Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,20 @@ attribute set, and all holiday names are wrapped with `tr`/`self.tr` helpers. Us
codes](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) when adding new languages. Copy the
generated template to all locale folders you're going to translate this country holiday names into
(e.g., for Argentina: holidays/locale/en/LC_MESSAGES/AR.po - note the file extension difference
here). Also copy the template to a default country language folder (e.g., for Argentina
holidays/locale/es/LC_MESSAGES) and leave it as is. After copying the .po files, open them with
your favorite .po file editor and translate accordingly. Don't forget to fill in the translation
file headers. Finally, update the list of supported translations for the country in the README.md.
here). Also copy the template to the default country or market language folder (e.g., for
Argentina `holidays/locale/es/LC_MESSAGES`) and leave holiday-name `msgstr` entries empty. After
copying the `.po` files, open them with your favorite `.po` file editor and translate the
**non-default** locales only. Don't forget to fill in the translation file headers. Finally, update
the list of supported translations for the country in the README.md.

!!! note "Default language `.po` files"

In this project, the `.po` file for each country or market's **default** language (the one that
matches that entity's `default_language` attribute) **intentionally** keeps `msgstr` values
empty for those messages. Holiday names are already authored in that language in the source
code; the catalog is still required for tooling and consistency. Please do not treat empty
`msgstr` lines there as missing work or duplicate the `msgid` text into `msgstr` unless
maintainers explicitly ask for a change.

If the translation already exists you'll just need to update it with the new template entries
(your .po file editor may help you to do that with no hassle).
Expand Down
Loading