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

A tool to help to backport locales, changes source strings to fix other broken translations #23633

Merged
merged 10 commits into from
Mar 23, 2023

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 22, 2023

It use old en-US locales as reference, fill the old other locales with new locales.


More broken translations

Many translations are still broken. The reason is: at the last time restoring the ini to crowdin, many semicolon are treated as comments.

Two kinds of broken strings:

Some translations can be re-translated

skipping options/locale/locale_si-LK.ini org teams.add_nonexistent_repo
skipping options/locale/locale_tr-TR.ini repo commits.search.tooltip
skipping options/locale/locale_es-ES.ini repo settings.trust_model.committer.desc
skipping options/locale/locale_es-ES.ini admin dashboard.new_version_hint
skipping options/locale/locale_pt-PT.ini org teams.add_nonexistent_repo
skipping options/locale/locale_hu-HU.ini install require_sign_in_view_popup
skipping options/locale/locale_hu-HU.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini repo migrate.invalid_local_path
skipping options/locale/locale_id-ID.ini org teams.add_nonexistent_repo
skipping options/locale/locale_de-DE.ini repo settings.protect_protected_file_patterns_desc

So this PR also does some small changes on them, to trigger the re-translation.

The locale_el-GR.ini contains many broken tranlsations

I guess we should reset them from crowdin side, then translators can re-translate them.


Update: in latest main, the strings have been fixed.

TODO

Update: the el-GR translators have done great job and fixes these broken translations.

Merge this PR ASAP and upload locale_el-GR.ini to crowdin to remove broken strings.

Out-dated, fixed in main.

image

@wxiaoguang wxiaoguang force-pushed the fix-locale-backport branch 2 times, most recently from 7436bb7 to 910036c Compare March 22, 2023 12:45
@wxiaoguang wxiaoguang marked this pull request as draft March 22, 2023 12:51
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2023

Codecov Report

Merging #23633 (cacd252) into main (f521e88) will increase coverage by 0.00%.
The diff coverage is 37.89%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff            @@
##             main   #23633    +/-   ##
========================================
  Coverage   47.14%   47.14%            
========================================
  Files        1149     1154     +5     
  Lines      151446   152353   +907     
========================================
+ Hits        71397    71826   +429     
- Misses      71611    72050   +439     
- Partials     8438     8477    +39     
Impacted Files Coverage Δ
cmd/dump.go 0.67% <0.00%> (ø)
cmd/web.go 0.00% <0.00%> (ø)
models/actions/run.go 1.64% <0.00%> (-0.08%) ⬇️
models/actions/runner.go 1.44% <ø> (ø)
models/packages/package.go 45.45% <0.00%> (-1.13%) ⬇️
models/user/search.go 77.50% <0.00%> (-6.29%) ⬇️
modules/actions/github.go 0.00% <0.00%> (ø)
modules/actions/workflows.go 0.00% <0.00%> (ø)
modules/context/context.go 64.54% <0.00%> (-3.53%) ⬇️
modules/doctor/storage.go 31.93% <0.00%> (ø)
... and 33 more

... and 41 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 22, 2023
@yardenshoham yardenshoham added the skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. label Mar 22, 2023
@wxiaoguang wxiaoguang force-pushed the fix-locale-backport branch 5 times, most recently from a3c67cd to 2f05d3b Compare March 22, 2023 14:23
@wxiaoguang wxiaoguang marked this pull request as ready for review March 22, 2023 14:27
@wxiaoguang wxiaoguang changed the title A tool to help to backport locales A tool to help to backport locales, fix broken translations Mar 22, 2023
@zeripath
Copy link
Contributor

I think there's still a bug here. The Czech locale file in the referenced PR has ended up with an unclosed quote

@wxiaoguang
Copy link
Contributor Author

I think there's still a bug here. The Czech locale file in the referenced PR has ended up with an unclosed quote

Two bugs:

  1. The semicolon in strings, cause the last restoring to Crowdin become a mess
  2. The Czech is still buggy in crowdin (still caused by last restoring)

They are all caused by the old update-locales.sh and the last restoring. But we can not import our ini to crowdin because they are still incompatible.

I can do nothing at the moment because I do not have privileges.

See the crowdin:

https://crowdin.com/translate/gitea/68/enus-cs?filter=advanced&value=12&verbal_expression_scope=translations&sort_method=1#q=run_user_not_match

image

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Mar 23, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 23, 2023
@wxiaoguang wxiaoguang changed the title A tool to help to backport locales, fix broken translations A tool to help to backport locales, changes source strings to fix other broken translations Mar 23, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2023
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
options/locale/locale_en-US.ini Outdated Show resolved Hide resolved
@techknowlogick techknowlogick enabled auto-merge (squash) March 23, 2023 16:54
@techknowlogick
Copy link
Member

ping lg-tm

@techknowlogick techknowlogick merged commit 95818ad into go-gitea:main Mar 23, 2023
@techknowlogick techknowlogick added this to the 1.20.0 milestone Mar 23, 2023
@techknowlogick techknowlogick removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 23, 2023
@wxiaoguang wxiaoguang deleted the fix-locale-backport branch March 24, 2023 01:11
lunny pushed a commit that referenced this pull request Mar 24, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 24, 2023
* upstream/main:
  Fix incorrect `HookEventType` of pull request review comments (go-gitea#23650)
  [skip ci] Updated translations via Crowdin
  Fix codeblocks in the cheat sheet (go-gitea#23664)
  Drop migration for ForeignReference (go-gitea#23605)
  Fix new issue/pull request btn margin when it is next to sort (go-gitea#23647)
  A tool to help to backport locales, changes source strings to fix other broken translations (go-gitea#23633)
  Fix incorrect `show-modal` and `show-panel` class (go-gitea#23660)
  Restructure documentation. Now the documentation has installation, administration, usage, development, contributing the 5 main parts (go-gitea#23629)
  Check LFS/Packages settings in dump and doctor command (go-gitea#23631)
  Use a general approach to show tooltip, fix temporary tooltip bug (go-gitea#23574)
  Improve workflow event triggers (go-gitea#23613)
  Improve `<SvgIcon>` to make it output `svg` node and optimize performance (go-gitea#23570)
lunny pushed a commit that referenced this pull request Mar 31, 2023
…x some strings with semicolons (#23819)

Follow #23633 and #23240

Close #23814

Now we almost have a complete test set for Gitea's LocalStore.

This PR is still a quick fix for the legacy locale system (see the
TODOs), to resolve the problems fundamentally, it needs more work in the
future.
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants