Skip to content
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

fix: wrong detect whether a translation is plural #1119

Merged
merged 1 commit into from
Aug 30, 2021
Merged

Commits on Aug 18, 2021

  1. Fix wrong detect whether a translation is plural

    The previous logic is wrong because a language like Vietnamese, Indonesian, Malaysian... does not support plural form, so gettext tools does not allow these kind of to have multiple msgstr. Therefore detecting a plural translation through number of msgstr is not true. As consequence, that causes plural macro can not be replaced with proper translation.
    
    Ex:
    ```
    #. js-lingui:icu=%7BmonthNumber%2C+plural%2C+one+%7B%2F+%23+th%C3%A1ng%7D+other+%7B%2F+%23+th%C3%A1ng%7D%7D&pluralize_on=monthNumber
    msgid "/ # tháng"
    msgid_plural "/ # tháng"
    msgstr[0] "/ # bulan"
    ```
    truong-hua authored Aug 18, 2021
    Configuration menu
    Copy the full SHA
    4559eac View commit details
    Browse the repository at this point in the history