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

Chinese .po translation for NNG4 #55

Merged
merged 12 commits into from
Mar 26, 2024

Conversation

JiechengZhao
Copy link
Contributor

Chinese .po translation for NNG4

.i18n/zh_CN.po Outdated
"\n"
"* 需要方括号。`rw h` 永远不会正确。\n"
"\n"
"* 如果 `h` 不是一个 *equality* 的 *proof* (形式为 `A = B` 的语句)、\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

equality and proof are not translated. Should be *等式* 的 *证明*.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for reviewing!

@kbuzzard is it generally okay for you to (more or less blindly) trust translations (and add them) if we don't speak the target language? (Currently the translation is not available in-game, but once the front-end has been implemented, you should be able to select your language.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

equality and proof are not translated. Should be *等式* 的 *证明*.

fixed

Copy link
Contributor

@utensil utensil Mar 21, 2024

Choose a reason for hiding this comment

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

My two cents:

  1. The current translation seems to be mostly machine translated, has strong "translation tone"(翻译腔), and shows little sign of manual corrections (Disclaimer: I'm a native Chinese speaker);
  2. It could be considered an initial translation for others to work on and improve, so accepting the PR could be considered, or it could be more polished in this PR before merging;
  3. In general, contributors of translations could be asked to submit the following information alongside the translation:
  • Translation method: Completely machine, machine assisted, manual? Please elaborate a little on your manual corrections.
  • Translation review process: Has the translation been reviewed by a small group of native speakers, and what are the feedbacks?
  • Initial target audience: Is this for a course targeting a certain number of students, or just sharing between some friends etc. but maybe they are research mathematicians?
  • Translation maintenance: Is the contributor willing to continuously gather feedbacks and fix the translations, at least for a few months?

Then a reviewer can be more certain about whether a specific PR should be merged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks @utensil that's very helpful! I updated the README with some points you suggested. I'm quite fine with the quality of translations in general, but having some external review like you just did should be preferrable:

We happily accept translations of the game into different lanugages! You can use .i18n/Game.pot and translate it into .i18n/Game-{lang}.po where {lang} is the ISO language code like fr or en_UK, using for example POEdit.

We would like the following requirements for a translation PR:

  • One independent person from the community, who understands the language, gives a review on the PR. You could for example look at the Lean Community Map or ask on Zulip. Such a review an be quite generic and does not have to be super detailed.
  • In the credits (i.e. in the string translating them), ideally you should add yourself as a translator for this language.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@utensil , I have a suggestion. You could briefly review all the scripts, raise significant errors, and then we'll merge the PR and label the translation as Beta. Once everything is set and the game has a Chinese version, you're welcome to play/review it again within the game and provide feedback. This approach would be more effective than spending a time analyzing fragmented scripts and discussing 'translation tone.'

Copy link
Contributor

@utensil utensil Mar 22, 2024

Choose a reason for hiding this comment

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

Thanks for the explanation, apologies for underestimating your efforts put into the manual fixes, also thanks for your work on i18next.

The proposal looks good to me, previously I only skimmed, I'll try to go over it again later today.

I definitely agree that improvements on the translation tone belongs to separate PRs as it's really non-trivial and quite opinionated.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the explanation, apologies for underestimating your efforts put into the manual fixes, also thanks for your work on i18next.

The proposal looks good to me, previously I only skimmed, I'll try to go over it again later today.

I definitely agree that improvements on the translation tone belongs to separate PRs as it's really non-trivial and quite opinionated.

Thank you. Don't hesitate to give advice, even if it is about tone. I'm pretty sure I've left many inconsistency and maybe significant errors in the script, though I failed to find them when I, myself, review the script.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also note, anybody (also students playing) can later still submit corrections with very little effort, so you really don't need to spent more time on reviewing than you feel is necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

@JiechengZhao Sorry for the delay, I have finished a more care pass, and submitted the comments, most of them are just suggestions, only few are mistakes.

.i18n/Game-zh_CN.mo Outdated Show resolved Hide resolved
.i18n/Game-zh_CN.po Outdated Show resolved Hide resolved
@joneugster
Copy link
Collaborator

Thanks @JiechengZhao for all your effort, we really apprechiate it! I'll leave the PR up for a bit, just because we can't actually display it in the game yet.

So if you do want to still change anything you have a few days to just do it here, but when we are able to display it in-game, I will happily merge it and get it online!

.i18n/Game-zh_CN.po Outdated Show resolved Hide resolved

#: Game.Levels.Power.L09add_sq
msgid "`add_sq a b` is the statement that $(a+b)^2=a^2+b^2+2ab.$"
msgstr "`add_sq a b` 是 $(a+b)^2=a^2+b^2+2ab$ 的证明。"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msgstr "`add_sq a b` 是 $(a+b)^2=a^2+b^2+2ab$ 的证明。"
msgstr "`add_sq a b` 是 $(a+b)^2=a^2+b^2+2ab$ 的定理。"

Here "statement" doesn't mean "proof", and the canonical translation in Chinese math books of "statement" is "陈述", see e.g. https://zh.wikipedia.org/wiki/%E5%AE%9A%E7%90%86 . But maybe it's better to translate it to "theorem"/"lemma", like many other occurrences where "the theorem" instead of "the statement" is used in English.

Copy link
Contributor Author

@JiechengZhao JiechengZhao Mar 23, 2024

Choose a reason for hiding this comment

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

After reading the wiki link you provided, I may prefer '推论,' but I will still consider how we should deal with the 'statement.'

Copy link
Contributor

Choose a reason for hiding this comment

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

IIUC, "推论" exclusively means "corollary".

Copy link
Contributor

Choose a reason for hiding this comment

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

In retrospect, I believe using "证明" consistently for proof/statement/theorem is more natural, in the context of introducing the ID/name of the proof for the player to use.


#: Game.Levels.AdvMultiplication.L10mul_right_eq_self
msgid "Reduce to the previous lemma with `nth_rewrite 2 [← mul_one a] at h`"
msgstr "使用 `nth_rewrite 2 [← mul_one a] at h` 将问题简化为之前的引理。"
Copy link
Contributor

@utensil utensil Mar 23, 2024

Choose a reason for hiding this comment

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

"reduce" doesn't necessarily mean "simplified to", a more appropriate translation may be "还原" or "化归", both can be found in Chinese math texts.

Copy link
Contributor Author

@JiechengZhao JiechengZhao Mar 23, 2024

Choose a reason for hiding this comment

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

"化归" is good. I will fix it.

.i18n/Game-zh_CN.po Outdated Show resolved Hide resolved
.i18n/Game-zh_CN.po Outdated Show resolved Hide resolved

#: Game.Levels.Implication.L07intro2
msgid "intro practice"
msgstr "入门练习(译注:翻译存疑,没刷过最新版本,有可能是 `intro` 策略的练习。)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you check where it appears in the UI and remove the translation note?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will do this as soon as the UI is ready.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's the title of this level.

.i18n/Game-zh_CN.po Outdated Show resolved Hide resolved
"and the other where you went right.\n"
msgstr ""
"\n"
"\"`≤`的完全性是这个世界的老大级别,接下来就是它了。它表明如果`a`和`b`是自然数,\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should translate "boss level" consistently.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will fix it.


#: Game.Levels.AdvMultiplication.L04one_le_of_ne_zero
msgid "Now take apart the existence statement with `cases ha with n hn`."
msgstr "现在用 `cases ha with n hn` 分类讨论存在性声明。"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msgstr "现在用 `cases ha with n hn` 分类讨论存在性声明。"
msgstr "现在用 `cases ha with n hn` 分类讨论存在性定理。"

"statement" means "声明" mostly in the context of programming, it should be "称述", or more naturally, just use "定理", as it's a statement of the theorem.

"x + 37 = x + 37\n"
"```\n"
"\n"
"那么 `rfl` 将关闭(译注:这个的关闭是证明的意思)它。但如果它看起来像 `0 + x = x`,那么 `rfl` 将无法工作,因为即使 $0+x$ 和 $x$ 作为*数字*总是相等,但它们作为*项*并不相等。唯一与 `0 + x` 相同的项是 `0 + x`。\n"
Copy link
Contributor

@utensil utensil Mar 23, 2024

Choose a reason for hiding this comment

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

The "close" in "close the goal" is not natural in Chinese, maybe it should be consistently translated to "解决目标", as in one such occurrence. Just a suggestion, as long as it's consistent and explain at the first occurrence, it's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think using '证明' directly is better. Initially, I used '关闭' in the early translations and added notes, but later, I switched to '证明'. I will go through the script and make it consistent.

JiechengZhao and others added 6 commits March 23, 2024 19:46
Co-authored-by: Utensil <utensilcandel@gmail.com>
Co-authored-by: Utensil <utensilcandel@gmail.com>
Co-authored-by: Utensil <utensilcandel@gmail.com>
Co-authored-by: Utensil <utensilcandel@gmail.com>
Co-authored-by: Utensil <utensilcandel@gmail.com>
Co-authored-by: Utensil <utensilcandel@gmail.com>
@joneugster
Copy link
Collaborator

@JiechengZhao you have now some experience with translating. Would you consider PO-files to be more useful than plain JSON or more complicated to handle?

Of course one can convert them into each other easily, but I wonder what's better to provide in the future? The frontend seems to prefer Json.

@joneugster
Copy link
Collaborator

We're there :) still needs some cleaning up etc., but I'm going to merge this and use it as a test example.

@joneugster joneugster merged commit 37f7fe7 into leanprover-community:main Mar 26, 2024
1 check passed
@JiechengZhao
Copy link
Contributor Author

@JiechengZhao you have now some experience with translating. Would you consider PO-files to be more useful than plain JSON or more complicated to handle?

Of course one can convert them into each other easily, but I wonder what's better to provide in the future? The frontend seems to prefer Json.

To me, .po is better. gettext is well supported by the community, and there are many tools to help you manage your .po files, making the translation process easier. There are also some tools that support i18next, but to me, it is not essential to learn a new tool.

@JiechengZhao
Copy link
Contributor Author

JiechengZhao commented Mar 27, 2024

We're there :) still needs some cleaning up etc., but I'm going to merge this and use it as a test example.

Are the .pot and lean-i18n also updated? We might still encounter some mismatch of the keys. My .po file is autofixed by PoEditor and does not strictly match the .pot file.

Once the new .pot file is ready. I will fix the potential mismatch in the script.

@joneugster
Copy link
Collaborator

Let's talk on Zulip! Not quite done yet with that yet

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.

None yet

3 participants