# Translating addons

**URL:** <https://gramps.discourse.group/t/translating-addons/6106>\
**Category:** Development\
**Tags:** third-party-addon, localization\
**Created:** [September 22, 2024, 3:42pm UTC](https://gramps.discourse.group/t/translating-addons/6106 "2024-09-22T15:42:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 22, 2024, 3:42pm UTC](https://gramps.discourse.group/t/translating-addons/6106/1 "2024-09-22T15:42:22Z")

</div>

Started to translate addons to Danish.  
I am not fluent in git.

Could someone check that a da-locale.po exists for the following two addons?

- **AllNamesQuickview** (should it be in [master](https://github.com/gramps-project/addons-source/tree/master/AllNamesQuickview)? Currently in [maintenance/gramps52](https://github.com/gramps-project/addons-source/tree/maintenance/gramps52/AllNamesQuickview) branch)
- **AssociationsTool** (should it be in [master](https://github.com/gramps-project/addons-source/tree/master/AssociationsTool)? Currently in [maintenance/gramps52](https://github.com/gramps-project/addons-source/tree/maintenance/gramps52/AssociationsTool) branch)

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [September 22, 2024, 3:57pm UTC](https://gramps.discourse.group/t/translating-addons/6106/2 "2024-09-22T15:57:58Z")

</div>

No, these addons do not have an existing da-local.po . The only addons that have this file are:

> Themes/po/da-local.po  
> Form/po/da-local.po  
> CalculateEstimatedDates/po/da-local.po  
> CheckPlaceTitles/po/da-local.po  
> EditExifMetadata/po/da-local.po

---

<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:** [September 22, 2024, 5:47pm UTC](https://gramps.discourse.group/t/translating-addons/6106/3 "2024-09-22T17:47:42Z")

</div>

> [@GaryGriffin](#):
>
> No, these addons do not have an existing `da-local.po` . The only addons that have this file are:

Those instances of `da-local.po` exist in the `master` branch for those addons. Kaj’s dansk additions are in the `maintenance/gramps52` branch.

Are the translations coming from the right branch for the 5.2 [Addon Manager](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Navigation#Using_the_Addon_Manager)?

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [September 22, 2024, 6:42pm UTC](https://gramps.discourse.group/t/translating-addons/6106/4 "2024-09-22T18:42:02Z")

</div>

Refreshed and yes, these 2 new da-local.po exist in the _ **addons-source** _ repo, _maintenance/gramps52_ branch. Users can manually download from there.

They are not yet merged into _ **addons** _ repo, _master_ branch - which is where the 5.2 [Addon Manager](https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Navigation#Using_the_Addon_Manager) looks for the tgz and listing (json, txt) files.

The next step is to [package the addon](https://gramps-project.org/wiki/index.php/Addons_development#Package_your_addon) and [add listing](https://gramps-project.org/wiki/index.php/Addons_development#List_your_addon_in_the_Gramps_Plugin_Manager) and then merge results (tgz, json files) into the addons repo, master branch.

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 23, 2024, 5:41am UTC](https://gramps.discourse.group/t/translating-addons/6106/5 "2024-09-23T05:41:21Z")

</div>

Thanks.  
I will continue to translate the addons and push to github for each addon.  
Some time ago I started the same task, but didn’t push, got stalled and all finished translations disappeared probably during a fresh install of a new OS version.  
I don’t want that to happen again.  
The next steps to package and list is something the maintainers do, and I don’t have to worry about?

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 23, 2024, 6:10am UTC](https://gramps.discourse.group/t/translating-addons/6106/6 "2024-09-23T06:10:48Z")

</div>

And sorry tor not being precise in my question.

---

<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:** [September 23, 2024, 8:44am UTC](https://gramps.discourse.group/t/translating-addons/6106/7 "2024-09-23T08:44:37Z")

</div>

> [@emyoulation](#):
>
> Kaj’s dansk additions are in the `maintenance/gramps52` branch.

Discovered the GitHub search is biased. It only returns matches from the current branch. CodeFarmer shared how to have GitHub search a different branch in a PM. Will convert that to a wiki article.

If you recall an addon where you had created a dansk PO file, you could go to that PO folder in `maintenance/gramps52` branch. Then flip backwards through the branch selector for Gramps versions.

Maybe you could copy those old version PO files to your local plugins folders. It could save you some re-translation work.

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 23, 2024, 9:33am UTC](https://gramps.discourse.group/t/translating-addons/6106/8 "2024-09-23T09:33:12Z")

</div>

Thanks. but the issue is that I didn’t push to repository, wanted to do it all in one big round.  
I am wiser now 😉

---

<div class="post-metadata">

**Author:** ![GaryGriffin](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/garygriffin/32/6525_2.png) [@GaryGriffin](https://gramps.discourse.group/u/GaryGriffin)\
**Post date:** [September 23, 2024, 3:05pm UTC](https://gramps.discourse.group/t/translating-addons/6106/9 "2024-09-23T15:05:15Z")

</div>

> [@kmikkels](#):
>
> The next steps to package and list is something the maintainers do, and I don’t have to worry about?

Correct. You can send me a PM when finished to package everything if you want.

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 23, 2024, 3:09pm UTC](https://gramps.discourse.group/t/translating-addons/6106/10 "2024-09-23T15:09:26Z")

</div>

Thanks. Will do that

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [September 23, 2024, 7:28pm UTC](https://gramps.discourse.group/t/translating-addons/6106/11 "2024-09-23T19:28:05Z")

</div>

Perhaps we should use Weblate to translate the addons.

I have started to investigate the idea of concatenating all the pot files into a single file for translation. It is possible to split the translations back out again for each addon.

The only problem I can see so far is that the copyright details for contribution would be stored at the combined file level. Is this acceptable?

It is likely that initially we could have quite a few updates with translation changes only. This could be annoying for users, but would increase the visibility of addons to our translators.

---

<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:** [September 23, 2024, 7:40pm UTC](https://gramps.discourse.group/t/translating-addons/6106/12 "2024-09-23T19:40:47Z")

</div>

> [@Nick-Hall](#):
>
> I have started to investigate the idea of concatenating all the pot files into a single file for translation. It is possible to split the translations back out again for each addon.

Is there a workflow for checking your addon’s translatable strings against the core Weblate glossary?

With over 7,000 strings already in the Glossary, it seems like a lot of subjects will already be covered by only changing a word or two in your prototype’s strings.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [September 23, 2024, 10:19pm UTC](https://gramps.discourse.group/t/translating-addons/6106/13 "2024-09-23T22:19:12Z")

</div>

> [@emyoulation](#):
>
> Is there a workflow for checking your addon’s translatable strings against the core Weblate glossary?

I exclude entries that are already in the core `gramps.pot` file.

---

<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:** [September 23, 2024, 10:29pm UTC](https://gramps.discourse.group/t/translating-addons/6106/14 "2024-09-23T22:29:03Z")

</div>

> [@Nick-Hall](#):
>
> I exclude entries that are already in the core `gramps.pot` file.

That’s extra work for you.

I tried to look up strings in Weblate while composing verbose hints and tooltips, trying to match existing strings. It was tedious and error prone. So I figure I am doing it the hard way.

---

<div class="post-metadata">

**Author:** ![codefarmer](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@codefarmer](https://gramps.discourse.group/u/codefarmer)\
**Post date:** [September 23, 2024, 10:39pm UTC](https://gramps.discourse.group/t/translating-addons/6106/15 "2024-09-23T22:39:53Z")

</div>

> [@Nick-Hall](#):
>
> It is likely that initially we could have quite a few updates with translation changes only. This could be annoying for users, but would increase the visibility of addons to our translators.

If the single pot file approach causes user inconvenience due to unnecessary builds even temporarily, I’d be inclined to consider raising visibility in other ways.

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [September 23, 2024, 10:49pm UTC](https://gramps.discourse.group/t/translating-addons/6106/16 "2024-09-23T22:49:14Z")

</div>

A single `pot` file won’t cause unnecessary builds.

I create a directory with an `addons.pot` file and a `po` file for each language. When a language gets updated, I can merge the changes back into the `po` files for each addon changed.

So for example, if Kaj updated the Danish translations for three addons, then we would modify three `po` files. Then we would have to build and publish these three addons. Everyone would get the updated addons even if they are not interested in the Danish translation.

This is no different from our current manual process though.

---

<div class="post-metadata">

**Author:** ![codefarmer](https://avatars.discourse-cdn.com/v4/letter/c/b9e5f3/32.png) [@codefarmer](https://gramps.discourse.group/u/codefarmer)\
**Post date:** [September 23, 2024, 11:13pm UTC](https://gramps.discourse.group/t/translating-addons/6106/17 "2024-09-23T23:13:20Z")

</div>

Thanks for the clarification - it removed the misunderstanding I had about the impact of this proposal.

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 24, 2024, 6:35am UTC](https://gramps.discourse.group/t/translating-addons/6106/18 "2024-09-24T06:35:12Z")

</div>

Having one place for all translations would be beneficial for me.  
But if it is lot of work and/or cost I can live with poediting individual files.  
Hopefully sometime I will have done all. I am currently on D

---

<div class="post-metadata">

**Author:** ![kmikkels](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/kmikkels/32/2317_2.png) [@kmikkels](https://gramps.discourse.group/u/kmikkels)\
**Post date:** [September 27, 2024, 7:12am UTC](https://gramps.discourse.group/t/translating-addons/6106/19 "2024-09-27T07:12:54Z")

</div>

Someone on the github repo, suggested that I should make a pull request before pushing my da-local.po file to the repo.  
Wouldn’t that be a lot of unnecessary pull requests?  
And what are the actual rules for when you should make a pull request?

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [September 27, 2024, 4:02pm UTC](https://gramps.discourse.group/t/translating-addons/6106/20 "2024-09-27T16:02:36Z")

</div>

Generally pull requests are preferred, but there are a few exceptions:

- Translations. Before Weblate, a translation maintainer was allowed to commit translation updates directly without a PR. This is still the case for addons. The reason behind this was that it was unlikely that the PR would be reviewed.

- Package maintenance. We allow package maintainers to make changes in the directory related to the package that they maintain.

- Releases. PRs are not required for commits relating to a release.

- Branch merges. I don’t make a PR when merging bug fixes from a maintenance branch into the master branch.

[Next page](https://gramps.discourse.group/t/translating-addons/6106.md?page=2)
