fnando / i18n-json

Export I18n translations to JSON. A perfect fit if you want to export translations to JavaScript.
1 stars 0 forks source link

No changes reflected in json after rails boot #2

Open eelkevdbos opened 2 years ago

eelkevdbos commented 2 years ago

Using the following config:

translations:
  - file: app/assets/locales/:locale/application.json
    patterns:
      - "*"
      - "!admin*"
      - "!rails*"

Initial translations are generated correctly using

$ I18nJSON.call(config_file: "config/i18n.yml")

However, subsequent changes to a locale file (in config/locales) do not change the json output. Even weirder, when I completely remove the json files previously outputted and reinvoke I18nJSON.call the old/original json is again generated. The same behavior holds for I18nJSON.listen.

Important: Rebooting rails and or starting a new rails console session does trigger actual changes, but only once for that session.

fnando commented 2 years ago

Hey!

I merged this repo into https://github.com/fnando/i18n-js/tree/v4, and this particular bug has been fixed on that branch.

Can you please replace i18n-json with i18n-js v4 and follow that one readme instead?

To avoid any further confusion, I'll archive this repo. Sorry for the trouble!