Skip to content

Document :on_obsolete and :store_previous_message_on_fuzzy_match as merge flags only - #458

Merged
whatyouhide merged 2 commits into
elixir-gettext:mainfrom
oliver-kriska:merge-project-config
Dec 4, 2026
Merged

whatyouhide merged 2 commits into
elixir-gettext:mainfrom
oliver-kriska:merge-project-config

Conversation

@oliver-kriska

@oliver-kriska oliver-kriska commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor
  • :on_obsolete and :store_previous_message_on_fuzzy_match are listed in the Gettext module under "Mix tasks configuration", but mix gettext.merge has only ever read them from the command line. Setting them in mix.exs does nothing.
  • This removes the two entries from the configuration list and points to the --on-obsolete and --store-previous-message-on-fuzzy-match flags instead.
  • Docs only. No behaviour changes.

The first version of this PR made the task read both options from the project configuration. Following the review, it now fixes the docs instead. mix gettext.extract --merge forwards the flags to the merge task, so they can be set once in a Mix alias.

lib/gettext.ex, "Mix tasks configuration"
Before :on_obsolete and :store_previous_message_on_fuzzy_match listed as project options
After a short paragraph saying they are not project options, naming the two flags and linking Mix.Tasks.Gettext.Merge

Checks

  • The diff against main is lib/gettext.ex only (+4/−7).
  • mix format --check-formatted, mix compile --warnings-as-errors and mix test pass (194 passed).

🤖 Generated with Claude Code

… project config

Both options are documented as :gettext project configuration, but
mix gettext.merge only read them from the command line. The flags
still override the configuration.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@josevalim

Copy link
Copy Markdown
Contributor

Maybe we should update the docs? Configuration causes recompilation so unless we want them as default I'd avoid new config.

Drop the project configuration lookup and remove :on_obsolete and
:store_previous_message_on_fuzzy_match from the configuration docs,
pointing to the mix gettext.merge flags.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@oliver-kriska oliver-kriska changed the title Read :on_obsolete and :store_previous_message_on_fuzzy_match from the project config Document :on_obsolete and :store_previous_message_on_fuzzy_match as merge flags only Dec 3, 2026
@oliver-kriska

Copy link
Copy Markdown
Contributor Author

Makes sense. I've changed this PR to fix the docs instead: the two options are gone from the project configuration list, with a pointer to the --on-obsolete and --store-previous-message-on-fuzzy-match flags. gettext.extract --merge already forwards them, so nothing changes in behaviour.

@whatyouhide
whatyouhide merged commit b677e5b into elixir-gettext:main Dec 4, 2026
2 checks passed
@whatyouhide

Copy link
Copy Markdown
Contributor

Thank you @oliver-kriska.

@oliver-kriska

Copy link
Copy Markdown
Contributor Author

Thank you @oliver-kriska.

You're welcome. Thanks for this library and work on Elixir. Sorry that my Claude went wild and creating more PRs. I told him to investigate our main big project and gettext to find out what can improve gettext and our implementation of gettext thanks to code what we have and our usage.

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.

3 participants