-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Include languages' translated names in the switcher #245
Conversation
@JulienPalard @oonid @alessandrocucci @cocoatomo @flowdas @zhsj @mattwang44 @egeakman @raulcd I cannot request reviews. Pining coordianators to settle capitalization. |
Is it overloading the name field? In my opinion this is a little over complicated for static text that can be pre-stored as a string. It has no effect on the end user and is easier for us as the logic is simpler while still being well below 80 chars. |
I'm unsure what you mean here? Language names are proper nouns so must be capitalised. Did you ping people just to check spelling? Just for the future, it may be better to check these questions before pinging lots of people. A |
Treating language names as proper names is a weird thing that English does.
See here for the discussion: #244 (comment)
|
@AA-Turner Apologies, I assumed you had read the long exchange in my PR where this question had been asked. Petr has linked it. |
Co-authored-by: Ezio Melotti <[email protected]>
Co-authored-by: Rafael Fontenelle <[email protected]>
Thanks for linking to the thread! This table from Wikipedia suggests the following translations for languages.
Other sources:
A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are the common translations of Chinese in other language switches.
Co-authored-by: W. H. Wang <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the Spanish translation point of view.
@@ -388,7 +395,7 @@ def setup_switchers( | |||
- Cross-link various languages in a language switcher | |||
- Cross-link various versions in a version switcher | |||
""" | |||
language_pairs = sorted((l.tag, l.name) for l in languages if l.in_prod) | |||
language_pairs = sorted((l.tag, l.switcher_label) for l in languages if l.in_prod) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest sorting by name/switcher label instead of prioritizing the tag. This way it will be easier to find by English name lexicographically when the list will grow longer.
It will be predictable and natural where to look for a language knowing its English name.
Preview of how this would look by editing this into the HTML: HTML<select class="language-select"><option value="en">English</option><option value="es">Spanish | español</option><option value="fr">French | français</option><option value="it">Italian | italiano</option><option value="ja">Japanese | 日本語</option><option value="ko">Korean | 한국어</option><option value="pl">Polish | polski</option><option value="pt-br">Brazilian Portuguese | Português brasileiro</option><option value="tr">Turkish | Türkçe</option><option value="zh-cn">Simplified Chinese | 简体中文</option><option value="zh-tw">Traditional Chinese | 繁體中文</option></select> I don't think the mobile preview in Chrome accurately shows the dropdown (it shows it much smaller, so here's just a screenshot of how it is now on my Android. |
Let's go with this as a first step and see how things look. A |
pt_BR is big, I wish sometimes our language was Brazilian 😁 |
An alternative to #244 (closes #244, #238 if merged).
I think it is cleaner to use a new attribute for the local/translated/native name for each language, rather than overloading the
name
field. I agree with @encukou that the English name should come first, and that we should not de-emphasise the other name by using brackets for it.cc @StanFromIreland @rffontenelle @m-aciek as I can't request you as reviewers.
A