Skip to content

Instantly share code, notes, and snippets.

@ppcano
Created May 30, 2012 13:33
Show Gist options
  • Select an option

  • Save ppcano/2836349 to your computer and use it in GitHub Desktop.

Select an option

Save ppcano/2836349 to your computer and use it in GitHub Desktop.
What should be modified to integrate i18n at the object level?
{{view Yn.ActionButtonView action="login" textI18n="login"}}
{{view Yn.FormInputView type="tel" nameI18n="phone"}}
App.LoginActionButtonView = Yn.ActionButtonView.extend({
action: 'login',
textI18n: 'login'
});
App.LoginPhoneFormInputView = Yn.FormInputView.extend({
type: 'tel',
nameI18n: 'phone'
});
App.LoginActionButtonView = Yn.ActionButtonView.extend({
action: 'login',
text: I18n.t('login')
});
App.LoginPhoneFormInputView = Yn.FormInputView.extend({
type: 'tel',
name: I18n.t('phone')
});
@ppcano

ppcano commented May 30, 2012

Copy link
Copy Markdown
Author

Currently, i must define custom view to specify translations (without_18n_integration.js) . It will be nice if translations could be integrated either at the Em.Object, Em.View or View Helper level as ( with_18n_integration.js).

Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment