Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 20, 2022

This PR contains the following updates:

Package Type Update Change
gettext (source) prod minor == 0.19.1 -> == 0.26.2

Release Notes

elixir-gettext/gettext (gettext)

v0.26.2

Compare Source

  • Introduces warning if plural messages are defined with the same singular
    message and conflicting plural messages.
    • Improves performance by striping not required metadata when compiling the
      Gettext backend.

v0.26.1

Compare Source

  • Address backwards incompatible changes in previous release

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 controller imports 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 then importing that to use its macros, you need to:

  1. Define a Gettext backend with use Gettext.Backend
  2. Import and use its macros with use Gettext, backend: MyApp.Gettext.
Before and After

Before this release, code using Gettext used to look something like this:

defmodule MyApp.Gettext do
  use Gettext, otp_app: :my_app
end

defmodule MyAppWeb.Controller do
  import MyApp.Gettext
end

This creates a compile-time dependency for every module that imports the Gettext backend.

With this release, the above turns into:

defmodule MyApp.Gettext do
  use Gettext.Backend, otp_app: :my_app
end

defmodule MyAppWeb.Controller do
  use Gettext, backend: MyApp.Gettext
end

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 run
mix 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:

  • Add 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.
  • Document lgettext/5 and lngettext/7 callbacks in Gettext.Backend. These get generated in every Gettext backend.
  • Add the Gettext.domain/0 type.

v0.25.0

Compare Source

  • Run merging for mix gettext.extract's POT files even if they are unchanged.
    • Allow Expo 1.0+.

v0.24.0

Compare Source

  • Handle singular and plural messages with the same msgid as the same
    message.

    This change produces a Expo.PO.DuplicateMessagesError if you already have
    messages with the same singular msgid. This can be solved by calling the
    expo.msguniq mix task on your .po file:

    mix expo.msguniq \
      priv/gettext/LOCALE/LC_MESSAGES/DOMAIN.po \
      --output-file priv/gettext/LOCALE/LC_MESSAGES/DOMAIN.po

v0.23.1

Compare Source

  • Use the Hex version of the excoveralls dependency.

v0.23.0

Compare Source

  • Add the :custom_flags_to_keep Gettext option.

v0.22.3

Compare Source

  • Fix a bug with extracting translations in Elixir 1.15.0+.

v0.22.2

Compare Source

  • Use Code.ensure_compiled/1 instead of Code.ensure_loaded/1 for Elixir < 1.12 compatibility.
    • Ensure all modules are properly loaded for mix gettext.merge.
    • Fix a "protected" check when extracting translations.

v0.22.1

Compare Source

  • Put correct Plural-Forms header on gettext.merge for the first time.
    • Fix extractor crash in case of conflicting backends.
    • Fix to use the correct plural forms for multiple languages.
    • Update expo to ~> 0.4.0 to fix issues with empty msgstr.

v0.22.0

Compare Source

  • Deprecate (with a warning) the --plural-forms CLI option and the :plural_forms option in favor of --plural-forms-header and :plural_forms_header.
    • Supply the Plural-Forms header to Gettext.Plural callbacks.
    • Bump Expo requirement to ~> 0.3.0.
    • Add the types:
      • Gettext.Interpolation.bindings/0
      • Gettext.Error.t/0
      • Gettext.Plural.locale/0
      • Gettext.Plural.pluralization_context/0
      • Gettext.Plural.plural_info/0
    • Add the optional callbacks Gettext.Plural.init/1 and Gettext.Plural.plural_forms_header/1.
Bug fixes
  • Fix --check-up-to-date with msgids split in different ways.
  • Don't write the same file more than once in references when using write_reference_line_numbers: false.

v0.21.0

Compare Source

New features and improvements
  • Bump Elixir requirement to 1.11+.

  • Extract parsing and dumping of PO/POT files to the
    expo library, and start depending
    on that.

  • Support marking messages as obsolete with the new :on_obsolete Gettext
    configuration option.

  • Add the :write_reference_line_numbers Gettext configuration option.

  • Save the previous messages when there's a fuzzy match, with the new
    :store_previous_message_on_fuzzy_match Gettext configuration option.

  • Change :sort_by_msgid to accept false, :case_sensitive, or
    :case_insensitive and deprecate the true value.

Bug fixes
  • Sort messages independent of line splits when dumping PO files.

v0.20.0

Compare Source

  • Allow gettext_comment to be invoked multiple times
    • Dump flags after references in PO files
    • Deprecate compile.gettext in favor of __mix_recompile__?
Backwards incompatible changes
  • handle_missing_translation(locale, domain, msgid, bindings) callback
    signature was changed to handle_missing_translation(locale, domain, msgctxt, msgid, bindings) (it receives a new argument called msgctxt)

  • handle_missing_plural_translation(locale, domain, msgid, msgid_plural, n, bindings) callback signature was changed to
    handle_missing_plural_translation(locale, domain, msgctxt, msgid, msgid_plural, n, bindings) (it receives a new argument called msgctxt)


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Jul 20, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: mix.lock
Command failed: docker run --rm --name=renovate_a_sidecar --label=renovate_a_child --memory=3584m -v "/tmp/worker/70d669/6624be/repos/github/mike-works/phoenix-fundamentals":"/tmp/worker/70d669/6624be/repos/github/mike-works/phoenix-fundamentals" -v "/tmp/worker/70d669/6624be/cache":"/tmp/worker/70d669/6624be/cache" -e CONTAINERBASE_CACHE_DIR -w "/tmp/worker/70d669/6624be/repos/github/mike-works/phoenix-fundamentals" ghcr.io/containerbase/sidecar:9.26.2 bash -l -c "install-tool erlang 26.1.2.0 && install-tool elixir v1.15.7 && mix deps.update gettext"
warning: found quoted keyword "test" but the quotes are not required. Note that keywords are always atoms, even when quoted. Similar to atoms, keywords made exclusively of ASCII letters, numbers, and underscores and not beginning with a number do not require quotes
  mix.exs:52:7

warning: use Mix.Config is deprecated. Use the Config module instead
  config/config.exs:6

warning: Mix.Config.config/2 is deprecated. Use the Config module instead
  config/config.exs:9

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/config.exs:13

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/config.exs:21

warning: Mix.Config.import_config/1 is deprecated. Use the Config module instead
  config/config.exs:27

warning: use Mix.Config is deprecated. Use the Config module instead
  config/dev.exs:1

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/dev.exs:9

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/dev.exs:19

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/dev.exs:30

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/dev.exs:34

warning: Mix.Config.config/3 is deprecated. Use the Config module instead
  config/dev.exs:37

** (Mix) Hex dependency resolution failed

@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 4dfe227 to c22b7bb Compare March 18, 2023 06:01
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.20.0 chore(deps): update dependency gettext to == 0.22.1 Mar 18, 2023
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.22.1 chore(deps): update dependency gettext to == 0.22.2 Jun 1, 2023
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from c22b7bb to abba6ce Compare June 1, 2023 15:58
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from abba6ce to f4dfd9f Compare July 1, 2023 11:06
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.22.2 chore(deps): update dependency gettext to == 0.22.3 Jul 1, 2023
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.22.3 chore(deps): update dependency gettext to == 0.23.0 Aug 7, 2023
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from f4dfd9f to 2f4817a Compare August 7, 2023 16:51
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.23.0 chore(deps): update dependency gettext to == 0.23.1 Aug 16, 2023
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 2f4817a to 0362aa5 Compare August 16, 2023 13:00
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 0362aa5 to 2bbe45a Compare November 13, 2023 13:13
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.23.1 chore(deps): update dependency gettext to == 0.24.0 Dec 4, 2023
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 2bbe45a to 13f0068 Compare December 4, 2023 15:33
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 13f0068 to a8097e7 Compare August 5, 2024 18:04
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.24.0 chore(deps): update dependency gettext to == 0.25.0 Aug 5, 2024
@renovate
Copy link
Contributor Author

renovate bot commented Aug 5, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: mix.lock
Command failed: mix deps.update gettext
    warning: found quoted keyword "test" but the quotes are not required. Note that keywords are always atoms, even when quoted. Similar to atoms, keywords made exclusively of ASCII letters, numbers, and underscores and not beginning with a number do not require quotes
    │
 52 │      "test": ["ecto.create --quiet", "ecto.migrate", "test"]]
    │      ~
    │
    └─ mix.exs:52:6

    warning: use Mix.Config is deprecated. Use the Config module instead
    │
  6 │ use Mix.Config
    │ ~~~~~~~~~~~~~~
    │
    └─ config/config.exs:6

    warning: Mix.Config.config/2 is deprecated. Use the Config module instead
    │
  9 │ config :eblog,
    │ ~~~~~~~~~~~~~~
    │
    └─ config/config.exs:9

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 13 │ config :eblog, Eblog.Endpoint,
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/config.exs:13

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 21 │ config :logger, :console,
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/config.exs:21

    warning: Mix.Config.import_config/1 is deprecated. Use the Config module instead
    │
 27 │ import_config "#{Mix.env}.exs"
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/config.exs:27

    warning: use Mix.Config is deprecated. Use the Config module instead
    │
  1 │ use Mix.Config
    │ ~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:1

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
  9 │ config :eblog, Eblog.Endpoint,
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:9

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 19 │ config :eblog, Eblog.Endpoint,
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:19

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 30 │ config :logger, :console, format: "[$level] $message\n"
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:30

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 34 │ config :phoenix, :stacktrace_depth, 20
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:34

    warning: Mix.Config.config/3 is deprecated. Use the Config module instead
    │
 37 │ config :eblog, Eblog.Repo,
    │ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    │
    └─ config/dev.exs:37

** (Mix) Hex dependency resolution failed

@renovate renovate bot force-pushed the renovate/gettext-0.x branch from a8097e7 to 43e5a41 Compare August 20, 2024 09:31
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.25.0 chore(deps): update dependency gettext to == 0.26.0 Aug 20, 2024
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from 43e5a41 to adb5586 Compare August 20, 2024 14:31
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.26.0 chore(deps): update dependency gettext to == 0.26.1 Aug 20, 2024
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from adb5586 to ebaa59b Compare November 14, 2024 02:01
@renovate renovate bot changed the title chore(deps): update dependency gettext to == 0.26.1 chore(deps): update dependency gettext to == 0.26.2 Nov 14, 2024
@renovate renovate bot force-pushed the renovate/gettext-0.x branch from ebaa59b to bd7ffe8 Compare July 19, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant