mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
OPEN : ALF-11176: Untranslated strings in Group Review and Approve Task form
Activiti has one default transition "Next". If there is no transition then the model builder was not finding a translation for the task outcome (and just using the english word, e.g. "Approve"). Now it looks up the translation workflowtask.outcome.[wf:outcome property] git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32724 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -59,6 +59,7 @@ import org.alfresco.service.namespace.QName;
|
|||||||
import org.alfresco.util.Pair;
|
import org.alfresco.util.Pair;
|
||||||
import org.alfresco.util.collections.CollectionUtils;
|
import org.alfresco.util.collections.CollectionUtils;
|
||||||
import org.alfresco.util.collections.Function;
|
import org.alfresco.util.collections.Function;
|
||||||
|
import org.springframework.extensions.surf.util.I18NUtil;
|
||||||
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
import org.springframework.extensions.surf.util.ISO8601DateFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,6 +149,8 @@ public class WorkflowModelBuilder
|
|||||||
public static final String WORKFLOW_DEFINITION_START_TASK_DEFINITION_TYPE = "startTaskDefinitionType";
|
public static final String WORKFLOW_DEFINITION_START_TASK_DEFINITION_TYPE = "startTaskDefinitionType";
|
||||||
public static final String WORKFLOW_DEFINITION_TASK_DEFINITIONS = "taskDefinitions";
|
public static final String WORKFLOW_DEFINITION_TASK_DEFINITIONS = "taskDefinitions";
|
||||||
|
|
||||||
|
public static final String TASK_OUTCOME_MESSAGE_PREFIX = "workflowtask.outcome.";
|
||||||
|
|
||||||
private final NodeService nodeService;
|
private final NodeService nodeService;
|
||||||
private final PersonService personService;
|
private final PersonService personService;
|
||||||
private final WorkflowService workflowService;
|
private final WorkflowService workflowService;
|
||||||
@@ -625,8 +628,15 @@ public class WorkflowModelBuilder
|
|||||||
}
|
}
|
||||||
if (outcomeLabel == null)
|
if (outcomeLabel == null)
|
||||||
{
|
{
|
||||||
// TODO: is this okay -> no real transitions exist for activiti
|
String translatedOutcome = I18NUtil.getMessage(TASK_OUTCOME_MESSAGE_PREFIX+outcomeId);
|
||||||
outcomeLabel = outcomeId;
|
if (translatedOutcome != null)
|
||||||
|
{
|
||||||
|
outcomeLabel = translatedOutcome;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outcomeLabel = outcomeId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user