Translations Technical Developer Discussion

Hi to everyone,

I am a native speaker of Tamil language.I would like to volunteer as a Translations Coordinator for translating the documentation to my native language.So pls guide me how to join as a volunteer in this project. :smiley:

Edit by Patrick:
Changed title

Great! This is much and long needed!

Could you sign up for a whonix.org wiki account please?

We still have not figured out how to use the mediawiki translation extension. It is installed on whonix.org wiki already and working. So we just have to use it. Documentation can be found here:
MediaWiki Language Extension Bundle - MediaWiki

Please have a look.

Then pick a wiki page and start prepare it for translation. Maybe Start Whonix ā„¢. And translate to your language.

Letā€™s see how it works.

[quote=ā€œmacofe, post:1, topic:322ā€]Hi,

Iā€™ve started the Spanish translation of some of the wiki pages.

The infobox in the [url=https://www.whonix.org/wiki/Main_Page]https://www.whonix.org/wiki/Main_Page[/url] only appears in English. For other languages it says: {{#invoke:Infobox|infobox}}. Maybe the tags are breaking something.[/quote]
Moved to separate topic:
Whonix Forum

Since I went through the hassle of setting up the wiki locally, Iā€™m willing to help test the translation extension. Just give me a sample of foreign text to use if needed.

Great! See:

[quote=ā€œPatrick, post:2, topic:321ā€]We still have not figured out how to use the mediawiki translation extension. It is installed on whonix.org wiki already and working. So we just have to use it. Documentation can be found here:
MediaWiki Language Extension Bundle - MediaWiki

Please have a look.[/quote]

If you want to test it without revealing any additional languages you might speak (which is fine),

  1. make a copy of the Start Whonix ā„¢ page, for example, copy its contents to https://www.whonix.org/wiki/Dev/Starting_Whonix
  2. prepare the page for translation as per mediawiki translation extension documentation
  3. use some free online translation service such as google translate to translate it to some language (such as German)
  4. try to pick a translatorā€™s perspective and translate that test page

We canā€™t / shouldnā€™t use some free online translation service for serious translations. 1) unclear licensing of translated text - okay to read, but not sure if allowed to license under GPLv3+ 2) very poor translation results. This is just for testing. When we figured out how to use it, we rely on human translators.

This wonā€™t be that simple. Will probably require quite some documentation reading as well as asking the devs of that extension. If it was easy, I would be already accustomed to it.

Just doing it the simple way.

full wiki source

Just wonā€™t make it.

Example wiki source:

= Verify the Whonix images =
It is important to check the integrity of the virtual machine images you downloaded to make sure no man-in-the-middle attack or file corruption happened. (See [[Download Security|Download Security]].)

{{mbox
| type      = critical
| image   = [[File:Ambox_warning_pn.svg.png|40px|alt=OpenPGP verification warning box]]
| text       =

Warning:

Do not continue if verification failed! You risk using infected or erroneous files! The whole point of verification is to confirm file integrity.
}}

Whonix virtual machine images are cryptographically signed using OpenPGP<ref>OpenPGP is a standard for data encryption that provides cryptographic privacy and authentication through the use of keys owned by its users.</ref> by Whonix developer Patrick Schleizer.

If you know how to use an OpenPGP key, download the [[Whonix Signing Key|Whonix Signing Key]] and the [[#Download Whonix|Whonix signatures]] straight away.

Otherwise, follow the instructions:

* [[Verify_the_virtual_machine_images_using_Linux|For Linux: Ubuntu, Debian, Whonix, etc. using kgpg]]
* [[Verify the_virtual_machine_images_using_the_command line|For Linux with the command line]]
* [[Verify_the_virtual_machine_images_using_other_operating systems|For Windows or Mac]]

In this example users may or may not be able to enter the }}. Hence the page will look messed up. Manually fixing that makes quite some work. So to keep this maintainable for loads of translators, users must not be asked to translate that in the first place so they can not mess up.

