open-telemetry / opentelemetry.io

The OpenTelemetry website and documentation
https://opentelemetry.io
Creative Commons Attribution 4.0 International
520 stars 1.11k forks source link

[i18n] Tooling to detect inconsistent translation and formatting Japanese text #4745

Open svrnm opened 3 months ago

svrnm commented 3 months ago

@svrnm @chalin Thank you for supporting each language localization! At least, the localization for Japanese could make a smooth start thanks to the great automation tools.

Now I started feeling like I need some automation tool to detect inconsistent translation and Japanese formatting to have more contributions from many people. How can I add that feature to the repo? Tricky parts are:

What do you think about this idea?

Originally posted by @ymotongpoo in https://github.com/open-telemetry/opentelemetry.io/discussions/4302#discussioncomment-9870096

svrnm commented 3 months ago

hey @ymotongpoo, I copied your comment from the discussion to a dedicated issue because this is a scoped task.

We have tooling for that for English content already, but turned it off for translations, since it requires additional language-specific configuration. So here is what we need to do:

The tools are:

We should address them 1-by-1

ymotongpoo commented 3 months ago

@svrnm thank you for routing the topic to the issue.

svrnm commented 3 months ago
* cspell doesn't work well for Japanese and for this purpose.

I was not aware of that, I did a quick check and indeed it only supports English so far, that's interesting. Do you have any recommendations for a spell checker that works well for Japanese?

* it is said prettier 3.0.0+ works well with Japanese (ref: [Markdown[next branch]: Do not insert spaces between Chinese/Japanese & latin letters prettier/prettier#11597](https://github.com/prettier/prettier/pull/11597))

If it works well, then let's have a PR to introduce it for Japanese. If you provide the language-specific config (if needed/where needed), @chalin or I can handle the rest

* textlint is the most fitting and common tool for this kind of Japanese document. (ref: an example for Japanese technical magazine [gist.github.com/inao/f55e8232e150aee918b9](https://gist.github.com/inao/f55e8232e150aee918b9))

That's great to hear! Again, if you can provide us with some guidance (via a PR) with the required config etc, we can take a look into integrating it into the workflows