# Wiki RTL glitches

**URL:** <https://gramps.discourse.group/t/wiki-rtl-glitches/3991>\
**Category:** Feedback\
**Tags:** wiki\
**Created:** [August 11, 2023, 9:48am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991 "2023-08-11T09:48:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![yaron](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/yaron/32/2962_2.png) [@yaron](https://gramps.discourse.group/u/yaron)\
**Post date:** [August 11, 2023, 9:48am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/1 "2023-08-11T09:48:59Z")

</div>

The following page was translated by @avma , there are some code examples and snippets along the page, the code parts should be completely LTR otherwise it’s very complicated to understand it.

[https://gramps-project.org/wiki/index.php/Translating\_Gramps/he](https://gramps-project.org/wiki/index.php/Translating_Gramps/he)

The headers are also automatically LTR (although aligned to the right), which garbles the sentences and make it harder to understand.

---

<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:** [August 11, 2023, 10:23am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/2 "2023-08-11T10:23:49Z")

</div>

Does the following MediaWiki support page abot sectional overrides for directionality help?

[https://mediawiki.org/wiki/Topic:Rh21f64zkzoyc5xe](https://mediawiki.org/wiki/Topic:Rh21f64zkzoyc5xe)

> inside `<div dir="rtl"></div>` and also inserting the RLO character (RIGHT-TO-LEFT OVERRIDE, U+202E) at the start of the code and the PDF character (POP DIREC‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬TIO‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬‬NAL FORMATTING, U+202C) at the end.

---

<div class="post-metadata">

**Author:** ![yaron](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/yaron/32/2962_2.png) [@yaron](https://gramps.discourse.group/u/yaron)\
**Post date:** [August 11, 2023, 11:42am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/3 "2023-08-11T11:42:32Z")

</div>

Well sort of, It better be automatically for all code boxes but I guess it can work for now, I’ll send an account request.

---

<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:** [August 11, 2023, 1:37pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/4 "2023-08-11T13:37:10Z")

</div>

Even with decades of experience writing HTML and with various CMS tools, becoming productive as a WikiContributor difficult.

It required simultaneously learning:

- the MediaWiki markdown language
- the [Gramps Wiki](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual#Table_of_Contents) typographical conventions
- the article organization (or disorganization) and the discovering the holes
- and I was new to the subject matter too: Gramps

The new WikiContributor onboarding was (and is) non-existant. ( “ **Welcome to _Gramps_!** We hope you will contribute much and well. You will probably want to read the [help pages](https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents).”) The referenced help pages are from MediaWiki, not the [Gramps wiki](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual#Table_of_Contents). So that’s drinking from a firehose.

We put together a “[Onboarding Survey](https://gramps-project.org/wiki/index.php/Template:Onboarding_Survey)” that’s a little more specific to our wiki.

As you get started, please note any problems you have becoming productive in improving translations. Feel welcome to keep those notes on the discussion page of the “[Translating the Gramps User manual](https://gramps-project.org/wiki/index.php/Translating_the_Gramps_User_manual)” wiki article.

---

<div class="post-metadata">

**Author:** ![yaron](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/yaron/32/2962_2.png) [@yaron](https://gramps.discourse.group/u/yaron)\
**Post date:** [August 12, 2023, 6:39am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/5 "2023-08-12T06:39:43Z")

</div>

And do you believe migrating to a newer version will solve some of these caveats?  
Are there plugins supporting these operations or everything should be done manually?

---

<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:** [August 12, 2023, 12:20pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/6 "2023-08-12T12:20:56Z")

</div>

The updating problems have roadblocked trying out tools that might help. There are MediaWiki addons for translators.

---

<div class="post-metadata">

**Author:** ![yaron](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/yaron/32/2962_2.png) [@yaron](https://gramps.discourse.group/u/yaron)\
**Post date:** [August 13, 2023, 7:20am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/7 "2023-08-13T07:20:40Z")

</div>

Is there somewhere I can download the whole dump and try to upgrade it manually?

---

<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:** [August 29, 2023, 1:50am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/8 "2023-08-29T01:50:05Z")

</div>

@garygriffin has written a script to compile the main chapters of the wiki as a singe (offline) html file. It strips off the WikiMedia extra stuff as well.

Could you and @avma proofread (or spot check) the Hebrew PDF manual generated from that HTML file? 4 files were generated to test his automation. the basefile (English), a latin alphabet translation (Dutch), a non-latin ltr alphabet (Russian), a rtl layout (Hebrew).

> [@Gramps Offline/Print User Manual](https://gramps.discourse.group/t/gramps-offline-print-user-manual/4087):
>
> A compilation of all of the Wiki Manual is available as a PDF for offline use (or for printing) in English, Dutch, Hebrew, and Russian. This was assembled on 27 Aug 2023 and reflects the Wiki Manual as of that date. Download: [Complete English Offline Manual](https://gramps-project.org/wiki/images/7/7b/Gramps5.1UserManual.pdf) (20 MiB) Download: [Complete Dutch Offline Manual](https://gramps-project.org/wiki/images/e/eb/Gramps5.1UserManual_nl.pdf) (16 MiB) Download: [Complete Russian Offline Manual](https://gramps-project.org/wiki/images/b/bb/Gramps5.1UserManual_ru.pdf) (16 MiB) Download: [Complete Hebrew Offline Manual](https://gramps-project.org/wiki/images/7/72/Gramps5.1UserManual_he.pdf) (24 MiB) Please let us know what you think. Your feedback is welcome. Thanks to @GaryGr…

---

<div class="post-metadata">

**Author:** ![yaron](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/yaron/32/2962_2.png) [@yaron](https://gramps.discourse.group/u/yaron)\
**Post date:** [August 29, 2023, 4:39am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/9 "2023-08-29T04:39:06Z")

</div>

Hi and thank you for this wonderful work!  
The code part is right aligned and I need to help @avma with more screenshots and some typos I found while skimming through the pages but overall it’s pretty comprehensible (except for the untranslated parts).

This is a screenshot showing the right aligned code block:

 ![IMG_20230829_073536](https://global.discourse-cdn.com/free1/uploads/gramps/original/2X/7/74243254dffa84bcfefc7f2797c0293e89588f32.jpeg)

Thanks!

---

<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:** [August 29, 2023, 5:00am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/10 "2023-08-29T05:00:31Z")

</div>

I also want to express my thanks to @GaryGriffin for this wonderful work.

He put in a lot of effort and made many revisions cycles. And he had to fix (or compensate for) a lot of inconsistencies in the wiki too.

It is nice having an offline copy in HTML format too. It raises a future possibility of having the Help button in Gramps route to the offline manual when you have no connection.

---

<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:** [August 29, 2023, 5:28am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/11 "2023-08-29T05:28:54Z")

</div>

> [@emyoulation](#):
>
> It raises a future possibility of having the Help button in Gramps route to the offline manual when you have no connection.

This is where maintaining the English anchors in the translated wikipages is going to become important… and probably that’s not known by translators.

Each heading style is an “anchor” for web navigation. So Gramps might link to  
[https://gramps-project.org/wiki/index.php/Gramps\_5.1\_Wiki\_Manual\_-\_Gramplets#What\_is\_a\_Gramplet](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Gramplets#What_is_a_Gramplet) (which is `== What is a Gramplet? ==` in the english wiki markdown) but the header is `= מה זה גרמפלט? =` in the translated page.

I don’t know if we’ve figured out headings as anchors in translated wikipages

---

<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:** [August 29, 2023, 1:12pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/12 "2023-08-29T13:12:15Z")

</div>

You can create a manual anchor in this case:

```python
==<span id="What is a Gramplet?"></span>מה זה גרמפלט?==

```

See the [Internal links](https://www.mediawiki.org/wiki/Help:Links#Internal_links) section of the mediawiki manual. Look at the “Setting an anchor for incoming links” example.

---

<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:** [August 29, 2023, 1:24pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/13 "2023-08-29T13:24:09Z")

</div>

> [@Nick-Hall](#):
>
> See the [Internal links](https://www.mediawiki.org/wiki/Help:Links#Internal_links) section of the mediawiki manual. Look at the “Setting an anchor for incoming links” example.

The part that is confusing is the complication of the hashtag target when the URL has a “translation redirection” parameter too.

So where do you put the hashtag (`#What_is_a_Gramplet` or `#מה_זה_גרמפלט` ) for a [`https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Gramplets/he`](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-_Gramplets/he) URL?

---

<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:** [August 29, 2023, 1:34pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/14 "2023-08-29T13:34:51Z")

</div>

The `help_url` will be Gramplets#What\_is\_a\_Gramplet.3F".

The url will be constructed as “[https://gramps-project.org/wiki/index.php/Gramps\_5.1\_Wiki\_Manual\_-Gramplets/he#What\_is\_a\_Gramplet.3F](https://gramps-project.org/wiki/index.php/Gramps_5.1_Wiki_Manual_-Gramplets/he#What_is_a_Gramplet.3F)”, if the user’s language is set to “he”.

This could then re-direct to a page with a Hebrew title, but in this case it doesn’t.

All that is needed is an invisible English anchor to be added to the Hebrew section heading.

---

<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:** [August 29, 2023, 2:51pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/15 "2023-08-29T14:51:06Z")

</div>

I am wondering 2 things:

1. if the index.php parser can handle both a hashtag target AND a language redirection parameter. (If so, how? Does the hastag go before or after the language parameter?)
2. if the process wouldn’t be greatly simplified by specifically _ **avoiding** _ having a translated anchor and hashtag target? Or by doing a double ID?

The combination of ltr and rtl components in a URL is complicating the matter. Maybe troubleshooting 1 part at a time by using a ltr language would be reasonable.

Take the French Gramp glossary term “lieu” (Place) [under L](https://gramps-project.org/wiki/index.php?title=Glossaire_Gramps&action=edit&section=12).

You will notice that the lieu term has no `div` or `span` anchor… the only anchor is the alphabetization index (a MediaWiki header) for [L](https://gramps-project.org/wiki/index.php/Glossaire_Gramps#L). Meanwhile, the English eqivalent is under ‘[P](https://gramps-project.org/wiki/index.php/Gramps_Glossary#P)’ and the Place term has a manually added anchor: `<span id="place">Place</span>`

The index.php for:

[`https://gramps-project.org/wiki/index.php/Gramps_Glossary/fr`](https://gramps-project.org/wiki/index.php/Gramps_Glossary/fr)

Serves:

https://gramps-project.org/wiki/index.php/Glossaire\_Gramps

If the ‘lieu’ term actually had an english equivalent in a double ID (`<span id="place"><span id="lieu">lieu</span></span>`), it would simplfy things a little, translaters could spend less time harmonizing Help URLs, internal wiki links and evolving translations. Plus support is usually in english and tweaking a URL to insert a `/fr` in [`https://gramps-project.org/wiki/index.php/Gramps_Glossary#place`](https://gramps-project.org/wiki/index.php/Gramps_Glossary#place) is a lot easier than guessing the arbitrarily chosen term in your language.

But how could this anchor be used with the `index.php/Gramps_Glossary/fr` parameterized URL?

---

<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:** [August 29, 2023, 5:41pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/16 "2023-08-29T17:41:52Z")

</div>

I’ve just been testing this.

We have a function called `display_help(webpage, section)` which displays help pages from our wiki. The base url points our wiki, so you have to add the prefix for the user manual, if required.

For example:

```python
display_help("Gramps_5.1_Wiki_Manual_-_Gramplets", "What_is_a_Gramplet?")

```

will display the “What is a Gramplet?” section in the “Gramplets” page in our user manual.

This also works with the Hebrew translation of the manual. I had to add an anchor to the wiki page and add Hebrew to the list of user manual translations.

It is important to separate the webpage and section, so that an url pointing to a translated page can be constructed. This was not the case with the gramplet bars, so I’ll fix them.

I notice that in many parts of Gramps the section name is translated. This has lead to confusion in the past because these strings have been translated even when no translated version of the manual page exists. If no translated manual exists we want the English help page displayed. The alternative is to add invisible English anchors to the translated web pages.

I’ll investigate if we have any manual page translations problems in Weblate.

---

<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:** [August 29, 2023, 5:52pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/17 "2023-08-29T17:52:51Z")

</div>

> [@Nick-Hall](#):
>
> I’ll investigate if we have any manual page translations problems in Weblate.

I am hoping that the use of English anchors might eliminate the need for Weblate for the help\_url

If you can always call with the language code (since MediaWiki fallsback to the english page if the translation page doesn’t exist), then you can take Weblate harmonization (with the github pushes of translations that wait for releases, and constant programmer labor) out of the equation. Instead of shared responsibility, the entire burden will be solely on the wikicontributors. They wouldn’t have to coordinate with anyone and their changes would be immediate.

This would eliminate a huge amount of work and glossary entries for the Weblate translators.

---

<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:** [August 29, 2023, 6:56pm UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/18 "2023-08-29T18:56:55Z")

</div>

There are 68 manual section strings in Weblate. They all have the context “manual” and have the following explanation:

“Used as part of a link to a wiki manual page. This string should only be translated if a corresponding translated manual page exists. Underscores should be retained.”

I also set a condition that the translated text must not contain spaces.

Despite this, many strings have been translated into languages that don’t have a translated manual.

The “Attribute\_Editor\_dialog” has been translated into French such that it doesn’t match the section heading in the French manual causing the link to break.

---

<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:** [August 30, 2023, 1:27am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/19 "2023-08-30T01:27:57Z")

</div>

If you find issues with the PDF User Manual in Hebrew, please check to see if the issue is also in the Wiki page. If it is, then it needs fixed in the Wiki page to be correct in the PDF. The PDF should look like an extraction from the Wiki page with Table of Contents, language tables at top and bottom, and bottom nav removed.

I can regenerate the PDF if there are fixes to the Wiki page.

The process for generating the PDF is described at [Gramps 5.1 Manual Creation - Gramps](https://gramps-project.org/wiki/index.php/Gramps_5.1_Manual_Creation) . I included all of the scripts needed for en, nl, ru, and he languages.

---

<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:** [August 30, 2023, 1:32am UTC](https://gramps.discourse.group/t/wiki-rtl-glitches/3991/20 "2023-08-30T01:32:47Z")

</div>

> [@Nick-Hall](#):
>
> I notice that in many parts of Gramps the section name is translated. This has lead to confusion in the past because these strings have been translated even when no translated version of the manual page exists. If no translated manual exists we want the English help page displayed. The alternative is to add invisible English anchors to the translated web pages.

This definitely caused more work for the PDF compilation process. Right now, my process will work either way, so it is independent of whether there is ‘encouragement’ to make english-only anchors.

[Next page](https://gramps.discourse.group/t/wiki-rtl-glitches/3991.md?page=2)
