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

Handbook Japanese and update ZH with Provenance section #2426

Merged
merged 8 commits into from
Sep 9, 2023

Conversation

DrJingLee
Copy link
Contributor

update with ja.po ;
add language botton "日本語版"

Add Language Button "Japanese Version"
@raphjaph
Copy link
Collaborator

raphjaph commented Sep 5, 2023

I'm having trouble building the the book. We're you able to build it properly?

@DrJingLee
Copy link
Contributor Author

I'm having trouble building the the book. We're you able to build it properly?

I can check the error info by tomorrow and run locally before commit

fix format error ja.po ,local run successfully
@DrJingLee
Copy link
Contributor Author

I'm having trouble building the the book. We're you able to build it properly?

Local run successfully after fix the typo and format error.

@DrJingLee
Copy link
Contributor Author

DrJingLee commented Sep 7, 2023

To Update your translation version of Handbook, #2427 here is my opration cmds @ordinaHO
Assume the environment are well configured with Phython, Mdbook and Mdbook-i18n-helper:
1, Synchronize with ordinals/ord ;
2,Run to generate a new pot file : messages.pot

MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
  mdbook build -d po

3,Run msgmerge, xx.po is your language version; this will allow the po file updated with the newest orignal version;

msgmerge --update po/xx.po po/messages.pot

4,Find #, fuzzy ; i18n using "fuzzy" tag to mark those are newly edited ;

5,Do the transaltion works ;

6,Run mdbook cmd , here is zh example:

mdbook build docs -d build

MDBOOK_BOOK__LANGUAGE=zh mdbook build docs -d build/zh

mv docs/build/zh/html docs/build/html/zh

python3 -m http.server --directory docs/build/html --bind 127.0.0.1 8080

7,check everything is ok , then commit and open the PR to the github.

@ordinaHO
Copy link
Contributor

ordinaHO commented Sep 7, 2023

Hi @DrJingLee , correct i spend sometime yesterday to check out the details! so far i think that adding <div dir="rtl"> command in my translation is making some mistakes as i used Poedit to move my original translation with the new format #2422 .
Im not sure if @raphjaph can help to point out this issue as the language is from right to left 👈 check attachment example below.
Screenshot 2023-09-07 093454
Screenshot 2023-09-07 093723

@DrJingLee
Copy link
Contributor Author

Do you think its a good idea to generate the newest .pot file on the github every time when the oringinal book updated. @raphjaph

so other people can just download the newest version and work on it if they don't have the local mdbook environment

@DrJingLee DrJingLee changed the title Handbook Japanese Version Handbook Japanese and update ZH with Provenance section Sep 8, 2023
Copy link
Collaborator

@raphjaph raphjaph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but watch out not to check in files ending with ~ or .pot files. I've removed them

@raphjaph
Copy link
Collaborator

raphjaph commented Sep 9, 2023

Do you think its a good idea to generate the newest .pot file on the github every time when the oringinal book updated. @raphjaph

so other people can just download the newest version and work on it if they don't have the local mdbook environment

I think to properly translate you should download the mdbook things but we should definitley add the commands that you need to run to the README under the Translations header. Would be great if you could open a seperate PR for that!

@raphjaph raphjaph enabled auto-merge (squash) September 9, 2023 17:01
@raphjaph raphjaph merged commit ca30715 into ordinals:master Sep 9, 2023
6 checks passed
@DrJingLee DrJingLee mentioned this pull request Sep 10, 2023
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 this pull request may close these issues.

3 participants