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

vi: Translate the std library String type #2052

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vohoanglong0107
Copy link
Contributor

I couldn't find an effective way to translate Trait and implement, so both terms are going to be used as is in the translation.

@vohoanglong0107 vohoanglong0107 marked this pull request as ready for review May 4, 2024 14:39
po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
po/vi.po Outdated

#: src/std-types/string.md
msgid ""
"To a substring by using `s3[0..4]`, where that slice is on character "
"boundaries or not."
msgstr ""
"Truy cập một chuỗi con bằng cách sử dụng `s3[0..4]`, với phạm vi của chuỗi "
Copy link
Collaborator

@qu-ngx qu-ngx May 6, 2024

Choose a reason for hiding this comment

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

"xâu con" might be better than "chuỗi con" (just a suggestion). Instead of using "nằm trên" try out "nằm ngoài"? Cái chuỗi này nằm ngoài chuỗi kia sounds a bit more logical since you are referring to "phạm vi" or "danh giới".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@qu-ngx Ah, I can see where the confusion coming from. Rust string has this rather strange property that, unlike other language like C++, when you access a string with s[i] syntax, the returned value could be an invalid character. The reason is, Rust's string is made of unicode characters, so each character could span multiple index. Suppose you have the string s = "Xin chào". All the X, i, n, (a white space), c, h, o are ASCII characters, therefore these characters need only one byte, consuming one slot in the string. However, à is a unicode character, therefore it needs 2 bytes, consuming 2 slot. What this means is that when you try to access "Xin chào", Rust allow you to access s[0..2], which prints out Xi, s[5..8], which equals to , but you can't access s[5..7], since 7 is in the middle of à character. This is what the excerpt refer to as the character boundaries.
However, I acknowledge that my translation poorly conveys that idea. I will see if I can improve this.

po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
po/vi.po Show resolved Hide resolved
Copy link
Collaborator

@qu-ngx qu-ngx left a comment

Choose a reason for hiding this comment

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

I have left some comments and feedbacks before you are able to merge. You should review and change your code before it is merged. Tks!

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx I'm quite unsure about translating implement and trait, as there are no Vietnamese terms that accurately express them. The closest translation I could think of for implement is kế thừa, but it's more related to the OOP term inherit than implement.

@qu-ngx qu-ngx self-assigned this May 6, 2024
@qu-ngx
Copy link
Collaborator

qu-ngx commented May 6, 2024

@qu-ngx I'm quite unsure about translating implement and trait, as there are no Vietnamese terms that accurately express them. The closest translation I could think of for implement is kế thừa, but it's more related to the OOP term inherit than implement.

Implement is also áp dụng, thi hành, trang bị, .... Trait aka đặc điểm, tính trạng, trạng thái. If you are not so sure, I think you can use some English dictionary (ie Meriam Webster) for the synonyms. English has many different shades so it is not tied to only one meaning at all.

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx Also, when translating type name, such as String, I believe translate String the first time it appearse is good, but it shouldn't be translated in subsequent appearances, as it can have cause confusion. For example, in Rust &str and String can be translated as Xâu in Vietnamese, but using only Xâu in the translation will cause confusion, as the students might be unsure which type to use.

@qu-ngx
Copy link
Collaborator

qu-ngx commented May 6, 2024

@qu-ngx Also, when translating type name, such as String, I believe translate String the first time it appearse is good, but it shouldn't be translated in subsequent appearances, as it can have cause confusion. For example, in Rust &str and String can be translated as Xâu in Vietnamese, but using only Xâu in the translation will cause confusion, as the students might be unsure which type to use.

It still has translation in Vietnamese and also String translation is a well-known Vietnamese word. That is why when I say translate you put in the brackets. You can refer to the other successful PRs of other people as well if you want. It has no cost and no harm in doing it as not everyone learn it in English first time. That is why both is better than just one.

@qu-ngx
Copy link
Collaborator

qu-ngx commented May 6, 2024

@qu-ngx Also, when translating type name, such as String, I believe translate String the first time it appearse is good, but it shouldn't be translated in subsequent appearances, as it can have cause confusion. For example, in Rust &str and String can be translated as Xâu in Vietnamese, but using only Xâu in the translation will cause confusion, as the students might be unsure which type to use.

Also, please remember you are doing the translation for everyone so clarity in the words and meanings have a significant role in why you are doing translations. These feedbacks are not set to target you, but to help you find a better way to make your translation as clear as possible to the other Vietnamese peers.

@vohoanglong0107
Copy link
Contributor Author

Implement is also áp dụng, thi hành, trang bị, .... Trait aka đặc điểm, tính trạng, trạng thái. If you are not so sure, I think you can use some English dictionary (ie Meriam Webster) for the synonyms. English has many different shades so it is not tied to only one meaning at all.

@qu-ngx I could use these translations, but they wouldn't maintain the original meaning. For example, how would Deserializer implement Sync Trait be translated?
IMO, we shouldn't force a translation on a technical terms. Rust Tiếng Việt agree with me on this point, as they also don't translate Trait and implement

@vohoanglong0107
Copy link
Contributor Author

Also, please remember you are doing the translation for everyone so clarity in the words and meanings have a significant role in why you are doing translations. These feedbacks are not set to target you, but to help you find a better way to make your translation as clear as possible to the other Vietnamese peers.

I understand, which is why I want to discuss with you the best way to translate this. I want to introduce this book to my Vietnamese friends, and I don't want to confuse them while reading the book.

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx I have opened a new discussion to talk about this here

Copy link
Collaborator

@qu-ngx qu-ngx left a comment

Choose a reason for hiding this comment

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

I have removed some comments on translation for built-ins. Can you help me out with the translation? Tkiu so much!

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx I think some previous comments are staled after #2062 (comment). Could you give this another go?

@qu-ngx
Copy link
Collaborator

qu-ngx commented May 10, 2024

@qu-ngx I think some previous comments are staled after #2062 (comment). Could you give this another go?

Oh yea, sorry I forgot to remove some on comments. Can you check it for me. And btw the other "implements" is an action word. It isn't the name of the built-in implement. Can you help translate that one?

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx Are you referring to another implement?
Because Deref<Target = T> is a trait, you can learn more about this trait here, implement in implement Deref<Target = T> isn't being used as English action verb. What implement Deref<Target = T> actually means is, any type that implement Deref<Target = T> will have a method called deref, which in many cases means that the type allows user to access the underlying type.
I hope this clear things up a bit.

Copy link
Collaborator

@qu-ngx qu-ngx left a comment

Choose a reason for hiding this comment

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

The implement you referred to is without s. However, impelement in the sentence goes with "s". So is it a techincal term or not?

Copy link
Collaborator

@qu-ngx qu-ngx left a comment

Choose a reason for hiding this comment

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

I agree with your comment in the code review. When u are done changing, just ping me.

@vohoanglong0107
Copy link
Contributor Author

@qu-ngx I think this should be ready for another go

@mgeisler mgeisler changed the title Translate the std library String type into Vietnamese vi: Translate the std library String type May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants