dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41671
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21246: minor i18n fix in ou maint module
------------------------------------------------------------
revno: 21246
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2015-12-01 16:21:30 +0700
message:
minor i18n fix in ou maint module
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitDetails.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.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-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java 2015-08-25 10:17:01 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/java/org/hisp/dhis/oum/action/organisationunit/GetOrganisationUnitListAction.java 2015-12-01 09:21:30 +0000
@@ -28,7 +28,12 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
+import org.hisp.dhis.i18n.I18nService;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
+import org.hisp.dhis.paging.ActionPagingSupport;
+import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
import java.util.Collection;
@@ -36,10 +41,7 @@
import java.util.List;
import java.util.stream.Collectors;
-import org.hisp.dhis.common.comparator.IdentifiableObjectNameComparator;
-import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
-import org.hisp.dhis.paging.ActionPagingSupport;
+import static org.apache.commons.lang3.StringUtils.isNotBlank;
/**
* @author Torgeir Lorange Ostby
@@ -52,7 +54,7 @@
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
-
+
private OrganisationUnitSelectionManager selectionManager;
public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
@@ -60,6 +62,9 @@
this.selectionManager = selectionManager;
}
+ @Autowired
+ private I18nService i18nService;
+
// -------------------------------------------------------------------------
// Input & Output
// -------------------------------------------------------------------------
@@ -105,7 +110,7 @@
{
organisationUnits.add( selectedUnit ); // Add to list if root
}
-
+
organisationUnits.addAll( selectedUnit.getChildren() );
}
}
@@ -120,6 +125,8 @@
this.paging = createPaging( organisationUnits.size() );
organisationUnits = getBlockElement( organisationUnits, paging.getStartPos(), paging.getPageSize() );
+ i18nService.internationalise( organisationUnits );
+
return SUCCESS;
}
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitDetails.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitDetails.vm 2011-09-11 09:37:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitDetails.vm 2015-12-01 09:21:30 +0000
@@ -1,5 +1,5 @@
-<h3>$encoder.htmlEncode( $organisationUnit.name )</h3>
+<h3>$encoder.htmlEncode( $organisationUnit.displayName )</h3>
<table>
@@ -53,12 +53,12 @@
</tr>
<tr>
<td><label>$i18n.getString( "hierarchy" ):</label></td>
-<td>$!encoder.htmlEncode( $organisationUnit.ancestorNames )</td>
+<td>$!encoder.htmlEncode( $organisationUnit.ancestorNames )</td>
</tr>
#foreach( $groupSet in $groupSets )
<tr>
-<td><label>$!encoder.htmlEncode( $groupSet.name ):</label></td>
+<td><label>$!encoder.htmlEncode( $groupSet.displayName ):</label></td>
<td>$!encoder.htmlEncode( $!organisationUnit.getGroupNameInGroupSet( $groupSet ) )</td>
</tr>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm 2015-09-09 08:41:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/organisationUnitSearch.vm 2015-12-01 09:21:30 +0000
@@ -5,7 +5,7 @@
</script>
#if( $selectedOrganisationUnit )
-#set( $orgUnitText = "[ $!encoder.htmlEncode( $selectedOrganisationUnit.name ) ]" )
+#set( $orgUnitText = "[ $!encoder.htmlEncode( $selectedOrganisationUnit.displayName ) ]" )
#else
#set( $orgUnitText = $i18n.getString( 'please_select_from_tree' ) )
#end