=== 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 2013-03-19 17:09:10 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSetService.java 2013-06-24 05:33:13 +0000 @@ -90,6 +90,18 @@ DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nIndicators, boolean i18nOrgUnits ); /** + * Get a DataSet + * + * @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. + * @param i18nSections whether to i18n the sections 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 i18nIndicators, boolean i18nOrgUnits, boolean i18nSections ); + + /** * Returns the DataSet with the given UID. * * @param uid the UID. === 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 2013-03-19 17:09:10 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/dataset/DefaultDataSetService.java 2013-06-24 05:33:13 +0000 @@ -117,6 +117,11 @@ public DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nIndicators, boolean i18nOrgUnits ) { + return getDataSet( id, i18nDataElements, i18nIndicators, i18nOrgUnits, false ); + } + + public DataSet getDataSet( int id, boolean i18nDataElements, boolean i18nIndicators, boolean i18nOrgUnits, boolean i18nSections ) + { DataSet dataSet = getDataSet( id ); if ( i18nDataElements ) @@ -134,6 +139,11 @@ i18n( i18nService, dataSet.getSources() ); } + if ( i18nSections && dataSet.hasSections() ) + { + i18n( i18nService, dataSet.getSections() ); + } + return dataSet; } === 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 2013-04-04 18:06:19 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/java/org/hisp/dhis/de/action/LoadFormAction.java 2013-06-24 05:33:13 +0000 @@ -214,7 +214,7 @@ public String execute() throws Exception { - DataSet dataSet = dataSetService.getDataSet( dataSetId, true, false, false ); + DataSet dataSet = dataSetService.getDataSet( dataSetId, true, false, false, true ); List dataElements = new ArrayList( dataElementService.getDataElements( dataSet, null, null ) ); === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2013-05-23 10:40:52 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/defaultForm.vm 2013-06-24 05:33:13 +0000 @@ -16,7 +16,7 @@ #set( $cols = $colRepeat.get( $category.id ) ) #foreach( $col in $cols ) #foreach( $categoryOption in $categoryOptions ) - #if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.name )}#end + #if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.displayName )}#end #end #end @@ -26,7 +26,7 @@ #set( $dataElements = $orderedDataElements.get( $categoryCombo ) ) #set( $optionCombos = $orderedCategoryOptionCombos.get( $categoryCombo.id ) ) #set( $mark = 0 ) - #foreach( $optionCombo in $optionCombos ) + #foreach( $optionCombo in $optionCombos ) #end #foreach( $dataElement in $dataElements ) #if( $mark == 1 ) === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm 2013-05-23 10:40:52 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/multiOrgSectionForm.vm 2013-06-24 05:33:13 +0000 @@ -36,7 +36,7 @@ #foreach( $dataElement in $section.dataElements ) - $dataElement.name + $dataElement.displayName #end @@ -50,7 +50,7 @@ #foreach( $dataElement in $section.dataElements ) #foreach( $col in $cols ) #foreach( $categoryOption in $categoryOptions ) - ${encoder.htmlEncode( $categoryOption.name )} + ${encoder.htmlEncode( $categoryOption.displayName )} #end #end #end @@ -61,7 +61,7 @@ #set( $count = 0 ) #set( $mark = 0 ) #set( $optionCombos = $orderedCategoryOptionCombos.get( $categoryComboId ) ) - #foreach( $optionCombo in $optionCombos )#end + #foreach( $optionCombo in $optionCombos )#end #foreach( $organisationUnit in $organisationUnits ) #if( $mark == 1 ) @@ -72,7 +72,7 @@ #set( $count = $count + 1 ) #set( $dataEntryId = "${organisationUnit.id}-${dataElement.uid}-${optionCombo.uid}-val" ) - ${encoder.htmlEncode( $organisationUnit.name )} + ${encoder.htmlEncode( $organisationUnit.displayName )} #foreach( $dataElement in $section.dataElements ) === modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm' --- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-05-29 21:15:22 +0000 +++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/sectionForm.vm 2013-06-24 05:33:13 +0000 @@ -35,7 +35,7 @@ #set( $cols = $colRepeat.get( $category.id ) ) #foreach( $col in $cols ) #foreach( $categoryOption in $categoryOptions ) - #if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.name )}#end + #if( $categoryOption.isDefault() )${i18n.getString( "value" )}#else ${encoder.htmlEncode( $categoryOption.displayName )}#end #end #end @@ -44,7 +44,7 @@ #set( $count = 0 ) #set( $mark = 0 ) #set( $optionCombos = $orderedCategoryOptionCombos.get( $categoryComboId ) ) - #foreach( $optionCombo in $optionCombos ) + #foreach( $optionCombo in $optionCombos ) #end #foreach( $dataElement in $section.dataElements ) #if( $mark == 1 )