Opened 10 years ago

Closed 8 years ago

#3570 closed Translation (duplicate)

Russian translation

Reported by: zerg Owned by: charles
Priority: Normal Milestone: None Set
Component: Qt Client Version: 2.75+
Severity: Normal Keywords: Russian
Cc:

Description

Updated Russian translation

Attachments (3)

transmission_ru.ts.bz2 (12.9 KB) - added by zerg 10 years ago.
Transmission_RUS.ZIP (25.4 KB) - added by rb07 10 years ago.
Updated to version 2.21 and 2.22.
transmission_ru_2.75.svn.zip (12.4 KB) - added by krab 8 years ago.

Download all attachments as: .zip

Change History (43)

Changed 10 years ago by zerg

comment:1 Changed 10 years ago by charles

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

Thanks! Updated in r11242

comment:2 Changed 10 years ago by charles

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

comment:3 Changed 10 years ago by rb07

  • Keywords Russian added
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 2.04 to 2.22

I was sent this translation by Igor Butvin, it is complete for versions 2.21 and 2.22 which have the same strings.

I cannot verify it since I don't know Russian. I also replied to him telling him to upload himself, but 4 days have gone by and it would be a waste considering the current translation is about half complete.

Changed 10 years ago by rb07

Updated to version 2.21 and 2.22.

comment:4 Changed 10 years ago by jordan

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

.ts updated in r12114.

It's my understanding that the .qm files should be autogenerated by lrelease, so I didn't commit the .qm file that was in the zipfile. If that's an error, please reopen this ticket.

comment:5 Changed 8 years ago by krab

  • Milestone changed from 2.10 to 2.80
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 2.22 to 2.75+

Almost complete for 2.75+ (svn).

Changed 8 years ago by krab

comment:6 Changed 8 years ago by rb07

You left one very old string, line 24 - 26:

        <source>Copyright (c) The Transmission Project</source>
        <translatorcomment>Transmission-QT Win v2.21 (11855) Russian Localization Beta 0.2 by Igor Bootwin (bootwin@gmail.com)</translatorcomment>
        <translation>© Transmission Project, 2005-2011</translation>

I would delete the "translatorcomment", and change the translation (the source hasn't had a year, or year range, in a long time).

comment:7 Changed 8 years ago by krab

I used lupdate -no-obsolute. :) ok i remember it.

But now i have problem with "MB"

Russian: http://wstaw.org/m/2013/01/02/plasma-desktopV10446.png

Original English: http://wstaw.org/m/2013/01/02/plasma-desktopr10446.png

look, all after strange symbol was erased in the line "Have"

comment:8 Changed 8 years ago by rb07

-no-obsolete means something different, its not "old" text, but "not used" in the code anymore.

The line I show is just something that changed.

The problem with MB I'm not sure, perhaps its caused by the file encoding, yours is the first one in UTF-8.

comment:9 Changed 8 years ago by krab

QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));

in app.cc after "setApplicationName" - fixed my problem

Last edited 8 years ago by krab (previous) (diff)

comment:10 Changed 8 years ago by rb07

And probably breaks it for everybody else.

You are dangerous!

comment:11 follow-up: Changed 8 years ago by krab

No. http://wstaw.org/m/2013/01/03/plasma-desktopp10446.png

Man 2013 year on the street! Why not UTF? How about Chinese, Japanese or Thai?

comment:12 follow-up: Changed 8 years ago by jordan

rb07, krab, transmission-gtk uses https://translations.launchpad.net/transmission/trunk/+pots/transmission, DYK if there's a similar tool out there for crowdsourcing Qt-based translations?

comment:13 in reply to: ↑ 12 Changed 8 years ago by rb07

Replying to jordan:

DYK if there's a similar tool out there for crowdsourcing Qt-based translations?

No, I haven't heard of anything like it, or other compatible program (or Web interface) than Qt's Linguist which is the only GUI.

comment:15 in reply to: ↑ 11 Changed 8 years ago by rb07

Replying to krab:

No. http://wstaw.org/m/2013/01/03/plasma-desktopp10446.png

Man 2013 year on the street! Why not UTF? How about Chinese, Japanese or Thai?

Your replies are insulting. I was trying to help, and you answer with a rant.

