Skip to content

Commit

Permalink
update measure to get translation from display name key from external…
Browse files Browse the repository at this point in the history
… files
  • Loading branch information
jonfang committed Jan 21, 2019
1 parent 3392de1 commit ba5c006
Showing 1 changed file with 12 additions and 0 deletions.
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.birt.report.designer.ui.cubebuilder.util.UIHelper;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ReportElementHandle;
import org.eclipse.birt.report.model.api.elements.structures.ColumnHint;
import org.eclipse.birt.report.model.api.olap.MeasureHandle;
import org.eclipse.birt.report.model.api.olap.TabularCubeHandle;
import org.eclipse.jface.action.IAction;
Expand Down Expand Up @@ -93,6 +94,17 @@ public String getNodeDisplayName( Object model )
{
return handle.getDisplayName( );
}
if ( handle.getDisplayNameKey( ) != null )
{
String externalizedDisplayName = handle.getExternalizedValue(
ColumnHint.DISPLAY_NAME_ID_MEMBER,
ColumnHint.DISPLAY_NAME_MEMBER );
if ( externalizedDisplayName != null
&& externalizedDisplayName.trim( ).length( ) > 0 )
{
return externalizedDisplayName;
}
}
return handle.getName( );
}

Expand Down

0 comments on commit ba5c006

Please sign in to comment.