= <translate>Verify the Whonix images</translate> =
<translate>It is important to check the integrity of the virtual machine images you downloaded to make sure no man-in-the-middle attack or file corruption happened. (See </translate>[[Download Security|<translate>Download Security</translate>]].)

{{mbox
| type      = critical
| image   = [[File:Ambox_warning_pn.svg.png|40px|alt=<translate>OpenPGP verification warning box</translate>]]
| text       =

<translate>
Warning:
</translate>

...

For the syntax

[[wiki link|description of wiki link]]

translators most times translated ā€œwiki linkā€ even they were only supposed to translate ā€œdescription of wiki linkā€.

I donā€™t know if

will work.

Maybe that broke internal links on a wiki page in wiki table of contents.

So maybe

<translate> = Verify the Whonix images = </translate>

has to be used.

About the offline documentation, Iā€™m not worried about it becuase the kiwix workaround should be fine whenever it becomes stable in the repos. There is a bug or something wrong with dumphtml. The cryptic permissions error is of little help.

After I read the mediawiki guide, I started playing around with the translation and Iā€™m seeing the ā€˜changes marked for translation messageā€™ at the top. Clicking it doesnā€™t open a translation unit editor like so File:Translate manual - Page example - 10. Mark changes.png - MediaWiki

However if your experience is better than mine but the problem is with the tag placement and types then a real life example should be useful:

https://techbase.kde.org/index.php?title=Getting_Started/Sources&action=edit

KDE uses mediawiki, making the tag syntax relevant.
The entire text body on the page is wrapped in translate tags.
Section titles take a translation unit tag right at the end of it.
Each text paragraph needs a Translate unit tag preceding it to split it up for the translator.

Problem is, translators donā€™t know anything about wiki syntax. Murphyā€™s law will hit hard here.

For example.

<!--T:56--> [[Category:Getting Started]]

Will ask translators to translate.

Which is untranslatable.

Butā€¦ It will be translated as

anyway.

Instead as leaving it as is.

So you can either,

  • a) cause lots of confusion, answer lots of support requests why ā€œ[[Kategorie:Erste Schritte]]ā€ resulted in a broken link, teach every individual translator the wiki syntax and put a lot effort into that or,
  • b) have a knowledgable translation coordinator who prepares wiki pages in a way for translation so translators arenā€™t even asked to translate non-translatable things such as ā€œ[[Category:Getting Started]]ā€.

Same issue with [[internal wiki link is not translatable|to be translated description of link]].

Same issue forā€¦

{{mbox | type = notice | image = [[File:Ambox_notice.png|40px|alt=Whonix default password info box]] | text = here comes the text }}

Where they translate the wiki markup keywords type, image, text while only ā€œhere comes the textā€ and ā€œWhonix default password info boxā€ is translatable.

Once they translated ā€œtypeā€ to a language you donā€™t know (example: ā€œŠøŠ·Š¾Š±Ń€Š°Š¶ŠµŠ½ŠøŠµā€ (Russian)) and the page looks broken, they will be coming for you to ask to fix the page. And fixing a page where all keywords are translated and broken speaking by experience is quite a time consuming task.

To keep this maintainable, I think we really should go for b).

Good example is this support request:

If it can go wrong - it will go wrong.

I see what you mean. however I donā€™t think direct translations of categories is needed by translators. when viewing sources for another language in their example page I see paragraph titles translated only. Any reference to an English extension name is used as it is.

Should someone offer to translate a page I can prepare it for them with tags. Translation should be straightforward after, because the edit option gives gui boxes for each separate paragraph, but I need to make sure nothing breaks. Please try them and tel me what do you see when you add these tags?

It isnā€™t needed. I didnā€™t want to imply that. I just donā€™t want the translate extension to even ask the translator to translate it. Because that will result in issues.

Should someone offer to translate a page I can prepare it for them with tags.
We had lots of offers already. So I guess starting with the most important pages would be beneficial.
Translation should be straightforward after, because the edit option gives gui boxes for each separate paragraph,
It is quite simple if users aren't asked to translate untranslatable things (keywords, internal links, ...).
Please try them and tel me what do you see when you add these tags?
I'll try.

