[X2Go-Dev] [X2go-Dev] [PATCH] Traditional Chinese(zh_TW) translation for x2goclient

Oleksandr Shneyder oleksandr.shneyder at obviously-nice.de
Mon Jan 30 08:24:27 CET 2012


Hi Mike,

Am 27.01.2012 13:28, schrieb Mike Gabriel:
> Hi Alex,
> 
> On Fr 30 Dez 2011 21:21:01 CET Reinhard Tartler wrote:
> 
>> On Fr, Dez 30, 2011 at 13:56:31 (CET), Mike Gabriel wrote:
>>
>>> Hi Morty,
>>>
>>> On Fr 30 Dez 2011 12:38:30 CET Moritz Strübe wrote:
>>>
>>>> Am 30.12.2011 12:05, Mike Gabriel schrieb:
>>>>> The patch tarball has arrived in a broken state here. Could you resend
>>>>> your file and check the tarball integrity before sending?
>>>>
>>>> Looks ok to me (I could open the .patch).
>>>
>>> weird... Could you evaluate the patch then?
>>
>> This is the patch.
>>
>> diff --git a/onmainwindow.cpp b/onmainwindow.cpp
>> index 81dce94..0295cae 100644
>> --- a/onmainwindow.cpp
>> +++ b/onmainwindow.cpp
>> @@ -438,7 +438,7 @@ void ONMainWindow::installTranslator()
>>      QTranslator* x2goclientTranslator=new QTranslator();
>>      QString filename=QString ( ":/x2goclient_%1" ).arg (
>>                           QLocale::system().name() );
>> -    filename=filename.toLower();
>> +    //filename=filename.toLower();
>>      if ( !x2goclientTranslator->load ( filename ) )
>>      {
>>          qDebug ( "Can't load translator (%s) !\n",
>>
>> I think Alex needs to comment on that.
> 
> Alex, I would like to make x2goclient available to zh_TW. Can you pick
> out the patch referred to in this mail (it was on the x2go-dev list) and
> commit if approved?
> 
> Thanks,
> Mike

There is no need to make such changes in X2goClient. It is common
practice to create translation files in lower case. See Qt
documentation:
http://developer.qt.nokia.com/doc/qt-4.8/qtranslator.html#load

All what you need to use zh_TW localisation is to create translation
file "x2goclient_zh_tw.ts" (in lower case) and add this translation to
project file "x2goclient.pro":

TRANSLATIONS += x2goclient_zh_tw.ts

and to resources file "resources.rcc":

<file>x2goclient_zh_tw.qm</file>

regards,
Alex
-- 
Oleksandr Shneyder
Dipl. Informatik
X2go Core Developer Team

email:  oleksandr.shneyder at obviously-nice.de
web: www.obviously-nice.de

--> X2go - everywhere at home

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20120130/42d42fe9/attachment.pgp>


More information about the x2go-dev mailing list