From 591a912666fd2b2c34c63ffb28c4dcc779c7d3de Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 17 Sep 2022 15:16:41 +0200 Subject: [PATCH] Make i18n-js configuration compatible with 4.x --- .gitignore | 2 +- config/{i18n-js.yml => i18n.yml} | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) rename config/{i18n-js.yml => i18n.yml} (68%) diff --git a/.gitignore b/.gitignore index 46743497..499e744c 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ coverage/ *~ # dont push generated js translations to repository -/app/javascript/retrospring/i18n.ts +/app/javascript/retrospring/i18n.json # every fucking time, dolphin .directory diff --git a/config/i18n-js.yml b/config/i18n.yml similarity index 68% rename from config/i18n-js.yml rename to config/i18n.yml index 0a5cdfa3..c4b7c90d 100644 --- a/config/i18n-js.yml +++ b/config/i18n.yml @@ -21,12 +21,9 @@ # If you're running an old version, you can use something # like this: # -fallbacks: :default_locale - -export_i18n_js: false - translations: - - file: 'app/javascript/retrospring/i18n.ts' - only: ['*.voc.*', '*.frontend.*', '*.views.actions.*'] - prefix: "import I18n from 'i18n-js'\nimport Cookies from 'js-cookie'\n" - suffix: "I18n.defaultLocale = 'en';\nI18n.locale = Cookies.get('hl') || 'en';\nexport default I18n" + - file: 'app/javascript/retrospring/i18n.json' + patterns: + - '*.voc.*' + - '*.frontend.*' + - '*.views.actions.*'