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

Fixes #278: Localization for Medication module #318

Merged
merged 1 commit into from
Mar 2, 2016

Conversation

alexpelan
Copy link
Contributor

One thing I wanted to highlight is the 'searchStatus' parameter used in many of the index routes isn't easy to internationalize right now - because that same string is used for both display and is actually stored in the model - I think we'll have to switch to use category id: string mappings and translate those for the models?

@jkleinsc
Copy link
Member

@alexpelan unless I am missing something the medication module doesn't display searchStatus anywhere. The only place I see it being displayed is on the invoices index page.

@alexpelan
Copy link
Contributor Author

@jkleinsc Sorry if I was being unclear - 'searchStatus' appears (to me) to be used to filter which medication records show up - it looks like it searches for the model's 'status' property. The model's status property appears to be an english string, and is then displayed in the UI, for example in the medication/index template. These localization tickets appear to specifically target the UI text, I was just pointing out there's some other work that will have to be done.

saved_message: 'The medication record has been saved.',
fulfilled_title: 'Medication Request Fulfilled'
},
common: {
Copy link
Member

Choose a reason for hiding this comment

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

@alexpelan was this common section intended to be labels common across the app? It is nested under medication in this file.

Copy link
Member

Choose a reason for hiding this comment

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

Also, if it is intended to be app wide, a label other than "common" would be better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It wasn't intended to be nested - great catch, thanks. What would you suggest as a better label? I was looking for something that could be a button, or a label, or a title

Copy link
Member

Choose a reason for hiding this comment

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

@alexpelan I think it would be better to place them in more specific buckets such as button, label, or title because it gives translators better context of the intention of that text. Does that make sense?

@jkleinsc
Copy link
Member

@alexpelan gotcha about searchStatus. Yes the problem is the text in the model.

modelName: 'medication',
newTitle: 'New Medication Request',
newTitle: t('medications.titles.new_medication_request'),
Copy link
Member

Choose a reason for hiding this comment

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

This should be t('medication.titles.new_medication_request'),

@alexpelan alexpelan force-pushed the alexpelan/medication-i18n branch from 2ce43bd to 27b36ea Compare March 2, 2016 03:31
@alexpelan
Copy link
Contributor Author

@jkleinsc responded to your feedback - thanks for the quick review.

@jkleinsc
Copy link
Member

jkleinsc commented Mar 2, 2016

@alexpelan looks good. Thanks for the PR!

jkleinsc added a commit that referenced this pull request Mar 2, 2016
Fixes #278: Localization for Medication module
@jkleinsc jkleinsc merged commit 8434f10 into HospitalRun:master Mar 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants