Author Topic: Translation question  (Read 543 times)

jinformatique

  • Newbie
  • *
  • Posts: 5
Translation question
« on: December 15, 2016, 11:31:17 AM »
Hello,

I'd like to participate. What does these types mean?

<translation type="vanished">
<translation type="obsolete">

Does it have to be updated and then we can put it like this ?
<translation>

Thanks,
Best regards.

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1005
Re: Translation question
« Reply #1 on: December 15, 2016, 12:28:30 PM »
Just ignore and don't touch all strings marked as "vanished" and "obsolet". Please pay attention to preserve markup and think about keyboard accessibility, including keyboard accellerators (&amp;) where appropriate, avoiding conflicts. Thanks!

jinformatique

  • Newbie
  • *
  • Posts: 5
Re: Translation question
« Reply #2 on: December 15, 2016, 03:06:45 PM »
Ok. Are not keyboard accellerators in the source tag and represented with an underscore like this:
<source>L_uma threshold:</source>

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1005
Re: Translation question
« Reply #3 on: December 15, 2016, 03:13:51 PM »
Underscores are the GTK way to define keyboard accelerators. I reported a possible issue with them today, you better use strictly the Qt way to define accels in your translations for now (Avidemux GUI is a Qt application):

Code: [Select]
&amp;
By the way, into which language are you going to translate?

edit: Of course, you never modify anything within the source tags. Just use &amp; in your translations where an accelerator is appropriate.
« Last Edit: December 15, 2016, 03:19:17 PM by eumagga0x2a »

jinformatique

  • Newbie
  • *
  • Posts: 5
Re: Translation question
« Reply #4 on: December 15, 2016, 03:34:36 PM »
Thanks for your help. I'm doing French translation.

So another question. I got this:

Code: [Select]
<source>Ca_rtoon mode</source>
<translation type="unfinished"></translation>

If I understand correctly, I keep the source, but where do I put the &amp; in the translation? How do I choose?

Code: [Select]
<source>Ca_rtoon mode</source>
<translation type="unfinished">Mode dessin animé</translation>

But I could also change the source like this, why not?
Code: [Select]
<source>Ca&amp;rtoon mode</source>

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1005
Re: Translation question
« Reply #5 on: December 15, 2016, 04:12:56 PM »
Thanks for your help. I'm doing French translation.

Fine, but please take into account that Mean, the author of Avidemux, is French, and the current translation is his work, you should be careful to avoid conflicts.

Quote
I got this:

Code: [Select]
<source>Ca_rtoon mode</source>
<translation type="unfinished"></translation>

Just because you picked this spot, I think the code in question is unused. When Xvid is available, the plugin (avidemux_plugins/ADM_videoEncoder/xvid4) is used instead, its translation begins at line 12036 of avidemux_fr.ts.

Quote
If I understand correctly, I keep the source, but where do I put the &amp; in the translation? How do I choose?

Common sense. If possible, keep the same key as in the English original, if not, choose another one. The first letter is preferable, but if this leads to a conflict with another accel in the same window, choose a different one.

Quote
Code: [Select]
<source>Ca_rtoon mode</source>
<translation type="unfinished">Mode dessin animé</translation>

E.g.

Code: [Select]
<source>Ca_rtoon mode</source>
<translation>Mode &amp;dessin animé</translation>

This will set Alt+D as keyboard shortcut to directly access the checkbox labeled with "Mode dessin animé".

Quote
But I could also change the source like this, why not?
Code: [Select]
<source>Ca&amp;rtoon mode</source>

Never ever touch the source because it a) will break the translation which won't be matched to the respective string in the code anymore and b) it will be discarded next time the .ts files get regenerated (which happens mostly shortly before a release if new strings have been added).

jinformatique

  • Newbie
  • *
  • Posts: 5
Re: Translation question
« Reply #6 on: December 15, 2016, 04:27:17 PM »
So if the author of Avidemux, is French why is not all the code translated?

eumagga0x2a

  • Hero Member
  • *****
  • Posts: 1005
Re: Translation question
« Reply #7 on: December 15, 2016, 05:41:20 PM »
Other priorities, which makes sense. Who else would actually develop the application? This said, I'm sure your future contributions will be welcome, just be careful not to modify existing translations imprudently. If you are unsure about a particular piece of code your are going to translate, don't hesitate to ask. Generally, I assume that you are able to read C++ source to understand the real meaning of the strings you translate. If not, I'd encourage you to learn it, this is immensly helpful for translation work.

If you don't have a build environment for Avidemux yet, I would recommend that you set up such an environment to test your changes and to generate easily applicable patches. You might want to read the topic http://avidemux.org/smif/index.php/topic,17299.0.html in this case.

scootergrisen

  • Jr. Member
  • **
  • Posts: 53
Re: Translation question
« Reply #8 on: December 15, 2016, 09:01:57 PM »
You can use Qt Linguist to translate TS files.

jinformatique

  • Newbie
  • *
  • Posts: 5
Re: Translation question
« Reply #9 on: December 16, 2016, 10:04:48 AM »
Ok, so I did my first pull request. Hope it looks good  ;)

https://github.com/mean00/avidemux2/pull/55