Giter VIP home page Giter VIP logo

Comments (2)

leonelquinteros avatar leonelquinteros commented on May 18, 2024

@alexedwards I've been looking into this issue, and while it's a bug, the solution is more complex than just N=1.

What's happening here is that the Locale object you're using doesn't have the Domain (Po object) you're requesting loaded, so it defaulted to the plural.
That said, the current implementation was using the n == 1 rule to identify singular cases, and that's kind of incorrect, because it would depend on the plurals definition from the .po file.

So I'm working on a solution in the Po object that will fallback to the corresponding default value based on the plural forms definitions in the .po file.
When it fallbacks to an non-existing translation string, but on an existing domain (.po file) it will use this new approach.
Otherwise, as if the domain isn't loaded and it doesn't knows how plural definitions are, it will fallback using the western n == 1 rule, just to make a convention here.

I'll be pushing a fix to master branch soon.

from gotext.

alexedwards avatar alexedwards commented on May 18, 2024

Thanks for the time looking into this and the fast fix. I really appreciate it 👍

from gotext.

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.