- Transfer the code to the "change" namespace (only an update to
mix.exs
).
- Upgrade
ex_cldr
to version 2. From the PR description (by @barrieloydall):This PR updates ex_cldr to the latest 2.x` version which requires a few changes beyond a number version update.
Some initial reading: https://github.com/elixir-cldr/cldr#getting-started
We are now required to a have a backend module, which i've placed in cldr_backend.ex, this essentially acts as the public interface to the CLDR functionality and is used for some of the configuration now.
Only
json_library
anddefault_locale
can be defined in config, anything else will generate warnings for future deprecation.As we use Linguist within a couple of other apps, we need to specify an
otp_app
name. This allows for related config to be passed in by our other apps. This keeps linguist just using the 3 locales it previously defined:config :linguist, Linguist.Cldr, locales: ["fr", "en", "es"]
.Now also defining the
data_dir
, and also ignoring it from git. Without this, I would run into an issue which I should go back and validate... - Add sobelow to the project. Address the issues it flagged.
- Add ex_doc and tidy up the generated documentation output
- Add helper function for normalizing locales argument in MemorizedVocubalary.t/3. Locales will be made into the format "es-ES" or "es"
- LARGE SCALE REFACTOR described in this pull request
- Bug Fixes
- Fix bug causing interpolations at beginning of string to be missed
-
Enhancements
- Add
locale
macro for locale definitions - Support String filepath locale source for automated evaluation
- Suppport arbitrary locale source to fetch keyword list of translations, ie function call, Code.eval_file, etc.
- Add
t!
lookups whereNoTranslationError
is raised if translation not found
- Add
-
Backwards incompatible changes
- Rename
Linguist.Compiler
toLinguist.Vocabulary
- Locale definitions now required to use
locale/2
macro instead ofuse
options - Update
t
lookups to return{:ok, translation}
or{:error, :no_translation}
- Rename
Initial release