Permalink
Browse files

Add translations for ember-i18n and make the application use the tran…

…slations
  • Loading branch information...
corrspt committed Nov 19, 2016
1 parent 63e9d07 commit 17e65a762ef81e0ddd7805f2397543ec11a602de
Showing with 32 additions and 22 deletions.
  1. +14 −9 app/locales/en/translations.js
  2. +14 −9 app/locales/pt/translations.js
  3. +4 −4 app/templates/application.hbs
@@ -1,11 +1,16 @@
export default {
// "some.translation.key": "Text for some.translation.key",
//
// "a": {
// "nested": {
// "key": "Text for a.nested.key"
// }
// },
//
// "key.with.interpolation": "Text with {{anInterpolation}}"
'model': {
'person': {
'name': {
'label': 'Name',
'help': 'This name will be used throughout the application to display your name',
'placeholder': 'Person\'s complete name'
},
'age': {
'label': 'Age',
'help': 'This field is used to validate access to some parts of the app, must be 18 or older',
'placeholder': 'The age (in years)'
}
}
}
};
@@ -1,11 +1,16 @@
export default {
// "some.translation.key": "Text for some.translation.key",
//
// "a": {
// "nested": {
// "key": "Text for a.nested.key"
// }
// },
//
// "key.with.interpolation": "Text with {{anInterpolation}}"
'model': {
'person': {
'name': {
'label': 'Nome',
'help': 'Este nome vai ser usado na aplicação para mostrar o nome',
'placeholder': 'Nome completo da pessoa'
},
'age': {
'label': 'Idade',
'help': 'Este campo é usado para validar outras zonas da aplicação, tem de ser maior que 18',
'placeholder': 'A idade (em anos)'
}
}
}
};
@@ -7,8 +7,8 @@
attribute-text
model=model
attribute='name'
label='Name'
placeholder='Insert your name'
label=(t 'model.person.name.label')
placeholder=(t 'model.person.name.placeholder')
onUpdateValue=(action 'setName')
}}
</div>
@@ -17,8 +17,8 @@
attribute-text
model=model
attribute='age'
label='Age'
placeholder='Insert your age'
label=(t 'model.person.age.label')
placeholder=(t 'model.person.age.placeholder')
onUpdateValue=(action 'setAge')
}}
</div>

0 comments on commit 17e65a7

Please sign in to comment.