Skip to content

Releases: Cropster/ember-l10n

v3.0.1

21 Jan 07:33
Compare
Choose a tag to compare
  • Add explicit @glimmer/syntax dependency

v3.0.0

28 Nov 12:26
Compare
Choose a tag to compare

This release includes two major changes:

  1. 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.

  2. 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

  1. Add --include-patterns option for ember l10n:extract. Example usage: ember l10n:extract --include-patterns 'app/translated-things'

  2. Remove --exclude-patterns option for ember l10n:extract. Instead, use --include-patterns to manually achieve the same effect.

v2.1.6

05 Nov 09:59
Compare
Choose a tag to compare
  • Ensure translations work without a plural-forms header present

v2.1.5

30 Oct 14:54
Compare
Choose a tag to compare

v2.1.4

24 Oct 14:32
Compare
Choose a tag to compare
  • Strip comments out of JSON files when using ember l10n:convert command to reduce file size #46

v2.1.3

11 Oct 15:16
Compare
Choose a tag to compare
  • 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

14 Sep 07:39
Compare
Choose a tag to compare
  • Sanitize message ids to fix messages with newlines in their IDs

v2.1.1

29 Aug 07:21
Compare
Choose a tag to compare
  • Added JSON validation for ember l10n:convert command #38
  • Added first chunk of node tests for ember l10n:extract command #37

v2.1.0

23 Jul 17:54
Compare
Choose a tag to compare
  • 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 and gettext-parser. Existing apps may have to remove these dependencies manually.

v2.0.5

22 May 11:19
Compare
Choose a tag to compare
  • Better debug information for CLI #30
  • Fixed change counter in ember l10n:sync