kanryu / quickviewer

A image/comic viewer application for Windows, Mac and Linux, it can show images very fast
https://kanryu.github.io/quickviewer/
GNU General Public License v3.0
535 stars 63 forks source link

Improve English #165

Open sakkamade opened 3 years ago

sakkamade commented 3 years ago

This is still draft. I also haven't changed the .ts files in translation folder yet.

Wanted to understand if what I will do wouldn't be in vain. As well as have a couple of questions.

sakkamade commented 3 years ago

Does this line also belongs to UI? https://github.com/kanryu/quickviewer/blob/6a995667d1f1c85114fbe88be212bf0368c27bba/QuickViewer/src/mainwindow.ui#L375

sakkamade commented 3 years ago

Does this line also belongs to UI?

Yes, it is.

sakkamade commented 3 years ago

@kanryu, This is ready for review.

I better go all the way, and then we will see 😉

sakkamade commented 3 years ago

Anyhow, at the end this PR will require long and dull review, and may be a cause of lots of regressions. I understand if no one would want to spend their time on that.

As an alternative, I may suggest to close this PR and open another one with changed only quickviewer_en.qm and quickviewer_en.ts files...

sakkamade commented 3 years ago

@kanryu, Hello! So are you willing to review this .ui, then compare it with all 8 .ts files, which I will also change, and then build and test it?

Or it would be better if I improve only quickviewer_en.ts?

kanryu commented 3 years ago

@kanryu, Hello! So are you willing to review this .ui, then compare it with all 8 .ts files, which I will also change, and then build and test it?

Basically, the translation file (* .ts) in the Qt project is automatically generated from the source code. Therefore, if you want to change the English notation from which all language resource files are derived, you should modify the source code.

If modified, the modified keywords will no longer match translations in each language. The corrections must be individually and carefully implemented.

sakkamade commented 3 years ago

I understand that.

Well, just to make sure, my steps at this point are:

  1. Modify .ui
  2. Replace modified strings in all .ts files as well (in some text editor)
  3. Generate new .qm files from edited .ts in Qt Linguist

Right?

kanryu commented 3 years ago

@sakkamade Thank you for correcting the translated keywords in the source code. But if I merge your pull request, QuickViewer's translation doesn't work. This is because the translation resource side has not been updated.

To resolve this issue, lupdate Linguist in your repository. Then the translation resources will be updated.

sakkamade commented 3 years ago

if I merge your pull request, QuickViewer's translation doesn't work

Of course.

lupdate Linguist in your repository

I see!

But if I type

lupdate src/mainwindow.ui -ts translations/quickviewer_ar.ts

Edited strings are not carefully replaced. What should I type exactly?

kanryu commented 3 years ago

Edited strings are not carefully replaced. What should I type exactly?

This project is designed to build with qmake, and project files written with qmake can be built from Qt Creator. Modifications to your translation word will be applied to the translation file by selecting the Qt Creator menu.

sakkamade commented 3 years ago

Well, I have tried to do it by Qt Creator as well. They doesn't update still. The output lupdate warning: no TS files specified. Probably I am making some basic mistake. It's above my head, to put it bluntly.

So I leave it as draft for ever, you may close it, use it, &c. if you want. Sorry for taking your time.