We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Reducing diff noise from Gettext translation files
almirsarajcic
Created
If you’ve been using Gettext in your Elixir application, you quickly realized most of the diff in your PRs comes down to .po and .pot files because of all the references to strings in your app. These references need to be updated whenever you move your code around or add new code.
There’s an option to avoid that.
In your mix.exs
file add
def project do
[
# ...
gettext: [write_reference_line_numbers: false]
]
end
With that change
#: lib/myapp_web/live/hello_live.html.heex:2
#, elixir-autogen, elixir-format
becomes
#: lib/myapp_web/live/hello_live.html.heex
#, elixir-autogen, elixir-format
Recently, we’ve managed to solve this problem here:
https://github.com/3Stones-io/omedis/pull/433/files
There’s also an option to remove these reference comments completely called :write_reference_comments
.
https://hexdocs.pm/gettext/Gettext.html#module-mix-tasks-configuration
Copy link
copied to clipboard