You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAINTAINERS.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,33 @@ For PRs that are translations to existing Docs content, including new page addit
93
93
- If you speak the language natively, check the content for accuracy. Note: some languages have created their own glossaries and/or language guides located in their language folder within `/src/i18n/`.
94
94
- If you do not speak the language natively, and the PR has not had any recent activity, you can use online translation tools (e.g. Google Translate) and scan the results for anything that looks wildly out of place. Also, visit the page in the PR’s Netlify deploy preview to verify that nothing is visually out of place. While we always prefer to have a review from a native speaker of the language, having translated docs with some errors is usually better than having no docs at all.
95
95
96
+
#### Correcting an Incorrect Translation Status
97
+
98
+
If the Translation Status Overview Issue incorrectly shows "needs updating" for a page (e.g. a typo fix to an English page triggered the status update), take the following steps to manually update the tracker:
99
+
100
+
- Open the [Translation Status Overview](https://github.com/withastro/docs/issues/438) Issue.
101
+
- Click the "Edit" button.
102
+
- Find the big JSON object at the end (i.e. the translation's internal progress data).
103
+
- Replace the `lastMajorChange` value of the affected languages with today's date and hour.
This process tells the tracker that the page was updated "now". The next time a PR gets merged, the translation tracking script will be rerun and the page will appear to have been updated, removing its "needs updating" icon.
Copy file name to clipboardExpand all lines: TRANSLATING.md
+89-39Lines changed: 89 additions & 39 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,24 +4,31 @@ Thanks for your interest in helping us translate [docs.astro.build](https://docs
4
4
5
5
## Getting involved
6
6
7
-
### How can I help translate one of the supported languages?
8
-
Translations all live in this GitHub repository. You can add and update them by creating a pull request. Read on to find out more!
7
+
To get involved in our translation efforts, we **highly recommend**[joining our Discord chat](https://astro.build/chat) first. This way, we can get you up to speed with our process and give you the opportunity to chat with your language's translation team.
9
8
10
-
### How can I find out what needs translating?
11
-
See our automated [Translation Status Overview issue](https://github.com/withastro/docs/issues/438) for a quick list of which pages are missing or need updating.
9
+
Most of our internationalization decisions and discussions happen on Discord. Joining us there is the best way to find out which patterns and recommendations your language's translation team follows before making your own PRs. You can even become a part of the decision-making process.
12
10
11
+
> Can’t access Discord? Please [open a new issue](https://github.com/withastro/docs/issues/new/choose) here on GitHub to ask any questions you may have.
12
+
13
+
### How can I help translate/review one of the supported languages?
14
+
15
+
Translations all live in this GitHub repository. You can add and update them by creating a pull request or reviewing pending translations in the "Pull Requests" tab. Read on to find out more!
16
+
17
+
### How can I find out what needs to be reviewed/translated?
18
+
19
+
To find translations pending review, you can filter through this repo's [Pull Requests with the i18n label](https://github.com/withastro/docs/pulls?q=is%3Apr+is%3Aopen+label%3Ai18n).
20
+
21
+
See our automated [Translation Status Overview issue](https://github.com/withastro/docs/issues/438) for a quick list of which pages are missing a translation or need updating to match a change to the English version.
13
22
14
23
> **Warning**
15
-
> Please do not translate any pages without first checking their status in our [Overview Issue](https://github.com/withastro/docs/issues/438)!
24
+
> Please do not translate any pages without first checking their status in our [Overview Issue](https://github.com/withastro/docs/issues/438)! If a page is not listed here as needing a translation or an update, we can not accept your PR.
16
25
17
-
Not every page is marked as "ready to translate." So, even if you find a page that is not yet translated on the Docs site, you must confirm that it is on the list of available pages to translate. If the `.md` files does not contain `i18nReady: true` in its YAML frontmatter, do not translate the document.
18
-
19
-
You can read more about how pages are marked "ready for (initial) translating" and "needs updating" in [CONTRIBUTING.md](https://github.com/withastro/docs/blob/main/CONTRIBUTING.md).
26
+
Not every page is marked as "ready to translate." So, even if you find a page that is not yet translated on the Docs site, you must first confirm that it is on the list of available pages to translate. Do not translate documents that are missing:
20
27
21
-
### How can I participate in the conversation and decisions?
22
-
Discussion around translation currently takes place in [the Astro Discord](https://astro.build/chat). Everyone is welcome to participate! If you are interested in getting involved, please reach out to us in the `#docs-i18n` channel.
28
+
- A "Translate this page" button in the Docs site.
29
+
- The `i18nReady: true` frontmatter property in its Markdown file.
23
30
24
-
> Can’t access Discord? Please [open a new issue](https://github.com/withastro/docs/issues/new/choose) here on GitHub to ask any questions you may have.
31
+
You can read more about how pages are marked "ready for (initial) translating" and "needs updating" in [CONTRIBUTING.md](https://github.com/withastro/docs/blob/main/CONTRIBUTING.md).
25
32
26
33
## Languages for translation
27
34
@@ -48,7 +55,7 @@ The official docs will only contain supported languages for now, but we will be
48
55
49
56
## Translation Structure
50
57
51
-
Generally speaking there are two kinds of content that we need to translate to internationalise the docs.
58
+
Generally speaking, there are two kinds of content that we need to translate to internationalize the docs.
52
59
53
60
1.**Documentation pages** — explain how specific parts of Astro work
54
61
2.**UI text** — used to structure and label the user interface of many different pages
@@ -91,50 +98,47 @@ If you spot something on [docs.astro.build](https://docs.astro.build/) that you
91
98
92
99
➤ Go to `src/pages/{language}/{page-slug}.md`
93
100
94
-
##Contributing to translations
101
+
# Contributing to translations
95
102
96
103
Please see [CONTRIBUTING.md](https://github.com/withastro/docs/blob/main/CONTRIBUTING.md) for information about contributing via a fork, our Style Guide, and more!
97
-
---
98
104
99
-
## Adding a new language
105
+
## Review Tips
100
106
101
-
> 🛑 **Please don’t add a new language without first consulting with the docs team in [the `#docs-i18n` channel on Discord](https://astro.build/chat).**
107
+
We love our reviewers! Reviewing PRs is an important task — it's thanks to the efforts of our reviewers that we can guarantee consistent, high-quality translations. Many projects track PRs that you submit, but we also celebrate review stats, visible on your very own [Astro Badge](https://astro.badg.es)! Visit our Discord and you'll see that we shout out every PR merged with a list contributors who helped with review comments.
102
108
103
-
### Prerequisites
109
+
We even have an entire section in our Maintainer's Guide about [how to manually add reviewer's names to commit messages](https://github.com/withastro/docs/blob/main/MAINTAINERS.md#getting-co-authored-by-commit-message-name-and-email) before merging in case they are not automatically included!
104
110
105
-
To get started adding a language, you’ll need:
111
+
So, if you're interested in helping review translation PRs, thank you! We really appreciate the effort, and we put an effort into showing it!
106
112
107
-
1.**Its BCP 47 tag**
113
+
Learn more about [how to review and suggest changes](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request) on GitHub Docs.
108
114
109
-
Examples: `en` / `pt-BR` / `ar`
110
-
111
-
This will be used for the HTML `lang` attribute and as the base for URLs for this language, e.g. `/{tag}/getting-started`. These tags can encode script-type and regions as well as language, but most often we will only need the language part unless we want to distinguish regional variants (as in the `pt-BR` example above).
112
115
113
-
#### Resources
114
-
115
-
-[Choosing a Language Tag](https://www.w3.org/International/questions/qa-choosing-language-tags) (in-depth guide)
116
-
-[Subtag lookup web app](https://r12a.github.io/app-subtags/)
It can be confusing to know what exactly should be reviewed! Mostly, what we are looking for is another pair of eyes to catch any obvious mistakes. If that is all you do, you have been a HUGE help!
120
119
121
-
Examples: `English` / `Português do Brasil` / `العربية`
120
+
Just ask yourself: does anything seem "out of place" or "unusual" when I read it? Are there typos or any unusual words choices that I would not expect to read? This might not mean the translation is "wrong" but *is* worth mentioning if a word choice is distracting when reading documentation.
122
121
123
-
This will be used to label this language in the site’s language switcher and potentially elsewhere. The best way to get this is probably to ask the person leading translation work for this language.
122
+
If you want to take your reviews to the next level, here are some more questions you can ask yourself while reviewing translations:
124
123
125
-
### Scaffold files for a new language
124
+
- Is the translation correctly written following the translated language's norms and practices?
125
+
- Did the translation deviate from the original in a way that important information is being missed somehow?
126
+
- Is the translation consistent with the language's style guide and glossary?
127
+
- Are there any UI labels or content missing translation?
128
+
- Are the custom components, asides, and code samples being properly displayed in the Deploy Preview?
129
+
- Does the code samples' titles, syntax highlighting (like `js` or `astro`), and highlighted lines match the English version?
130
+
- Are there any links that could be localized? (e.g. Wikipedia and MDN links)
126
131
127
-
To scaffold the basic files for a new language, use the `add-language` script from your terminal:
132
+
**When you think a PR is good to be merged**, approve the PR through GitHub's "Review Changes" button or leave a "**LGTM!**" in the comments. (“LGTM” is an abbreviation of “Looks Good to Me” often used to approve pull requests.)
128
133
129
-
```bash
130
-
pnpm run add-language
131
-
```
134
+
## Translation Tips
132
135
133
-
The CLI will prompt you for a tag and name for the new language as described above. Follow the instructions and the wizard will create a basic set of files to get started translating that language.
Update the placeholder content in the newly created files, commit them, and away you go!
138
+
Translators are free to create and mantain a glossary, style guide and other tips for their language's translation squad. This is a great way to keep translations consistent across contributors and to centralize team decisions. You can find it (or create it) inside the language's `i18n` folder as a `README.md` file.
139
+
140
+
Feel free to take a look at the [Deutsch Guide](https://github.com/withastro/docs/blob/main/src/i18n/de/README.md) for an example.
136
141
137
-
## Translation Tips
138
142
139
143
### Frontmatter
140
144
@@ -173,6 +177,13 @@ i18nReady: true
173
177
// Rest of the file's content is here...
174
178
```
175
179
180
+
181
+
### Code Samples
182
+
183
+
We have lots of code samples throughout our docs, and although we **recommend translating comments**, as they give a contextual clue of what's happening in the code, each language is **free to decide** whether or not they want to translate titles, variables, string values, function names, etc.
184
+
185
+
Be aware that if code samples are being translated, you may need to update some of the code sample's highlighted lines. Read the [Code Samples section](https://github.com/withastro/docs/blob/main/WRITING.md#code-samples) in our Writing Guide to know more about our syntax.
186
+
176
187
### Asides
177
188
178
189
Most of our pages include stylish tip/note/caution blocks called "asides". We use a custom syntax to author them which includes the type of aside (all lowercase) and optionally a custom title in square brackets. Here is an example of a "tip" found in the docs:
@@ -212,7 +223,7 @@ Astro allows us to import and include custom components in our Markdown pages. T
212
223
</IslandsDiagram>
213
224
```
214
225
215
-
**Do translate**: slotted content (content between opening and closing tags).
226
+
**Do translate**: slotted content (content between the opening and closing tags).
216
227
217
228
**Do not translate**: import statements in the frontmatter, component names, and slot names (like `slot="headerApp"`)
218
229
@@ -240,3 +251,42 @@ Some of our English page content is generated from outside sources, and must not
240
251
However, these pages are translated directly here and **these warnings are not meant for translations**.
241
252
242
253
For these generated pages (like `configuration-reference.md`), we recommend **ignoring and removing the note and component (including its import) from the file**, thus avoiding confusion for other translators thinking that this warning applies to translations as well.
254
+
255
+
256
+
## Adding a new language
257
+
258
+
> 🛑 **Please don’t add a new language without first consulting with the docs team in [the `#docs-i18n` channel on Discord](https://astro.build/chat).**
259
+
260
+
### Prerequisites
261
+
262
+
To get started adding a language, you’ll need:
263
+
264
+
1. **Its BCP 47 tag**
265
+
266
+
Examples: `en` / `pt-BR` / `ar`
267
+
268
+
This will be used for the HTML `lang` attribute and as the base for URLs for this language, e.g. `/{tag}/getting-started`. These tags can encode script-type and regions as well as language, but most often we will only need the language part unless we want to distinguish regional variants (as in the `pt-BR` example above).
269
+
270
+
#### Resources
271
+
272
+
- [Choosing a Language Tag](https://www.w3.org/International/questions/qa-choosing-language-tags) (in-depth guide)
273
+
- [Subtag lookup web app](https://r12a.github.io/app-subtags/)
Examples: `English` / `Português do Brasil` / `العربية`
279
+
280
+
This will be used to label this language in the site’s language switcher and potentially elsewhere. The best way to get this is probably to ask the person leading translation work for this language.
281
+
282
+
### Scaffold files for a new language
283
+
284
+
To scaffold the basic files for a new language, use the `add-language` script from your terminal:
285
+
286
+
```bash
287
+
pnpm run add-language
288
+
```
289
+
290
+
The CLI will prompt you for a tag and name for the new language as described above. Follow the instructions and the wizard will create a basic set of files to get started translating that language.
291
+
292
+
Update the placeholder content in the newly created files, commit them, and away you go!
0 commit comments