Skip to content

Conversation

acolomb
Copy link
Member

@acolomb acolomb commented Feb 6, 2023

As recently discussed in https://forum.syncthing.net/t/translating-syncthing/, this mangles the various translation files to interoperate with the repository on Hosted Weblate, to be found at https://hosted.weblate.org/projects/syncthing/gui/. The live Weblate instance currently syncs with the source branch of this PR, and will be automatically rebased.

Starting with some refactoring and housekeeping, the individual commits basically track how the Weblate database reached its current state: First importing already translated strings, then adding back the untranslated ones to apply a "needs-editing" label automatically. All based on the latest Transifex state as of 2023-02-06. Some language codes are not directly compatible and get adjusted automatically during future imports.

The only real conflict is es-ES Spanish (Spain), which has no equivalent on Weblate. As we already have a plain es Spanish translation, strings from the former are copied to the latter where there is no previous translation. The es-ES variant should be removed completely in the long term, if needed strings can be recovered from Git history by the Spanish translators.

Finally, all translation updates already collected through Weblate, but not present on Transifex, get imported through this PR. Not including them here would override the Weblate internal database. Note that Weblate interacts directly with the JSON files committed in upstream Git, thus all languages will live there henceforth and the transifexdl.go script should no longer be used.

This is the step-by-step roadmap for a clean transition as far as I can tell. Please comment on any steps I might have missed:

For roughly a few months after the transition, @acolomb volunteers to keep checking and incorporating remaining translation changes coming in through Transifex. Unless / until step 3. above is implemented.

Documentation

There are only two references to Transifex in the docs, in a heavily outdated section about source code layout. That should be cleaned up in general, but at least the reference will be removed in a separate docs PR once this is approved and merged.

Skip duplicated and completely empty languages.
These are now treated correctly as untranslated, but present with the
original (English) translation key.
Translated using Weblate (Polish)

