-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Localization for Admin Module #281
Comments
Hello! I want to help you with pt-br localization, how could i do that? |
@renato04 we need to first move the text in the system to |
@jkleinsc Are there anyone doing this? Could I help to do this? |
No one is working on this particular one for the admin module, so you are welcome to work on it. See the directions at the top of this issue. If you do decide to work on it, please comment in this ticket so that we know someone is working on it. |
@jkleinsc Hello, [info] [<0.155.0>] 127.0.0.1 - - PUT /_users/org.couchdb.user:hradmin 500 Could anyone help me? |
@jkleinsc I managed to install the database. Now i'm ready to start. I'll start to do this. Ok? |
You probably already figured this out, but for other people to know, you need to make sure that CouchDB is running when you interact with the database. On Windows, you just need to start the "Start CouchDB" script that is added into your start menu when you install CouchDB. You need to do this before running /scripts/initcouch.sh and before you run ember (using 'ember serve'). Hope this helps, and we look forward to your contributions. |
I realize that might not have actually been the solution to your issue. If you did something else to get the script working, could you let me know? I'm curious as I am also developing in Windows 10. |
I'm sorry. I forgot to share the solution. |
I don't know if i can put this here Here it is the message error I'm trying in this way: |
Hmm, I have couch installed in Program Files and it works just fine for me. I bet you just needed to reinstall the program. It might not have installed properly the first time. |
i reinstall a several times. And Apparently it doesn't happen just to me. |
@renato04 does this approach not work for that field? I think it isn't working because 'this' isn't bound properly to get the i18n service. If just using the t helper doesn't work, you can change it to a property - I had to do that here, for an example: https://github.com/HospitalRun/hospitalrun-frontend/blob/master/app/imaging/route.js#L16 |
@alexpelan that approach doesnt work for that field I tried import and import Ember from 'ember';
import { translationMacro as t } from 'ember-i18n';
export default Ember.Mixin.create({
navItems: [
(...)
{
title: 'Administration',
iconClass: 'octicon-person',
route: 'admin.lookup',
capability: 'admin',
subnav: [
{
title: t('admin.lookup_lists'),
iconClass: 'octicon-chevron-right',
route: 'admin.lookup',
capability: 'update_config'
},
}
(...) This is the error showed on browser multiples times: Thank you for the help |
@renato04 the second approach I suggested works. You need to change navItems to be a property: here's a gist of how I got it to work: https://gist.github.com/alexpelan/f544e7056a77ae916506 |
@alexpelan Thank you for the help. It worked here. But i don't know how to localize the input label like this |
@renato04 for items like
|
@jkleinsc Thank you, i'll try later and let you know if it work. |
@jkleinsc Thank you your suggestion worked. Now i'm facing another difficulty, i'm sorry for the many questions, i'm new with this. import Ember from 'ember';
import BillingCategories from 'hospitalrun/mixins/billing-categories';
import LabPricingTypes from 'hospitalrun/mixins/lab-pricing-types';
import ModalHelper from 'hospitalrun/mixins/modal-helper';
import ImagingPricingTypes from 'hospitalrun/mixins/imaging-pricing-types';
import InventoryTypeList from 'hospitalrun/mixins/inventory-type-list';
import UnitTypes from 'hospitalrun/mixins/unit-types';
import VisitTypes from 'hospitalrun/mixins/visit-types';
import { translationMacro as t } from "ember-i18n";
export default Ember.Controller.extend(BillingCategories, LabPricingTypes,
ModalHelper, ImagingPricingTypes, InventoryTypeList, UnitTypes, VisitTypes, {
fileSystem: Ember.inject.service('filesystem'),
lookupTypes: [{
i18n: Ember.inject.service(),
name: t('admin.lookup.anesthesia_types'),
value: 'anesthesia_types',
model: {
procedure: 'anesthesiaType'
}
}, it is throwing the following error: Uncaught Error: Assertion Failed: Attempting to lookup an injected property on an object without a container, ensure that the object was instantiated via a container. If i try using Thank you in Advance. |
Move the following line to be above the lookupTypes definition: i18n: Ember.inject.service(), |
@jkleinsc Thank you I tried your suggestion like this: import Ember from 'ember';
import BillingCategories from 'hospitalrun/mixins/billing-categories';
import LabPricingTypes from 'hospitalrun/mixins/lab-pricing-types';
import ModalHelper from 'hospitalrun/mixins/modal-helper';
import ImagingPricingTypes from 'hospitalrun/mixins/imaging-pricing-types';
import InventoryTypeList from 'hospitalrun/mixins/inventory-type-list';
import UnitTypes from 'hospitalrun/mixins/unit-types';
import VisitTypes from 'hospitalrun/mixins/visit-types';
import { translationMacro as t } from "ember-i18n";
export default Ember.Controller.extend(BillingCategories, LabPricingTypes,
ModalHelper, ImagingPricingTypes, InventoryTypeList, UnitTypes, VisitTypes, {
fileSystem: Ember.inject.service('filesystem'),
i18n: Ember.inject.service(),
lookupTypes: [{
name: t('lookup.anesthesia_types'),
value: 'anesthesia_types',
model: {
procedure: 'anesthesiaType'
}
} And it is throwing this error: Update I resolved this question following this suggestion @jkleinsc Thank you |
Now that i18n support has been added to HospitalRun via PR #248 and issue #141 we need to localize the app. This issue is to track localization for the admin module. Localization in HospitalRun uses Ember-I18n. The translations/default text will be placed in app/locales/en/translations.js.
See https://github.com/jamesarosen/ember-i18n/wiki/Doc:-Translating-Text for information on how to localize the templates.
The text was updated successfully, but these errors were encountered: