Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
svrnm opened this issue Jun 25, 2024 · 3 comments
Open
Labels
CI/infra CI & infrastructure i18n internationalization

Comments

@svrnm
Copy link
Member

svrnm commented Jun 25, 2024

@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:

  • Only lang:ja labeled PRs need the
  • The tool needs to have a set of mappings between correct and incorrect wordings (in some file)

What do you think about this idea?

Originally posted by @ymotongpoo in #4302 (comment)

@svrnm
Copy link
Member Author

svrnm commented Jun 25, 2024

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:

  • for each tool create a configuration for Japanese that is only applied to files in content/ja
  • enable them locally and test those tools if they work properly
  • enable them in the GitHub actions workflows

The tools are:

  • cspell for spell checking
  • prettier for formatting
  • textlint (especially "terminology") for consistent translations

We should address them 1-by-1

@ymotongpoo
Copy link
Contributor

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

@svrnm
Copy link
Member Author

svrnm commented Jun 26, 2024

* 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

@svrnm svrnm added CI/infra CI & infrastructure i18n internationalization labels Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI/infra CI & infrastructure i18n internationalization
Projects
None yet
Development

No branches or pull requests

2 participants