|
1 | 1 | # ja-quarkusio
|
2 | 2 |
|
3 |
| -Localization project for [quarkusio.github.io](https://github.com/quarkusio/quarkusio.github.io) (The repository for [quarkus.io website](https://quarkus.io)) |
| 3 | +Localization project for [https://github.com/quarkusio/quarkusio.github.io](https://github.com/quarkusio/quarkusio.github.io) (The repository for [quarkus.io website](https://quarkus.io)) |
4 | 4 |
|
5 | 5 | Localized site: [https://ja-quarkusio.surge.sh/](https://ja-quarkusio.surge.sh)
|
6 | 6 |
|
7 |
| -## Translation workflow |
| 7 | +## Localization architecture |
8 | 8 |
|
9 |
| -Original [quarkusio.github.io](https://github.com/quarkusio/quarkusio.github.io) is built with Jekyll, and its contents are written in asciidoctor (.adoc) files. |
10 |
| -ja-quarkusio extracts texts with [po4a](https://po4a.org/) utility, machine-translates with deepL, write back, and build a localized site. |
11 |
| -Most workflow are automated by GitHub Actions except manual post-editing(translation). If you are interested in contributing localization, |
12 |
| -please translate .po files, and submit a pull request. |
| 9 | +Original [quarkusio.github.io](https://github.com/quarkusio/quarkusio.github.io) is built with Jekyll, |
| 10 | +and most of its contents are written in asciidoctor (.adoc) files. |
| 11 | +ja-quarkusio extracts texts to po files with [po4a](https://po4a.org/) utility, translates, |
| 12 | +write back to asciidoctor files, and build a localized site. |
| 13 | +Most workflow including pre-translation by DeepL API are automated by GitHub Actions. |
| 14 | +Translators can focus on post-editing to improve fluency. |
| 15 | +If you are interested in contributing localization, please edit .po files, and submit a pull request. |
13 | 16 |
|
14 |
| -### Prerequisites |
| 17 | + |
15 | 18 |
|
16 |
| -All you need for your local environment is a CAT Tool like [POEdit](https://poedit.net/), which run on Win/Mac/Linux. |
| 19 | +### .adoc files localization |
17 | 20 |
|
18 |
| -### Extracting texts from original repository |
| 21 | +#### sync workflow |
19 | 22 |
|
20 |
| -ja-quarkusio extracts texts with [po4a-updatepo](https://po4a.org/) utility from .adoc files to .adoc.po files, which saved in |
21 |
| -in [l10n/po](l10n/po) directory. |
22 |
| -ja-quarkusio GitHub repository has a [GitHub Actions' periodic workflow](.github/workflows/sync-upstream.yml) |
23 |
| -to extract texts from .adoc files stored in upstream submodule, |
24 |
| -which points [quarkusio.github.io](https://github.com/quarkusio/quarkusio.github.io) repository. |
| 23 | +ja-quarkusio GitHub repository has a GitHub Actions workflow which checks upstream repository(submodule) update, |
| 24 | +extracts texts from upstream .adoc files to [.adoc.po files](l10n/po), pre-translate with a translation memory |
| 25 | +and the DeepL API. |
25 | 26 |
|
26 |
| -### Translating .po files |
| 27 | +#### Translating .po files |
27 | 28 |
|
28 | 29 | .po files in [l10n/po](l10n/po) directory need to be translated.
|
29 | 30 | .po file is a file format commonly used for software internationalization, and many CAT software and SaaS can read/write.
|
30 |
| -While generating .po files, texts are pre-filled with translation memory and machine translation. |
31 |
| -Please correct inappropriate sentences if needed. |
| 31 | +[POEdit](https://poedit.net/), which run on Windows/Mac/Linux is a good candidate. |
| 32 | +Since .po files are pre-filled with machine translation with "fuzzy" mark, |
| 33 | +please remove "fuzzy" mark and correct inappropriate sentences if needed. |
32 | 34 |
|
33 |
| -### Applying translated texts |
| 35 | +#### Build a localized site |
34 | 36 |
|
35 |
| -Now you are ready to apply translated texts to .adoc files. With the command below, translated source tree are formed in `translated` directory. |
| 37 | +When you send a pull-request, GitHub Actions workflow automatically apply translations in .po files to .adoc files, |
| 38 | +build a localized site and deploy it to surge.sh with preview domain. When the deploy finish, GitHub Actions comment |
| 39 | +the URL to the pull-request. Reviewers can check the deployed site for review. |
| 40 | +When the pull-request is merged into `master`, it is automatically deployed to the production site. |
| 41 | + |
| 42 | +#### Build a localized site locally |
| 43 | + |
| 44 | +If you would like to build a site locally, run: |
36 | 45 |
|
37 | 46 | ```
|
38 | 47 | bin/apply-translation
|
| 48 | +bin/exec-jekyll |
39 | 49 | ```
|
40 | 50 |
|
41 |
| -### Build a translated site |
| 51 | +The site is build in `doc` directory. |
42 | 52 |
|
43 |
| -You can build a translated site from `translated` directory with: |
| 53 | +### HTML templates localization |
44 | 54 |
|
45 |
| -``` |
46 |
| -bin/exec-jekyll |
47 |
| -``` |
| 55 | +Most contents of [quarkus.io](https://quarkus.io) are in .adoc files, but a few texts are in its HTML templates. |
| 56 | +Since HTML templates cannot be parsed with [po4a](https://po4a.org/) utility, this localization project repository has their |
| 57 | +localized copies in the [l10n/override](l10n/override) directory. When the templates in the upstream repository are |
| 58 | +updated, GitHub Actions workflow automatically create a issue to let you know. |
| 59 | +Please refer the [l10n/stats/override.csv](l10n/stats/override.csv) to check which files are updated, and update the override files |
| 60 | +to keep it up to date. |
48 | 61 |
|
49 | 62 | ## Contributing
|
50 | 63 |
|
|
0 commit comments