Add lit components localization
Localization is performed via the @lit/localize package, which has been
integrated into the repo. A I18nLitElement class which extends
LitElement has been included, which automatically sets up the
localization.
This CL also introduces localization to the flattenThreads feature.
Fixed: twpowertools:157
Change-Id: If01540b9c8d70876a648aa002a1e0a5bede8f383
diff --git a/lit-localize.json b/lit-localize.json
new file mode 100644
index 0000000..1bbc7a7
--- /dev/null
+++ b/lit-localize.json
@@ -0,0 +1,36 @@
+{
+ "$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
+ "sourceLocale": "en",
+ "targetLocales": [
+ "ar",
+ "ca",
+ "de",
+ "es",
+ "fr",
+ "id",
+ "it",
+ "ja",
+ "ko",
+ "pl",
+ "pt_BR",
+ "ru",
+ "th",
+ "tr",
+ "vi"
+ ],
+ "inputFiles": [
+ "src/contentScripts/communityConsole/flattenThreads/components/**/*.js",
+ "src/contentScripts/communityConsole/workflows/components/**/*.js",
+ "src/contentScripts/communityConsole/threadToolbar/components/**/*.js",
+ "src/workflows/manager/components/**/*.js"
+ ],
+ "output": {
+ "mode": "runtime",
+ "outputDir": "./src/lit-locales/generated",
+ "localeCodesModule": "./src/lit-locales/generated/locales.js"
+ },
+ "interchange": {
+ "format": "xliff",
+ "xliffDir": "./src/lit-locales/source"
+ }
+}