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

Translate database strings #549

Closed
billybonks opened this issue Jul 2, 2016 · 1 comment
Closed

Translate database strings #549

billybonks opened this issue Jul 2, 2016 · 1 comment
Labels
needs requirements indicates that an issue needs more requirements in order to be worked on wontfix indicates an issue/pull request will not be worked on

Comments

@billybonks
Copy link
Contributor

Currently, we have english strings that are displayed to the user stored in the database, this will have to be translated as well.

Most of the strings are tags likes status/type/category etc. some of these lists are mutable and others are immutable
Mutable
- visit-types.js
- inventory-type-list.js
- unit-types.js
- lab-pricing-types.js

immutable
- publish-statuses.js
- payment-profiles.js
- inventory-adjustment-types.js
- imaging-pricing-types.js
- billing-categories.js

Useages:

  1. All lists in creation/edit forms are displayed in a select box
  2. They are displayed in the handlebars as strings

The translations should be under the database namespace, containing a namespace for each mixin. these namespaces will contain all contain keys for each value that should be translated.

database: {
  visitTypes:{
    someValue: 'translation'
  }
}

The solution to usage one is that each mixin should have a computed property called something like getSelectList. this will return an array of objects:

[
{
 displayText: 'translatedString',
 value: 'englishString'
},
...
]

All usages of the bare type object in select boxes will have to be replaced by this new computed property.

The solution to point 2 could be a handle bars helper {{translate-database-value value namespace='payments'}} the helper will search the namespace for a key containing the value. if that key does not exist it will return the value, since it is user created.

@tangollama tangollama added the needs requirements indicates that an issue needs more requirements in order to be worked on label Jul 22, 2016
@stale
Copy link

stale bot commented Aug 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix indicates an issue/pull request will not be worked on label Aug 7, 2019
@fox1t fox1t closed this as completed Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs requirements indicates that an issue needs more requirements in order to be worked on wontfix indicates an issue/pull request will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants