Holidays: files and localization

  1. Holidays for countries are placed in file “holidays.xml.in”:
    https://gramps-project.org/wiki/index.php/Calendar_tools_holidays

  2. GRAMPS have two files in “data” dir:
    holidays.xml
    holidays.xml.in

  3. Gramps.pot use file “holidays.xml.in.h” in comments (maybe from old version):
    #: …/data/holidays.xml.in.h:3

  4. Setup.py and Libholiday.py use “holidays.xml”:
    _FILES = (‘data/tips.xml’, ‘data/holidays.xml’)
    holiday_file = ‘holidays.xml’

  5. Update_po.py use “holidays.xml.in.h”:
    with open(’…/data/holidays.xml.in.h’, ‘w’) as holidays:

Questions:

  1. What file I must use for add new holiday?
  2. What file must be use in “pot” and all “po” files?
  3. Can I delete not used “holidays.xml.in” file?
  4. Can I change Wiki?
  5. Can I change “holidays.xml” file for format:
    “date name=NAME value=VALUE type=TYPE offset=OFFSET if=EXPRESSION”

P.S. File “tips.xml” have similar problem…

The “.xml.h" files are automatically created from the ".xml” files. They should probably not be in the repository, as this is indeed confusing. The “intltool-update” utility creates them. After which the update_po.py utility gets run to actually extract the translatable strings. So only make changes to the *.xml files.

See https://gramps-project.org/wiki/index.php/What_to_do_for_a_release#Translation_update

This is a Linux tool, correct? The wiki only mentions it operationally. (Although there is a note of needing to install it for Fedora 8 to 10.) So I’m assuming it isn’t universally installed for all Linux flavors. It neglects to introduce where the tool is obtained.

Also, is there a port available for persons wanting to translate on the Windows or macOS platforms?

It appears that I was wrong about my last message. The correct original file to edit is the “**.xml.in” file. This is converted to a “*.xml.in.h” file in update_po.py which is then processed to create the gramps.pot.
During setup.py execution, the “*.xml.in” files are converted, to “*.xml” for use by Gramps during runtime.

Regarding where intltool comes from; for Windows, part of the process is to install via
pacman -S perl-XML-Parser
pacman -S intltool
as described in
https://gramps-project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2

I don’t know how this is done for OSX builds.

Found a Install intltool on Mac OSX page.

You’re certainly welcome to make any changes that might make the wiki more helpful. If you prefer, you can add the technical suggestions to the “discussion” page. (

The Translations section of the Calendar tools holidays page could be improved. But the page is already intricate … so specialized detail inserted there might be overlooked. Since Translation applies only to the language skilled subset of readers, it is better to place those instuctions in a separate document. So, you could create a “How do I…” page and link it to the original (superficial) Translations section when finalized.

  1. Create a WikiContributor account on Gramps-Project.org
  2. Log in

Yes.
Update_po.py take “holidays.xml.in” (551 rows) and create temp file “holidays.xml.in.h” (48 rows):
char *s = N_(“Bulgaria”);
char *s = N_(“Canada”);
char *s = N_(“Chile”);
char *s = N_(“China”);

Then insert this 48 rows in “gramps.pot” in format:
…temp_file_name:temp_file_row_number
Must be:
…holidays.xml:holidays.xml_row_number

We see:
#: …/data/holidays.xml.in.h:1
#: …/data/holidays.xml.in.h:2
#: …/data/holidays.xml.in.h:3

Must be:
#: …/data/holidays.xml:3
#: …/data/holidays.xml:52
#: …/data/holidays.xml:84

So, update_po.py use holidays.xml.in.
Setup.py use other file - holidays.xml.

String for *.pot taking from one file, but Gramps use other file.
And PO-editor can’t use temp source file holidays.xml.in.h.
P.S. I not use PO-editor, xed only and not saw this problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.