nedit-ng icon indicating copy to clipboard operation
nedit-ng copied to clipboard

Internationalization

Open eteran opened this issue 7 years ago • 24 comments

Using Qt makes translation possible. If there is anyone who is able to provide translations, they will be welcome!

eteran avatar Jan 24 '17 23:01 eteran

Hi,

I can help for french translation. But I need you explain me how to proceed.

Regards.

Xuo.

ericxuo avatar Feb 25 '18 16:02 ericxuo

Awesome, that is great news. I just need to figure out how to add the necessary parts to the cmake build system.

eteran avatar Feb 26 '18 02:02 eteran

OK, so here's the first steps (assuming "fr" for french)

  1. install Qt linguist
  2. cd into the "source" directory of nedit-ng
  3. run lupdate *.cpp *.h *.ui -ts res/translations/nedit-ng_fr.ts. This will produce the XML file for translation
  4. run linguist res/translations/nedit-ng_fr.ts
  5. Once this is complete, submit a PR to add this file to the repo, at which point I will add "compiling" it to the build process and will be able to test loading the translation file at runtime.

There's a lot of strings, so don't feel like you need to get them all done in one shot! Thanks!

eteran avatar Feb 28 '18 05:02 eteran

Hi,

I prefer to ask as I'm not 100% sure of what should be done.

calltipwidget

Here, I think there is nothing to translate.

commandrecorder Here neither ...

dialogabout

Here, I should copy/paste all the original html text in the "Français traduction" field and translate the useful parts.

Do you agree ?

Regards.

Xuo.

ericxuo avatar Mar 03 '18 19:03 ericxuo

Yes, for fields which have nothing to translate, it should simply have the original text. I think that if you mark an item as complete (the toolbar button with the green check) without putting anything in the "Français traduction" field, then it'll default to the original text... We should check to be sure though.

eteran avatar Mar 03 '18 19:03 eteran

Yup just checked the manual: "Missing translations will be replaced with the native language phrases at runtime". So if there is literally nothing to translate, just mark it as complete :-)

eteran avatar Mar 03 '18 20:03 eteran

lupdate-qt5 on F27

1div0 avatar Mar 04 '18 14:03 1div0

Hi,

I don't understand how to open a PR. I can add the .ts file here as an attachment and you can include it where you want. You agree ?

Regards.

Xuo.

ericxuo avatar Mar 04 '18 18:03 ericxuo

Sure, that'll be fine 🙂

On Sun, Mar 4, 2018, 1:31 PM ericxuo [email protected] wrote:

Hi,

I don't understand how to open a PR. I can add the .ts file here as an attachment and you can include it where you want. You agree ?

Regards.

Xuo.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eteran/nedit-ng/issues/4#issuecomment-370251765, or mute the thread https://github.com/notifications/unsubscribe-auth/AAi4VaGRPTB8zL__HcLo0Mr9vUcmWx_vks5tbDLwgaJpZM4Ls5nq .

eteran avatar Mar 04 '18 18:03 eteran

Hi,

I don't understand how to open a PR. I can add the .ts file here as an attachment and you can include it where you want. You agree ?

Regards.

Xuo.

ericxuo avatar Mar 04 '18 21:03 ericxuo

Hi,

Here it is (I renamed it from nedit-ng_fr.ts to nedit-ng_fr.txt as the .ts extension is not allowed here).

nedit-ng_fr.txt

Regards.

Xuo.

ericxuo avatar Mar 04 '18 21:03 ericxuo

Hi,

Another question : Sometime, there is something like that to translate : &Regular expression which make the R to be underlined which maybe means that 'R' could be an accelerator to tick the dialog box corresponding to the field 'Regular Expression'.

In french, it will be translated to : Expression régulière Should I write : Expression régulière or &Expression régulière or Exp&Ression régulière or Exp&ression régulière

Regards.

Xuo.

ericxuo avatar Mar 05 '18 16:03 ericxuo

You should place the ampersand in a place that you believe is appropriate while doing your best to avoid collisions with accelerators in the same context. Beyond that, it is (in my opinion) at the discretion of the translator. In some languages, the translation may not even have an 'R'!

In this particular case, I would probably go with:

Expression &régulière

As it is most consistent with the original text... but like I said, I leave it at your discretion.

eteran avatar Mar 05 '18 19:03 eteran

Hi,

Here is the next version. nedit-ng_fr_v2.txt

Regards.

Xuo.

ericxuo avatar Mar 05 '18 19:03 ericxuo

Wonderful! I'll start working on the code to compile and include translations 👍

eteran avatar Mar 05 '18 20:03 eteran

OK, I'm about to push a version that should use your translations (found in source/res/translations/nedit-ng_fr.ts). Easily testable with:

LANGUAGE=fr ./nedit-ng

A few notes:

  1. Thank you for the effort!
  2. I don't think we should translate the GPL though, let's leave that as is.
  3. Try to pay attention to things like whitespace. In the about dialog, it uses a fixed width font and the English is lined up to look nice; please attempt to maintain that in the translations.
  4. Likewise, be careful about introducing new leading or trailing whitespace. The UI actually warns about this (yellow checkmark and message in the warnings pane)
  5. What name would you like me to add to the translator's list in the about dialog?
  6. Thank you again!

eteran avatar Mar 06 '18 04:03 eteran

Hi,

Yes, I know I didn't respect whitespace, semicolons, ... This is because I prefer, for ex, to add a space before a colon. I've noticed the yellow stuff but I though it was not important. I'll change this to get everything green (and even dark green). About the name, I just don't care. Xuo will be fine.

Regards.

Xuo.

ericxuo avatar Mar 06 '18 10:03 ericxuo

BTW, now that the file is in the repo, please look into how to do a PR.

Basically, the process is:

  1. fork the repo
  2. create a branch in your version of the repo
  3. make changes as you see fit to your version
  4. in github, you can ask it to create a PR to merge your changes with my repo
  5. make sure your repo remains in sync with the main one (only complicated part I think)

See these pages for more in-depth details: https://help.github.com/articles/creating-a-pull-request/ and https://help.github.com/articles/creating-a-pull-request-from-a-fork/

eteran avatar Mar 07 '18 01:03 eteran

@ericxuo Any change that you have time to update the french translation? The steps are more or less the same as before:

  1. cd into the "source" directory of nedit-ng
  2. run lupdate *.cpp *.h *.ui -ts res/translations/nedit-ng_fr.ts. This will update the XML file for translation
  3. run linguist res/translations/nedit-ng_fr.ts
  4. Once this is complete, submit a PR or send me the .ts file otherwise.

Either way, thanks for your efforts (and it seems that someone thinks they fixed the "Cancel" button issue you were seeing!

eteran avatar Aug 13 '18 17:08 eteran

Hi,

I had translated everything. This is not what you see ? Except maybe if you have added some new stuff since my last PR.

Regards.

Xuo.

ericxuo avatar Aug 15 '18 14:08 ericxuo

Oh your translation seemed great. but some strings have changed slightly, some were removed, and a few added, so it could use a refresh :-)

eteran avatar Aug 15 '18 16:08 eteran

Hi,

OK. I'll have a look. I just need to remember how I did. I think I've lost all my previous nedit-ng translation configuration (change of PC). I think I've kept somewhere a "HowTo".

Regards.

Xuo.

ericxuo avatar Aug 15 '18 18:08 ericxuo

Hi I can make a Czech translation. Regards

Zdenek (Barracuda)

Barracuda1984 avatar Feb 23 '19 16:02 Barracuda1984

That would be fantastic!

eteran avatar Feb 23 '19 18:02 eteran