-
-
Notifications
You must be signed in to change notification settings - Fork 550
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
docs: refactor languages list #1012
Conversation
|
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Woo, this looks great! Was hoping you would find the time to do this.
One thought: should <I18nList />
take a prop to make the first letter uppercase? Something like <I18nList startsSentence />
?
In some languages, language names are not uppercased, but we should make it possible to start with a capital letter in e.g. Spanish if the list starts the sentence.
docs/src/components/i18n-list.astro
Outdated
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.
Nit: is <I18nList />
the clearest name here? Maybe <LanguagesList />
would be clearer?
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'd say LanguagesList
is more explicit
Looks great, but the |
|
Thanks @Alynva! Do you mean the start of the sentence or would you expect every word to be capitalized? |
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.
zh-CN
looks great to me! 👍
|
Every word, like it's in the original |
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.
es
LGTM ✅
Very creative component ✨ ."es" LGTM! |
|
* main: (22 commits) fix(docs-i18n-tracker): update `translations` import (withastro#1025) [ci] format i18n(zh-cn): Update css-and-tailwind.mdx (withastro#1018) [ci] format i18n(zh-cn): Update authoring-content.md (withastro#1016) i18n(ko-KR): update `configuration.mdx` (withastro#1015) i18n(ko-KR): update `sidebar.mdx` (withastro#1014) i18n(ko-KR): update `i18n.mdx` (withastro#1013) [ci] format i18n(ko-KR): update `frontmatter.md` (withastro#1017) [ci] format i18n(pt-BR): Update `css-and-tailwind.mdx`, `authoring-content.md` and `overrides.md` (withastro#1009) [ci] format [ci] release (withastro#996) Fix Prettier-compatibility of i18n test fixture Refactor translation system to be reusable in non-Astro code (withastro#1003) Add social icons to mobile menu footer (withastro#988) [ci] format Add Galician language support (withastro#1004) feat: add support for light / dark hero images (withastro#280) ...
That's a tricky question! TL;DR it shouldn't be capitalized, here's why: According to the Portuguese Language Orthographic Agreement of 1990 (translated for your convenience):
This rule says that the language name can be optionally capitalized when it's in a context related to the study of the language, like school, college, etc. I had originally thought (and that's why the current translation is capitalized) that this could also apply when specifying the available languages (as in, a language you know IS a "domain of knowledge"), but it does not after some research on language forums and official documents. Therefore, it falls back into the base rules of the language, meaning it should be written without capitalization, the same way as most other romance languages. |
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.
pt-BR
LGTM
Thanks everyone who jumped in, really appreciated 🙌 I just pushed an update including the following changes:
Note: I think we should maybe merge this when #1028 and #1019 are merged (and any other |
Co-authored-by: Chris Swithinbank <[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.
OK, I’m satisfied with this code and looks like we’ve got some good feedback to confirm how this will render for other languages.
I merged #1019 but looks like there are a few comments on #1028 we’ll need to wait on.
This PR is probably a fun one to use https://coauthor.kevinzunigacuellar.com/ on.
Oh definitely, it's gonna be a fun one 🎉 |
Amazing work!!! I've run it locally and it behaves well in Chinese. |
#1028 merged! |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Heh, inevitably we now have a new PR touching a translation of the i18n guide — #1052. Let's merge this anyway though and then update that PR. Otherwise we could be waiting a while. |
Merging this! Will leave a comment in #1052 so we remember to update that there. |
What kind of changes does this PR include?
Description
This PR is a follow up to this comment and refactors the list of supported languages in the Translate Starlight’s UI section of the docs Internationalization (i18n) page by replacing it by a dynamically generated list of languages.
The goal is that PRs adding new languages would no longer require follow-up i18n PRs.
Here is the diff for example in English:
The main difference is that the list of languages is now sorted alphabetically but here are the individual changes in the list of languages:
Norwegian
→Norwegian Bokmål
Farsi
→Persian
Simplified Chinese
→Chinese
For an easier global review, here are the diffs for each language of the docs site:
en
de
es
ja
Note: I included the entire existing sentence as I did not want to make mistakes while extracting the list of languages.
fr
it
id
zh-CN
Note: I included the entire existing sentence as I did not want to make mistakes while extracting the list of languages.
pt-BR
ko
Note: I included the entire existing sentence as I did not want to make mistakes while extracting the list of languages.
tr
Note: This page is using fallback content but I included what it would be if it was translated.
+ Almanca, Arapça, Çekçe, Çince, Danca, Endonezce, Farsça, Felemenkçe, Fransızca, İbranice, İngilizce, İspanyolca, İsveççe, İtalyanca, Japonca, Korece, Norveççe Bokmål, Portekizce, Rusça, Türkçe, Ukraynaca ve Vietnamca
ru
Note: I included the entire existing sentence as I did not want to make mistakes while extracting the list of languages.