Skip to content

Commit

Permalink
Do not use global getLocaleString in SurveyError classes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Feb 24, 2025
1 parent 1317c34 commit 79f6eea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/survey-core/src/error.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { getLocaleString } from "./surveyStrings";
import { SurveyError } from "./survey-error";
import { ISurveyErrorOwner } from "./base-interfaces";

Expand Down Expand Up @@ -53,7 +52,7 @@ export class ExceedSizeError extends SurveyError {
return "exceedsize";
}
public getDefaultText(): string {
return (<any>getLocaleString("exceedMaxSize"))["format"](this.getTextSize());
return (<any>this.getLocalizationString("exceedMaxSize"))["format"](this.getTextSize());
}
private getTextSize() {
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
Expand Down Expand Up @@ -148,7 +147,7 @@ export class MinRowCountError extends SurveyError {
return "minrowcounterror";
}
protected getDefaultText(): string {
return (<any>getLocaleString("minRowCountError"))["format"](this.minRowCount);
return (<any>this.getLocalizationString("minRowCountError"))["format"](this.minRowCount);
}
}
export class KeyDuplicationError extends SurveyError {
Expand Down

0 comments on commit 79f6eea

Please sign in to comment.