docs
docs copied to clipboard
i18n(ar): Update nav.ts
Description (required)
I translated nav.ts.
Related issues & labels (optional)
- Suggested label: i18n
First-time contributor to Astro Docs?
@tarik
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| docs | ✅ Ready (Inspect) | Visit Preview | May 15, 2024 4:40pm |
Lunaria Status Overview
🌕 This pull request will trigger status changes.
Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.
Tracked Files
| Locale | File | Note |
|---|---|---|
| ar | nav.ts | Localization changed, will be marked as complete. 🔄️ |
Warnings reference
| Icon | Description |
|---|---|
| 🔄️ | The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied. |
Thanks @wpplumber, I'll just ask you to update the format the file is on.
As shown in the comment above this file:
/**
* This configures the navigation sidebar.
* All other languages follow this ordering/structure and will fall back to
* English for any entries they haven’t translated.
*
* - All entries MUST include `text` and `key`
* - Heading entries MUST include `header: true` and `type`
* - Link entries MUST include `slug` (which excludes the language code)
*
* For translators:
*
* Copy the English `key` value unchanged and translate only the `text` into your language:
*
* `src/i18n/en/nav.ts`: `{ text: 'Getting Started', slug: 'getting-started', key: 'getting-started' },`
* `src/i18n/ja/nav.ts`: `'getting-started': 'はじめに',`
*/
It should go back to the format it had before but with the keys updated, like so:
export default NavDictionary({
// Start Here
startHere: 'ابدأ هنا',
'getting-started': 'دليل البداية',
install: 'التثبيت',
'editor-setup': 'إعداد المحرر',
// (more keys...)
});
Welcome @yanthomasdev,
It should go back to the format it had before
I think I'm using the latest format used in the English version!
I think I'm using the latest format used in the English version!
Hey @wpplumber, sorry if I wasn't clear.
So, the format used in the English version is different because it has some additional metadata necessary to build the docs dashboard, those extra properties are not necessary in translations, and to avoid issues we ask for them to not be included in this case.
With the export default NavDictionary({}) format, you can only add the key of sidebar item and the translation as its value, and that makes it easier for future changes by you or other contributors without having to worry about the extra properties.
Again, here's the comment example from the file:
* For translators:
*
* Copy the English `key` value unchanged and translate only the `text` into your language:
*
* `src/i18n/en/nav.ts`: `{ text: 'Getting Started', slug: 'getting-started', key: 'getting-started' },`
* `src/i18n/ja/nav.ts`: `'getting-started': 'はじめに',`
*/
Let me know if you have any issues making this change!
Welcome @yanthomasdev,
I made changes based on your review.