facebook / fbt

A JavaScript Internationalization Framework
https://facebook.github.io/fbt
MIT License
3.88k stars 178 forks source link

unexpected pluralization behavior #376

Open vonovak opened 1 year ago

vonovak commented 1 year ago

🐛 Bug Report

Hello! I'm here to ask about / report unexpected pluralization behavior. Thank you for looking into this.

To Reproduce

This json file contains translations corresponding to this component. The file was created in crowdin from this source_strings.json file.

Expected behavior

running the translate-fbts script in package.json I'm expecting the output to contain plural forms for cs_CZ like in the input file but they are different:

input has 4 plural froms:

output has 2 plural forms:

    "1hIiOI": {
      "*": "Máte {number of people} sledujících",
      "_1": "Máte 1 člověka, který sleduje"
    },

Link to repo (highly encouraged) or paste

https://github.com/vonovak/i18n-demo

envinfo

  System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 1.92 GB / 64.00 GB
    Shell: 5.1.16 - /opt/homebrew/bin/bash
  Binaries:
    Node: 16.16.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.11.0 - /opt/homebrew/bin/npm
    Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman