diff --git a/docs/translation/README.md b/docs/translation/README.md new file mode 100644 index 0000000000..5518095fa9 --- /dev/null +++ b/docs/translation/README.md @@ -0,0 +1,17 @@ +# Translation Documentation + +This folder contains language-specific documentation for translation contributors working on the p5.js website. + +Each language has its own file in this folder. Each file contains: + +- **Glossary** - agreed translations for technical and p5.js-specific terms +- **Style points** - writing and formatting conventions specific to that language +- **Technical exceptions** - code level changes required to support that language correctly + +## Languages + +- [Hindi](./hi.md) +- [Korean](./ko.md) +- [Chinese](./zh.md) + +For general localization architecture, see [localization.md](../localization.md). \ No newline at end of file diff --git a/docs/localization_hi.md b/docs/translation/hi.md similarity index 80% rename from docs/localization_hi.md rename to docs/translation/hi.md index f097d458a8..51943e5e06 100644 --- a/docs/localization_hi.md +++ b/docs/translation/hi.md @@ -1,10 +1,15 @@ -# Hindi (हिन्दी) Localization Guide +# Hindi (हिन्दी) Translation Guide -This document contains the standardized Hindi translations for technical and p5.js-specific terms used across the p5.js website. Translators should refer to this glossary to maintain consistency. +This document contains translation guidelines and standardized +term translations for Hindi contributors working on the p5.js +website. -For the general localization architecture, see [localization.md](./localization.md). +For general localization architecture, see +[localization.md](../localization.md). -## Programming-Specific Terms +## Glossary + +### Programming-Specific Terms | English | Hindi (हिन्दी) | | --- | --- | @@ -87,7 +92,7 @@ For the general localization architecture, see [localization.md](./localization. | vertex | शिखर | | video | वीडियो | -## p5.js-Specific Terms +### p5.js-Specific Terms | English | Hindi (हिन्दी) | | --- | --- | @@ -121,3 +126,26 @@ For the general localization architecture, see [localization.md](./localization. | stroke (outline) | रूपरेखा | | video | वीडियो | | webcam | वेबकैम | + +## Technical Exceptions + +### Punctuation Handling + +Hindi uses `।` (danda) and `॥` (double danda) as sentence +ending punctuation instead of the Latin full stop `.` + +The regex in `src/components/GridItem/Reference.astro` was +updated in PR #1156 to include these characters. Without them +the regex only recognised `.` and `。` as sentence endings, +causing Hindi reference pages to display the entire description +instead of just the first line. + +See [PR #1156](https://github.com/processing/p5.js-website/pull/1156) +and [issue #1154](https://github.com/processing/p5.js-website/issues/1154) +for full details. + +## Additional Resources + +The p5.js repository contains the Hindi FES error message +translations which may be useful for terminology consistency: +[Hindi FES Translations](https://github.com/processing/p5.js/tree/main/translations/hi) \ No newline at end of file diff --git a/docs/translation/ko.md b/docs/translation/ko.md new file mode 100644 index 0000000000..cbc097e71d --- /dev/null +++ b/docs/translation/ko.md @@ -0,0 +1,27 @@ +# Korean (한국어) Translation Guide + +This document contains translation guidelines for Korean contributors working on the p5.js website. + +For general localization architecture, see [localization.md](../localization.md). + +## Glossary + +A Korean terminology table is being developed in [issue #1323](https://github.com/processing/p5.js-website/issues/1323). + +## Style Points + +### Line Spacing + +Korean characters do not have descenders like Latin letters do, which causes fonts to allocate less vertical space by default. This makes Korean text appear more compressed than intended. A CSS rule was added in [PR #1392](https://github.com/processing/p5.js-website/pull/1392) to increase line spacing for Korean content: + +```css +html[lang="ko"] .rendered-markdown { + line-height: 1.7; + word-break: keep-all; +} +``` +`word-break: keep-all` prevents Korean words from breaking mid-word at line endings which can look awkward in Korean text. + +## Additional Resources + +The p5.js repository contains a Korean translation guide with tips, resources and terminology decisions from the FES Korean translation project: [Korean Translation Resources](https://github.com/processing/p5.js/tree/main/translations/ko) \ No newline at end of file diff --git a/docs/translation/zh.md b/docs/translation/zh.md new file mode 100644 index 0000000000..af03e7c869 --- /dev/null +++ b/docs/translation/zh.md @@ -0,0 +1,19 @@ +# Chinese (简体中文) Translation Guide + +This document contains translation guidelines for Chinese contributors working on the p5.js website. + +For general localization architecture, see [localization.md](../localization.md). + +## Glossary + +A Chinese terminology table has not been created yet. If you would like to contribute one, please open an issue. + +## Style Points + +### Line Spacing + +Based on input from Chinese translation contributor @lirenjie95 in [issue #1376](https://github.com/processing/p5.js-website/issues/1376), adjusting line spacing does not appear to make a noticeable visual difference for Chinese text. Chinese uses an ideographic writing system where each character carries its own independent meaning, which behaves differently from Korean text. No additional CSS rule has been added for Chinese at this time. + +## Additional Resources + +The p5.js repository contains the Chinese FES error message translations which may be useful for terminology consistency: [Chinese FES Translations](https://github.com/processing/p5.js/tree/main/translations/zh) \ No newline at end of file