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
base: main
Are you sure you want to change the base?
Conversation
6199538
to
c7e6e90
Compare
c7e6e90
to
22e320f
Compare
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 " |
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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 hà
, 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.
There was a problem hiding this 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!
@qu-ngx I'm quite unsure about translating |
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 Also, when translating type name, such as |
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. |
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. |
@qu-ngx I could use these translations, but they wouldn't maintain the original meaning. For example, how would |
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. |
There was a problem hiding this 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!
@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 |
@qu-ngx Are you referring to another |
There was a problem hiding this 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?
There was a problem hiding this 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.
@qu-ngx I think this should be ready for another go |
I couldn't find an effective way to translate
Trait
andimplement
, so both terms are going to be used as is in the translation.