Database Messages Module
Overview
The Database Messages Module module registers itself as a default Message Provider and provides a set of management screens that will allow the user to add/edit/delete messages.
Download and Installation
Install the omod with the Manage Modules admin page
After the installation is completed, you will observe that all message translation files which are stored in the WEB-INF/messages_**.properties files in the webapp are moved to the database. OpenMRS reads these and outputs for the user. You can Add/Search properties/translations from the module's admin page.
Overview :
By default internationalization(I18N) of OpenMRS is handled by the Spring Framework reads files called as messages**.properties. These files are shipped with OpenMRS in the war file. Modifying them is tricky and only temporary. With the databasemessages module installed, the messages are stored in the database. Admins can then easily change them without the need to restart and without the fear of losing edits.
Modules provide their own translation files in their omod file. The databasemessages module picks these up and will write to its database automatically when a new module is installed.
When the module is uninstalled can again use the previous mechanism where in Spring reads all of our message properties translation files from the webapp again.
Administration:
Add New Key : Any new addition of properties can be done through this page.
You will have to provide the Message Key/Code , the locale id (en_US,en_GB,it,pt,fr,etc) which specifies the language and the value/message for that specified Code and locale.
A message will be displayed saying if successfully saved or not.
If you will try to insert a duplicate message for an already existing Code in the same Language then an error message will be displayed.
Error message displayed
Search By Key :
This allows a dynamic search for a code/Key through the UI and displays all the related matches for the search. For all the related matches you can find the Code/Key, Locale and a link to edit/delete that key.If you wish to edit or delete any message of a key then go to its respective link.
Once you go to the link, you find a page where you can see the Code, Locale a editable text field displaying the message, you can delete the Code/Key from here.
You will find a check box prompting You to if you wish to delete a key. If you wish to delete then you can check it and click save button. The Code/Key and all the respective locales for the respective Code/Key will be deleted from the database but not from the .properties file.
If you wish to edit the message for a particular Code you can make required changes here and then save the changes.
So all these changes will be reflected into the database and hence in the UI also the changes will be reflected.
Release Notes
0.8
Initial release
Planned Features
0.9
Add drop-down for available locales
Improved User-interface labels
1.0
Allow uploading of messages.properties file
1.1
Allow creating new locales and messages for locales
Add option to upload messages.properties for new locale
Improve module performance when importing keys after first install and new module installation