Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) Do not require language property in PDF report templates #618

Closed
jniles opened this issue Aug 3, 2016 · 0 comments · Fixed by #621
Closed

(refactor) Do not require language property in PDF report templates #618

jniles opened this issue Aug 3, 2016 · 0 comments · Fixed by #621
Assignees
Labels

Comments

@jniles
Copy link
Collaborator

jniles commented Aug 3, 2016

The current method of creating reports requires that a language be specified in the model passed in. For example:

<span>{{translate 'FORM.LABELS.PHONE' model.lang}}: {{ model.enterprise.phone }}</span>

Writing model.lang or data.lang over and over is exhausting. It would be ideal to find a way to ensure that a renderer uses a particular language without having to specify the language in every translatable field of the template.

@jniles jniles added the Refactor label Aug 3, 2016
@jniles jniles added this to the Future milestone Aug 3, 2016
@jniles jniles self-assigned this Aug 3, 2016
jniles pushed a commit to jniles/bhima that referenced this issue Aug 4, 2016
The handlebars translated helper is now overridden with the correct
language translation helper. This means that the developer does not have
to specify the translation key in templates - it is transparently
configured prior to compiling the template.

Closes IMA-WorldHealth#618.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant