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

manual translated Chinese #1

Open
s0521 opened this issue Jun 9, 2023 · 13 comments
Open

manual translated Chinese #1

s0521 opened this issue Jun 9, 2023 · 13 comments

Comments

@s0521
Copy link

s0521 commented Jun 9, 2023

Hi mattfidler,
I think rxode2 is great, so I translated this user manual into Chinese.
Maybe you can add a link to the simplified Chinese version translated for me in the current user manual. Or I can upload my translated markdown document in simplified Chinese to your repository.

@john-harrold
Copy link

This is really cool.

@mattfidler
Copy link
Member

Completely awesome.

If you are passionate about translating the manual to chinese, maybe you can translate the error/warning to chinese as well.

There is a way to make R have error messages with different locales, and this may be helpful too.

@mattfidler
Copy link
Member

Most of the manual is generated from other places in rxode2, so I will link it. What version is it referring to?

@billdenney
Copy link

Thank you! This is wonderful!!!

I'd definitely like to see the translation available in the same location as the English version to make it as accessible as possible. So, if there is a good way to make them both easily available and findable, that would be great.

I just did a quick look for how to have two translations available side-by-side, and there doesn't appear to be a clear/clean way to do it (https://bookdown.org/yihui/bookdown/internationalization.html; https://stackoverflow.com/questions/63894048/providing-translations-for-r-bookdown-project). I've put a bounty on the stackoverflow question to try to encourage more interest.

@s0521
Copy link
Author

s0521 commented Jun 27, 2023

Completely awesome.

If you are passionate about translating the manual to chinese, maybe you can translate the error/warning to chinese as well.

There is a way to make R have error messages with different locales, and this may be helpful too.

"error/warning" messages in R? OK, my pleasure! But I haven't done this kind of work, so it may take me some time to learn how to do it.

Most of the manual is generated from other places in rxode2, so I will link it. What version is it referring to?

Yes, I noticed that. You can assume that I made the Chinese version based on the latest document dated June 9, 2023.

@mattfidler
Copy link
Member

mattfidler commented Jun 28, 2023

Ok, I will update the manual and point the the chinese translation as soon as I get a chance!

As far as translating the error messages, they are ".pot" files; examples of these are here:

https://github.com/nlmixr2/rxode2/blob/main/po/R-RxODE.pot

https://github.com/nlmixr2/rxode2/blob/main/po/RxODE.pot

Then you would simply create Chinese translations of these warnings/error messages.

If you notice, these messages haven't been updated for awhile (since rxode2 was RxODE), so before we begin I will see if there is any new, easier workflows.

If you want to see what a complete Chinese translation would look like, it has been done for data.table. The English files are here:

https://github.com/Rdatatable/data.table/blob/master/po/R-data.table.pot
https://github.com/Rdatatable/data.table/blob/master/po/data.table.pot

And then the Chinese translation is here:

https://github.com/Rdatatable/data.table/blob/master/po/R-zh_CN.po
https://github.com/Rdatatable/data.table/blob/master/po/zh_CN.po

Then when you load data.table in your locale, you will see the Chinese error messages and warnings on your screen, though we will also have to discuss testing on these locales because if we are expecting certain English warnings, the tests will fail on Chinese systems since they will show the Chinese errors.

@s0521
Copy link
Author

s0521 commented Jul 2, 2023

Hi mattfidler,

I have finished the preliminary translation, can you test it?
nlmixr2/rxode2#538
nlmixr2/rxode2#539

Is the punctuation normal?(Chinese punctuation mark is full Angle, English punctuation mark is half Angle)
If there is any problem, please let me know, I will consider updating when I have time.

@mattfidler
Copy link
Member

I am sorry to say, I really don't know about the punctuation in Chinese. I will let you use your best judgement.

I will merge these and see if they work (after renaming them).

I didin't regenrate the rxode2.pot files so they may or may not work. You will have to try them out on your locale.

@mattfidler
Copy link
Member

If you want to try them out, you can use:

remotes::install_github("nlmixr2/rxode2")

My guess is some of the messages will work (and some will not).

Let me know if it works and you see chinese messages in your terminal.

We can also add you as a translator to the author release for the next revision of rxode2.

Each of the sub-packages could also have generated pot files for eventual translation if you like the effects.

@mattfidler
Copy link
Member

mattfidler commented Jul 4, 2023

I can't actually recall if the version of rxode2 is binary compatible to the CRAN version.

You can also use:

install.packages(c("dparser", "rxode2ll", "rxode2parse",
                   "rxode2random", "rxode2et", "rxode2"),
                 repos=c(nlmixr2="https://nlmixr2.r-universe.dev",
                         CRAN="https://cloud.r-project.org"))

But you have to wait a few hours for the rxode2 binaries to be updated

@mattfidler
Copy link
Member

The manual has been updated with a link.

@s0521
Copy link
Author

s0521 commented Jul 23, 2023

Hi mattfidler,

I want to install and test the translated RXODE2 package locally, I cloned the R package to the local,
But when installing the test in Rstudio through the "Build" tool, I found that the installed R package PO directory only contains the "en@quot" folder.
But, as a reference to data.table package, after the data.table package is installed, the O directory contains the "en@quot" folder and the "zh_CN" folder.

I don't know what causes this difference, do you know the reason?

@mattfidler
Copy link
Member

mattfidler commented Jul 24, 2023

Not sure. Perhaps I'm missing something.

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

4 participants