Unable to see i18n strings during development

AI-generated summary

The user RGJ reports an issue where their development environment fails to recognize new i18n strings from a plugin’s client.en.yml file, displaying the raw key [en.my_plugin.description_placeholder] instead of the translated text. The strings appear correctly in the admin customization panel, and changes made there are reflected in the browser, but the initial file is not picked up. This issue resolved after a reboot RGJ. david suggests a potential fix via a specific pull request, indicating a known caching or loading problem in the development setup.

When I start developing a new plugin, my dev environment does not pick up the client.en.yml strings that belong to the new plugin. It does pick up all other i18n strings, both from core and for other plugins.

I’ve had this before when introducing a new client.en.yml file and then the problem went away after a number of hours or after I did something (if only I knew what). When the problem goes away, it picks up updates to the i18n strings without any problems. It’s just like it takes something (or time) before the file is seen.

config/locales/client.en.yml

en:
  js:
    my_plugin:
      description_placeholder: "Enter description"

hbs file:

    <Input
      type="text"
      ...
      placeholder={{i18n "my_plugin.description_placeholder"}}
    />

Browser shows:

[en.my_plugin.description_placeholder]

Admin - Customize - Text:

shows the correct string (!!!) with key js.my_plugin.description_placeholder

When I change the string in admin - customize - text, the browser shows the modification.
When I revert the changed string, the browser goes back to [en.my_plugin.description_placeholder]

I’ve restarted bin/ember-cli
I’ve restarted rails

When I modify the file, ember-cli notices and outputs file changed client.en.yml

Does this sound familiar to anyone?

Just now, a reboot resolved the issue…

This should solve the problem:

https://github.com/discourse/discourse/pull/29468