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

Sorting existing languages in the menu #2701

Merged
merged 1 commit into from
Feb 29, 2024
Merged

Conversation

shurup
Copy link
Collaborator

@shurup shurup commented Dec 11, 2023

Describe your changes

As discussed before (see the issue below), ordering the localisations in the top-right menu seems a good idea. However, while implementing it, I realised that sorting localisations written in various languages can be quite tricky.

Based on this ICU demo and some common sense (e.g. looking at how Google sorts the languages in its interfaces), I ended up with this order for existing languages:

  • English (should be always first anyway)
  • Deutsch
  • Español (Spanish)
  • Français (French)
  • Italiano
  • Português
  • हिन्दी (Hindi)
  • বাংলা (Bengali)
  • 한국어 (Korean)
  • 简体中文 (Simplified Chinese)
  • 繁體中文 (Traditional Chinese)
  • اردو (Urdu)

I'll be happy to see any other thoughts on the best order (if there are any).

One last important thing to be aware of: we will have to update various weight values for various languages with each new localisation added (since this new language might have a higher position in the resulting menu).

Related issue number or link (ex: resolves #issue-number)

Resolves #2480

Checklist before opening this PR (put x in the checkboxes)

  • This PR does not contain plagiarism
    • don’t copy other people’s work unless you are quoting and contributing it to them.
  • I have signed off on all commits
    • signing off (ex: git commit -s) is to affirm that commits comply DCO. If you are working locally, you could add an alias to your gitconfig by running git config --global alias.ci "commit -s".

Copy link

netlify bot commented Dec 11, 2023

Deploy Preview for cncfglossary ready!

Name Link
🔨 Latest commit 739132a
🔍 Latest deploy log https://app.netlify.com/sites/cncfglossary/deploys/65e018a0fe29d000088bfb86
😎 Deploy Preview https://deploy-preview-2701--cncfglossary.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

Hi @shurup
Thanks for implementing #2480 :)

I agree with the current sorting method. (actually, I think the order depends on personal preferences)

Since you've sorted based on English words, it would be better to add (complete) English word for each language title to improve consistency.

languageName = "Português (Portuguese)"
languageName = "Italiano (Italian)"
languageName ="Deutsch (German)"

If German is acceptable, I guess we need to change the order for Deutsch

config.toml Outdated Show resolved Hide resolved
config.toml Outdated Show resolved Hide resolved
config.toml Outdated Show resolved Hide resolved
@seokho-son seokho-son added the maintainers Use this label if PR requires maintainers to take action label Dec 11, 2023
@shurup
Copy link
Collaborator Author

shurup commented Dec 11, 2023

it would be better to add (complete) English word for each language title to improve consistency.

Great idea indeed, thank you!

Since you've sorted based on English words

Just to clarify this moment: currently, the sorting is based not on the English words, but on some kind of transliteration of original language names into English. It means we consider Español (Spanish) as a language name starting from E (not from S). That's why Deutsch, which starts from D, seems to be in place — i.e., despite adding its English name after the original form, we still consider Deutsch as the main word for sorting.

@seokho-son
Copy link
Collaborator

Hi @shurup, my assumption about sorting by English was a misunderstanding. ;)

However, still, I believe having a clear and consistent criterion for ordering is preferable. From this perspective, I'd like to suggest listing based on the English words written in parentheses. This is important as we also need to update the guidelines accordingly.

In fact, as you mentioned, languages like Español and Deutsch can be read in English, so matching the sorting criteria to this makes sense. However, considering other languages and potential new additions, I want to avoid any special complications.

After all, local users will quickly find their language regardless of the order (for example, Koreans will easily spot 한국어), and they are unlikely to search based on the English spelling in the parentheses. If the sorting is done in English, primarily for the benefit of English-speaking locals (mainly in the US), I don't see a major issue.

What do you think?

I'd like hear @nate-double-u and @iamNoah1 's opinion as well. :)

@nate-double-u
Copy link
Member

Do we need the English in parentheses? We can order it that way if we'd like, but i'm not sure we need the language name in English. I'm thinking about who the menu item is for -- English speakers will see "English" in English, so will be able to navigate if needed, and other language readers will see their language written in their language, so I'm not sure what the value of having each language's name listed in English would be.

I'm happy for the sorting to be done with this transliteration process, but we should update the https://github.com/cncf/glossary/blob/main/LOCALIZATION.md file with the new process.

@iamNoah1
Copy link
Collaborator

I agree with sorting based on english term, but also not sure if we need to add it in parentheses. But I have also no strong opinion about the later.

@Okabe-Junya
Copy link
Collaborator

Hi there!!

FYI: In kubernetes/website repo as well, a similar PR has been created.

