Modify

Ticket #6875 (closed patch: fixed)

Opened 3 years ago

Last modified 3 years ago

Patches with updated Swedish translations and scripts to simplify XML translation

Reported by: Stefan Asserhäll <stefan.asserhall@…> Owned by: janne
Priority: trivial Milestone: 0.22
Component: Translations Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

Here are two patches with updated Swedish translations, including four generic scripts to simplify XML translation. I did this because I found that a lot of strings were not translated in the GUI. It seems that no translation has ever been done for <value> tags in the XML files.

The script "lupdate.sh" extracts strings for translation from all XML files and runs lupdate, and "lrelease.pl" deposits the translated strings back into the XML files after the translation and runs lrelease. The second script has a verbose flag (-v) and can take one or more languages as parameters.

The workflow becomes (with Swedish as example language):

cd mythtv/i18n
./lupdate.sh
linguist mythfrontend_sv.ts
./lrelease.pl -v sv

cd mythplugins
./lupdate.sh
linguist myth*/i18n/*_sv.ts
./lrelease.pl -v sv

The patch also includes i18n directories for some mythplugins that didn't have them, and fixes som missing tr() in the source code.

I hope this can be useful for other translators, as well. I could add this information to the wiki, if you'd like.

Attachments

myth-translation-patch.tar.gz (205.1 KB) - added by Stefan Asserhäll <stefan.asserhall@…> 3 years ago.
Translation patch for MythTV
myth-translation-patch.tar.2.gz (168.6 KB) - added by Stefan Asserhäll <stefan.asserhall@…> 3 years ago.
Updated and split patch
mythbrowser-translations-090822.diff (19.0 KB) - added by Stefan Asserhäll <stefan.asserhall@…> 3 years ago.
Additional patch for mythbrowser with some strings I missed before

Change History

Changed 3 years ago by Stefan Asserhäll <stefan.asserhall@…>

Translation patch for MythTV

comment:1 Changed 3 years ago by stuartm

Hi Stefan, this is what the themestringtool in svn is for and I will be running it when changes to the themes have settled down in a week or two. It writes the strings to i18n/themestrings.h rather than cluttering up the xml.

comment:2 Changed 3 years ago by stuartm

Can you break out the changes into separate patches please. One patch for source changes,one for the translation updates and the scripts in a third?

comment:3 Changed 3 years ago by stuartm

  • Status changed from new to infoneeded_new

Changed 3 years ago by Stefan Asserhäll <stefan.asserhall@…>

Updated and split patch

comment:4 Changed 3 years ago by Stefan Asserhäll <stefan.asserhall@…>

Thanks for the info about themestringtool. I didn't realize that <value> tags were handled differently from <text> and <alttext>. It seems a good idea to avoid having the translations in XML, but to also change <text> and <alttext> to use the same scheme as <value>, I think the existing translations need be moved into the ts files.

I have updated the lupdate.sh script to use themestringtool, and lrelease.pl to only deposit <text> and <alttext> translations.

I have uploaded a new patch, with the changes split as per your request.

comment:5 Changed 3 years ago by stuartm

  • Status changed from infoneeded_new to new

Changed 3 years ago by Stefan Asserhäll <stefan.asserhall@…>

Additional patch for mythbrowser with some strings I missed before

comment:6 Changed 3 years ago by stuartm

  • Type changed from enhancement to patch

comment:7 Changed 3 years ago by janne

  • Owner changed from ijr to janne
  • Status changed from new to accepted

comment:8 Changed 3 years ago by janne

(In [22198]) mark a few more strings translateable, Refs #6875

comment:9 Changed 3 years ago by janne

(In [22200]) add mythtv/programs/themestrings.h for xml translations in mythtv/programs/*. Refs #6875

comment:10 Changed 3 years ago by janne

(In [22201]) enable translations in mythmovies and add swedish translations. Refs #6875

comment:11 Changed 3 years ago by janne

(In [22208]) update swedish translations in xml files. Refs #6875

I didn't try to resolve the rejects. translations in the xml files are deprecated. they should be available via themestrings.h in the standard translation files.

comment:12 Changed 3 years ago by janne

  • Status changed from accepted to closed
  • Resolution set to fixed

(In [22209]) update swedish plugin translations. Fixes #6875

mythweather translation do not apply. please create a new ticket with the remaining translations.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.