This repository has been archived by the owner on Jan 9, 2023. It is now read-only.
Address #277: Localization for Imaging Module #283
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
-Added an initializer to inject the I18N service into all controllers, routes, and mixins
-Did not write any i18n-specific tests - don't have a lot of experience in how to automated test i18n, in this case knowing that the current tests didn't break when run with the 'en' locale is probably good enough? Would gladly write some if you have any suggestions.
-The Ember localization syntax can get kind of awkward sometimes, it doesn't feel very DRY. Take for example the subActions changes in app/imaging/route.js - you can't access the translation helper in the array because this isn't bound to the route , so you have to change it to a function. Not sure if there's a way around this, that method was recommended here: http://stackoverflow.com/a/33380796/265714
A couple of things I considered out of scope:
-I didn't localize the nav
-I made no effort to audit display of numbers / dates / etc in the proper locale - seems like we're just focused on translating strings for now.