Skip to content

Build your personal knowledge base with Trilium Notes

i18n(time_selector): add i18n for minimum_input

Panagiotis Papadopoulosa0c2715980a1
diff --git a/src/public/app/widgets/type_widgets/options/time_selector.ts b/src/public/app/widgets/type_widgets/options/time_selector.ts
index 94f607b995..a3ec7c9bb4 100644
--- a/src/public/app/widgets/type_widgets/options/time_selector.ts
+++ b/src/public/app/widgets/type_widgets/options/time_selector.ts
@@ -131,7 +131,7 @@ export default class TimeSelector extends OptionsWidget {
private setInternalTimeInSeconds(time: number) {
if (time < this.minimumSeconds) {
- toastService.showError(`Entered time needs to be at least ${this.minimumSeconds} seconds.`);
+ toastService.showError(t("time_selector.minimum_input", {minimumSeconds: this.minimumSeconds}));
return this.internalTimeInSeconds = this.minimumSeconds;
}
return this.internalTimeInSeconds = time;
diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json
index 1a5d92b324..32474d5c13 100644
--- a/src/public/translations/en/translation.json
+++ b/src/public/translations/en/translation.json
@@ -1656,6 +1656,7 @@
"days": "Days"
},
"time_selector": {
- "invalid_input": "The entered time value is not a valid number."
+ "invalid_input": "The entered time value is not a valid number.",
+ "minimum_input": "The entered time value needs to be at least {{minimumSeconds}} seconds."
}
}