-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement /config/intl.js execution to get intl configurations (translations location, nesting, default locations, etc) #344
Comments
Hi @lifeart. Have you had any thoughts about how this might be implemented. I'm currently exploring improving this project to support translation keys that use the folder structure to namespace keys, ie for In order to know whether we should be namespacing the keys we need to get access to the Wondering if you've put any thought in to how we might go about doing this? (For reference, I've started knocking together a PR to explore what needs to be done to actually namespace the keys. It's a proof of concept more than anything as I've not written any language server code before. Just an FYI. |
Hi @achambers! Thank you for your initiative! I think it's really good! Simplest way is to do dynamic "import" for this file, later, we could use |
Fixes #344 Ember Intl exposes a configuration file which allows you to configure the localization setup. One such setting is `wrapTranslationsWithNamespace` which determines whether translation keys should have the folder names within the key names. #### `wrapTranslationsWithNamespace: false` (default) ```yml # translations/sub-folder/en-us.yml subFolder: foo: bar ``` ```js this.intl.t('subFolder.foo'); ``` #### `wrapTranslationsWithNamespace: true` ```yml # translations/sub-folder/en-us.yml subFolder: foo: bar ``` ```js this.intl.t('sub-folder.subFolder.foo'); ``` `wrapTranslationsWithNamespace: true` is not currently supported by this extension. This PR adds the ability, when `wrapTranslationsWithNamespace: true` is set in `app/config/ember-intl.js`, to support keys which have folders in their key names. Co-authored-by: Pat O'Callaghan <pat@intercom.io>
No description provided.
The text was updated successfully, but these errors were encountered: