quickviewer icon indicating copy to clipboard operation
quickviewer copied to clipboard

Improve English

Open sakkamade opened this issue 4 years ago • 11 comments

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 avatar Apr 24 '21 00:04 sakkamade

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

sakkamade avatar Apr 24 '21 00:04 sakkamade

Does this line also belongs to UI?

Yes, it is.

sakkamade avatar Apr 25 '21 00:04 sakkamade

@kanryu, ~~This is ready for review.~~

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

sakkamade avatar Apr 25 '21 02:04 sakkamade

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 avatar Apr 25 '21 22:04 sakkamade

@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?

sakkamade avatar Apr 28 '21 05:04 sakkamade

@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.

kanryu avatar Apr 28 '21 08:04 kanryu

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?

sakkamade avatar Apr 28 '21 08:04 sakkamade

@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.

kanryu avatar Apr 29 '21 01:04 kanryu

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?

sakkamade avatar Apr 29 '21 02:04 sakkamade

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.

kanryu avatar Apr 29 '21 08:04 kanryu

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.

sakkamade avatar Apr 29 '21 21:04 sakkamade