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

Update translations from Crowdin #4121

Merged
merged 6 commits into from Sep 15, 2020
Merged

Update translations from Crowdin #4121

merged 6 commits into from Sep 15, 2020

Conversation

Senen
Copy link
Member

@Senen Senen commented Sep 4, 2020

References

This PR replaces #3944 and solves #4120.

Objectives

Update translations from Crowdin and enable languages with higher translation ratio:

Following languages are now available by default:

  • Bulgarian (bg): 98,5 % translated
  • Catalan (ca): 100 % translated
  • Spanish from Perú (es-PE): 64,8 % translated
  • Euskara (eu): 67,8 % translated
  • Georgian (ka): 98,9 % translated
  • Occitan (oc): 98,9 % translated
  • Romanian (ro): 99,1 % translated
  • Serbian (Cirylic) (sr-SP): 95,9 % translated

Also add custom fallbacks for the some of them:

  • Catalan (ca) => Español (val)
  • Español de Perú (es-PE) => Español (es)
  • Euskara (eu) => Español (es)
  • Portugues-Brazilero => Español (es)
  • Occitan (oc) => French (fr)

Other languages (Bulgarian, Georgian, Romanian and Serbian (Cirylic)) will have the default fallback language: English (en).

Remove the duplicated files for Norwegian (Norway) language, we only kept the ones using nn as locale code inside files and as language translations directory. Crowdin is sending Norwegian (Norway) translations using nn.

This PR also enables the Serbian (Cirylic) language because it has a very high translation but Crowdin is sending Serbian (Latin) translations with the same locale code sr that is using for Serbian (Cyrillic) language (which is not enabled yet because its current low translation ratio). To solve this we updated all Serbian (Latin) locale codes from sr to sr-CS manually and added a new language mapping at the crowdin.yml configuration file so Serbian (Latin) translation will come using sr-CS locale code.

Crowdin post-processors

Recently Crowdin integration xtarted to change Portuguese-Brazileiro locale code from pt-BR to pt, this was due to some internal change at Crowdin platform. As this would break the Portuguese Brazileiro translations i asked for Crowdin support and they enabled an internal post-processor to avoid this change.

I think that this might be configurable from Crowdin settings or via the crowdin.yml file we have, but this seems to be a setting only available on request to the Crowdin support service. This might a little bit confusing for developers as they cannot see this kind of setting nowhere within our codebase.

Comparison with previous release status (1.1.0)

Here is a comparison table between translation status of latest release 1.1.0 and this branch (i18n_crowdin).

Locale Missing ( v 1.1 ) Unused ( v 1.1 ) Interpolations ( v 1.1 ) Ratio %  ( v 1.1 ) ( 3442 keys ) Missing ( i18n_crowdin ) Unused Latest ( i18n_crowdin ) Interpolations ( i18n_crowdin ) Ratio %( i18n_crowdin ) ( 3467 keys ) Comment > 60%
ar 233 0 23 93,2 269     92,2 Worse  
ast 1437 0 0 58,3 1471     57,6 Worse  
ban 3316 0 0 3,7 3335     3,8 Better  
bg       0,0 49   23 98,6 Better Enable
bn 3265 0 0 5,1 3284     5,3 Better  
bs 625 0 0 81,8 655     81,1 Worse  
ca 1486 0 0 56,8 1     100,0 Better Enable
cs 642 12 0 81,3 585 13   83,1 Better  
da 216 1 0 93,7 92     97,3 Better  
de 9 0 0 99,7 45     98,7 Worse  
el 293 0 0 91,5 262     92,4 Better  
en 0 0 0 100,0 0     100,0 Source  
en-GB 3314 0 0 3,7 3333     3,9 Better  
en-US 3279 0 0 4,7 3298     4,9 Better  
es 0 0 1 100,0 0     100,0 Source  
es-PE 1139 0 0 66,9 1173     66,2 Worse  
eu 3200 0 0 7,0 1073   14 69,1 Better Enable
fa 1205 0 0 65,0 1236     64,3 Worse  
fi 2241 0 0 34,9 2270     34,5 Worse  
fr 589 0 0 82,9 550 1   84,1 Better  
gd       0,0 3335     3,8 Better  
gl 514 0 0 85,1 550     84,1 Worse  
he 248 0 0 92,8 285     91,8 Worse  
hr 384 0 0 88,8 113     96,7 Better  
hu 3316 0 0 3,7 3335     3,8 Better  
id 961 3 0 72,1 995 1   71,3 Worse  
it 566 0 0 83,6 592     82,9 Worse  
ka       0,0 37   1 98,9 Better Enable
mk 3254 0 0 5,5 2292     33,9 Better  
nl 650 0 0 81,1 686     80,2 Worse  
nn 2612 0 13 24,1 2639   13 23,9 Worse  
oc       0,0 37     98,9 Better Enable
pap 3314 0 0 3,7 3333     3,9 Better  
pl 688 0 0 80,0 705     79,7 Worse  
pt 3316 0 0 3,7 3335     3,8 Better  
pt-BR 132 0 1 96,2 1   1 100,0 Better  
ro 3316 0 0 3,7 29   13 99,2 Better Enable
ru 265 4 0 92,3 301 4   91,3 Worse  
sh 3316 0 0 3,7 3335     3,8 Better  
si 3316 0 0 3,7 3335     3,8 Better  
sl 1247 11 0 63,8 1275 11   63,2 Worse  
so 807 0 0 76,6 843     75,7 Worse  
sq 797 0 0 76,8 833     76,0 Worse  
sr-CS 3316 0 0 3,7 3335     3,8 Better  
sr-SP 3316 0 0 3,7 141   1 95,9 Better Enable
sv-FI 3298 0 0 4,2 3317     4,3 Better  
sv 259 0 0 92,5 36     99,0 Better  
tr 229 0 0 93,3 265     92,4 Worse  
val 755 0 0 78,1 791     77,2 Worse  
yi 3316 0 0 3,7 3335     3,8 Better  
zh-CN 795 3 0 76,9 829 1   76,1 Worse  
zh-TW 815 3 0 76,3 848 1   75,5 Worse  

