- Now requires Elixir ~> 1.11
- Add Elixir 1.15 and OTP 25 to ci test matrix
- Upgrade
ex_cldr
to version 2.37 - Add mix docs to ci workflow, to ensure docs build after changes
- Add Elixir 1.13 OTP 24 to ci test matrix
- Remove unused
earmark
dep - Remove unnecessary
applications:
config causing error withmix docs
- Update dependencies + credo fixes
- Update readme, add status badges
- Updates docs and typo fixes
- Add dependabot and codeowner configs
Wow, I held on to this release waaaaaay too long. Sorry about that. Also, a huge thank you to @dolfinus for their contributes (and nudges)!
Here's what changed:
- removes the cldr compiler
- improved readme syntax highlighting
- much improved handling of locales as atoms or binaries
- remove warning about 'always matches' function
- stop unnecessary local file downloads
- automatically start the cldr application
- add CI pipeline with github actions
- setup CI to use ubuntu 18
- 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
- Support 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