non-standard locale support for modules

classic Classic list List threaded Threaded
11 messages Options
Dave Thomas Dave Thomas
Reply | Threaded
Open this post in threaded view
|

non-standard locale support for modules

Hi.  I have a question about adding non-standard locales from modules.

What i'd like is to have a module work in the kinyarwanda locale (rw),
without modifying core.  How do I programatically add a system locale
from a module?  The local data entry staff are fine with English, but
ideally, we would be able to set the locales for the clerks at the
registration desk to 'rw' (through the user profile dialogues).

There are some hacky, quick work-arounds, but i'd rather do this right.

d

--
Dave Thomas
EMR Programmer
Partners In Health
Rwinkavu Hospital, Rwanda
[hidden email]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

Hi Dave,

I'm pretty sure there's just a global property (in OpenmrsConstants: GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ; defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in your particular installation.

What do you want to add specifically? A bunch of messages_rw.properties? More than that?

-Darius

On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]> wrote:
Hi.  I have a question about adding non-standard locales from modules.

What i'd like is to have a module work in the kinyarwanda locale (rw), without modifying core.  How do I programatically add a system locale from a module?  The local data entry staff are fine with English, but ideally, we would be able to set the locales for the clerks at the registration desk to 'rw' (through the user profile dialogues).

There are some hacky, quick work-arounds, but i'd rather do this right.

d

--
Dave Thomas
EMR Programmer
Partners In Health
Rwinkavu Hospital, Rwanda
[hidden email]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list
Dave Thomas Dave Thomas
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

nope, adding 'rw' to the locale list doesn't do it.  And yes, what I need is a bunch of messages_rw.properties.

d

On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
Hi Dave,

I'm pretty sure there's just a global property (in OpenmrsConstants: GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ; defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in your particular installation.

What do you want to add specifically? A bunch of messages_rw.properties? More than that?

-Darius

On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]> wrote:
Hi.  I have a question about adding non-standard locales from modules.

What i'd like is to have a module work in the kinyarwanda locale (rw), without modifying core.  How do I programatically add a system locale from a module?  The local data entry staff are fine with English, but ideally, we would be able to set the locales for the clerks at the registration desk to 'rw' (through the user profile dialogues).

There are some hacky, quick work-arounds, but i'd rather do this right.

d

--
Dave Thomas
EMR Programmer
Partners In Health
Rwinkavu Hospital, Rwanda
[hidden email]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list
Dave Thomas Dave Thomas
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

To give a better answer, my gp is set to en,rw,fr, and what I get is english and french as locale options for users.

The AdministrationServiceImpl.getPresentationLocales() method depends not only on the gp, but on the messageSourceServiceImpl locales, which appear to get loaded at startup somehow?

d

On 5/12/2010 5:28 PM, David Thomas wrote:
nope, adding 'rw' to the locale list doesn't do it.  And yes, what I need is a bunch of messages_rw.properties.

d

On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
Hi Dave,

I'm pretty sure there's just a global property (in OpenmrsConstants: GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ; defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in your particular installation.

What do you want to add specifically? A bunch of messages_rw.properties? More than that?

-Darius

On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]> wrote:
Hi.  I have a question about adding non-standard locales from modules.

What i'd like is to have a module work in the kinyarwanda locale (rw), without modifying core.  How do I programatically add a system locale from a module?  The local data entry staff are fine with English, but ideally, we would be able to set the locales for the clerks at the registration desk to 'rw' (through the user profile dialogues).

There are some hacky, quick work-arounds, but i'd rather do this right.

d

--
Dave Thomas
EMR Programmer
Partners In Health
Rwinkavu Hospital, Rwanda
[hidden email]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

Is "rw" a valid locale?

I can't remember exactly, but I think the list of locales at the bottom
is the union of the allowed_locales GP and the available
messages.properties files.

Ben

On 05/12/2010 07:40 PM, David Thomas wrote:

> To give a better answer, my gp is set to en,rw,fr, and what I get is
> english and french as locale options for users.
>
> The AdministrationServiceImpl.getPresentationLocales() method depends
> not only on the gp, but on the messageSourceServiceImpl locales, which
> appear to get loaded at startup somehow?
>
> d
>
> On 5/12/2010 5:28 PM, David Thomas wrote:
>> nope, adding 'rw' to the locale list doesn't do it. And yes, what I
>> need is a bunch of messages_rw.properties.
>>
>> d
>>
>> On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
>>> Hi Dave,
>>>
>>> I'm pretty sure there's just a global property (in OpenmrsConstants:
>>> GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ;
>>> defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in
>>> your particular installation.
>>>
>>> What do you want to add specifically? A bunch of
>>> messages_rw.properties? More than that?
>>>
>>> -Darius
>>>
>>> On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>>     Hi. I have a question about adding non-standard locales from modules.
>>>
>>>     What i'd like is to have a module work in the kinyarwanda locale
>>>     (rw), without modifying core. How do I programatically add a
>>>     system locale from a module? The local data entry staff are fine
>>>     with English, but ideally, we would be able to set the locales
>>>     for the clerks at the registration desk to 'rw' (through the user
>>>     profile dialogues).
>>>
>>>     There are some hacky, quick work-arounds, but i'd rather do this
>>>     right.
>>>
>>>     d
>>>
>>>     --
>>>     Dave Thomas
>>>     EMR Programmer
>>>     Partners In Health
>>>     Rwinkavu Hospital, Rwanda
>>>     [hidden email] <mailto:[hidden email]>
>>>
>>>     _________________________________________
>>>
>>>     To unsubscribe from OpenMRS Developers' mailing list, send an
>>>     e-mail to [hidden email]
>>>     <mailto:[hidden email]> with "SIGNOFF
>>>     openmrs-devel-l" in the body (not the subject) of your e-mail.
>>>
>>>     [mailto:[hidden email]
>>>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>>>
>>>
>>> ------------------------------------------------------------------------
>>> Click here to unsubscribe
>>> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
>>> from OpenMRS Developers' mailing list
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

http://java.sun.com/javase/6/docs/api/java/util/Locale.html -> http://www.loc.gov/standards/iso639-2/php/English_list.php
Kinyarwanda is "rw" in ISO 639-1 and it's "kin" in ISO 639-2. Rwanda (the country) is "rw". So yes, "rw" is a valid locale, and if you say new Locale("rw") you get Kinyarwanda (the language) rather than Rwanda (the country).

Anyway, what Dave needs is for his module to be able to add a new locale that doesn't have a messages_rw.properties file in core. I think this is a legitimate thing to want to do.

I would propose that we make AdministrationService.getPresentationLocales() depend only on the global property, and not restrict to those that have a message bundle in core.

-Darius

On Wed, May 12, 2010 at 8:59 AM, Ben Wolfe <[hidden email]> wrote:
Is "rw" a valid locale?

I can't remember exactly, but I think the list of locales at the bottom is the union of the allowed_locales GP and the available messages.properties files.

Ben


On 05/12/2010 07:40 PM, David Thomas wrote:
To give a better answer, my gp is set to en,rw,fr, and what I get is
english and french as locale options for users.

The AdministrationServiceImpl.getPresentationLocales() method depends
not only on the gp, but on the messageSourceServiceImpl locales, which
appear to get loaded at startup somehow?

d

On 5/12/2010 5:28 PM, David Thomas wrote:
nope, adding 'rw' to the locale list doesn't do it. And yes, what I
need is a bunch of messages_rw.properties.

d

On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
Hi Dave,

I'm pretty sure there's just a global property (in OpenmrsConstants:
GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ;
defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in
your particular installation.

What do you want to add specifically? A bunch of
messages_rw.properties? More than that?

-Darius

On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]
<mailto:[hidden email]>> wrote:

   Hi. I have a question about adding non-standard locales from modules.

   What i'd like is to have a module work in the kinyarwanda locale
   (rw), without modifying core. How do I programatically add a
   system locale from a module? The local data entry staff are fine
   with English, but ideally, we would be able to set the locales
   for the clerks at the registration desk to 'rw' (through the user
   profile dialogues).

   There are some hacky, quick work-arounds, but i'd rather do this
   right.

   d

   --
   Dave Thomas
   EMR Programmer
   Partners In Health
   Rwinkavu Hospital, Rwanda
   [hidden email] <mailto:[hidden email]>


   _________________________________________

   To unsubscribe from OpenMRS Developers' mailing list, send an
   e-mail to [hidden email]
   <mailto:[hidden email]> with "SIGNOFF

   openmrs-devel-l" in the body (not the subject) of your e-mail.

   [mailto:[hidden email]
   <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]


------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l>
from OpenMRS Developers' mailing list
------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

But why have a presentation locale that doesn't have any presentation
messages?

Ben

On 05/12/2010 12:21 PM, Darius Jazayeri wrote:

> http://java.sun.com/javase/6/docs/api/java/util/Locale.html ->
> http://www.loc.gov/standards/iso639-2/php/English_list.php
> <http://www.loc.gov/standards/iso639-2/php/English_list.php>Kinyarwanda
> is "rw" in ISO 639-1 and it's "kin" in ISO 639-2. Rwanda (the country)
> is "rw". So yes, "rw" is a valid locale, and if you say new Locale("rw")
> you get Kinyarwanda (the language) rather than Rwanda (the country).
>
> Anyway, what Dave needs is for his module to be able to add a new locale
> that doesn't have a messages_rw.properties file in core. I think this is
> a legitimate thing to want to do.
>
> I would propose that we make
> AdministrationService.getPresentationLocales() depend only on the global
> property, and not restrict to those that have a message bundle in core.
>
> -Darius
>
> On Wed, May 12, 2010 at 8:59 AM, Ben Wolfe <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Is "rw" a valid locale?
>
>     I can't remember exactly, but I think the list of locales at the
>     bottom is the union of the allowed_locales GP and the available
>     messages.properties files.
>
>     Ben
>
>
>     On 05/12/2010 07:40 PM, David Thomas wrote:
>
>         To give a better answer, my gp is set to en,rw,fr, and what I get is
>         english and french as locale options for users.
>
>         The AdministrationServiceImpl.getPresentationLocales() method
>         depends
>         not only on the gp, but on the messageSourceServiceImpl locales,
>         which
>         appear to get loaded at startup somehow?
>
>         d
>
>         On 5/12/2010 5:28 PM, David Thomas wrote:
>
>             nope, adding 'rw' to the locale list doesn't do it. And yes,
>             what I
>             need is a bunch of messages_rw.properties.
>
>             d
>
>             On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
>
>                 Hi Dave,
>
>                 I'm pretty sure there's just a global property (in
>                 OpenmrsConstants:
>                 GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST =
>                 "locale.allowed.list" ;
>                 defaults to "en, es, fr, it, pt") that you'd need to add
>                 "rw" to in
>                 your particular installation.
>
>                 What do you want to add specifically? A bunch of
>                 messages_rw.properties? More than that?
>
>                 -Darius
>
>                 On Wed, May 12, 2010 at 2:19 PM, David Thomas
>                 <[hidden email] <mailto:[hidden email]>
>                 <mailto:[hidden email] <mailto:[hidden email]>>>
>                 wrote:
>
>                     Hi. I have a question about adding non-standard
>                 locales from modules.
>
>                     What i'd like is to have a module work in the
>                 kinyarwanda locale
>                     (rw), without modifying core. How do I
>                 programatically add a
>                     system locale from a module? The local data entry
>                 staff are fine
>                     with English, but ideally, we would be able to set
>                 the locales
>                     for the clerks at the registration desk to 'rw'
>                 (through the user
>                     profile dialogues).
>
>                     There are some hacky, quick work-arounds, but i'd
>                 rather do this
>                     right.
>
>                     d
>
>                     --
>                     Dave Thomas
>                     EMR Programmer
>                     Partners In Health
>                     Rwinkavu Hospital, Rwanda
>                 [hidden email] <mailto:[hidden email]>
>                 <mailto:[hidden email] <mailto:[hidden email]>>
>
>
>                     _________________________________________
>
>                     To unsubscribe from OpenMRS Developers' mailing
>                 list, send an
>                     e-mail to [hidden email]
>                 <mailto:[hidden email]>
>                 <mailto:[hidden email]
>                 <mailto:[hidden email]>> with "SIGNOFF
>
>                     openmrs-devel-l" in the body (not the subject) of
>                 your e-mail.
>
>                     [mailto:[hidden email]
>                 <mailto:[hidden email]>
>                 <mailto:[hidden email]
>                 <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l]
>
>
>                 ------------------------------------------------------------------------
>                 Click here to unsubscribe
>                 <mailto:[hidden email]
>                 <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>                 from OpenMRS Developers' mailing list
>
>         ------------------------------------------------------------------------
>         Click here to unsubscribe
>         <mailto:[hidden email]
>         <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>         from
>         OpenMRS Developers' mailing list
>
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

Modules need to be able to add presentation messages. In this case Dave would be having a module add Kinyarwanda presentation messages.

(So maybe we also need to let MessageSourceService allow modules to add more messages? I haven't looked at the code...)

-Darius

On Wed, May 12, 2010 at 9:33 AM, Ben Wolfe <[hidden email]> wrote:
But why have a presentation locale that doesn't have any presentation messages?

Ben


On 05/12/2010 12:21 PM, Darius Jazayeri wrote:
http://java.sun.com/javase/6/docs/api/java/util/Locale.html ->
http://www.loc.gov/standards/iso639-2/php/English_list.php
<http://www.loc.gov/standards/iso639-2/php/English_list.php>Kinyarwanda
is "rw" in ISO 639-1 and it's "kin" in ISO 639-2. Rwanda (the country)
is "rw". So yes, "rw" is a valid locale, and if you say new Locale("rw")
you get Kinyarwanda (the language) rather than Rwanda (the country).

Anyway, what Dave needs is for his module to be able to add a new locale
that doesn't have a messages_rw.properties file in core. I think this is
a legitimate thing to want to do.

I would propose that we make
AdministrationService.getPresentationLocales() depend only on the global
property, and not restrict to those that have a message bundle in core.

-Darius

On Wed, May 12, 2010 at 8:59 AM, Ben Wolfe <[hidden email]
<mailto:[hidden email]>> wrote:

   Is "rw" a valid locale?

   I can't remember exactly, but I think the list of locales at the
   bottom is the union of the allowed_locales GP and the available
   messages.properties files.

   Ben


   On 05/12/2010 07:40 PM, David Thomas wrote:

       To give a better answer, my gp is set to en,rw,fr, and what I get is
       english and french as locale options for users.

       The AdministrationServiceImpl.getPresentationLocales() method
       depends
       not only on the gp, but on the messageSourceServiceImpl locales,
       which
       appear to get loaded at startup somehow?

       d

       On 5/12/2010 5:28 PM, David Thomas wrote:

           nope, adding 'rw' to the locale list doesn't do it. And yes,
           what I
           need is a bunch of messages_rw.properties.

           d

           On 5/12/2010 8:49 AM, Darius Jazayeri wrote:

               Hi Dave,

               I'm pretty sure there's just a global property (in
               OpenmrsConstants:
               GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST =
               "locale.allowed.list" ;
               defaults to "en, es, fr, it, pt") that you'd need to add
               "rw" to in
               your particular installation.

               What do you want to add specifically? A bunch of
               messages_rw.properties? More than that?

               -Darius

               On Wed, May 12, 2010 at 2:19 PM, David Thomas
               <[hidden email] <mailto:[hidden email]>
               <mailto:[hidden email] <mailto:[hidden email]>>>

               wrote:

                   Hi. I have a question about adding non-standard
               locales from modules.

                   What i'd like is to have a module work in the
               kinyarwanda locale
                   (rw), without modifying core. How do I
               programatically add a
                   system locale from a module? The local data entry
               staff are fine
                   with English, but ideally, we would be able to set
               the locales
                   for the clerks at the registration desk to 'rw'
               (through the user
                   profile dialogues).

                   There are some hacky, quick work-arounds, but i'd
               rather do this
                   right.

                   d

                   --
                   Dave Thomas
                   EMR Programmer
                   Partners In Health
                   Rwinkavu Hospital, Rwanda
               [hidden email] <mailto:[hidden email]>
               <mailto:[hidden email] <mailto:[hidden email]>>



                   _________________________________________

                   To unsubscribe from OpenMRS Developers' mailing
               list, send an
                   e-mail to [hidden email]
               <mailto:[hidden email]>
               <mailto:[hidden email]
               <mailto:[hidden email]>> with "SIGNOFF

                   openmrs-devel-l" in the body (not the subject) of
               your e-mail.

                   [mailto:[hidden email]
               <mailto:[hidden email]>
               <mailto:[hidden email]
               <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l]


               ------------------------------------------------------------------------
               Click here to unsubscribe
               <mailto:[hidden email]
               <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
               from OpenMRS Developers' mailing list

       ------------------------------------------------------------------------
       Click here to unsubscribe
       <mailto:[hidden email]
       <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
       from
       OpenMRS Developers' mailing list


   _________________________________________

   To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
   to [hidden email] <mailto:[hidden email]>

   with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
   your e-mail.

   [mailto:[hidden email]
   <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]


------------------------------------------------------------------------
Click here to unsubscribe
<mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

A module should be able to add new messages via its own
messages_rw.properties file.

Module properties messages are copied to files called
module_messages_rw.properties so as to not overwrite the openmrs
messages_rw.properties files.  I havne't looked at the code, but perhaps
this is bug fix so that the getPresentationLocales thats
module_messages*.properties files into account as well?

Ben

On 05/12/2010 12:38 PM, Darius Jazayeri wrote:

> Modules need to be able to add presentation messages. In this case Dave
> would be having a module add Kinyarwanda presentation messages.
>
> (So maybe we also need to let MessageSourceService allow modules to add
> more messages? I haven't looked at the code...)
>
> -Darius
>
> On Wed, May 12, 2010 at 9:33 AM, Ben Wolfe <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     But why have a presentation locale that doesn't have any
>     presentation messages?
>
>     Ben
>
>
>     On 05/12/2010 12:21 PM, Darius Jazayeri wrote:
>
>         http://java.sun.com/javase/6/docs/api/java/util/Locale.html ->
>         http://www.loc.gov/standards/iso639-2/php/English_list.php
>         <http://www.loc.gov/standards/iso639-2/php/English_list.php>Kinyarwanda
>         is "rw" in ISO 639-1 and it's "kin" in ISO 639-2. Rwanda (the
>         country)
>         is "rw". So yes, "rw" is a valid locale, and if you say new
>         Locale("rw")
>         you get Kinyarwanda (the language) rather than Rwanda (the country).
>
>         Anyway, what Dave needs is for his module to be able to add a
>         new locale
>         that doesn't have a messages_rw.properties file in core. I think
>         this is
>         a legitimate thing to want to do.
>
>         I would propose that we make
>         AdministrationService.getPresentationLocales() depend only on
>         the global
>         property, and not restrict to those that have a message bundle
>         in core.
>
>         -Darius
>
>         On Wed, May 12, 2010 at 8:59 AM, Ben Wolfe
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>>
>         wrote:
>
>             Is "rw" a valid locale?
>
>             I can't remember exactly, but I think the list of locales at the
>             bottom is the union of the allowed_locales GP and the available
>             messages.properties files.
>
>             Ben
>
>
>             On 05/12/2010 07:40 PM, David Thomas wrote:
>
>                 To give a better answer, my gp is set to en,rw,fr, and
>         what I get is
>                 english and french as locale options for users.
>
>                 The AdministrationServiceImpl.getPresentationLocales()
>         method
>                 depends
>                 not only on the gp, but on the messageSourceServiceImpl
>         locales,
>                 which
>                 appear to get loaded at startup somehow?
>
>                 d
>
>                 On 5/12/2010 5:28 PM, David Thomas wrote:
>
>                     nope, adding 'rw' to the locale list doesn't do it.
>         And yes,
>                     what I
>                     need is a bunch of messages_rw.properties.
>
>                     d
>
>                     On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
>
>                         Hi Dave,
>
>                         I'm pretty sure there's just a global property (in
>                         OpenmrsConstants:
>                         GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST =
>         "locale.allowed.list" ;
>                         defaults to "en, es, fr, it, pt") that you'd
>         need to add
>         "rw" to in
>                         your particular installation.
>
>                         What do you want to add specifically? A bunch of
>                         messages_rw.properties? More than that?
>
>                         -Darius
>
>                         On Wed, May 12, 2010 at 2:19 PM, David Thomas
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>         <mailto:[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>>>
>
>                         wrote:
>
>                             Hi. I have a question about adding non-standard
>                         locales from modules.
>
>                             What i'd like is to have a module work in the
>                         kinyarwanda locale
>                             (rw), without modifying core. How do I
>                         programatically add a
>                             system locale from a module? The local data
>         entry
>                         staff are fine
>                             with English, but ideally, we would be able
>         to set
>                         the locales
>                             for the clerks at the registration desk to 'rw'
>                         (through the user
>                             profile dialogues).
>
>                             There are some hacky, quick work-arounds,
>         but i'd
>                         rather do this
>                             right.
>
>                             d
>
>                             --
>                             Dave Thomas
>                             EMR Programmer
>                             Partners In Health
>                             Rwinkavu Hospital, Rwanda
>         [hidden email] <mailto:[hidden email]> <mailto:[hidden email]
>         <mailto:[hidden email]>>
>         <mailto:[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>>
>
>
>
>                             _________________________________________
>
>                             To unsubscribe from OpenMRS Developers' mailing
>                         list, send an
>                             e-mail to [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> with "SIGNOFF
>
>                             openmrs-devel-l" in the body (not the
>         subject) of
>                         your e-mail.
>
>                             [mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>>?body=SIGNOFF%20openmrs-devel-l]
>
>
>
>           ------------------------------------------------------------------------
>                         Click here to unsubscribe
>         <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l>
>                         from OpenMRS Developers' mailing list
>
>
>           ------------------------------------------------------------------------
>                 Click here to unsubscribe
>         <mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l>
>                 from
>                 OpenMRS Developers' mailing list
>
>
>             _________________________________________
>
>             To unsubscribe from OpenMRS Developers' mailing list, send
>         an e-mail
>             to [hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>
>
>             with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>             your e-mail.
>
>             [mailto:[hidden email]
>         <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l]
>
>
>         ------------------------------------------------------------------------
>         Click here to unsubscribe
>         <mailto:[hidden email]
>         <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>         from
>         OpenMRS Developers' mailing list
>
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Andrew Kanter Andrew Kanter
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

In reply to this post by Dave Thomas
You might have to add some rw locales to your concept_names table or something like that?
-Andy
 
--------------------
Andrew S. Kanter, MD MPH

- Director of Health Information Systems/Medical Informatics
Millennium Villages Project, Earth Institute, Columbia University
- Asst. Prof. of Clinical Biomedical Informatics and Clinical Epidemiology
Columbia University


Email: [hidden email]
Mobile: +1 (646) 469-2421
Office: +1 (212) 305-4842
Skype: akanter-ippnw
Yahoo: andy_kanter



From: David Thomas <[hidden email]>
To: [hidden email]
Sent: Wed, May 12, 2010 7:40:47 PM
Subject: Re: [OPENMRS-DEV] non-standard locale support for modules

To give a better answer, my gp is set to en,rw,fr, and what I get is english and french as locale options for users.

The AdministrationServiceImpl.getPresentationLocales() method depends not only on the gp, but on the messageSourceServiceImpl locales, which appear to get loaded at startup somehow?

d

On 5/12/2010 5:28 PM, David Thomas wrote:
nope, adding 'rw' to the locale list doesn't do it.  And yes, what I need is a bunch of messages_rw.properties.

d

On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
Hi Dave,

I'm pretty sure there's just a global property (in OpenmrsConstants: GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST = "locale.allowed.list" ; defaults to "en, es, fr, it, pt") that you'd need to add "rw" to in your particular installation.

What do you want to add specifically? A bunch of messages_rw.properties? More than that?

-Darius

On Wed, May 12, 2010 at 2:19 PM, David Thomas <[hidden email]> wrote:
Hi.  I have a question about adding non-standard locales from modules.

What i'd like is to have a module work in the kinyarwanda locale (rw), without modifying core.  How do I programatically add a system locale from a module?  The local data entry staff are fine with English, but ideally, we would be able to set the locales for the clerks at the registration desk to 'rw' (through the user profile dialogues).

There are some hacky, quick work-arounds, but i'd rather do this right.

d

--
Dave Thomas
EMR Programmer
Partners In Health
Rwinkavu Hospital, Rwanda
[hidden email]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list

[hidden email] from OpenMRS Developers' mailing list
Dave Thomas Dave Thomas
Reply | Threaded
Open this post in threaded view
|

Re: non-standard locale support for modules

In reply to this post by Ben Wolfe
Yes -- this would be particularly useful for me.  Once again, my use
case is that the registration module will be in kinyarwanda, and is very
much a stand-alone application.  This is the only part of openmrs that
the registration clerks will ever see.  The core system, used by the
data entry staff, is fine in English.  We'd like to just be able to set
the clerk's locale to 'rw' when we create them as users, and have the
registration module work in kinyarwanda.

Would one of you care to open a ticket for this?  We're upgrading in 2
weeks to the sync module + 1.6 and it would be nice if this didn't sit
around until 1.7.  The work-arounds are straightforward, but pretty hacky.

d

On 5/12/2010 12:06 PM, Ben Wolfe wrote:

> A module should be able to add new messages via its own
> messages_rw.properties file.
>
> Module properties messages are copied to files called
> module_messages_rw.properties so as to not overwrite the openmrs
> messages_rw.properties files.  I havne't looked at the code, but
> perhaps this is bug fix so that the getPresentationLocales thats
> module_messages*.properties files into account as well?
>
> Ben
>
> On 05/12/2010 12:38 PM, Darius Jazayeri wrote:
>> Modules need to be able to add presentation messages. In this case Dave
>> would be having a module add Kinyarwanda presentation messages.
>>
>> (So maybe we also need to let MessageSourceService allow modules to add
>> more messages? I haven't looked at the code...)
>>
>> -Darius
>>
>> On Wed, May 12, 2010 at 9:33 AM, Ben Wolfe <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>>     But why have a presentation locale that doesn't have any
>>     presentation messages?
>>
>>     Ben
>>
>>
>>     On 05/12/2010 12:21 PM, Darius Jazayeri wrote:
>>
>>         http://java.sun.com/javase/6/docs/api/java/util/Locale.html ->
>>         http://www.loc.gov/standards/iso639-2/php/English_list.php
>> <http://www.loc.gov/standards/iso639-2/php/English_list.php>Kinyarwanda
>>         is "rw" in ISO 639-1 and it's "kin" in ISO 639-2. Rwanda (the
>>         country)
>>         is "rw". So yes, "rw" is a valid locale, and if you say new
>>         Locale("rw")
>>         you get Kinyarwanda (the language) rather than Rwanda (the
>> country).
>>
>>         Anyway, what Dave needs is for his module to be able to add a
>>         new locale
>>         that doesn't have a messages_rw.properties file in core. I think
>>         this is
>>         a legitimate thing to want to do.
>>
>>         I would propose that we make
>>         AdministrationService.getPresentationLocales() depend only on
>>         the global
>>         property, and not restrict to those that have a message bundle
>>         in core.
>>
>>         -Darius
>>
>>         On Wed, May 12, 2010 at 8:59 AM, Ben Wolfe
>> <[hidden email] <mailto:[hidden email]>
>> <mailto:[hidden email] <mailto:[hidden email]>>>
>>         wrote:
>>
>>             Is "rw" a valid locale?
>>
>>             I can't remember exactly, but I think the list of locales
>> at the
>>             bottom is the union of the allowed_locales GP and the
>> available
>>             messages.properties files.
>>
>>             Ben
>>
>>
>>             On 05/12/2010 07:40 PM, David Thomas wrote:
>>
>>                 To give a better answer, my gp is set to en,rw,fr, and
>>         what I get is
>>                 english and french as locale options for users.
>>
>>                 The AdministrationServiceImpl.getPresentationLocales()
>>         method
>>                 depends
>>                 not only on the gp, but on the messageSourceServiceImpl
>>         locales,
>>                 which
>>                 appear to get loaded at startup somehow?
>>
>>                 d
>>
>>                 On 5/12/2010 5:28 PM, David Thomas wrote:
>>
>>                     nope, adding 'rw' to the locale list doesn't do it.
>>         And yes,
>>                     what I
>>                     need is a bunch of messages_rw.properties.
>>
>>                     d
>>
>>                     On 5/12/2010 8:49 AM, Darius Jazayeri wrote:
>>
>>                         Hi Dave,
>>
>>                         I'm pretty sure there's just a global
>> property (in
>>                         OpenmrsConstants:
>>                         GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST =
>>         "locale.allowed.list" ;
>>                         defaults to "en, es, fr, it, pt") that you'd
>>         need to add
>>         "rw" to in
>>                         your particular installation.
>>
>>                         What do you want to add specifically? A bunch of
>>                         messages_rw.properties? More than that?
>>
>>                         -Darius
>>
>>                         On Wed, May 12, 2010 at 2:19 PM, David Thomas
>> <[hidden email] <mailto:[hidden email]>
>> <mailto:[hidden email] <mailto:[hidden email]>>
>> <mailto:[hidden email] <mailto:[hidden email]>
>> <mailto:[hidden email] <mailto:[hidden email]>>>>
>>
>>                         wrote:
>>
>>                             Hi. I have a question about adding
>> non-standard
>>                         locales from modules.
>>
>>                             What i'd like is to have a module work in
>> the
>>                         kinyarwanda locale
>>                             (rw), without modifying core. How do I
>>                         programatically add a
>>                             system locale from a module? The local data
>>         entry
>>                         staff are fine
>>                             with English, but ideally, we would be able
>>         to set
>>                         the locales
>>                             for the clerks at the registration desk
>> to 'rw'
>>                         (through the user
>>                             profile dialogues).
>>
>>                             There are some hacky, quick work-arounds,
>>         but i'd
>>                         rather do this
>>                             right.
>>
>>                             d
>>
>>                             --
>>                             Dave Thomas
>>                             EMR Programmer
>>                             Partners In Health
>>                             Rwinkavu Hospital, Rwanda
>>         [hidden email] <mailto:[hidden email]> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>> <mailto:[hidden email] <mailto:[hidden email]>
>> <mailto:[hidden email] <mailto:[hidden email]>>>
>>
>>
>>
>>                             _________________________________________
>>
>>                             To unsubscribe from OpenMRS Developers'
>> mailing
>>                         list, send an
>>                             e-mail to [hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>> with "SIGNOFF
>>
>>                             openmrs-devel-l" in the body (not the
>>         subject) of
>>                         your e-mail.
>>
>>                             [mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>>?body=SIGNOFF%20openmrs-devel-l]
>>
>>
>>
>>          
>> ------------------------------------------------------------------------
>>                         Click here to unsubscribe
>> <mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l>
>>                         from OpenMRS Developers' mailing list
>>
>>
>>          
>> ------------------------------------------------------------------------
>>                 Click here to unsubscribe
>> <mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l>
>>                 from
>>                 OpenMRS Developers' mailing list
>>
>>
>>             _________________________________________
>>
>>             To unsubscribe from OpenMRS Developers' mailing list, send
>>         an e-mail
>>             to [hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>
>>
>>             with "SIGNOFF openmrs-devel-l" in the  body (not the
>> subject) of
>>             your e-mail.
>>
>>             [mailto:[hidden email]
>> <mailto:[hidden email]>
>> <mailto:[hidden email]
>> <mailto:[hidden email]>>?body=SIGNOFF%20openmrs-devel-l]
>>
>>
>>        
>> ------------------------------------------------------------------------
>>         Click here to unsubscribe
>> <mailto:[hidden email]
>> <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>>         from
>>         OpenMRS Developers' mailing list
>>
>>
>>     _________________________________________
>>
>>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>>     to [hidden email] <mailto:[hidden email]>
>>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>>     your e-mail.
>>
>>     [mailto:[hidden email]
>> <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>>
>>
>> ------------------------------------------------------------------------
>> Click here to unsubscribe
>> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
>> OpenMRS Developers' mailing list
>
> _________________________________________
>
> To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
> to [hidden email] with "SIGNOFF openmrs-devel-l" in the  
> body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]