From 472c594c5e19203d9003a67a41a73075dc0034c5 Mon Sep 17 00:00:00 2001 From: Nwakaego Glory Nwaekpe <81041326+Nwakaego-Ego@users.noreply.github.com> Date: Sun, 10 May 2026 21:56:13 -0700 Subject: [PATCH] add docs/translation folder with language specific documentation --- docs/translation/README.md | 17 +++++++++++++++++ docs/translation/hi.md | 25 +++++++++++++++++++++++++ docs/translation/ko.md | 27 +++++++++++++++++++++++++++ docs/translation/zh.md | 19 +++++++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 docs/translation/README.md create mode 100644 docs/translation/hi.md create mode 100644 docs/translation/ko.md create mode 100644 docs/translation/zh.md 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/translation/hi.md b/docs/translation/hi.md new file mode 100644 index 0000000000..54a7fa4271 --- /dev/null +++ b/docs/translation/hi.md @@ -0,0 +1,25 @@ +# Hindi (हिन्दी) Translation Guide + +This document contains translation guidelines for Hindi contributors working on the p5.js website. + +For general localization architecture, see [localization.md](../localization.md). + +## Glossary + +For the Hindi glossary of standardized technical and p5.js-specific terms, see [localization_hi.md](../localization_hi.md). + +## 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