Skip to content

Commit

Permalink
1063284 - Translation issues BPMS
Browse files Browse the repository at this point in the history
(cherry picked from commit ee7e17e)
  • Loading branch information
nmirasch committed Mar 7, 2014
1 parent 519dc7b commit 4e34995
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
Expand Up @@ -41,4 +41,12 @@ public interface WorkItemsEditorConstants
String BrowserTitle();

String workItemResourceTypeDescription();

String Definition();

String Parameter();

String Result();

String DisplayName();
}
Expand Up @@ -32,6 +32,7 @@
import com.google.gwt.user.client.ui.VerticalPanel;
import org.drools.workbench.screens.workitems.client.resources.i18n.WorkItemsEditorConstants;
import org.drools.workbench.screens.workitems.model.WorkItemDefinitionElements;
import org.drools.workbench.screens.workitems.service.WorkItemsEditorService;
import org.uberfire.client.mvp.UberView;

public class WorkItemDefinitionElementsBrowser extends Composite implements HasWorkItemDefinitionElements,
Expand Down Expand Up @@ -144,10 +145,24 @@ public void init( final WorkItemDefinitionElementSelectedListener presenter ) {
public void setDefinitionElements( final WorkItemDefinitionElements metaData ) {
final Map<String, String> workItemElementDefinitions = metaData.getDefinitionElements();
for ( Map.Entry<String, String> entry : workItemElementDefinitions.entrySet() ) {
elementsPanel.add( new PanelButton( entry.getKey(),
elementsPanel.add( new PanelButton( getButtonDescription(entry.getKey()),
entry.getValue() ) );
}
}
private String getButtonDescription(String buttonKey){
if(buttonKey==null || buttonKey.trim().length()==0){
return "";
} else if(WorkItemsEditorService.WORK_ITEMS_EDITOR_SETTINGS_DEFINITION.equals(buttonKey)){
return WorkItemsEditorConstants.INSTANCE.Definition();
} else if(WorkItemsEditorService.WORK_ITEMS_EDITOR_SETTINGS_DISPLAY_NAME.equals(buttonKey)){
return WorkItemsEditorConstants.INSTANCE.DisplayName();
} else if(WorkItemsEditorService.WORK_ITEMS_EDITOR_SETTINGS_PARAMETER.equals(buttonKey)){
return WorkItemsEditorConstants.INSTANCE.Parameter();
} else if(WorkItemsEditorService.WORK_ITEMS_EDITOR_SETTINGS_RESULT.equals(buttonKey)){
return WorkItemsEditorConstants.INSTANCE.Result();
}
return buttonKey;
}

public void setImages( final List<String> workItemImages ) {
imagesList.clear();
Expand Down
Expand Up @@ -20,3 +20,7 @@ ChooseImportClass = Click on class to import
ChooseIcon = Select icon to add
BrowserTitle=Palette
workItemResourceTypeDescription=Work Item Definitions
Definition=Definition
Parameter=Parameter
Result=Result
DisplayName=DisplayName
Expand Up @@ -5,3 +5,7 @@ ChooseImportClass=Haga clic en la clase a importar
ChooseIcon=Seleccione el ícono a agregar
BrowserTitle=Paleta
workItemResourceTypeDescription=Definiciones de Objetos de Trabajo
Definition=Definición
Parameter=Parámetro
Result=Resultado
DisplayName=NombreVisible

0 comments on commit 4e34995

Please sign in to comment.