Skip to content

Commit 2ce7bb9

Browse files
committed
Add hint to remove autogen comments from .pot file
1 parent 94e6acd commit 2ce7bb9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

guides/translations/translations.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ You can place the functions in a module of your choice. In this example, we use
4242

4343
You will also need to create a Gettext template file in your application. You can use the [this](https://github.com/naymspace/backpex/blob/main/priv/gettext/backpex.pot) template from our GitHub repository as it contains all the translations used by Backpex. Note that this file may contain unreleased translations, so be sure to select the tag that matches your version in the branch selection input in the top left corner.
4444

45+
> #### Warning {: .warning}
46+
>
47+
> If you copy the above mentioned `backpex.pot` file, you should remove the`elixir-autogen` comments. Otherwise, running the `gettext.extract --merge` task will remove the translations from your project.
48+
4549
## Modify texts (per `LiveResource`)
4650

4751
In addition to translating texts, Backpex provides a way to modify texts per LiveResource with the `c:Backpex.LiveResource.translate/1` callback.
@@ -63,4 +67,4 @@ def translate({"New %{resource}", opts}), do: gettext("Create %{resource}", opts
6367
> #### Info {: .info}
6468
>
6569
> Note that you cannot change form errors with the `translate/1` callback as you can already define a custom `translate_error` function
66-
> per field. See [error customization guide](guides/fields/error-customization.md) for detailed information.
70+
> per field. See [error customization guide](guides/fields/error-customization.md) for detailed information.

0 commit comments

Comments
 (0)