Git Product home page Git Product logo

Comments (2)

JanCizmar avatar JanCizmar commented on July 28, 2024

Hey! Tolgee is currently not prepared to handle the exact (=0, =1) cases so well. We recommend to use the standard zero, one ... keywords, since these will convert correctly to other languages.

The background:
As you can see in the official CLDR documentation here, in some languages, it doesn't behave as you would expect.

For example the zero form is used also for !=0 cases (e.g. in Latvian), so if you use the exact =0... forms, it can break pretty simply.

from tolgee-platform.

siepkes avatar siepkes commented on July 28, 2024

Good point about the "zero" form use case.

I got this "questionable practice" from the Google Closure Templates documentation on using messages within Closures Templates. Closure Templates has it's own message syntax (with plural support, etc.) for use in the templates which is extracted by a tool and converted to ICU message format so it can be used by translation tooling (like Tolgee). Apparently internally Google converts it to some other internal message format which they use for translation.

Since Google probably translates a lot of stuff in a lot of languages it makes you wonder why they would document using the "zero" form like that (i.e. "You have no products" instead of "You have 0 products"). Since Closure Templates is basically more "source drops" then "opensource with a community" the docs give some insights in how Google does things internally.

from tolgee-platform.

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.