Clarify routing logic config instruction#13879
Conversation
✅ Deploy Preview for astro-docs-2 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hello! Thank you for opening your first PR to Astro’s Docs! 🎉 Here’s what will happen next:
|
Lunaria Status Overview🌑 This pull request will not trigger status changes. Learn moreLunaria automatically ignores changes on specific PRs by adding a ignored keyword in its title. Found: You can change this by either removing the keyword above from the PR's title, or modifying the Tracked FilesNote The notes below indicate what would happen if the pull request is merged when triggering status changes. Since a ignored keyword was found in the PR's title, the status changes indicated below won't be applied.
Warnings reference
|
There was a problem hiding this comment.
Thanks for your contribution! We usually expect an issue or a discussion first when things are unclear... But you're right, the sentence was rather heavy.
You missed a parentheses, and I also suggested to simplify that sentence even more. Let me know if you think this matches your intent!
Edit: and because the wording affects the translations, we don't need i18nIgnore here. Except really obvious typo this is rarely useful because the English wording can affect how this is translated. So, I updated the PR title.
| ## Configure i18n routing | ||
|
|
||
| Both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)) and a default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale)), which must be one of the languages listed in `locales`, need to be specified in an `i18n` configuration object. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs. | ||
| When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs. |
There was a problem hiding this comment.
What about something like this? Do you think it's easier to read/understand?
| When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs. | |
| In your [`i18n` configuration](/en/reference/configuration-reference/#i18n), specify both a list of all supported [`locales`](/en/reference/configuration-reference/#i18nlocales) and a [`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale) present in that list. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs. |
My thinking is to improve the consistency at the same time. We usually don't use "languages (locales)" but "locales" directly (e.g. Custom locale paths), I don't see any reason to make an exception here. And, we can remove some words to make the sentence shorter and more direct.
There was a problem hiding this comment.
I personally think it makes sense to hint that a "locale" represents a language, for readers who are just setting this up for the first time. However, I was mostly leaving it in because it was already there.
This specific phrasing adds more complex words and sentence structure in the service of lowering word count, but my background is in writing for Global English and this isn't my style guide. ¯_(ツ)_/¯
There was a problem hiding this comment.
This specific phrasing adds more complex words and sentence structure
I'm not a native speaker, but I would say it's the other way around? Shorter and direct sentences are easier to parse. And a tool like the Hemingway App seems to say the same when comparing both sentences.
I personally think it makes sense to hint that a "locale" represents a language
Alright, I don't have a strong opinion on this.
| When you create an `i18n` configuration object, you must specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)), and set one of the locales in the list as the default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale). You can also configure more specific routing and fallback behavior to match your desired URLs. | |
| In your [`i18n` configuration](/en/reference/configuration-reference/#i18n), specify both a list of all supported languages ([`locales`](/en/reference/configuration-reference/#i18nlocales)) and a default language ([`defaultLocale`](/en/reference/configuration-reference/#i18ndefaultlocale)) present in that list. Additionally, you can configure more specific routing and fallback behavior to match your desired URLs. |
If you don't like this, do not hesitate to suggest something else. But, "When you create" and "you must" seem superfluous to me and an imperative style should be used instead.
this isn't my style guide
Well, you can read more about our style guide in Astro Docs Docs 😄
|
Sorry about the missed paren. I really wish Github had better syntax highlighting in the editor! I didn't have time to do a full checkout to edit it in my IDE, but wanted to fix this one. |
Description (required)
Reordering the sentence to be a little clearer about what you're doing in this step. (I need to make a fast-follow edit to
s/local/locale)First-time contributor to Astro Docs
👋 Hi, I'm SansContext on the Astro Discord. (I mostly hang out in #starlight )