Wiki : add a new translate page

Hello,

I’m just starting to translate the wiki. Before starting, I’d like to check that my method is the right one so as not to make any mistakes.

If I want to translate into French the page about the gramplet Historical Context.

Do I have to create the Addon:Historical Context/fr - Gramps page first? Then I translate and add my screenshots in French. At the end, will this page be automatically linked to the main English page? Is there anything else I need to do?

Thank.

1 Like

The language bar needs to be added to both the English and the translation page. (For navigation between translated versions)

I have tried to understand the explanation by @Nick-Hall about why the help_url does not need to be a translatable string. But have not grasped it yet

My suspicion is that my confusion is about the expected naming pattern (using the English URL plus a language code) for addon pages for the wiki. And that it seems non‐functional to me because of translations of the page name, re-direction and issues with breaking internal anchors.

e.g., https://gramps-project.org/wiki/index.php/Addon:Isotammi_addons vs. https://gramps-project.org/wiki/index.php/Addon:Isotammi_addons/fi redirecting to https://gramps-project.org/wiki/index.php/Fi:Isotammi_Gramps-laajennukset

3 Likes

Thank you for your confirmation.

My first page is translated! :champagne:

1 Like

To obtain the name of a translated page, we just add a language code. So MyPage#link becomes MyPage/fr#link for the French page for example.

To translate the title of a page we just use page redirection. That is why Addon:Isotammi_addons/fi redirects to Fi:Isotammi_Gramps-laajennukset.

Finally the links are kept in English. Translators should just insert invisible placeholders to get the links to work correctly.

It does not work as seamlessly as that when doing manual tests. However I cannot test the Gramps-driven GUI, since I am unable to navigate Gramps running in another language.

The test target help_url is the Help button for the Isotammi Filter+ addon. (Only visible when the gramplet is undocked. Or as Wiki buttons in the Addon Manager and Plugin Manager Enhanced.)
https://gramps-project.org/wiki/index.php/Addon:Isotammi_addons#Filter.2B

(That particular gramplet was missing from the translated page. So for testing purposes, I’ve added a preliminary Suodatin+ section plus included the specified English <span id="Filter+"> </span> anchor.)

Manually adding the /fi language code and pressing enter
https://gramps-project.org/wiki/index.php/Addon:Isotammi_addons/fi#Filter.2B

will correctly jump to :
https://gramps-project.org/wiki/index.php/Fi:Isotammi_Gramps-laajennukset#Filter.2B

However, using the Language bar to switch languages drops the “jump link” anchor portion of the URL.
https://gramps-project.org/wiki/index.php/Fi:Isotammi_Gramps-laajennukset

So the language bar navigation does not work with anchors.

And I do not know if Anchors for Help buttons work when clicked in the native language in the GUI. I’ve requested a test through the Isotammi team.

@PeterPower Pekka confirms that clicking the Help button in an undocked Filter+ gramplet running on an Finnish GUI Gramps will still open the English wiki page even though there is an existing Finnish forwarding page. (Maybe the help_url conversion appends the /fi after the hashtag anchor in the Addon: instead of before the hashtag ?)

The display_help function should be used to display help pages.

If I am reading that correctly, then display_help does not correctly parse an anchor for a URL_MANUAL_PAGE and reassemble it with a language EXTENSION

A help_url of
Addon:Isotammi_addons#Filter.2B
Would be improperly transformed to
Addon:Isotammi_addons#Filter.2B/fi
which would disregard the anchor.

Instead, maybe the following?

Would have to be broken into Addon:Isotammi_addons and #Filter.2B (or use a string manipulation. Like URL_MANUAL_PAGE = insert_string(URL_MANUAL_PAGE, EXTENSION, URL_MANUAL_PAGE.index('#'))

To yield

Addon:Isotammi_addons/fi#Filter.2B

Correct. It should be called with webpage=“Addon:Isotammi_addons” and section=“Filter.2B”.

Well, all I can report is that it isn’t working in the field for Gramps running the Finnish GUI.

It isn’t even going to the top of the translated page (nor the forwarding page) in their language. It just brings up the English page scrolled to the english anchor.

Please create a bug report.

1 Like

I’ll post the bug report ( 13562 Help does not properly adapt to non-english wiki pages or allow anchors ) … but I hate writing up something that I cannot personally validate. There are always ommissions and inaccuracies in the step-by-step.

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