Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Throw when intl-get is used standalone #85

Merged
merged 2 commits into from
Mar 26, 2015

Conversation

jasonmit
Copy link
Member

Fixes #84

@yahoocla
Copy link

CLA is valid!

@@ -175,7 +175,7 @@ export default Ember.Service.extend(Ember.Evented, {
}
},

getLanguage: function (locale) {
findLanguage: function (locale) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not yet documented and private, I am changing them to match what gets invoked on the adapter for consistency. In 1.3.0 I plan to document this and mark it as public.

@@ -7,6 +7,8 @@ import Ember from 'ember';
import { Stream, read, readHash, destroyStream } from 'ember-intl/utils/streams';

export default function (value, options) {
Ember.assert('intl-get helper must be used as a subexpression', options.isInline === true);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Future versions I plan to deprecate intl-get with a warning in favor of a t helper. Intl-get no longer shares the same concepts of its sibling libs since it only is used to resolve translations keys.

(intl-get 'messages.foo.bar') will become (t 'foo.bar')

In 2.0 I plan to remove intl-get all together. This will coincide with renaming locales -> translations and build in the "merging", at build time, of the fallback locale into all other known locales.

jasonmit added a commit that referenced this pull request Mar 26, 2015
[Enhancement] Throw when intl-get is used standalone
@jasonmit jasonmit merged commit 9f39084 into master Mar 26, 2015
@jasonmit jasonmit deleted the assert-intl-get branch March 28, 2015 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

intl-get template helper now returns an object instead of just the message string
2 participants