nicokaiser / hugo-theme-gallery

Gallery Theme for Hugo
https://nicokaiser.github.io/hugo-theme-gallery/
MIT License
305 stars 85 forks source link

i18n(zh): restructure the order of words #72

Closed Tenktau closed 2 months ago

Tenktau commented 2 months ago

Hi @nicokaiser,

In this pr, I've adjusted the syntax of albumCount related string, so that it's more in line with Chinese users' reading habits.

Btw, thanks for your wonderful open source project, I'm enjoying using it to develop my own gallery site! : )

nicokaiser commented 2 months ago

Thanks for your PR! I do not speak any Chinese, but shouldn't it be {{ .count }} 个相册,共计 {{ .photoCount }} 张照片? For example: 5 个相册,共计 120 张照片 (for 120 photos in 5 albums)?

Tenktau commented 2 months ago

Your translation is correct, but if I didn’t misunderstood, the “张照片” has included in the {{ .photoCount }}.

nicokaiser commented 2 months ago

Your translation is correct, but if I didn’t misunderstood, the “张照片” has included in the {{ .photoCount }}.

No, the naming is a bit misleading: {{ .photoCount }} is only the number, not the photoCount translation string from above. So the line should be

other: "{{ .count }} 个相册,共计 {{ .photoCount }} 张照片"

Tenktau commented 2 months ago

https://github.com/nicokaiser/hugo-theme-gallery/blob/f17773044bb54d144af2e98e1a5f4ab92f2560d5/i18n/en.yaml#L12-L17

Okay…But I don’t understand, maybe we can compare with the section of en.yaml above, the quantifier photo(s) of photoCount(L12-L14) doesn’t appear in the albumCount(L15-L17), that’s why I thought the quantifier 张照片 should not be included in the string as well.

And I did that in my project, the result met the translation expectation.

nicokaiser commented 2 months ago

Of course, you are right! Sorry for the confusion, I misread my own code ;-)