mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Office add-in collaboration updates
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7512 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -37,6 +37,7 @@
|
|||||||
<import resource="classpath:alfresco/attributes-service-context.xml"/>
|
<import resource="classpath:alfresco/attributes-service-context.xml"/>
|
||||||
<import resource="classpath:alfresco/linkvalidation-service-context.xml"/>
|
<import resource="classpath:alfresco/linkvalidation-service-context.xml"/>
|
||||||
<import resource="classpath:alfresco/remote-services-context.xml"/>
|
<import resource="classpath:alfresco/remote-services-context.xml"/>
|
||||||
|
<import resource="classpath:alfresco/office-addin-context.xml"/>
|
||||||
<import resource="classpath*:alfresco/patch/*-context.xml" />
|
<import resource="classpath*:alfresco/patch/*-context.xml" />
|
||||||
<import resource="classpath*:alfresco/domain/*-context.xml" />
|
<import resource="classpath*:alfresco/domain/*-context.xml" />
|
||||||
|
|
||||||
|
@@ -49,15 +49,41 @@ public class I18NMessageMethod extends BaseTemplateProcessorExtension implements
|
|||||||
public Object exec(List args) throws TemplateModelException
|
public Object exec(List args) throws TemplateModelException
|
||||||
{
|
{
|
||||||
String result = "";
|
String result = "";
|
||||||
|
int argSize = args.size();
|
||||||
|
|
||||||
if (args.size() == 1)
|
if (argSize > 0)
|
||||||
{
|
{
|
||||||
|
String id = "";
|
||||||
Object arg0 = args.get(0);
|
Object arg0 = args.get(0);
|
||||||
if (arg0 instanceof TemplateScalarModel)
|
if (arg0 instanceof TemplateScalarModel)
|
||||||
{
|
{
|
||||||
String id = ((TemplateScalarModel)arg0).getAsString();
|
id = ((TemplateScalarModel)arg0).getAsString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argSize == 1)
|
||||||
|
{
|
||||||
|
// Shortcut for no additional params
|
||||||
result = I18NUtil.getMessage(id);
|
result = I18NUtil.getMessage(id);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Object arg;
|
||||||
|
Object[] params = new Object[argSize - 1];
|
||||||
|
for (int i = 0; i < argSize-1; i++)
|
||||||
|
{
|
||||||
|
// Note: need to ignore first passed-in arg
|
||||||
|
arg = args.get(i+1);
|
||||||
|
if (arg instanceof TemplateScalarModel)
|
||||||
|
{
|
||||||
|
params[i] = ((TemplateScalarModel)arg).getAsString();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
params[i] = new String("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result = I18NUtil.getMessage(id, params);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user