macrokata icon indicating copy to clipboard operation
macrokata copied to clipboard

Proposal to Translate Repository into Chinese

Open ghost opened this issue 2 years ago • 7 comments

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.

ghost avatar Mar 14 '23 09:03 ghost

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.

tfpk avatar Mar 14 '23 10:03 tfpk

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 ’ (๐•̆ ·̭ •̆๐)’ ’ (๐•̆ ·̭ •̆๐)’

ghost avatar Mar 17 '23 05:03 ghost

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.

tfpk avatar Mar 17 '23 23:03 tfpk

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.

ghost avatar Mar 18 '23 00:03 ghost

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.

tfpk avatar Mar 18 '23 01:03 tfpk

Just do it!

ghost avatar Mar 18 '23 03:03 ghost

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.

tfpk avatar Mar 18 '23 07:03 tfpk