If this is helpful for English speakers, I agree with merging this PR. (as son-san mentioned, many Japanese would look for "日本語" too).

Additionally, if we make this change, it seems more understandable to have config.toml in the order of weights. In other words, it seems easier to read if it is as follows:

[languages.foo]
...
 weight = 2

[languages.bar]
...
weight = 3

@shurup
Copy link
Collaborator Author

shurup commented Jan 26, 2024

Thank you everyone for your thoughts!

Personally, I think that following the English words to order languages and removing English in parentheses doesn't make much sense. Based on those criteria, we'll get such a list:

  • বাংলা
  • English (or it might still go the first one)
  • Français
  • Deutsch
  • हिन्दी
  • Italiano
  • 한국어
  • Português
  • 简体中文
  • Español
  • 繁體中文
  • اردو

… which seems to be quite random to me as a person who can't read any non-Latin symbols. (And I guess it will still be pretty awkward for those who can read more languages, but definitely not all of them.) Adding the English names in parentheses helps simply because I start seeing some logic behind this ordering 🤣

At the same time, perhaps the transliteration of all languages is too difficult to explicitly explain and maintain (e.g., writing guidelines, etc.), which I can fully understand.

Thus, I think that sorting the English names and specifying those English names in parentheses is the best compromise. As I can see from the Kubernetes documentation (thanks, @Okabe-Junya, for sharing!), the same logic was applied there.

I also like the idea of reordering the language blocks in config.toml according to the newly determined UI-facing weights of languages.

Does this all sound reasonable to others? If so, I'm ready to make corresponding changes, including those in the "Initiating a new localization team" docs. Otherwise, let's decide which way will be better.

Copy link
Collaborator

@iamNoah1 iamNoah1 left a comment

Choose a reason for hiding this comment

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

Sounds fair :)

@seokho-son
Copy link
Collaborator

Hi @nate-double-u @iamNoah1 @Okabe-Junya @shurup

Thank you to everyone who participated in the discussion. (And a special thanks to @shurup for summing it up so well)
It seems we've reached a general consensus through our discussion. As I mentioned initially, given that the Glossary is viewed by audiences speaking various languages, it seemed unlikely that there would be a clear-cut sorting method. In open source, even if there's no single right answer, the best solution often emerges through discussion. :) Thanks again.

Here's a summary, and it would be great if @shurup could confirm and implement these:

  • Add parentheses after the language names to include the Latin transcription (to be added for languages currently not having this).
  • Sort each language based on the alphabetized transcription using the 'weight' in the config (but let's keep English first, as it's the source of the Glossary definitions).
  • Arrange the order of language settings in the config also according to their weight.

Additional points for implementation:

@shurup
Copy link
Collaborator Author

shurup commented Jan 30, 2024

Thanks for this excellent summary (and your very detailed ToDo list), @seokho-son! I'll make relevant changes and let you know here.

@shurup shurup force-pushed the reorder-lang-menu branch 3 times, most recently from 292b1e4 to 35bde54 Compare February 9, 2024 09:35
@shurup
Copy link
Collaborator Author

shurup commented Feb 9, 2024

Hi @seokho-son! All changes are done, including a corresponding update of the documentation (LOCALIZATION.md). Please review them and let me know if something needs to be corrected.

Conflicts are also resolved now.

Copy link
Collaborator

@iamNoah1 iamNoah1 left a comment

Choose a reason for hiding this comment

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

thanks @shurup LGTM. Just some minor suggestions if you want you can add them.

LOCALIZATION.md Outdated Show resolved Hide resolved
LOCALIZATION.md Outdated Show resolved Hide resolved
LOCALIZATION.md Outdated Show resolved Hide resolved
Signed-off-by: Dmitry Shurupov <dmitry.shurupov@palark.com>
@shurup
Copy link
Collaborator Author

shurup commented Feb 29, 2024

Thanks, @iamNoah1! I applied your changes: dots instead of semicolons at the end of lists. My sense of beauty also suggested I should then capitalise the first letters in this list, which I did.

I also rebased this PR to main and fixed the order for the newly added Turkish localisation. If everything is good, it would be fantastic to merge it and avoid further rebasing/reordering for new languages 😅 🙏

Copy link
Collaborator

@seokho-son seokho-son left a comment

Choose a reason for hiding this comment

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

+1 approval to help @iamNoah1 make final decision. :)

@iamNoah1
Copy link
Collaborator

@shurup thanks a lot for your contribution :) lgtm

@iamNoah1 iamNoah1 merged commit 1aa8acc into cncf:main Feb 29, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainers Use this label if PR requires maintainers to take action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Localizations order in the menu
5 participants