Releases: Cropster/ember-l10n
v3.0.1
v3.0.0
This release includes two major changes:
-
It drops the dependency on ember-ajax (and thus on jQuery). Instead, we simply do a manual XMLHttpRequest. If your app runs in fastboot, you might need to overwrite this to make this work. For this, you can override the
ajaxRequest(fileName)
method, which is expected to return a promise that resolves to the JSON object from the given URL. -
It changes the extraction behavior. We now use AST to get translation strings from .js and .hbs files, which is much, much faster - in a big app this could go down from >20 minutes to 8 seconds. The changes are:
- Massively improved extraction time - in a big example app, extraction time was down from ~27 minutes to 8 seconds!
- Extraction from template literals now works - e.g. l10n.t(
translate this
) - Extraction will now throw on invalid syntax, instead of silently ignoring it
- Since extraction for .hbs & .js is now combined, it will correctly keep comments for both file types for a single translation
- We now also keep column position of translations, in addition to file name & row
For a more complete guide of the changes, see #43
-
Add
--include-patterns
option forember l10n:extract
. Example usage:ember l10n:extract --include-patterns 'app/translated-things'
-
Remove
--exclude-patterns
option forember l10n:extract
. Instead, use--include-patterns
to manually achieve the same effect.
v2.1.6
v2.1.5
v2.1.4
v2.1.3
- Improves the detectLocale function to better take sub-locales into account. This is necessary when dealing with e.g. Chinese, where zh_HK is a different language from zh_CN. Now, it will compare the list from
window.navigator.languages
(which returns something like['de-AT', 'de', 'en']
) with the list of allowed locales, and tries to pick the best one. - The service also exposes this functionality in a new function
guessBrowserLocale()
.
v2.1.2
v2.1.1
v2.1.0
- Dynamic dependency resolution (enables f.e. yarn workspaces)
- Improved windows support regarding dependency checks #29
- Improve/Normalize line numbers for PO across various OS
- Add support for extraction of TypeScript files #36
- Dependency cleanup
Notes for upgrading:
- With this release host apps no longer need to include
xgettext-template
andgettext-parser
. Existing apps may have to remove these dependencies manually.