Note: Ratios in the table above were calculated considering the amount of keys translated so that percentages will not match the percentages shown at Crowding project homepage where the calculation considers the amount of translated words instead of the amount of translated keys.

As you can see at table above some languages (23) translation ratio decreased compared to previous Consul release 1.1.0 but we can consider the decrease small, the biggest translation ratio decrease is about of 1% so there is nothing to worry about, this decrease is due to changes at source strings or new ones added in work done from 1.1.0 release date. This can be fixed by the translators of each language by adding/updating translations for new/updated source strings.

The same happens with new inconsistent interpolations ... it can be fixed by the translators through Crowding application.

@Senen Senen self-assigned this Sep 4, 2020
@Senen Senen linked an issue Sep 4, 2020 that may be closed by this pull request
@Senen Senen force-pushed the i18n_crowdin branch 5 times, most recently from 92ea6fa to 33eebaa Compare September 5, 2020 10:43
@Senen Senen marked this pull request as ready for review September 5, 2020 11:56
@javierm javierm added the 1.2 label Sep 7, 2020
@javierm javierm added this to Reviewing in Consul Democracy via automation Sep 7, 2020
Copy link
Member

@javierm javierm left a comment

Choose a reason for hiding this comment

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

Cool 😄. I've left a few comments; let me know what you think 😉.

config/locales/es/general.yml Show resolved Hide resolved
config/locales/sr-SP/activemodel.yml Outdated Show resolved Hide resolved
config/application.rb Show resolved Hide resolved
config/application.rb Outdated Show resolved Hide resolved
@javierm javierm moved this from Reviewing to Doing in Consul Democracy Sep 9, 2020
@Senen Senen marked this pull request as draft September 15, 2020 10:22
@Senen Senen marked this pull request as ready for review September 15, 2020 15:23
@Senen Senen moved this from Doing to Reviewing in Consul Democracy Sep 15, 2020
@Senen Senen requested a review from javierm September 15, 2020 15:24
Consul Democracy automation moved this from Reviewing to Testing Sep 15, 2020
Following locales are now available by default:

* "bg" (Bulgarian):              98,5% translated
* "ca" (Catalan):               100  % translated
* "es-PE" (Spanish from Perú):   64,8% translated
* "eu" (Euskara):                67,8% translated
* "ka" (Georgian):               98,9% translated
* "oc" (Occitan):                98,9% translated
* "ro" (Romanian):               99,1% translated

Spanish and Euskara were enabled becuase both are near the 70% and its
fallback language (Spanish) is complete.

Add custom fallbacks:

* Catalan (ca)                 => Español (es).
* Español de Perú (es-PE)      => Español (es).
* Euskara (eu)                 => Español (es).
* Portuguese-Brazilero (pt-BR) => Español (es).
* Occitan (oc)                 => French (fr)
I realized Crowdin suddenly started to change Portuguese-Brazilero locale
codes so i asked for Crowdin support and they fixed the problem by configuring
an internal post-processor for this project so the reason seems to be some
change on the Crowdin side. I tested it successfully by making a dummy update
on one translation to see if next commits for this language will come with the
right locale ... and it worked nice!
Consul uses two variants of Serbian: Serbian (Cirylic), and
Serbian (Latin) so wee need to use different locale codes for each of
them to avoid collisions.

The folder names of both languages were correct but the locale code within
the files was the same for both languages "sr" so translations were mixed.

This commit changes the locale code within Serbian (Latin) translations
files to "sr-CS", also adds a new language mapping to the Crowdin config
file so next ConsulBot commits with Serbian (Latin) translations will be
done using the locale code defined at new language mapping.
Crowdin is sending Norwegian (Norway) translations to
`config/locales/nn` folder using the `nn`locale code inside files
and we do not have any other Norwegian dialect active at Crowdin
application so those files seem to not to be needed.
@javierm javierm merged commit 820c1f0 into master Sep 15, 2020
Consul Democracy automation moved this from Testing to Release 1.2.0 Sep 15, 2020
@javierm javierm deleted the i18n_crowdin branch September 15, 2020 16:11
@javierm javierm removed the 1.2 label Sep 15, 2020
@javierm javierm self-assigned this Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add new language to repo
2 participants