canton7 / SyncTrayzor

Windows tray utility / filesystem watcher / launcher for Syncthing
MIT License
5.97k stars 412 forks source link

Incorrect numbers are shows when translation plurals in Chinese #678

Open yfdyh000 opened 2 years ago

yfdyh000 commented 2 years ago

ref: https://www.transifex.com/canton7/synctrayzor/translate/#zh_CN/strings/50561743?q=translation_text%3A%E5%B7%B2%E6%9B%B4%E6%96%B0 The Updated {0:p:1 file|{} files} & Updated {0:p:1 file|{} files} ({1:p:1 failure|{} failures}) always display "1 files" for Chinese, since there is no plural form in Chinese locale. The 已更新 {0} 个文件 is unable to submit due to Validation Error:.

Other plural representations may have the same problem.

canton7 commented 2 years ago

Looks like a Transifex problem. 已更新 {0:p:{} 个文件} seems to make it happy

yfdyh000 commented 2 years ago

Looks like a Transifex problem. 已更新 {0:p:{} 个文件} seems to make it happy

I'm not sure. I see the Japanese uses the {0:p:1|{}} form. https://www.transifex.com/canton7/synctrayzor/viewstrings/#ja/strings/65792852?q=developer_notes%3Anumber

I would like you to un-reviewed all strings in Chinese (China), they are not high-quality, including issues like typos, punctuation and access key broken.

canton7 commented 2 years ago

I don't think that Japanese translation is correct: Japanese also only has 1 plural form, so only the 1 option will be chosen, and not the {} option.

n13i commented 2 years ago

I noticed the same problem in Japanese translation. Now I'm trying to fix.

Looks like a Transifex problem. 已更新 {0:p:{} 个文件} seems to make it happy

I've tried this, but it shows "已更新" and ignores the placeholder part. SmartFormat seems to require at least one plural form in placeholder, so try 已更新 {0:p:{} 个文件|}.