Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3766 closed Bug (fixed)

Translation, fixes & proposed enhancements.

Reported by: rb07 Owned by: charles
Priority: Normal Milestone: 2.13
Component: Qt Client Version: 2.12
Severity: Normal Keywords: translation
Cc:

Description

Currently with version 2.12 transmission-qt's translation doesn't quite work.

The attached patch fixes that, and also makes some changes I'd like to propose as enhancements. Additionally adds a couple of missing translations in the code.

The problems:

  • The application looks for file names transmission-qt_<LANG>.qm, the actual files that came with the source code are named transmission_<LANG>.qm; I changed the code to look for the later names. I also changed it to look in a translations directory, more about that later, its an enhancement.
  • Even with the correct translation file names, it works partially. The fix is to move qtTranslator and appTranslator from the stack to the heap (yes, they were being destroyed before the dynamic content was translated).

The enhancements:

  • As mentioned, I moved the existing translations into their own directory: $SOURCE/qt/translations, and will use the same for the binary installation (of course the source contains the .ts files, the binary contains .qm files). The idea is not to pollute the source file directory, like the po directory the contents will eventually become large.
  • The application uses 2 translation files, qt_<LANG>.qm and transmission_<LANG>.qm, for people that have Qt installed and/or use Linux with KDE there is no problem with the former files, they already have them. But for people in other environments, installing from a binary, the packager has to include both for each language.

Packagers will have to include a qt.conf file with the application, to tell Qt where to look for its translations, I'm using:

[Paths]
Prefix = .
Translations = translations

Along in the patch there are the current available translations, updated against my version of the source code. That means that only my translation, ticket #3765, is up to date. The Brazilian-Portuguese, ticket #3751, is close, and the Russian, ticket #3570, is about half translated (much changed since it was posted).

Attachments (2)

Translations-diff-r11433.diff (2.9 KB) - added by rb07 11 years ago.
Fix for use of translations (against rev.11433)
Translation-files.tar.bz2 (18.1 KB) - added by rb07 11 years ago.
Missing .ts files. I forgot I didn't add to the repository those files, nor deleted the other .ts and .qm files.

Download all attachments as: .zip

Change History (9)

Changed 11 years ago by rb07

Fix for use of translations (against rev.11433)

comment:1 Changed 11 years ago by charles

  • Milestone changed from None Set to 2.13
  • Status changed from new to assigned

Thank you for the patch! Having someone step into the breach on Translations is much appreciated.

comment:2 Changed 11 years ago by charles

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

committed in r11437

Changed 11 years ago by rb07

Missing .ts files. I forgot I didn't add to the repository those files, nor deleted the other .ts and .qm files.

comment:3 Changed 11 years ago by rb07

  • Resolution fixed deleted
  • Status changed from closed to reopened

Sorry, I forgot to add the .ts files, and in fact the whole repository operations.

I was wondering why the patch was so small, and that's because it only has the code changes to the current files. The other changes, rm qt/*.ts qt/*.qm, and adding the tranlations/*.ts files (4 files).

Version 0, edited 11 years ago by rb07 (next)

comment:4 Changed 11 years ago by charles

I'm not sure what task is remaining to close this ticket. I already moved the ts files into qt/translations/ in r11437 .

comment:5 Changed 11 years ago by rb07

The .ts files attached to this ticket are updated versions, the ones on the translation tickets are not (except mine, ticket #3765).

By "updated" I mean I regenerate them with:

lupdate -no-obsolete -locations relative qtr.pro

You can do the same, of course. But since its not automated by Qt...

Other than that difference, I agree on closing this ticket.

comment:6 Changed 11 years ago by charles

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

Thanks for the clarification :)

Committed in r11483

comment:7 Changed 11 years ago by Robby

Note: See TracTickets for help on using tickets.