dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15827
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5843: I18n db wip
------------------------------------------------------------
revno: 5843
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-02-01 10:54:34 +0100
message:
I18n db wip
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java
dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm
--
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-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java 2012-01-30 20:16:08 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java 2012-02-01 09:54:34 +0000
@@ -81,10 +81,11 @@
*
* @param id The unique identifier for the DataSet to get.
* @param i18nDataElements whether to i18n the data elements of this data set.
+ * @param i18nIndicators whether to i18n the indicators of this data set.
* @param i18nOrgUnits whether to i18n the org units of this data set.
* @return The DataSet with the given id or null if it does not exist.
*/
- DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nOrgUnits );
+ DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nIndicators, boolean i18nOrgUnits );
/**
* Returns the DataSet with the given UID.
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2012-01-30 10:28:30 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataelement/DefaultDataElementService.java 2012-02-01 09:54:34 +0000
@@ -360,7 +360,7 @@
{
return i18n( i18nService, dataElementGroupStore.get( id ) );
}
-
+
public Collection<DataElementGroup> getDataElementGroups( final Collection<Integer> identifiers )
{
Collection<DataElementGroup> groups = getAllDataElementGroups();
=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2012-01-30 20:16:08 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2012-02-01 09:54:34 +0000
@@ -122,7 +122,7 @@
return i18n( i18nService, dataSetStore.getByUid( uid ) );
}
- public DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nOrgUnits )
+ public DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nIndicators, boolean i18nOrgUnits )
{
DataSet dataSet = getDataSet( id );
@@ -131,6 +131,11 @@
i18n( i18nService, dataSet.getDataElements() );
}
+ if ( i18nIndicators )
+ {
+ i18n( i18nService, dataSet.getIndicators() );
+ }
+
if ( i18nOrgUnits )
{
i18n( i18nService, dataSet.getSources() );
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java 2012-01-30 20:16:08 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java 2012-02-01 09:54:34 +0000
@@ -201,7 +201,7 @@
public String execute()
throws Exception
{
- DataSet dataSet = dataSetService.getDataSet( dataSetId, true, false );
+ DataSet dataSet = dataSetService.getDataSet( dataSetId, true, false, false );
List<DataElement> dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java 2012-01-20 10:38:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/EditDataSetFormAction.java 2012-02-01 09:54:34 +0000
@@ -120,7 +120,7 @@
if ( dataSetId != null )
{
- dataSet = dataSetService.getDataSet( dataSetId );
+ dataSet = dataSetService.getDataSet( dataSetId, true, true, false );
dataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
indicators = new ArrayList<Indicator>( dataSet.getIndicators() );
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java 2012-01-20 10:38:11 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/java/org/hisp/dhis/dataset/action/GetDataSetAction.java 2012-02-01 09:54:34 +0000
@@ -129,11 +129,11 @@
dataSetDataElements = new ArrayList<DataElement>( dataSet.getDataElements() );
- Collections.sort( dataSetDataElements, new IdentifiableObjectNameComparator() );
+ Collections.sort( dataSetDataElements, IdentifiableObjectNameComparator.INSTANCE );
dataSetIndicators = new ArrayList<Indicator>( dataSet.getIndicators() );
- Collections.sort( dataSetIndicators, new IdentifiableObjectNameComparator() );
+ Collections.sort( dataSetIndicators, IdentifiableObjectNameComparator.INSTANCE );
dataEntryForm = dataSet.getDataEntryForm();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2011-11-22 18:46:26 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/editDataSet.vm 2012-02-01 09:54:34 +0000
@@ -113,7 +113,7 @@
<td>
<select id="dataElementsSelectedList" name="dataElementsSelectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;">
#foreach ( $availableDataElement in $dataElements )
- <option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.name )</option>
+ <option value="$availableDataElement.id">$encoder.htmlEncode( $availableDataElement.displayName )</option>
#end
</select>
</td>
@@ -149,7 +149,7 @@
<td>
<select id="indicatorsSelectedList" name="indicatorsSelectedList" multiple="multiple" style="height: 200px; width: 100%; margin-top: 45px;">
#foreach ( $availableIndicator in $indicators )
- <option value="$availableIndicator.id">$encoder.htmlEncode( $availableIndicator.name )</option>
+ <option value="$availableIndicator.id">$encoder.htmlEncode( $availableIndicator.displayName )</option>
#end
</select>
</td>