Updated zh_CN/music.mo#899
Conversation
|
Some errors appear when trying to run |
|
Sorry, I missed some string somehow. It's been added now if nothing went wrong. |
|
Sorry, this still doesn't look quite right. Your second commit added the music.mo binary file but we don't need that for anything. We are only interested about the music.po file, and that didn't change at all in your second and third commits. |
|
Oh I confused with mo and po file. I will fix it later |
|
OK, music.po file is up-to-date and music.mo is deleted. Maybe a rebase job is needed, actually it's my first time use git command line tool. |
|
Thanks, it's better but still doesn't address my original comment. If you look at the "Files changed" tab in github, it can be easily seen in the raw music.po file. For example, there is this block: There's supposed to be two translations, one for the case of only one album in the user's library and another one for the case when there are more than one. The latter translation should contain the placeholder Using Poedit, you should fill the translations of "1 album" on the tab "Singular" and the translation of "{{ count }} albums" on the tab "Plural". |
|
Actually mandarin doesn' t have a plural form. The word 专辑 means both album and albums. Also in mandarin, it is better add a unit before a object, let's say, 1张专辑, the word 张 means one or some pieces of album. And because of the dependence issue, I can't tell whether I need to add those unit words, so I would make more change after a build. |
I didn't notice the Singular and Plural tab, I just translate both 1 album and {{ count }} albums into 专辑, because they are the same thing in mandarin. Maybe I miss the place holder, I'll check it. |
|
Yes, the placeholder somehow missing, I will check it later.
|
|
I think I find the problem. From Baidu ZhiDao |
|
Okay, if that is the case, then would it make sense to translate it as "{{ count }} 专辑" or something similar? And the {{ count }} there could then be number 1 or any greater number? I still need to check, if the application works technically correctly when only one translation is given like this. |
|
I think that won' t work. If only one album is available, the placeholder won' t be replaced. |
|
I updated the po file using things like |
|
I did now some testing, and the correct way seems to be to provide just one translation like In case you are interested, this is how we ask for the translated string in the code: Here, the gettextCatalog library automatically decides, which of the singular/plural translations to use, depending on the first argument albumCount. I guess that gettextCatalog also internally knows that there is supposed to be only one form for Chinese which is then used regardless of the count. I have read that gettextCatalog supports also languages using three different forms (1 item, 2 items, or 3+ items); e.g. Slovenian is such a language.
While testing, I also noticed one more thing to fix. In this translation, the parameter names and count do not match: Also, that translation refers to the Other than this, everything seemed to work technically correctly, and I saw no missing translations. |
|
As a mildly interesting technical detail, this line in music.po controls, which kind of singular/plural/etc. translations can be entered with Poedit: Line 18 in 599a1be In the Finnish translation file, the corresponding line is like this: Line 17 in 599a1be And in the Slovenian file, it's like this: Line 14 in 599a1be But none of these definitions are migrated to translations.js, so the gettext library must have corresponding/compatible definitions built-in and hard-coded per language. |
|
Thanks for those careful test. I think I know how gettext works now. I'll update these in next commit.
I made a mistake, thanks for notice! |
|
A new inspection was created. |
|
Thanks, looks correct now. I'll test this one more time in the evening, and then merge if I find no more issues. |
|
Everything worked great now, so I squashed and merged the commits. Thanks again for your contribution, it's much appreciated! The translations will be included in the next Music release v1.4.0 which I hope to be able to publish within a couple of weeks. |
|
The Music v1.4.0 with the Chinese translations is now released. |



Update zh_CN/music.mo from templete/music.mo, and add some translation. Try to solve issue #898