aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings2/settings-main.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-03 12:12:55 -0500
committerGitHub <noreply@github.com>2021-01-03 12:12:55 -0500
commit8e304b83c685dde17a00d402877a21303b7c11f2 (patch)
tree0b2123575502c3e3cb5127582b03e9c196c9891d /ext/bg/js/settings2/settings-main.js
parenteda8534e195d653ee0dea36f70caed0d8d49acf1 (diff)
Translator regex replacements (#1199)
* Add support for regex replacements during the translation process * Allow assignment of textReplacements * Rename * Set up test data * Write expected data * Set up options * Prevent infinite loop if regex matches empty string * Implement setting controller * Add support for testing pattern replacements
Diffstat (limited to 'ext/bg/js/settings2/settings-main.js')
-rw-r--r--ext/bg/js/settings2/settings-main.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/bg/js/settings2/settings-main.js b/ext/bg/js/settings2/settings-main.js
index 1a719edd..1b3bfaa0 100644
--- a/ext/bg/js/settings2/settings-main.js
+++ b/ext/bg/js/settings2/settings-main.js
@@ -36,6 +36,7 @@
* SettingsDisplayController
* StatusFooter
* StorageController
+ * TranslationTextReplacementsController
* api
*/
@@ -120,6 +121,9 @@ async function setupGenericSettingsController(genericSettingController) {
const secondarySearchDictionaryController = new SecondarySearchDictionaryController(settingsController);
secondarySearchDictionaryController.prepare();
+ const translationTextReplacementsController = new TranslationTextReplacementsController(settingsController);
+ translationTextReplacementsController.prepare();
+
await Promise.all(preparePromises);
document.documentElement.dataset.loaded = 'true';