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/i18n-config.toml b/i18n-config.toml
index 8c02374..dd55467 100644
--- a/i18n-config.toml
+++ b/i18n-config.toml
@@ -1,11 +1,22 @@
base_path = "."
+# NOTE: Keep in sync with lit-localize.json
locales = [
+ "ar",
"ca",
+ "de",
"es",
- "ru",
+ "fr",
+ "id",
+ "it",
+ "ja",
+ "ko",
+ "pl",
"pt_BR",
- "pt_PT",
+ "ru",
+ "th",
+ "tr",
+ "vi",
]
branches = [
@@ -19,3 +30,6 @@
[[paths]]
reference = "cws/en/listing-description.lang"
l10n = "cws/{android_locale}/listing-description.lang"
+
+[[paths]]
+ l10n = "src/lit-locales/source/{android_locale}.xlf"