Currently translated at 100.0% (512 of 512 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/pl/

Translated using Weblate (Danish)

Currently translated at 98.6% (505 of 512 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/da/

Translated using Weblate (Lithuanian)

Currently translated at 85.4% (441 of 516 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/lt/

Translated using Weblate (French)

Currently translated at 100.0% (516 of 516 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/fr/

Translated using Weblate (Danish)

Currently translated at 98.6% (509 of 516 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/da/

Translated using Weblate (Spanish)

Currently translated at 100.0% (516 of 516 strings)

Translation: Syncthing/GUI strings
Translate-URL: https://hosted.weblate.org/projects/syncthing/gui/es/
@acolomb acolomb requested a review from calmh as a code owner February 6, 2023 21:49
@acolomb
Copy link
Member Author

acolomb commented Feb 6, 2023

The following table summarizes the statistics (number of strings) for the current state at Transifex (TX) and Weblate (WL) as of today. Matching languages are in the same row, some are even empty in Transifex yet and therefore not copied to Weblate. If someone wants to work with this table, I can provide an .ods (OpenDocument) version or upload it somewhere like Google Docs.

Syncthing code TX origCode TX name TX translated TX untranslated TX reviewed TX total TX retrieved TX percentage TX valid WL origCode WL name WL translated WL total WL fuzzy WL retrieved code diff
ar ar Arabic 310 206 0 516 2023-02-06 60.1% no ar Arabic 310 516 206 2023-02-06 FALSE
be be Belarusian 120 396 0 516 2023-02-06 23.3% no be Belarusian 120 516 396 2023-02-06 FALSE
bg bg Bulgarian 510 6 0 516 2023-02-06 98.8% yes bg Bulgarian 510 516 6 2023-02-06 FALSE
ca ca Catalan 242 274 11 516 2023-02-06 46.9% no ca Catalan 231 516 285 2023-02-06 FALSE
ca@valencia ca@valencia Catalan (Valencian) 483 33 337 516 2023-02-06 93.6% yes ca@valencia Valencian 482 516 34 2023-02-06 FALSE
cs cs Czech 483 33 48 516 2023-02-06 93.6% yes cs Czech 483 516 33 2023-02-06 FALSE
da da Danish 465 51 27 516 2023-02-06 90.1% yes da Danish 509 516 7 2023-02-06 FALSE
de de German 516 0 437 516 2023-02-06 100.0% yes de German 516 516 0 2023-02-06 FALSE
el el Greek 366 150 284 516 2023-02-06 70.9% no el Greek 366 516 150 2023-02-06 FALSE
en en English 516 0 0 516 2023-02-06 100.0%   en English 516 516 0 2023-02-06 FALSE
en-AU en_AU English (Australia) 395 121 387 516 2023-02-06 76.6% yes en_AU English (Australia) 395 516 121 2023-02-06 FALSE
en-GB en_GB English (United Kingdom) 516 0 332 516 2023-02-06 100.0% yes en_GB English (United Kingdom) 491 516 25 2023-02-06 FALSE
eo eo Esperanto 366 150 0 516 2023-02-06 70.9% no eo Esperanto 366 516 150 2023-02-06 FALSE
es es Spanish 437 79 66 516 2023-02-06 84.7% yes es Spanish 516 516 0 2023-02-06 FALSE
et et Estonian 120 396 0 516 2023-02-06 23.3% no et Estonian 120 516 396 2023-02-06 FALSE
eu eu Basque 443 73 0 516 2023-02-06 85.9% yes eu Basque 443 516 73 2023-02-06 FALSE
fi fi Finnish 364 152 5 516 2023-02-06 70.5% no fi Finnish 359 516 157 2023-02-06 FALSE
fr fr French 516 0 516 516 2023-02-06 100.0% yes fr French 516 516 0 2023-02-06 FALSE
fr-CA fr_CA French (Canada) 249 267 244 516 2023-02-06 48.3% no fr_CA French (Canada) 5 516 511 2023-02-06 FALSE
fy fy Western Frisian 428 88 2 516 2023-02-06 82.9% yes fy Frisian 428 516 88 2023-02-06 FALSE
gl gl Galician 23 493 0 516 2023-02-06 4.5% no gl Galician 23 516 493 2023-02-06 FALSE
he-IL he_IL Hebrew (Israel) 111 405 0 516 2023-02-06 21.5% no he_IL Hebrew (Israel) 111 516 405 2023-02-06 FALSE
hu hu Hungarian 516 0 341 516 2023-02-06 100.0% yes hu Hungarian 516 516 0 2023-02-06 FALSE
id id Indonesian 447 69 214 516 2023-02-06 86.6% yes id Indonesian 444 516 72 2023-02-06 FALSE
it it Italian 508 8 293 516 2023-02-06 98.4% yes it Italian 507 516 9 2023-02-06 FALSE
ja ja Japanese 423 93 7 516 2023-02-06 82.0% yes ja Japanese 423 516 93 2023-02-06 FALSE
ko-KR ko_KR Korean (Korea) 516 0 516 516 2023-02-06 100.0% yes ko Korean 516 516 0 2023-02-06 TRUE
lt lt Lithuanian 438 78 209 516 2023-02-06 84.9% yes lt Lithuanian 441 516 75 2023-02-06 FALSE
nb nb Norwegian Bokmål 340 176 123 516 2023-02-06 65.9% no nb_NO Norwegian Bokmål 217 516 299 2023-02-06 TRUE
ne ne Nepali 25 491 0 516 2023-02-06 4.8% no ne Nepali 25 516 491 2023-02-06 FALSE
nl nl Dutch 512 4 508 516 2023-02-06 99.2% yes nl Dutch 510 516 6 2023-02-06 FALSE
nn nn Norwegian Nynorsk 237 279 92 516 2023-02-06 45.9% no nn Norwegian Nynorsk 145 516 371 2023-02-06 FALSE
pl pl Polish 516 0 516 516 2023-02-06 100.0% yes pl Polish 516 516 0 2023-02-06 FALSE
pt-BR pt_BR Portuguese (Brazil) 512 4 19 516 2023-02-06 99.2% yes pt_BR Portuguese (Brazil) 512 516 4 2023-02-06 FALSE
pt-PT pt_PT Portuguese (Portugal) 512 4 502 516 2023-02-06 99.2% yes pt_PT Portuguese (Portugal) 512 516 4 2023-02-06 FALSE
ro-RO ro_RO Romanian (Romania) 419 97 112 516 2023-02-06 81.2% yes ro Romanian 419 516 97 2023-02-06 TRUE
ru ru Russian 504 12 346 516 2023-02-06 97.7% yes ru Russian 499 516 17 2023-02-06 FALSE
si si Sinhala 458 58 61 516 2023-02-06 88.8% yes si Sinhala 458 516 58 2023-02-06 FALSE
sk sk Slovak 338 178 5 516 2023-02-06 65.5% no sk Slovak 338 516 178 2023-02-06 FALSE
sl sl Slovenian 469 47 56 516 2023-02-06 90.9% yes sl Slovenian 464 516 52 2023-02-06 FALSE
sq sq Albanian 68 448 0 516 2023-02-06 13.2% no sq Albanian 68 516 448 2023-02-06 FALSE
sv sv Swedish 516 0 0 516 2023-02-06 100.0% yes sv Swedish 516 516 0 2023-02-06 FALSE
tr tr Turkish 516 0 516 516 2023-02-06 100.0% yes tr Turkish 516 516 0 2023-02-06 FALSE
uk uk Ukrainian 516 0 61 516 2023-02-06 100.0% yes uk Ukrainian 455 516 61 2023-02-06 FALSE
vi vi Vietnamese 238 278 0 516 2023-02-06 46.1% no vi Vietnamese 238 516 278 2023-02-06 FALSE
zh-CN zh_CN Chinese (China) 516 0 134 516 2023-02-06 100.0% yes zh_Hans Chinese (Simplified) 515 516 1 2023-02-06 TRUE
zh-TW zh_TW Chinese (Taiwan) 453 63 8 516 2023-02-06 87.8% yes zh_Hant Chinese (Traditional) 453 516 63 2023-02-06 TRUE
zh-HK zh_HK Chinese (Hong Kong) 507 9 0 516 2023-02-06 98.3% yes zh_Hant_HK Chinese (Traditional, Hong Kong) 507 516 9 2023-02-06 TRUE
ach ach Acoli 0 516 0 516 2023-02-06 0.0% no             TRUE
bn bn Bengali 0 516 0 516 2023-02-06 0.0% no             TRUE
da-DK da_DK Danish (Denmark) 0 516 0 516 2023-02-06 0.0% no             TRUE
es-ES es_ES Spanish (Spain) 447 69 337 516 2023-02-06 86.6% yes             TRUE
fa fa Persian 0 516 0 516 2023-02-06 0.0% no             TRUE
ga-IE ga_IE Irish (Ireland) 0 516 0 516 2023-02-06 0.0% no             TRUE
hi hi Hindi 0 516 0 516 2023-02-06 0.0% no             TRUE
hr-HR hr_HR Croatian (Croatia) 0 516 0 516 2023-02-06 0.0% no             TRUE
ja-JP ja_JP Japanese (Japan) 0 516 0 516 2023-02-06 0.0% no             TRUE
lv lv Latvian 0 516 0 516 2023-02-06 0.0% no             TRUE
sk-SK sk_SK Slovak (Slovakia) 0 516 0 516 2023-02-06 0.0% no             TRUE
sq-AL sq_AL Albanian (Albania) 0 516 0 516 2023-02-06 0.0% no             TRUE
sr sr Serbian 0 516 0 516 2023-02-06 0.0% no             TRUE
ta ta Tamil 0 516 0 516 2023-02-06 0.0% no             TRUE
zh zh Chinese 0 516 0 516 2023-02-06 0.0% no             TRUE

@calmh
Copy link
Member

calmh commented Feb 7, 2023

Todos 1 and 2 are complete here, the only transifex import that runs is via GitHub actions which is updated in build.sh and the token I just added.

Copy link
Member

@calmh calmh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, engage

@calmh calmh merged commit 784129e into syncthing:main Feb 7, 2023
@acolomb
Copy link
Member Author

acolomb commented Feb 7, 2023

Wow, that was quick :-)

Let me see what I can do about the follow-ups right away.

@acolomb
Copy link
Member Author

acolomb commented Feb 7, 2023

Did you use the project token or something specific for your Weblate user account?

@calmh
Copy link
Member

calmh commented Feb 7, 2023

I grabbed mine from my account page, didn't know there was a project one. It's easy to change if required.

@acolomb
Copy link
Member Author

acolomb commented Feb 7, 2023

We can generate a new one at https://hosted.weblate.org/access/syncthing/#api (you should have admin access already), or I can send you the one I previously created (it's not displayed in the Web GUI anymore, but I have it). In case of the latter, do you have any preferred way of securely receiving private information? Threema, GitHub PM, E-Mail/OpenPGP?

@acolomb
Copy link
Member Author

acolomb commented Feb 9, 2023

@calmh can you please help out on points 6, 7 and 9 (optionally also 3) of the check-list above?

@calmh
Copy link
Member

calmh commented Feb 9, 2023

I've done the needful on the points above, except the release notes. The Spanish language change will be included if we close that issue by a PR, otherwise the release notes are for users who will not necessarily care about this change; those that do should run into the read-onlyness and announcement on transifex, or see the notes on the forum.

@acolomb
Copy link
Member Author

acolomb commented Feb 9, 2023

Nice, thanks @calmh!

Right the Weblate transition itself is not very important for users, and anyone interested in translations at all will get a heads-up when looking at why Spanish was removed. So I guess we can consider it done.

@acolomb acolomb deleted the weblate branch February 9, 2023 08:59
@calmh calmh added this to the v1.23.2 milestone Feb 12, 2023
calmh added a commit to calmh/syncthing that referenced this pull request Feb 22, 2023
* main: (48 commits)
  build: Use Go 1.19.6 for Windows
  build: Update dependencies
  gui, man, authors: Update docs, translations, and contributors
  gui: Remove duplicate Spanish (Spain) translation (fixes syncthing#8781) (syncthing#8782)
  gui: Add xattr filter editor (fixes syncthing#8660) (syncthing#8734)
  gui: Switch to Weblate for translations (syncthing#8777)
  all: Use new Go 1.19 atomic types (syncthing#8772)
  gui, man, authors: Update docs, translations, and contributors
  build: Update quic-go and pfilter for Go 1.20 (fixes syncthing#8768) (syncthing#8769)
  Add forgotten copyright notices
  cmd, docker: Updates for infrastructure
  cmd/ursrv: The driver import is important, though
  cmd/ursrv: Remove old, unused migration code
  cmd/ursrv: Harmonize timespan of charts
  cmd/ursrv: Remove broken and unsustainable join/leave chart
  cmd/ursrv: Fix broken block transfer chart
  gui, man, authors: Update docs, translations, and contributors
  gui: Fix broken link to Transifex in lang/README.txt (syncthing#8761)
  gui, man, authors: Update docs, translations, and contributors
  Handle relay connect timeout (fixes syncthing#8749) (syncthing#8755)
  ...
calmh added a commit to imsodin/syncthing that referenced this pull request Mar 10, 2023
* main: (46 commits)
  build: Update dependencies
  lib/api: Expose `blocksHash` in file info (syncthing#8810)
  gui, man, authors: Update docs, translations, and contributors
  lib/discover: Don't leak relay-tokens to discovery (syncthing#8762)
  gui, man, authors: Update docs, translations, and contributors
  gui: Add Croatian (hr) translation template (syncthing#8801)
  build(deps): bump github.com/quic-go/quic-go from 0.32.0 to 0.33.0 (syncthing#8800)
  cmd/stupgrades: Cache should apply to HEAD as well as GET
  build: Add more GitHub Actions
  gui: Remove non-existent customicons.css file reference (fixes syncthing#8797) (syncthing#8798)
  Only fail after chmod error if permissions differ (e.g. on config file) (syncthing#8771)
  gui, man, authors: Update docs, translations, and contributors
  build: Use Go 1.19.6 for Windows
  build: Update dependencies
  gui, man, authors: Update docs, translations, and contributors
  gui: Remove duplicate Spanish (Spain) translation (fixes syncthing#8781) (syncthing#8782)
  gui: Add xattr filter editor (fixes syncthing#8660) (syncthing#8734)
  gui: Switch to Weblate for translations (syncthing#8777)
  all: Use new Go 1.19 atomic types (syncthing#8772)
  gui, man, authors: Update docs, translations, and contributors
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Feb 7, 2024
@syncthing syncthing locked and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants