Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Address issue #390, Adjustment types for inventory need to be localized #1041

Merged
merged 2 commits into from
Apr 3, 2017
Merged

Address issue #390, Adjustment types for inventory need to be localized #1041

merged 2 commits into from
Apr 3, 2017

Conversation

sweeneydavidj
Copy link
Contributor

@sweeneydavidj sweeneydavidj commented Mar 31, 2017

Fixes #390.

There are two issues, which are related:

  1. Localization of drop-down
    Added translation keys to app/mixins/inventory-adjustment-types.js. So now the drop-down list for Adjustment Types is translated. Added English translations. I didn't update the files for the other languages - I'm not sure of the process for getting translation text in multiple languages - let me know if you'd like me to do something more about that.

  2. Localization of the 'submit' button.
    In app/inventory/adjust/controller.js I use the the Transaction Type to find a localized Adjustment Type name.

cc @HospitalRun/core-maintainers

Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

@sweeneydavidj Thanks for the PR. Looks good to me except for the organization of the localization values. Those values should be under inventory.labels, not in their own section under inventory.

Also, app/locales/en/translations.js was recently reorganized to be sorted alphabetically, so you will notice a merge conflict with your version of that file. Its probably easiest to just grab the latest version from master and add your labels to that vs trying to merge your file with master.

@@ -553,6 +553,13 @@ export default {
}
},
inventory: {
adjustmentTypes: {
Copy link
Member

Choose a reason for hiding this comment

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

These values should be under inventory.labels, eg:

inventory: {
  ...
  labels: {
     ...
     addAdjustmentType 'Add',
     removeAdjustmentType: 'Remove',
     ...
  }
}

@sweeneydavidj
Copy link
Contributor Author

@jkleinsc Thanks for the review. I've reorganized the localization values as suggested.

@jkleinsc
Copy link
Member

jkleinsc commented Apr 3, 2017

@sweeneydavidj looks good to me. Thanks for the PR!

@jkleinsc jkleinsc merged commit 34d4432 into HospitalRun:master Apr 3, 2017
@sweeneydavidj sweeneydavidj deleted the adjustment-types-localized branch April 4, 2017 09:26
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants