Update dependency gettext to v1 #104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "renovate/gettext-1.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
~> 0.24
->~> 1.0
Release Notes
elixir-gettext/gettext (gettext)
v1.0.0
Compare Source
This is the first 1.0 release of Gettext, a silly 10 years (and 6 months) after we started working on it. There are very few changes from the latest 0.26 release, and none of them are breaking.
Here are the new goodies:
"Hello " <> ~s(world)
).mix gettext.extract
to two minutes.Gettext.put_locale!/1
.Happy 10+ years of Elixir translations everyone! 🎉
v0.26.2
Compare Source
message and conflicting plural messages.
Gettext backend.
v0.26.1
Compare Source
v0.26.0
Compare Source
This release changes the way you use Gettext. We're not crazy: it does so because doing so makes it a lot faster to compile projects that use Gettext.
The changes you have to make to your code are minimal, and the old behavior is deprecated so that you will be guided on how to update.
The reason for this change is that it removes compile-time dependencies from modules that used to
import
a Gettext backend. In applications such as Phoenix applications, where every view and controllerimport
s the Gettext backend, this change means a lot less compilation when you make translation changes!Here's the new API. Now, instead of defining a Gettext backend (
use Gettext
) and thenimport
ing that to use its macros, you need to:use Gettext.Backend
use Gettext, backend: MyApp.Gettext
.Before and After
Before this release, code using Gettext used to look something like this:
This creates a compile-time dependency for every module that
import
s the Gettext backend.With this release, the above turns into:
We are also updating Phoenix generators to use the new API.
If you update Gettext and still use
use Gettext, otp_app: :my_app
to define a backend, Gettext will emit a warning now.Migration with Igniter
If your project is using
igniter
, you can runmix igniter.update_gettext
to automatically migrate to the new API.
Detailed Changelog
This is a detailed list of the new things introduced in this release:
Gettext.Macros
, which contains all the macros you know and love (*gettext
). It also contains*gettext_with_backend
variants to explicitly pass a backend at compile time and keep extraction working.lgettext/5
andlngettext/7
callbacks inGettext.Backend
. These get generated in every Gettext backend.Gettext.domain/0
type.v0.25.0
Compare Source
mix gettext.extract
's POT files even if they are unchanged.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.