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

Revise the translation for Korean #450

Merged
merged 8 commits into from
Feb 24, 2023
Merged

Conversation

jiyongp
Copy link
Collaborator

@jiyongp jiyongp commented Feb 23, 2023

  • Run msgmerge --no-wrap --update po/ko.po po/messages.pot
  • Be consistent with the line ending. For example, if the original text ends with ":", so the translation is.
  • Remove unnecessary newline characters
  • Fix the remaining inconsistencies on line ending chracters
  • s/제너릭/제네릭/g
  • s/트레이트/트레잇/g

If a newline character is from the rendering of the source text, remove
it in the translated text.
제네릭 seems to be the popular translation for "generic":

제너릭: 120K results
제네릭: 1M results
트레잇 seems to be the popular translation for "trait" at least in the
Rust ecosystem. The Rust book also uses 트레잇.
https://rinthel.github.io/rust-lang-book-ko/appendix-08-glossary.html
po/ko.po Outdated Show resolved Hide resolved
po/ko.po Outdated
@@ -29,755 +29,751 @@ msgid "Keyboard Shortcuts"
msgstr "단축키"

#: src/SUMMARY.md:7
msgid "Translations"
msgstr "다른 언어들"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this missing?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You probably need to generate po/messages.pot from the HEAD first.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Copy link
Collaborator

@jooyunghan jooyunghan left a comment

Choose a reason for hiding this comment

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

+1

Btw, can we keep hard line-breaking for better readability in source view?

@jooyunghan
Copy link
Collaborator

Beside it will help when editing long bullet items.

jooyunghan
jooyunghan previously approved these changes Feb 24, 2023
@jooyunghan jooyunghan self-requested a review February 24, 2023 00:07
@jooyunghan jooyunghan dismissed their stale review February 24, 2023 00:08

Accidentally approved. Sorry for the noise.

@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

Btw, can we keep hard line-breaking for better readability in source view?

I think it could/should be done in the editor you are using, until when we have a consensus on the text width in the po files.

Copy link
Collaborator

@jooyunghan jooyunghan left a comment

Choose a reason for hiding this comment

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

Unfortunately, editors (at least POEdit for now) don't handle line-wrapping well with non-english texts. It's because, byte length and visual font width for a character don't match. For readability, line-wrapping should be based on rendered width of texts but most editors do that based on bytes. For example, 가 (Korean) has 3-byte length (in utf8) while it's typically rendered as wide as two latin characters in most of fixed fonts.

@jooyunghan jooyunghan merged commit 10e918d into google:main Feb 24, 2023
@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

I meant that you can resize your editor's width (not the textwidth setting which the editor uses when writing the contents to the file) if a long text is hard to read & edit.

@jooyunghan
Copy link
Collaborator

Beside it will help when editing long bullet items.

Even when we set the editor's width, it will look like

* 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 
꽃이 피었습니다. 무궁화 꽃이 피었습니다.
  * 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁
화 꽃이 피었습니다. 꽃이 피었습니다. 무궁화 꽃이 피었습
니다.
  * 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁
화 꽃이 피었습니다. 꽃이 피었습니다. 무궁화 꽃이 피었습
니다.

while I hope ..

* 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁화 
  꽃이 피었습니다. 무궁화 꽃이 피었습니다.
  * 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁
    화 꽃이 피었습니다. 꽃이 피었습니다. 무궁화 꽃이 피
    었습니다.
  * 무궁화 꽃이 피었습니다. 무궁화 꽃이 피었습니다. 무궁
    화 꽃이 피었습니다. 꽃이 피었습니다. 무궁화 꽃이 피
    었습니다.

@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

We can't do that as long as we use poedit. It forcibly adds a new line character. For example,

What we type in poedit:

정상적으로 설치가 되었으면 강의의 코드 블록중 하나를
아래 단계를 따라 로컬에서 실행할 수 있습니다:

What poedit saves to the po file:

msgstr ""
"정상적으로 설치가 되었으면 강의의 코드 블록중 하나를\n"
"아래 단계를 따라 로컬에서 실행할 수 있습니다:"

I wish it were:

msgstr ""
"정상적으로 설치가 되었으면 강의의 코드 블록중 하나를 "
"아래 단계를 따라 로컬에서 실행할 수 있습니다:"

I think the problem with bullets should be addressed by #318.

@jooyunghan
Copy link
Collaborator

I liked

msgstr ""
"정상적으로 설치가 되었으면 강의의 코드 블록중 하나를\n"
"아래 단계를 따라 로컬에서 실행할 수 있습니다:"

because at least it gives me the control. It keeps \n exactly where I typed <cr>.

But, yeah, it depends on personal preference. If you don't like it, it's okay. It's already merged ;-)

@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

That newline character in the translation affects the rendering, which I think is bad.

msgstr ""
"이 4일짜리 러스트 강의는 안\n"
"드로이드 팀이 만들었습니다.

is rendered as

이 4일짜리 러스트 강의는 안 드로이드 팀이 만들었습니다. 

Notice the unexpected space after "안".

@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

In addition, the generated html is as follows:

<p>이 4일짜리 러스트 강의는 안
드로이드 팀이 만들었습니다.</p>

Nobody will read the html, but I think that the translation shouldn't affect any aspect of the output formatting.

@jooyunghan
Copy link
Collaborator

jooyunghan commented Feb 24, 2023

Oh, I see. You're right. That's also the problem I wanted to avoid (unexpected new lines, hence affecting the output formatting). I described how I avoided it in the commit 6aa1aac. (#444)

Poedit's settings:

  • uncheck "line-wrapping"
  • uncheck "keep old formatting"

By these settings (along with --no-wrap), newlines are all under control(no more automatic/unexpected line-breakings).

@mgeisler
Copy link
Collaborator

That newline character in the translation affects the rendering, which I think is bad.

msgstr ""
"이 4일짜리 러스트 강의는 안\n"
"드로이드 팀이 만들었습니다.

is rendered as

이 4일짜리 러스트 강의는 안 드로이드 팀이 만들었습니다. 

Notice the unexpected space after "안".

Yeah, that's unfortunate!

You're editing Markdown, so regardless of the formatting of the .po file, it's the rules of Markdown that matter for the final formatting.

I think I see some spaces im the text above, so could you not break the line after those?

@jiyongp
Copy link
Collaborator Author

jiyongp commented Feb 24, 2023

could you not break the line after those?

Yes, this is what I did in the commit 6841827

NoahDragon pushed a commit to wnghl/comprehensive-rust that referenced this pull request Jul 19, 2023
* Run msgmerge --no-wrap --update po/ko.po po/messages.pot

* Be consistent with the line ending. For example, if the original text
ends with ":", so the translation is.

* Remove unnecessary newline characters

If a newline character is from the rendering of the source text, remove
it in the translated text.

* Fix the remaining inconsistencies on line ending chracters

* s/제너릭/제네릭/g

제네릭 seems to be the popular translation for "generic":

제너릭: 120K results
제네릭: 1M results

* s/트레이트/트레잇/g

트레잇 seems to be the popular translation for "trait" at least in the
Rust ecosystem. The Rust book also uses 트레잇.
https://rinthel.github.io/rust-lang-book-ko/appendix-08-glossary.html

* Revive the missing translations for the Translations section

* Resolve remaining fuzzy translations
@jiyongp jiyongp deleted the translate-ko branch August 29, 2023 01:05
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