[GH-ISSUE #1857] How to Translation, localization, multi-language #1359

Open
opened 2026-05-05 07:45:14 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @maboroshin on GitHub (Dec 15, 2022).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1857

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 https://github.com/debauchee/barrier/pull/1854/commits/24b6e4b7fa9b08a751605863542cf4433538aa51, 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.

Originally created by @maboroshin on GitHub (Dec 15, 2022). Original GitHub issue: https://github.com/debauchee/barrier/issues/1857 Translatoin files in here: barrier/src/gui/res/[**lang**](https://github.com/debauchee/barrier/tree/master/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](https://github.com/debauchee/barrier/commits/master/src/gui/src). Strings are enclosed in ```tr("")``` or ```<string></string>```. e.g. In https://github.com/debauchee/barrier/pull/1854/commits/24b6e4b7fa9b08a751605863542cf4433538aa51, 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](https://github.com/debauchee/barrier/pull/1854/files) (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](https://github.com/debauchee/barrier/blob/master/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.
Author
Owner

@maboroshin commented on GitHub (Dec 15, 2022):

Related: https://github.com/debauchee/barrier/issues/1159 : [Feature request] Load external translations
The long release intervals. Unless the translator compiles it, difficult to test the display of translations.
<!-- gh-comment-id:1352906872 --> @maboroshin commented on GitHub (Dec 15, 2022): Related: https://github.com/debauchee/barrier/issues/1159 : [Feature request] Load external translations : The long release intervals. Unless the translator compiles it, difficult to test the display of translations.
Author
Owner
<!-- gh-comment-id:1352935559 --> @maboroshin commented on GitHub (Dec 15, 2022): Call from issue: fr:https://github.com/debauchee/barrier/issues/931 , hu:https://github.com/debauchee/barrier/issues/1456 Call from PL: * it @smart2128 https://github.com/debauchee/barrier/pull/1852 * ru @Quantum-0 https://github.com/debauchee/barrier/pull/1676 * hu @ViBE-HU https://github.com/debauchee/barrier/pull/1458 * ko @HwiNyeonKim https://github.com/debauchee/barrier/pull/1113 * zh-CN @gloomy-ghost https://github.com/debauchee/barrier/pull/1124 * sk-SK @jose1711 https://github.com/debauchee/barrier/pull/1151 * de @cjaone https://github.com/debauchee/barrier/pull/1035 : @Bintux https://github.com/debauchee/barrier/pull/1022 : @dieser-niko https://github.com/debauchee/barrier/pull/869 * sv @eson57 https://github.com/debauchee/barrier/pull/579 * jp https://github.com/debauchee/barrier/pull/536 https://github.com/debauchee/barrier/pull/1375 https://github.com/debauchee/barrier/pull/883 * en https://github.com/debauchee/barrier/pull/1854
Author
Owner

@ViBE-HU commented on GitHub (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.

<!-- gh-comment-id:1353260744 --> @ViBE-HU commented on GitHub (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.
Author
Owner

@maboroshin commented on GitHub (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.

https://github.com/input-leap/input-leap/pull/1422#issuecomment-981855986 :

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;

<!-- gh-comment-id:1353522140 --> @maboroshin commented on GitHub (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](https://github.com/input-leap/input-leap) They seem to be monitoring the Barrier. I need information on what contributors should do from input-leap. https://github.com/input-leap/input-leap/pull/1422#issuecomment-981855986 : > 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;```
Author
Owner

@maboroshin commented on GitHub (Dec 17, 2022):

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

<!-- gh-comment-id:1356296711 --> @maboroshin commented on GitHub (Dec 17, 2022): The cancel button is coded below and remains in English. ```QDialogButtonBox::Cancel|QDialogButtonBox::Ok```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1359
No description provided.