Git Product home page Git Product logo

Comments (4)

whatyouhide avatar whatyouhide commented on May 21, 2024

While I thought contexts (msgctxt) were a pretty useful feature in gettext, @josevalim told me on IRC that they're not seen as a very good thing because they can easily cause confusion.

This may make the Gettext.PO.Entry less useful since now it would only wrap a Translation/PluralTranslation and add information on comments. We could just create a %Gettext.PO.Comments{} struct which we can put in the :comments field of both Translations and PluralTranslations.

from gettext.

josevalim avatar josevalim commented on May 21, 2024

Also, we can do map polymorphism. I.e., even if we have both Translation and PluralTranslation, functions that work with comments will work as long as both store them in the :comment key. :)

from gettext.

josevalim avatar josevalim commented on May 21, 2024

Oops, closed accidentally. But anyway, I don't think we need this. At least not for now!

from gettext.

whatyouhide avatar whatyouhide commented on May 21, 2024

@josevalim you were right closing this; as I said myself above, without contexts a :comment field is enough and indeed, map polymorphism makes it even cleaner. Thanks for the feedback! I'm closing this for now.

from gettext.

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.