Skip to content

Latest commit

 

History

History
225 lines (169 loc) · 8.32 KB

CHANGELOG.md

File metadata and controls

225 lines (169 loc) · 8.32 KB

Changelog

v0.19.1

  • Fix warnings on Elixir v1.14+
  • Rename ex-autogen to elixir-autogen and make sure elixir-autogen is added to existing translations

v0.19.0

  • Remove the :one_module_per_locale option in favor of :split_module_by and :split_module_compilation
  • Make Gettext.dngettext/6 bindings argument optional (effectively introducing Gettext.dngettext/5)
  • Preserve the fuzzy translation flag when merging
  • Add the --check-unextracted flag to mix gettext.extract, which is useful in CI and similar
  • Place each translation reference on its own line in extracted PO files
  • Make the interpolation module customizable via the :interpolation configuration option
  • Use a different flag to detect autogenerated translations (ex-autogen)
  • Update gettext.extract to correctly extract on recompilation for Elixir 1.13+

v0.18.2

  • Allow plural forms to be set for the :gettext application
  • Use Application.compile_env/3 if available

v0.18.1

  • Allow default domain to be configurable
  • Improve parallelism when compiling modules

v0.18.0

  • Allow sorting strings by msgid
  • Add :allowed_locales to restrict the locales bundled in the backend

v0.17.4

  • Do not change the return types of *_noop macros (regression in v0.17.2 and v0.17.3)
  • Fix dialyzer warnings

v0.17.3

  • Add lgettext/4 back which was removed in v0.17.2 - note lgettext/4 is private API and may be removed in future once again

v0.17.2

  • Support pgettext
  • Consider extracted comments when merging templates during extraction

v0.17.1

  • Store the msgctxt value in translation and dump it when dumping translations
  • Fix a bug when dumping references
  • Improve code generation
  • Preserve whitespace in translation flags

v0.17.0

  • Require Elixir 1.6 and later
  • Add stats reporting when merging PO files

v0.16.1

  • Optimize default locale lookup

v0.16.0

  • Fix bugs related to expanding arguments to Gettext macros
  • Fix a bug where you couldn't have filenames with colons in them in reference comments
  • Add handle_missing_translation/4 and handle_missing_plural_translation/6 callbacks to Gettext backends
  • Fix a bug in mix gettext.extract, which was ignoring the --merge option

v0.15.0

  • Generate correct plural forms when dumping new translations in PO files
  • Fix a bug where we were losing translator comments for fuzzy-merged translations
  • Don't make an exact match when merging prevent later fuzzy matches
  • Allow multiple translations to fuzzy-match against the same translation when merging
  • Bump the Elixir requirement to v1.4 and on

v0.14.1

  • Copy flags from existing translations when merging translations

v0.14.0

  • Introduce a global locale (per-process) for all Gettext backends
  • Warn when compiling and raise at runtime for missing plural forms
  • Separate flags with commas when dumping and parsing .pot files
  • Add support for extracted comments via gettext_comment/1
  • Require Elixir v1.3 and fix warnings
  • Improve compilation time of Gettext backends in roughly 20%
  • Add :one_module_per_locale for parallel compilation of backends (requires Elixir v1.6)
  • Use the elixir-format flag to mark autogenerated translations

v0.13.1

  • Fix a bug with Dialyzer specs for the Gettext.Backend.ngettext_noop/2 callback
  • Parse msgctxt entries in PO and POT files so that they don't cause syntax errors, but ignore them in the parsed result

v0.13.0

  • Add the gettext_noop/1, dgettext_noop/2, ngettext_noop/3, and dngettext_noop/4 macros to Gettext backends. These macros can be used to mark translations for extractions without translating the given string

v0.12.2

  • Fix a bug where we failed miserably with a "no process" error when extracting translations without having the :gettext compiler run
  • Slightly revisit the indentation of subsequent literal strings in dumped PO(T) files; before, they were dumped one per line, indented one level more than the parent translation, while now they're indented at the same level as the parent translation

v0.12.1

  • Ensure the Gettext application is started before running Mix tasks

v0.12.0

  • Drop support for Elixir 1.1 and require ~> 1.2
  • Add :compiler_po_wildcard to explicitly choose the po files that are tracked by the compiler
  • Allow the developer to configure what happens when there are missing bindings in the translation. The default has been changed to log and return the incomplete string instead of raising
  • Move the configuration for the :gettext application to compile-time config in project/0 in mix.exs (under the :gettext key, with configuration options :excluded_refs_from_purging, :compiler_po_wildcard and :fuzzy_threshold)
  • Show the file name in syntax errors when running mix gettext.extract and mix gettext.merge
  • Don't print tokens as Erlang terms in syntax error when running mix gettext.extract and mix gettext.merge
  • Allow duplicate interpolation keys
  • Raise when the domain is not a binary at compile-time
  • Fix many dialyzer warnings
  • No longer traverse directories given to gettext.merge recursively (from now on gettext.merge expect specific locale directories)
  • Re enable the "compile" task in mix gettext.extract
  • Ensure translations are tracked to the proper child app when using umbrella apps

v0.11.0

  • Polish so many docs!
  • Make an error in Gettext.put_locale/2 clearer
  • Pluralize x_Y locales as x, but fail with Gettext.Plural.UnknownLocaleError for any other unknown locale
  • Add a Gettext.Backend behaviour (automatically implemented if a module calls use Gettext)
  • Allow whitelisting of references via the :excluded_refs_from_purging option in the :gettext application config

v0.10.0

  • Emit warnings when the domain passed to one of the *gettext macros has slashes in it (as we don't support domains in subdirectories).
  • Discard dangling comments when parsing/dumping PO(T) files (dangling comments are comments that are not followed by a transaction they can be attached to).
  • Updated informative comments for newly generated PO/POT files.

v0.9.0

  • Strip ## comments from POT files when they're being merged into PO files; these comments are comments meant to be generated by tools or directed at developers (so they have no use for translators in PO files).
  • Add informative comments at the top of newly generated PO/POT files.
  • Add Gettext.known_locales/1
  • Fix a bug with PO parsing when the PO file starts with a BOM character (which broke the parser, now a warning is issued).

v0.8.0

  • Fix a bug with the *gettext macros, which raised an error when given compile-time strings in the form of ~s/~S sigils.
  • Create missing locale directories (for example, en/LC_MESSAGES) when running the gettext.merge Mix task.
  • Fallback to default translations (that is, the msgid) when the msgstr (or one or more msgstr strings for plural translations) is empty.

v0.7.0

  • When dumping PO files, dump as many references as possible on one line, wrapping at the 80th column
  • Parse multiple references in the same reference comment
  • Remove Gettext.locale/0-1 and Gettext.with_locale/2 in favour of Gettext.get_locale/1, Gettext.put_locale/2, and Gettext.with_locale/3 which now work by setting/getting the locale on a per-backend basis (instead of a global one)
  • Remove the :default_locale config option for the :gettext application in favour of configuring the :default_locale for backends tied to their :otp_app (for example, config :my_app, MyApp.Gettext, default_locale: "pt_BR")

v0.6.1

  • Fix a bug with the mix gettext.merge task that was failing in Elixir v1.1.1 because 0.5 in 0..1 returns false with it

v0.6.0

  • Add a :flags field to the Gettext.PO.Translation and Gettext.PO.PluralTranslation structs
  • Add support for fuzzy matching translations in gettext.merge and gettext.extract --merge
  • Add the :fuzzy_threshold configuration option for the :gettext application

v0.5.0

  • Initial release