mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:29:54 +01:00
Make i18n-js configuration compatible with 4.x
This commit is contained in:
parent
a8c1961af3
commit
591a912666
2 changed files with 6 additions and 9 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -24,7 +24,7 @@ coverage/
|
||||||
*~
|
*~
|
||||||
|
|
||||||
# dont push generated js translations to repository
|
# dont push generated js translations to repository
|
||||||
/app/javascript/retrospring/i18n.ts
|
/app/javascript/retrospring/i18n.json
|
||||||
|
|
||||||
# every fucking time, dolphin
|
# every fucking time, dolphin
|
||||||
.directory
|
.directory
|
||||||
|
|
|
@ -21,12 +21,9 @@
|
||||||
# If you're running an old version, you can use something
|
# If you're running an old version, you can use something
|
||||||
# like this:
|
# like this:
|
||||||
#
|
#
|
||||||
fallbacks: :default_locale
|
|
||||||
|
|
||||||
export_i18n_js: false
|
|
||||||
|
|
||||||
translations:
|
translations:
|
||||||
- file: 'app/javascript/retrospring/i18n.ts'
|
- file: 'app/javascript/retrospring/i18n.json'
|
||||||
only: ['*.voc.*', '*.frontend.*', '*.views.actions.*']
|
patterns:
|
||||||
prefix: "import I18n from 'i18n-js'\nimport Cookies from 'js-cookie'\n"
|
- '*.voc.*'
|
||||||
suffix: "I18n.defaultLocale = 'en';\nI18n.locale = Cookies.get('hl') || 'en';\nexport default I18n"
|
- '*.frontend.*'
|
||||||
|
- '*.views.actions.*'
|
Loading…
Reference in a new issue