If you want to start with something easy, copy to a testpage:
https://www.whonix.org/wiki/Starting_Whonix

For something harder, copy the main or download page.

Or donā€™t make an edit and test preparation of the page without a copy. Shouldnā€™t go much wrong either way. Up to you.

Hello Everyone.

Iā€™m second year CS undergraduate and I volunteered as a Translation Coordinator.
For now I will be preparing MediaWiki Language Extension markup for future translations.
https://www.whonix.org/wiki/Starting_Whonix/pl can be considered ready and there you can find small sample of Polish translation (in which Iā€™m native) and markup.

One major problem is incapability of LE tags to handle other MediaWiki markup (as pointed earlier in the thread).
Even more we canā€™t divide translation units (hence sentences) with nested markup to separate phrases because it would make impossible to properly translate some of them in some of the languages (in which where order is different from English). Intuitively we thought of adding instructions in documentation section for translators, but itā€™s impossible to add them in all languages simultaneously, as well as adding documentation to native British English without making actual changes in translated sentences.

As a solution for that, we decided to create separate page on which I will write instructions and guidelines for future translators.

At this moment four translations are planned: Ukrainian, Russian, Turkish and Polish.
All will be done by native speakers (which I know personally).

Terrific! Finally we have someone to work on these things.

Update:

as I said yesterday documentation couldnā€™t be added without making
actual changes to translation and it seemed like it, because no
documentation was saved when I tried to save it multiple times.

Iā€™m reporting just so you know, when I checked it today, documentation
I was trying to add yesterday actually got saved and now is available
(at least in most parts and in the other languages only, not in British English itself where I was working.)

Also, I gave translation rights to two new translators who just made
their accounts: Taras.baran (Ukrainian) and Piotr Gierach (Russian).

Hey IvoHerka,

I tweaked your permissions a little bit. Let me know if you run into more issues. Just trying to ensure least privilege necessary. Not that I donā€™t trust you, but you never know. :slight_smile:

Sure, no problem, I get it.

Today I run into following issue:

After editing MainPage markup and marking updated version for translation everything seemed to work. New units appeared as they should.

When I started making Polish translation some of the units (completely random) would give me this error:

ā€˜Saving the translation failed: The modification you tried to make was aborted by an extension hookā€™

Any ideas what it means and how to fix it?

Edit: I made Support page markup from scratch and started translating: got same issue.

No idea.

If there are open questions, could you try asking the support of that extension please?

They have IRC as well as a forum:

Iā€™ve contacted Service Support, those are answers I got:

Issue 1: When translating, some of the translation units would give me the following error: ā€˜Saving the translation failed: The modification you tried to make was aborted by an extension hookā€™

fortasse, please look into that.

Issue 2: After adding documentation for translation units in the core language (British English), documentation would usually appear on the next day, but only in other languages (not even in all of them) and in pieces. Saving documentation to particular languages fails completely.

  • First of all, please check that the documentation was actually saved: after adding some, visit Special:MyContributions and ensure some pages were created in Translations: namespace with /qqq suffix.
  • While doing so, I noticed Login required - Whonix.

It seems your wiki is misconfigured and believes that all edits come from localhost: this is bound to produce a number of problems, including unexpected behaviour for blocks and ConfirmEdit.

Those are two main things, the original thread you can find at:
Extension talk:Translate - MediaWiki

Also, it seems there is method of hiding markup in translation, called ā€˜tvarā€™ syntax, so this is something I will look into.

Thanks for the update IvoHerka.

Issue 1 should be resolved. I updated permissions for translators.

Issue 2: the configuration is deliberate - we donā€™t log visitor IPs. This makes mediawiki a little confused, which is why editing from usernames is recommended (to keep peopleā€™s contributions accurate).

Try again with updated permissions, and see if that fixes the saving issue.

Thanks!