What to do when something isn't translated

I am currently going through the plugins, which I have translated.
Sometimes I find strings that aren’t translated.
Should I put this in a bug report?
Or should I take a look at the code, and fix the issue myself?
Or should I simply ignore it?
It could also be that the mot file is not up to date.

Currently checking the prerequsites gramplet.
Seems like Headers and italic strings are not translated.
Checked Swedish as well, to make sure it wasn’t my translation to Danish that was the issue. Same result

Output:
Diagnostisk Gramplet der hjælper med at kontrollere Gramps har allel forudsætninger installeret.

Du benytter Gramps 5.2.3. Tillykke, du benytter den nuværende version.

REQUIRED
Installations of the following packages are ABSOLUTELY REQUIRED
(Requires the minimum version or greater.):
• Python 3.10.12 (Godkendt: version 3.8.0 eller nyere installeret
• GTK+ 3.24.33 (Godkendt: version 3.24.0 eller nyere installeret
• PyGObject 3.46.0 (Godkendt: version 3.29.0 eller nyere installeret

Found one of the issues in the prerequisite gramplet:
Source code says REQUIRED but pot file says REQUIREMENT
Should I go ahead and make the hanges myself or do we hav a process for making the mot file from source code?

The gramps.pot file is generated automatically by running following:

python update_po.py -p

If there is a mistake in the original English string then we need to fix it like any other bug.

Thanks Nick. it is not the gramps.pot but the template.pot in the plugin directory: PrerequisitCheckerGramplet.
And probably in many more of the plugins
just extracted text by xgettext and saw a lot of changes to the supplied template.pot file

It’s similar for the addons. The make.py script is used to generate the template.pot file as follows:

python make.py gramps52 init PrerequisiteCheckerGramplet

Updated entries can then be merged into a translation with:

python make.py gramps52 update PrerequisiteCheckerGramplet dk

Hmmm - that doesn’t work on my local installation.
But I am not a python shark.
Tried to delete the template.pot, and it doesn’t get created
Tried touching the gramplets py file, but it didn’t change anything.
Do you want me to go on debugging, or should I put in a ticket?
Clearly the template.pot has not been changed as the gramplet itself has been changed
BTW I use python3

Please create a bug report.

1 Like

I tried this on my Mac system. I also had issues. (I set the variable GRAMPSPATH to my locally built gramps. This works fine for ‘build’ and ‘listing’ options when publishing addons.)

First, there was no existing dk translation, so I had to add the 2nd command below to create it.

Then when I tried the 3rd command, I got an error that GRAMPSPATH/po was not found. I am not sure how to create that as it did not build when I built gramps locally.

> python3 make.py gramps52 init PrerequisitesCheckerGramplet 
> python3 make.py gramps52 init PrerequisitesCheckerGramplet dk
> python3 make.py gramps52 update PrerequisitesCheckerGramplet dk

Error was:

Traceback (most recent call last):
  File "/Volumes/Storage/Development/addons-source/make.py", line 356, in <module>
    raise ValueError(
ValueError: Where is GRAMPSPATH/po: '/Users/gary/gtk/inst/bin/po'? Use 'GRAMPSPATH=path python3 make.py gramps52 update

I have only actually used the ‘build’ and ‘listing’ options myself.

The ‘init’ and ‘update’ options are documented in the make.py script.

Perhaps we should use Weblate for the addons? I have only investigated this very briefly. It is possible to concatenate all the template.pot files into a single pot file for Weblate using msgcat. Then the changes can be extracted using msgcomm.

Running the build option says ther eis nothing to build.
Deleted the template.pot, since I believed it would be rebuild, but that is not the case.
Have submitted a ticket.

If you explore that, could you give an overview of the process? The Isotammi project add-on collection could improve by becoming more diverse in its translations.

And those of us privately experimenting with Gramps addons might benefit too. I would like to delve into making my labels more consistent with the existing Gramps Weblate glossary.

To create template.pot files for addons (requires a local build of gramps), I think the process is :

1) Copy folder source/gramps-gramps-5.2.2/po to GRAMPSHOME (for me, this is inst/bin/po). This folder contains update_po.py and all the gramps po files.
2) The da.po file already exists in this folder. It was created by Weblate.

Then run the 3 commands in the earlier message. I can send a sample template.pot file for an Addon if someone wants to see if this functions.

> python3 make.py gramps52 init PrerequisitesCheckerGramplet 
Note: this command creates the template.pot file
> python3 make.py gramps52 init PrerequisitesCheckerGramplet da
Note: this command creates the da-local.po file
> python3 make.py gramps52 update PrerequisitesCheckerGramplet da
Note: this command creates the da-global.po, da.po, and da-temp.po files

When I compared the template.pot file, I see lots of text changes for the PrerequisitesCheckerGramplet. Do we need to regenerate for all Addons?

1 Like

That folder does not exists in my cloned gramps project
I clone the addons-source from github, and then I have to go to each plugin directory’s po directory, and there I make the da-local from the template.pot

So I am sorry, I think you lost me along the way, but thanks for your effort
And I fully agree with your last comment that template.pot needs to be recreated - and probably for all plugins

Does this mean you manually make the file or do you run the required commands mentioned in the addon-source README.md file?

I use poedit.
The instructions?

PrerequisitesCheckerGramplet

light revision of Sam Manzi’s 0.8.40 Prerequisite Checker

The text reformatting includes:

  • swapping in leading spaces & bullets for asterisks.
  • italicizing descriptive text
  • composing backup text and correcting menu labels
  • making the Required-Recommended-optional section labels more consistent in tense

Updated Help URLs

Changed & tested the Help URLs to the new standard “Addon:” prefix and added a “in document” scrolling target. (Including the help_url in this Gramps Plugin’s Registration file.)

A few issues.

Not critical - if the gramplet is added to a sidebar and Gramps is closed with preferences set to rember last view, then the Gramplet will have 3 COPIES of the report.

There are new developer tools. Does it need to check for:

  • Weblate
  • PyCharm
  • Glade

There are a bunch of TBDs when run the report

The guys with the metadata viewer need a new library and they are unsure how to test.
See Installing prerequisites for a Windows AIO bundle

OK found the READ.me you are referring to.
And yes, those commands doesn’t work for me, as mentioned earlier

And all those script depend on a correct template.pot, which exactly is the issue. The template.pot is not updated to reflect the changes in the source code

Seems like you got me on the right track.
Setting the GRAMPSPATH to the correct value, and the running the commands seem to have created a new template.pot file.
Please disregard my previous answer and receive a THANKS from me

I am finally on the right track.
If I do not do things manually, but uses the scripts (after setting the GRAMPSPATH it seems like the template.pot is updated via the make script.
I get a few python errors because da-local.po already exists, and the make script insist on creating a da.po file. I can live with that, as long as the da-local.po and template.pot is updated.
I think the weblate thing that Nick is thinking about is the way to go in the future. Also because translators do not get notified when changes occur in the plugin source. I think.
Again thanks everyone for your patience!

2 Likes