dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15683
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5745: Removed some properties from db i18n
------------------------------------------------------------
revno: 5745
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-01-18 09:40:55 +0100
message:
Removed some properties from db i18n
modified:
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datadictionary/DefaultDataDictionaryService.java
dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datadictionary/DefaultDataDictionaryService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datadictionary/DefaultDataDictionaryService.java 2011-12-26 10:07:59 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/datadictionary/DefaultDataDictionaryService.java 2012-01-18 08:40:55 +0000
@@ -27,13 +27,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.i18n.I18nUtils.i18n;
-
import java.util.Collection;
import org.hisp.dhis.common.GenericIdentifiableObjectStore;
import org.hisp.dhis.dataelement.DataElement;
-import org.hisp.dhis.i18n.I18nService;
import org.hisp.dhis.system.util.Filter;
import org.hisp.dhis.system.util.FilterUtils;
import org.springframework.transaction.annotation.Transactional;
@@ -56,14 +53,7 @@
{
this.dataDictionaryStore = dataDictionaryStore;
}
-
- private I18nService i18nService;
-
- public void setI18nService( I18nService service )
- {
- i18nService = service;
- }
-
+
// -------------------------------------------------------------------------
// DataDictionary
// -------------------------------------------------------------------------
@@ -75,7 +65,7 @@
public DataDictionary getDataDictionary( int id )
{
- return i18n( i18nService, dataDictionaryStore.get( id ) );
+ return dataDictionaryStore.get( id );
}
public Collection<DataDictionary> getDataDictionaries( final Collection<Integer> identifiers )
@@ -98,17 +88,17 @@
public DataDictionary getDataDictionaryByName( String name )
{
- return i18n( i18nService, dataDictionaryStore.getByName( name ) );
+ return dataDictionaryStore.getByName( name );
}
public Collection<DataDictionary> getAllDataDictionaries()
{
- return i18n( i18nService, dataDictionaryStore.getAll() );
+ return dataDictionaryStore.getAll();
}
public Collection<DataElement> getDataElementsByDictionaryId( int dictionaryId )
{
- return i18n( i18nService, dataDictionaryStore.get( dictionaryId ).getDataElements() );
+ return dataDictionaryStore.get( dictionaryId ).getDataElements();
}
public int getDataDictionaryCount()
@@ -123,11 +113,11 @@
public Collection<DataDictionary> getDataDictionarysBetween( int first, int max )
{
- return i18n( i18nService, dataDictionaryStore.getBetween( first, max ) );
+ return dataDictionaryStore.getBetween( first, max );
}
public Collection<DataDictionary> getDataDictionarysBetweenByName( String name, int first, int max )
{
- return i18n( i18nService, dataDictionaryStore.getBetweenByName( name, first, max ) );
+ return dataDictionaryStore.getBetweenByName( name, first, max );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-01-11 19:25:49 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2012-01-18 08:40:55 +0000
@@ -290,7 +290,6 @@
<bean id="org.hisp.dhis.datadictionary.DataDictionaryService" class="org.hisp.dhis.datadictionary.DefaultDataDictionaryService">
<property name="dataDictionaryStore" ref="org.hisp.dhis.datadictionary.DataDictionaryStore" />
- <property name="i18nService" ref="org.hisp.dhis.i18n.I18nService" />
</bean>
<bean id="org.hisp.dhis.indicator.IndicatorService" class="org.hisp.dhis.indicator.DefaultIndicatorService">
@@ -555,14 +554,16 @@
<ref bean="I18nDataElement" />
<ref bean="I18nDataElementGroup" />
<ref bean="I18nDataElementGroupSet" />
- <ref bean="I18nDataDictionary" />
<ref bean="I18nIndicator" />
<ref bean="I18nIndicatorType" />
<ref bean="I18nIndicatorGroup" />
<ref bean="I18nIndicatorGroupSet" />
<ref bean="I18nDataSet" />
<ref bean="I18nOrganisationUnit" />
+ <ref bean="I18nOrganisationUnitGroup" />
+ <ref bean="I18nOrganisationUnitGroupSet" />
<ref bean="I18nSection" />
+ <ref bean="I18nDataElementCategory" />
</list>
</property>
</bean>
@@ -672,8 +673,6 @@
<value>name</value>
<value>shortName</value>
<value>description</value>
- <value>numeratorDescription</value>
- <value>denominatorDescription</value>
</list>
</property>
@@ -711,26 +710,6 @@
<entry key="message" value="" />
</map>
</entry>
- <entry key="numeratorDescription">
- <map>
- <entry key="unique" value="false" />
- <entry key="required" value="false" />
- <entry key="minlength" value="0" />
- <entry key="maxlength" value="100" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
- <entry key="denominatorDescription">
- <map>
- <entry key="unique" value="false" />
- <entry key="required" value="false" />
- <entry key="minlength" value="0" />
- <entry key="maxlength" value="100" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
</map>
</property>
</bean>
@@ -807,59 +786,12 @@
</property>
</bean>
- <bean id="I18nDataDictionary" class="org.hisp.dhis.i18n.I18nObject">
- <property name="className" value="DataDictionary" />
- <property name="propertyNames">
- <list>
- <value>name</value>
- <value>description</value>
- <value>region</value>
- </list>
- </property>
-
- <property name="rulePropertyNames">
- <map>
- <entry key="name">
- <map>
- <entry key="unique" value="true" />
- <entry key="required" value="true" />
- <entry key="minlength" value="2" />
- <entry key="maxlength" value="160" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
- <entry key="description">
- <map>
- <entry key="unique" value="false" />
- <entry key="required" value="false" />
- <entry key="minlength" value="0" />
- <entry key="maxlength" value="200" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
- <entry key="region">
- <map>
- <entry key="unique" value="false" />
- <entry key="required" value="false" />
- <entry key="minlength" value="0" />
- <entry key="maxlength" value="255" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
- </map>
- </property>
- </bean>
-
<bean id="I18nOrganisationUnit" class="org.hisp.dhis.i18n.I18nObject">
<property name="className" value="OrganisationUnit" />
<property name="propertyNames">
<list>
<value>name</value>
<value>shortName</value>
- <value>comment</value>
</list>
</property>
@@ -887,16 +819,6 @@
<entry key="message" value="translation_shortname_wellformed" />
</map>
</entry>
- <entry key="comment">
- <map>
- <entry key="unique" value="false" />
- <entry key="required" value="false" />
- <entry key="minlength" value="0" />
- <entry key="maxlength" value="360" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
</map>
</property>
</bean>
@@ -997,6 +919,30 @@
</property>
</bean>
+ <bean id="I18nSection" class="org.hisp.dhis.i18n.I18nObject">
+ <property name="className" value="Section" />
+ <property name="propertyNames">
+ <list>
+ <value>name</value>
+ </list>
+ </property>
+
+ <property name="rulePropertyNames">
+ <map>
+ <entry key="name">
+ <map>
+ <entry key="unique" value="true" />
+ <entry key="required" value="true" />
+ <entry key="minlength" value="2" />
+ <entry key="maxlength" value="160" />
+ <entry key="regex" value="''" />
+ <entry key="message" value="" />
+ </map>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
<bean id="I18nDataElementCategory" class="org.hisp.dhis.i18n.I18nObject">
<property name="className" value="DataElementCategory" />
<property name="propertyNames">
@@ -1021,30 +967,6 @@
</property>
</bean>
- <bean id="I18nSection" class="org.hisp.dhis.i18n.I18nObject">
- <property name="className" value="Section" />
- <property name="propertyNames">
- <list>
- <value>name</value>
- </list>
- </property>
-
- <property name="rulePropertyNames">
- <map>
- <entry key="name">
- <map>
- <entry key="unique" value="true" />
- <entry key="required" value="true" />
- <entry key="minlength" value="2" />
- <entry key="maxlength" value="160" />
- <entry key="regex" value="''" />
- <entry key="message" value="" />
- </map>
- </entry>
- </map>
- </property>
- </bean>
-
<!-- Startup routine definitions -->
<bean id="org.hisp.dhis.startup.TableAlteror" class="org.hisp.dhis.startup.TableAlteror">
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-01-16 06:35:50 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-01-18 08:40:55 +0000
@@ -211,7 +211,7 @@
translation_save=Save
translation_label_id=Id
translation_label_name=Name
-translation_label_shortname=Short name
+translation_label_short_name=Short name
translation_label_description=Description
translation_label_comment=Comment
translation_label_region=Region