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

Proposal to Translate Repository into Chinese #45

Open
ghost opened this issue Mar 14, 2023 · 7 comments
Open

Proposal to Translate Repository into Chinese #45

ghost opened this issue Mar 14, 2023 · 7 comments

Comments

@ghost
Copy link

ghost commented Mar 14, 2023

Hi, I'm a student from China. I just finished these exercises yesterday as my first step in learning Rust macros. Your repo is really helpful for beginners(The little book in Macros is too verbose for those who just want to write some codes using macros system as a start). So I would like to propose translating the contents of this repository into Chinese(mainly the README in \exercises).
I am willing to take on the task of translating the content and maintaining it as updates are made to the repository. Please let me know if this is something you would be interested in and if you have any guidelines or preferences for the translation process.
Thank you for considering my proposal.

@tfpk
Copy link
Owner

tfpk commented Mar 14, 2023

Hi! Of course, I'd be happy to have a translation!

I've not had something be translated before, it's a new experience for me.

No guidelines or preferences: happy to be guided by what works for you! Just let me know if there's anything I can do to help.

@ghost
Copy link
Author

ghost commented Mar 17, 2023

Hi, I've finished the translation of 01_exercise. It's in my fork repo, Chinese branch now. Should I make a PR directly? It's also a new experience for me to contribute to other's repo (@_@;)
Maybe something like README-CN.md in this repo is a good example? Please give me some help. I'm afraid of messing things up ’ (๐•̆ ·̭ •̆๐)’ ’ (๐•̆ ·̭ •̆๐)’

@tfpk
Copy link
Owner

tfpk commented Mar 17, 2023

Hi!

Thank you so much, this is really exciting! I really appreciate your effort.

Before we upstream this, I've done some research as to how to get mdbook to do this properly. It turns out it's not as simple as just having a seperate file: the standard way of doing it is using a '.po' file.

I'm not sure how familiar you are with this, but I've looked at how https://github.com/google/comprehensive-rust/ is doing it; and it seems pretty simple (hopefully for the work you've already done, it's a matter of just doing a copy-paste).

Are you happy using this approach instead? For you, it would mean:

  • Downloading an editor like poedit (https://poedit.net/).
  • Editing the .po file I can commit to the repo, using that editor.
  • Pushing the .po file upstream, and then all the translations will just work.

Would that be OK with you? If not, let me know and of course we can discuss further.

@ghost
Copy link
Author

ghost commented Mar 18, 2023

That is really cool. This workstream seems easy to implement. Why not have a try first?

But there are still some questions. It seems that .pot and .po files define what is going to be translated block by block. Just don't divide the passage into small sentences which is hard to be translated. Paragraphs are much more easier to deal with.

@tfpk
Copy link
Owner

tfpk commented Mar 18, 2023

It does it basically paragraph by paragraph, it seems.

This is a screenshot of me testing with poedit:

image

If you're happy with this, I will now push the requisite changes to support .po files, then you can start working on the file and make a PR to update it.

@ghost
Copy link
Author

ghost commented Mar 18, 2023

Just do it!

@tfpk
Copy link
Owner

tfpk commented Mar 18, 2023

Done!

You can now edit the po/ folder, and upstream those changes.

Feel free to open a PR whenever you'd like if you want to check what I've got right now works OK.

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

No branches or pull requests

1 participant