Git Product home page Git Product logo

Comments (6)

HSUfineprint avatar HSUfineprint commented on August 11, 2024 1

Out of curiosity I looked in the zh_*.po files in a number of projects and everywhere I saw only the formula nplurals=1; plural=0;. No one used the formula with singular and plural. This is a little surprising.

I believe it's the default setting for zh in Poedit. Chinese and Taiwanese do have some rare plural nouns. Mostly, we use number and different classifier for plural nouns. In practical, the measure words might be omitted. Using nplurals=2 in .po files is more precise, but not necessarily required.

from darktable.

ralfbrown avatar ralfbrown commented on August 11, 2024

Looks like this is the bad entry:

msgid "writing sidecar file"
msgid_plural "writing %zu sidecar files"
msgstr[0] "寫入附屬檔案"
msgstr[1] "寫入 %zu 個附屬檔案"

My guess is that it should have been

msgid "writing sidecar file"
msgid_plural "writing %zu sidecar files"
msgstr[0] "寫入 %zu 個附屬檔案"

from darktable.

HSUfineprint avatar HSUfineprint commented on August 11, 2024

I got it. It is the Plural-Forms setting.

Chinese or Taiwanese usually don't have plural nouns. The .po has a Plural-Forms: nplurals=1; plural=0;\n setting. But this one, I saw it has different content in msgid_plural and msgid. That's why I use msgstr[0] and msgstr[1].

It's my fault, will use Plural-Forms: nplurals=2; plural=(n != 1);\n and add all other msgstr[1] strings.

from darktable.

victoryforce avatar victoryforce commented on August 11, 2024

But this one, I saw it has different content in msgid_plural and msgid

Yes, in the original (in English), they should be different, because this corresponds to the rules of the English language. But this does not matter for translation, if the target language does not have a plural form, then the translation will be the same.

The main question is the rules of the language into which we translate. If you write that Chinese or Taiwanese don't have plural nouns, then you need to use the formula Plural-Forms: nplurals=1; plural=0

from darktable.

HSUfineprint avatar HSUfineprint commented on August 11, 2024

The main question is the rules of the language into which we translate. If you write that Chinese or Taiwanese don't have plural nouns, then you need to use the formula Plural-Forms: nplurals=1; plural=0

Yes, that's the way in former zh-TW.po files.

But sometimes we will use different article in front of nouns to express singular and plural forms. It depends on the sentence. I think use plural independent setting will make it more solid. Even in most cases the msgstr[1] will be the same with msgstr[0].

from darktable.

victoryforce avatar victoryforce commented on August 11, 2024

But sometimes we will use different article in front of nouns to express singular and plural forms. It depends on the sentence.

Interesting! Got it. I even found good explanation: https://medium.com/@chinesewithnora/the-singular-world-of-plurals-in-chinese-c6307a5cbc25

I think use plural independent setting will make it more solid.

Out of curiosity I looked in the zh_*.po files in a number of projects and everywhere I saw only the formula nplurals=1; plural=0;. No one used the formula with singular and plural. This is a little surprising.

from darktable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.