What you saw seems to be a bug in Qt, and your fix is only a workaround for that problem. Its probably the known "Qt + iconv + Windows doesn't work", so its not even a general problem.

My point is that the original translation into Russian was working, with no changes, and the only difference btw. that one and yours is the added 4th line:

Original:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ru_RU" sourcelanguage="en">
<context>

Yours:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ru_RU" sourcelanguage="en">
<defaultcodec>UTF-8</defaultcodec>

My guess is that you have changed CODECFORTR setting on Qt Designer, for a specific project, or in general. That, and some lupdate options, are the only ways to add or change "defaultcodec".

Bottom line: your changes to the code are not needed, any language works fine as long as defaultcodec is not defined.

comment:16 Changed 8 years ago by krab

Ok, i test my ts without "<defaultcodec>UTF-8</defaultcodec>". and without QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));

Different between original and my in new translated strings like KB GB TB.

This metrics generated by formatter.cc via qPrintable.

And this МБ/с ((BROKEN)) output for qDebug() << qPrintable( unitStrings[SPEED][MB]); without QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));

And this МБ/с ((GOOD)) output for qDebug() << qPrintable( unitStrings[SPEED][MB]); with QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));

comment:17 Changed 8 years ago by rb07

The problem is a font problem in Qt, in more detail: its a font size problem (i.e. it shows fine at one size, it doesn't show at a smaller size).

krab: your comment 16 is non-sense, what you print on a terminal is not the same as what you show on an application: You are entering a UTF-8 string in the code, and printing it; of course the use of setCodecForCStrings() will affect that, your hard-coded UTF-8 will show gibberish if you print it as an ASCII or Latin1 string.

My comment in 15 is also wrong, the line with "defaultcodec" doesn't affect anything. Its just not in the other translations because krab has modified his Qt environment, and its not needed.

All the comments about UTF-8 being part of the problem are wrong. The fact is that all the translations are in UTF-8. The code changes in comment 6 are useless, they are not changing anything since one is already the default, the other, about the code used in C strings is a no-op because ASCII is a subset of UTF-8 (I wonder what else did krab changed in his environment to see any change, if he really saw any change -- my own test doesn't show the same thing krab has on his screenshots, it shows instead "??", which I thought where font problems, i.e. the default font used doesn't have those characters, but they do show in some other places http://img27.imageshack.us/img27/8153/fontproblem.png).

Another overlooked fact: 99.9% of krab's translation works fine (with no code change), its just the MB, GB, TB, MB/s, etc. strings that don't always show. Note the "not always", they do show at certain font size (example: in Preferences' Speed tab), and don't show in the status bar, and at the torrent's details, both on the list, and in its properties -- where they are in a smaller font size.

This discussion is off-topic on a "Russian translation" thread.

It could affect all translations, but so far only in this one has been seen. I still think its a Qt bug but I have not been able to fix it; I'm sure its not a Transmission bug, but I've also researched the possibility of enhancing the application by adding setStyleHint(), and setStyleStrategy() to use the best quality, scalable font, but the result is the same.

comment:18 Changed 8 years ago by krab

And? Then how to fix this problem? Russian interface is not completed.

How about this http://wstaw.org/m/2013/01/13/plasma-desktopmj1780.png (left codecForCStrings; right without (original))

But english interface without this problem: http://wstaw.org/m/2013/01/13/plasma-desktopUZ1780.png

Why you think "this bug in Qt". English interface work! Bug into transmission-qt code.

comment:19 Changed 8 years ago by krab

http://wstaw.org/m/2013/01/13/plasma-desktopjk1780.png

tmp.rect.setWidth(500);

file-tree.cc 610 line

comment:20 follow-up: Changed 8 years ago by rb07

You are wasting our time with your bad tests, and I insist: this thread is about the Russian translation, not about some bug you think you found.

The first pictures you show are not the way Transmission-Qt works, the torrent content file names are never translated; only the size units in those strings are translated. Sorry, I was thinking about problems in translation, what you show is the real contents of the torrent, which are files with names in Russian -- again, that has nothing to do with translation.

You may have found a bug, I don't know. Last time I checked, it worked fine with a torrent that had file names in Japanese.

Last edited 8 years ago by rb07 (previous) (diff)

comment:21 in reply to: ↑ 20 Changed 8 years ago by krab

Replying to rb07:

You are wasting our time with your bad tests, and I insist: this thread is about the Russian translation, not about some bug you think you found.

The first pictures you show are not the way Transmission-Qt works, the torrent content file names are never translated; only the size units in those strings are translated. Sorry, I was thinking about problems in translation, what you show is the real contents of the torrent, which are files with names in Russian -- again, that has nothing to do with translation.

You may have found a bug, I don't know. Last time I checked, it worked fine with a torrent that had file names in Japanese.

Its not bug about rects and Qt or fonts. Bug about QPrintable on Ubuntu and may be other linux dostros.

Difference between our test is one. I am make test under Ubuntu, Not Windows.

Last edited 8 years ago by krab (previous) (diff)

comment:22 follow-up: Changed 8 years ago by jordan

rb07, it appears that Qt 5 removed the QTextCodec::setCodecForCStrings() function and made UTF-8 the default.

If there are translations that aren't in UTF-8 yet, they probably ought to be switched over so that they'll work properly in Qt 5 too. Calling setCodecForCStrings() in 4.x might a good idea for 5.x compatability?

comment:23 in reply to: ↑ 22 ; follow-up: Changed 8 years ago by rb07

Replying to jordan:

If there are translations that aren't in UTF-8 yet, they probably ought to be switched over so that they'll work properly in Qt 5 too.

All the translations are in UTF-8, all have as first line:

<?xml version="1.0" encoding="utf-8"?>

Calling setCodecForCStrings() in 4.x might a good idea for 5.x compatability?

Forward compatibility? I already did all the changes necessary, and tested Qt5 (which is unusable at this time -- it has the "Item list doesn't resize when scroll bar appears" bug https://bugreports.qt-project.org/browse/QTBUG-22052 I didn't need any change to string encodings (but I didn't test a torrent like the one krab shows above, with the file names in what appears like UTF-8, but might be something else).

comment:24 Changed 8 years ago by krab

Damn. Bug in ubuntu (on windows all work) with converting QStrings (QPrintable) to const char*. Becouse Qt in ubuntu repositories not set codecForCStrings like it do Qt in Windows. And all strings conversions in ubuntu by default in Latin-1.

Just add if QT_VERSION < 0x050000 and if defined (Q_OS_LINUX) for

QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));

This picture http://wstaw.org/m/2013/01/13/plasma-desktopjk1780.png i get if string has bad converted symbols from Cyrillic to Latin-1 in ubuntu, not windows.

comment:25 follow-up: Changed 8 years ago by krab

Can you run

qDebug () << QTextCodec::codecForCStrings()->name();

in Windows?

comment:26 in reply to: ↑ 23 ; follow-up: Changed 8 years ago by jordan

Replying to rb07:

(but I didn't test a torrent like the one krab shows above, with the file names in what appears like UTF-8, but might be something else).

I'm not sure how to parse your meaning --

If you mean we might not be handling UTF-8 filenames properly, that's a problem: the BitTorrent? spec requires filenames in the metainfo to be UTF-8.

If you mean the filenames might not actually be UTF-8, then we /could/ handle that case to be nice, but the bug is with whatever app created the .torrent.

comment:27 Changed 8 years ago by krab

I do not understand why you're so persistently tell me "no". Now I do not see any characters whose language translation would not fit into the Latin-1.

This is the only Russian. We do not use CP-1252. Our CP-1251. And our character encoding is not in Latin-1. Just like any other Asian.

You persistently resist to make the normal interface support "only on Linux" (I did not ask to write setCodecForCStrings for all OS). Yes it is a bug in Qt 4.8.x with Ubuntu. But now nobody will not be repaired in the Qt.

If you mean we might not be handling UTF-8 filenames properly, that's a problem: the BitTorrent?? spec requires filenames in the metainfo to be UTF-8.

Again. Bug not in filenames from .torrent file. Bug in B KB MB GB TB translation via QPrintable only under Linux.

comment:28 in reply to: ↑ 26 Changed 8 years ago by rb07

Replying to jordan:

Replying to rb07:

(but I didn't test a torrent like the one krab shows above, with the file names in what appears like UTF-8, but might be something else).

I'm not sure how to parse your meaning --

If you mean we might not be handling UTF-8 filenames properly, that's a problem: the BitTorrent? spec requires filenames in the metainfo to be UTF-8.

If you mean the filenames might not actually be UTF-8, then we /could/ handle that case to be nice, but the bug is with whatever app created the .torrent.

I meant both options, I'm not 100% sure if the application handles listing file names in foreign languages (I've only tested a few languages, and found no problem).

I know the .torrent "should" list those files using UTF-8, or an encoding specified in the same .torrent file, and libtransmission does handle that well, using UTF-8 internally. But the possibility of a defective .torrent is there, since the description of the problem is very bad we don't know the complete details. I'm not proposing handling defective .torrent files ("garbage in, garbage out" principle is fine).

comment:29 Changed 8 years ago by krab

I tested torrents with Russian filenames. In English Transmission-Qt interface QPrintable work perfect. And i see Russian filenames from torrent and english B MB KB GB, no problem with it. :)

comment:30 in reply to: ↑ 25 Changed 8 years ago by rb07

Replying to krab:

Can you run

qDebug () << QTextCodec::codecForCStrings()->name();

in Windows?

You? Do you mean me?

Running that (and including the 2 required headers) results in:

Segmentation fault

Qt 4.8.4 btw.

Running instead

std::cerr << QTextCodec::codecForCStrings() << std::endl;

Prints a 0 (zero -- as expected, but you wanted the actual name, Qt seems not to implement the virtual function).

Last edited 8 years ago by rb07 (previous) (diff)

comment:31 follow-ups: Changed 8 years ago by jordan

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

comment:32 in reply to: ↑ 31 ; follow-up: Changed 8 years ago by krab

Replying to jordan:

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

I cant test this moment, i need transmission_ru.ts file which was used in the windows build. I tried to build the current QM ts file with translated B KB MB GB TB but the translation B KB MB GB TB remained in English

comment:33 in reply to: ↑ 31 Changed 8 years ago by rb07

Replying to jordan:

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

Huh?

Does Q_OS_LINUX even exist?

I've been using Q_OS_UNIX, which was the only option available for Linux as far as I remember.

Even if that change was correct, which it isn't, where does it go? what's the use case?

comment:34 in reply to: ↑ 32 ; follow-up: Changed 8 years ago by rb07

Replying to krab:

Replying to jordan:

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

I cant test this moment, i need transmission_ru.ts file which was used in the windows build. I tried to build the current QM ts file with translated B KB MB GB TB but the translation B KB MB GB TB remained in English

Jordan didn't ask you to test.

The translation file in Windows, and I assume you are talking about the Windows release of version 2.76, is using your file (minus the copyright left by the previous translator). The Windows version doesn't use KB/MB/TB by default, if you look closely its showing KiB/MiB/TiB (untranslated), and if you change the preference to use SI units it tries to show your translation, which appear as the screenshot I attached before (but I'm not sure if it is a locale problem, because I test with LANG=ru_RU.UTF-8, but Qt could be messing with things based on the real locale which is equivalent to en_US.UTF16 -- I'm guessing here, because Windows is different than Unix w.r.t. locales).

comment:35 in reply to: ↑ 31 Changed 8 years ago by krab

Replying to jordan:

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

I dont know how test rb07, but my test https://dl.dropbox.com/u/7983994/ShareX/2013-01/2013-01-16_04-03-06.png This transmission-qt windows port 2.76

I just translated ts file (2.76 release tar.xz) in gedit. As you can see in Windows also have problem.

comment:38 in reply to: ↑ 34 Changed 8 years ago by krab

Replying to rb07:

Replying to krab:

Replying to jordan:

rb07, does https://trac.transmissionbt.com/ticket/5219#comment:4 cause any problems for you when running on Windows?

I cant test this moment, i need transmission_ru.ts file which was used in the windows build. I tried to build the current QM ts file with translated B KB MB GB TB but the translation B KB MB GB TB remained in English

Jordan didn't ask you to test.

The translation file in Windows, and I assume you are talking about the Windows release of version 2.76, is using your file (minus the copyright left by the previous translator).

https://dl.dropbox.com/u/7983994/ShareX/2013-01/2013-01-16_04-29-54.png problem too (original windows port transmission-qt installation)

comment:40 Changed 8 years ago by jordan

  • Milestone changed from 2.80 to None Set
  • Resolution set to duplicate
  • Status changed from reopened to closed
Note: See TracTickets for help on using tickets.