Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Translation, localization, multi-language #1857

Open
maboroshin opened this issue Dec 15, 2022 · 5 comments
Open

How to Translation, localization, multi-language #1857

maboroshin opened this issue Dec 15, 2022 · 5 comments

Comments

@maboroshin
Copy link

maboroshin commented Dec 15, 2022

Translatoin files in here: barrier/src/gui/res/lang/

  • Translate your language translation file .ts.
  • For translation, use the "Qt linguist" tool.
  • Compile this .ts into .qs: Qt linguist's Menu - File - Release
  • Pull request new .ts and .qs to GitHub.

The latest string may not be reflected. String changes detected from barrier/src/gui/src 's history. Strings are enclosed in tr("") or <string></string>.

e.g. In 24b6e4b, The Fingerprint dialog' string has split for 2.4.0. Therefore, each translated file that does not reflect this update will have the Fingerprint dialog in English. This change was made the day before the 2.4.0 release and no one has updated the translation. If there are new changes , please let us know via this issue.

Here is a near-perfect file for2.4.1. #1854 (It's manual, so there may be mistakes.) Reflect the changes in your language file by text editor.


For developers
If only a code change is made (below 1. ), it could remain in place for years, reverted to English.

Correct change procedures

  1. Change the source code.
  2. At least reflect it in barrier/src/gui/gui.ts
    : gui.ts is just a collection of English strings. Any changes to this file will help the translators recognize the need for an update.
    : The program does not refer to filename and line in the location tag. This is seen by humans. And line numbers change frequently, so approximate is fine. Once added, leave the line numbers as they are. Otherwise, you will not be able to check the differences with each translation file.
    : Or, please let us know via this issue.
  3. Reflect the changes in all .ts on barrier/src/gui/res/lang/ and compile to .qs.

All of the projects I know of are either 2 orProceed to 3. It would be nice to have someone in charge of doing 3.

@maboroshin
Copy link
Author

maboroshin commented Dec 15, 2022

Related: #1159 : [Feature request] Load external translations
: The long release intervals. Unless the translator compiles it, difficult to test the display of translations.

@ViBE-HU
Copy link

ViBE-HU commented Dec 15, 2022

Sadly the dev is just totally uninterested and don't want to team up or share the project with others. Pretty sad.

@maboroshin
Copy link
Author

maboroshin commented Dec 15, 2022

I am one of the contributors for Japanese translation. It is taking years to reflect the translation files. It is very slow.

Another developers has started a Fork of Barrier in 2021. input-leap They seem to be monitoring the Barrier. I need information on what contributors should do from input-leap.

input-leap/input-leap#1422 (comment) :

In the future it would be best to do pull requests here as the original Barrier will become non-maintained anyway.

The only difference between the translated files is the copyright at this time.

Line 15 & 25
Copyright © 2018 Debauchee Open Source Group&lt;br /&gt;
Copyright © 2018 The InputLeap Developers&lt;br /&gt;

@maboroshin
Copy link
Author

The cancel button is coded below and remains in English.
QDialogButtonBox::Cancel|QDialogButtonBox::Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants