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

Use crowdin to translate documents #2119

Closed
uiolee opened this issue Dec 26, 2023 · 14 comments · Fixed by #2262
Closed

Use crowdin to translate documents #2119

uiolee opened this issue Dec 26, 2023 · 14 comments · Fixed by #2262

Comments

@uiolee
Copy link
Member

uiolee commented Dec 26, 2023

          As for my experiences in other repos, it may be better to put [Crowdin](https://crowdin.com/) into practice. Strings may be updated there for approval.

Originally posted by @jasonren0403 in #133 (comment)


I'm looking forward to using crowdin to translate our documents.

I contributed some translations to pnpm on crowdin and did some testing using hexo'site.
Crowdin can sync the changes of the original language into other languages, which I think is a very very good feature.

@uiolee
Copy link
Member Author

uiolee commented Dec 26, 2023

I had made some test, and it perform not bad.


assumed workflow

crowdin


what we need to do to setup working in crowdin

  • someone create a project in Crowdin.

  • create a Github App in hexojs org.https://github.com/apps/hexo-crowdin

    • get app_id and generate private_key.

    which used for commiting PR.
    because the PR committed via the default ${{github.token}} can't trigger tester.

  • Repo setting

    • add Crowdin's API token into secrets of hexo/site.

      use one of members' account or setup a bot account in crowdin.

    • add Crowdin's project ID into secrets of hexo/site.
    • add GithubApp's app_id into secrets of hexo/site.
    • add GithubApp's private_key into secrets of hexo/site.
    • Install the GithubApp and grant it PR permissions.
  • Merge configuration and CI into hexo/site. ci: add workflows of integrate with crowdin #2146

After the above:

  • Manually trigger upload translations once.
  • Add a reminder that Anyone should not to modify the translation in github.
  • fix and review translations in Crowdin.

    Some translations may lose their match with the original text. This means that crowdin sometimes does not realize that a certain sentence has been translated, which usually results in an extra sentence of original text in the translation exported by crowdin.
    This requires translators or managers to check or re-translate these sentences, which may be the most troublesome step in the entire migrating work.

BTW

Because the format of most .md files of site is not standardized, we'd better exec prettier or markdownlint to .md.

@yoshinorin
Copy link
Member

@uiolee cc: @hexojs/core
LGTM 🎉
Can we proceed this?

@tomap
Copy link
Contributor

tomap commented Jan 22, 2024

Just to start small, I would do it for a small minor subset (like a single small page) to work the angles before applying to all?

@uiolee
Copy link
Member Author

uiolee commented Jan 23, 2024

Just to start small, I would do it for a small minor subset (like a single small page) to work the angles before applying to all?

files

We now have about 45 files.

You can add by folder if you wish. Otherwise you need to write more rules

crowdin

@yoshinorin
Copy link
Member

manager register an account and create a project in Crowdin.

Is it possible to create org project to crowdin?

generate a github token and add it into secrets of hexo/site.
member account or new a bot account.

I think bot account is better, but how should we manage it? (e.g: share password)
If its difficult member account's token is acceptable.

Just to start small, I would do it for a small minor subset (like a single small page) to work the angles before applying to all?

Personally, I think it's okay to do it all at once.

  1. To small start is complex and time-consuming
  2. Within the previous discussions in the Hexo project, there have been several instances where no conclusion was reached, leading to a lack of progress.
  3. https://crowdin.com/project/hexo-site seems works well
  4. Even if there were any issues, it wouldn't be a significant problem compared to bugs into the program.

@uiolee
Copy link
Member Author

uiolee commented Feb 4, 2024

Is it possible to create org project to crowdin?

I don't see such a description in crowdin. But crowdin project can add multiple administrators.


I think bot account is better, but how should we manage it? (e.g: share password)
If its difficult member account's token is acceptable.

the github token is used to submit PR. I think we dont need do anything else.

I have found someways better. We can register a Github App via hexojs org. The PR it creates can trigger ci.

demo PR: https://github.com/uiolee/site/pull/78
config: https://github.com/uiolee/site/commit/722bbaa6cffac45fb9edae0aabe15bc83b5b39a4

ref: a simple guideline to create Github App https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens

@yoshinorin
Copy link
Member

yoshinorin commented Feb 7, 2024

I don't see such a description in crowdin. But crowdin project can add multiple administrators.

Ok, let's begin. What should we do first? Create an user account (hexo maintainers) on crowdin?

@uiolee
Copy link
Member Author

uiolee commented Feb 8, 2024

yes. lets move forward

@yoshinorin
Copy link
Member

yoshinorin commented Feb 8, 2024

@uiolee
Can we use your project? or should create another one?

https://crowdin.com/project/hexo-site

@uiolee
Copy link
Member Author

uiolee commented Feb 8, 2024

We'd better create a new one. I may have mixed in something weird while testing

@yoshinorin
Copy link
Member

We'd better create a new one. I may have mixed in something weird while testing

Would you please create a new one?

@uiolee
Copy link
Member Author

uiolee commented Feb 8, 2024

ok. I have created a new. https://crowdin.com/project/hexo
Crowdin

@yoshinorin
Copy link
Member

yoshinorin commented Feb 8, 2024

@hexojs/core
If you have a Crowdin account, please join the project and let us know. @uiolee will add your account to project on Crowdin as an administrator. If you don't have an account and plan to participate in translation reviews in the future, please create one.

It's not mandatory, but desirable have multiple project administrators and reviewr on Crowdin. If you have any opinions, please feel free to comment.

Thank you :)


P.S:

My account is https://crowdin.com/profile/yoshinorin

@D-Sketon
Copy link
Member

D-Sketon commented Feb 8, 2024

https://crowdin.com/profile/d-sketon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants