python-holidays icon indicating copy to clipboard operation
python-holidays copied to clipboard

`make l10n` doesn't create translations for all `supported_languages`

Open ankushhKapoor opened this issue 8 months ago • 3 comments

Currently, running make l10n generates .po files only for the language set as default_language. However, it would be more efficient and contributor-friendly if .po files were generated for all supported_languages instead.

This would avoid the need to manually change the default_language and re-run the command for each language, especially when working on or reviewing translations across multiple languages.

Let me know what you think.

ankushhKapoor avatar Apr 07 '25 15:04 ankushhKapoor

I'd like to work on this

Wasif-Shahzad avatar Apr 07 '25 15:04 Wasif-Shahzad

@ankushhKapoor do you plan to finish this?

arkid15r avatar May 20 '25 18:05 arkid15r

@ankushhKapoor do you plan to finish this?

Hi @arkid15r , thank you for the follow-up! I’m currently out of station and don’t have access to my laptop. I plan to open a PR for this in about 8–10 days once I’m back. Appreciate your patience!

ankushhKapoor avatar May 20 '25 19:05 ankushhKapoor

This is addressed in https://github.com/vacanza/holidays/pull/2607

arkid15r avatar Jun 28 '25 18:06 arkid15r

This is addressed in #2607

I believe this isn't fixed. I just created the .po files for Palestine and I had to do the old process. @arkid15r

Wasif-Shahzad avatar Jul 02 '25 14:07 Wasif-Shahzad

Try l10n_helper.py script 😉

KJhellico avatar Jul 02 '25 14:07 KJhellico

I believe this isn't fixed. I just created the .po files for Palestine and I had to do the old process. @arkid15r

Check description of #2607

  1. Make sure that default_language and supported_languages are specified in code.
  2. Run make l10n or python scripts/l10n/generate_po_files.py (to create .pot file).
  3. Run python scripts/l10n/l10n_helper.py MM --create-po --overwrite (MM is the country code hereinafter). This will create .po files for all supported languages. If you don't need .csv files, you can stop here and just work with .po files using your usual methods. For en_US locale, translations will be retrieved from msg comments (!).

Read this carefully.

ankushhKapoor avatar Jul 02 '25 14:07 ankushhKapoor