# Holidays: files and localization

**URL:** <https://gramps.discourse.group/t/holidays-files-and-localization/521>\
**Category:** Translation\
**Tags:** localization\
**Created:** [June 28, 2020, 11:27am UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521 "2020-06-28T11:27:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![PushKK](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/pushkk/32/1230_2.png) [@PushKK](https://gramps.discourse.group/u/PushKK)\
**Post date:** [June 28, 2020, 11:27am UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/1 "2020-06-28T11:27:14Z")

</div>

1. Holidays for countries are placed in file “holidays.xml.in”:  
[https://gramps-project.org/wiki/index.php/Calendar\_tools\_holidays](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…

---

<div class="post-metadata">

**Author:** ![prculley](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/prculley/32/41_2.png) [@prculley](https://gramps.discourse.group/u/prculley)\
**Post date:** [June 28, 2020, 3:40pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/2 "2020-06-28T15:40:34Z")

</div>

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](https://gramps-project.org/wiki/index.php/What_to_do_for_a_release#Translation_update)

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 28, 2020, 7:49pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/3 "2020-06-28T19:49:53Z")

</div>

> [@prculley](#):
>
> The “intltool-update” utility creates them.

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](https://www.gramps-project.org/wiki/index.php/Running_a_development_version_of_Gramps).) 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?

---

<div class="post-metadata">

**Author:** ![prculley](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/prculley/32/41_2.png) [@prculley](https://gramps.discourse.group/u/prculley)\
**Post date:** [June 28, 2020, 9:22pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/4 "2020-06-28T21:22:28Z")

</div>

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](https://gramps-project.org/wiki/index.php/Gramps_for_Windows_with_MSYS2)

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

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 28, 2020, 11:11pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/5 "2020-06-28T23:11:17Z")

</div>

Found a **[Install intltool on Mac OSX](http://macappstore.org/intltool/)** page.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [June 29, 2020, 1:03am UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/6 "2020-06-29T01:03:49Z")

</div>

> [@PushKK](#):
>
> 1. Can I change the Wiki?

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](https://gramps-project.org/wiki/index.php/Calendar_tools_holidays#Translations) 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…](https://www.gramps-project.org/wiki/index.php/Write_a_%22How_Do_I...%22_Article)” page and link it to the original (superficial) Translations section when finalized.

1. [Create a WikiContributor account](https://gramps-project.org/wiki/index.php/Special:RequestAccount) on [Gramps-Project.org](http://Gramps-Project.org)
2. [Log in](https://gramps-project.org/wiki/index.php?title=Special:UserLogin&returnto=Main+page)

---

<div class="post-metadata">

**Author:** ![PushKK](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/pushkk/32/1230_2.png) [@PushKK](https://gramps.discourse.group/u/PushKK)\
**Post date:** [June 29, 2020, 8:07pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/7 "2020-06-29T20:07:44Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [July 29, 2020, 8:15pm UTC](https://gramps.discourse.group/t/holidays-files-and-localization/521/8 "2020-07-29T20:15:40Z")

</div>

Closed on July 29, 2020, 8:15pm UTC

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