
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
ember-cli-pod-translations
Advanced tools
An addon to compile your locale files inside pods.
$ ember install ember-cli-pod-translations
Create translation files for your components, controllers or routes
For example, we could create an english file app/pods/components/x-foo/translations.en.json
{
"hello_world": "Hello World"
}
Then a french file app/pods/components/x-foo/translations.fr.json
:
{
"hello_world": "Bonjour le monde"
}
Extend your component, controller or route with the Localizable
mixin
NOTE: This is required for both the JS and template usage
// app/pods/components/x-foo/component.js
import Ember from 'ember';
import Localizable from 'ember-cli-pod-translations/mixins/localizable';
import translations from './translations';
export default Ember.Component.extend(Localizable(translations));
Use your translations in your Ember object
// app/pods/components/x-foo/component.js
import Ember from 'ember';
import Localizable from 'ember-cli-pod-translations/mixins/localizable';
import translations from './translations';
export default Ember.Component.extend(Localizable(translations), {
helloString: computed(function() {
return this.localTranslation('hello_world');
})
});
Use your translations in your template
{{!-- app/pods/components/x-foo/template.hbs --}}
{{local-t localizablePrefix 'hello_world'}}
You can also use a "raw" translation which is not wrapped in a SafeString for ember-moment for example:
{{moment-format date (local-t-raw localizablePrefix 'date_format')}}
$ git clone https://github.com/mirego/ember-cli-pod-translations
$ cd ember-cli-pod-translations
$ yarn install
$ ember serve
Visit your app at http://localhost:4200.
$ npm test # Runs `ember try:each` to test the addon against multiple Ember versions
$ ember test
$ ember test --server
$ ember build
For more information on using ember-cli, visit https://ember-cli.com/.
ember-cli-pod-translations
is © 2017 Mirego and may be freely distributed under the New BSD license.
See the LICENSE.md
file.
Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We're a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.
We also love open-source software and we try to give back to the community as much as we can.
FAQs
An addon to compile your locale files inside pods.
We found that ember-cli-pod-translations demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.