Giter Club home page Giter Club logo

Comments (3)

jasonmit avatar jasonmit commented on May 23, 2024

Correct, intl-get returns an object with a property translation and locale, where the translation derived from. This is to tell the downstream format-message which locale to pass through to the format functions.

What is the use case for using intl-get within your templates outside of format-message/format-html-message? I can make this backwards compat. by overriding toString, but I wasn't aware of people using the helper outside the context of subexpression :)

from ember-intl.

terryroe avatar terryroe commented on May 23, 2024

Jason,

We'd discovered that intl-get "worked" without using format-message. It wasn't clear that you "had" to use format-message. The docs didn't really say. Now they do, but it's still not quite clear. Here's the line that mentions it, but the wording of the line doesn't make it as obvious as I think it could: "Will return the message from the current locale, or locale explicitly passed as an argument, message object."

So, it looks like we were using it in an unexpected way, and we just need to do it the correct way with format-message.

Thanks for your help.

TR

from ember-intl.

jasonmit avatar jasonmit commented on May 23, 2024

Leaving this opened for now to update the docs to be more clear.

Thanks for the good feedback.

Edit: this PR will assert that intl-get is only used as a subexpression and wrote some tests to prevent that regression. #85

from ember-intl.

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.