i18n support for data set labels

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@44362 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2012-12-05 10:48:21 +00:00
parent 4b8b65d023
commit 5e2b8efc17
4 changed files with 82 additions and 73 deletions

View File

@@ -0,0 +1 @@
dataset.dod5015.label=DOD 5015 Example Data

View File

@@ -84,6 +84,7 @@
<value>alfresco.module.org_alfresco_module_rm.messages.action-service</value>
<value>alfresco.module.org_alfresco_module_rm.messages.audit-service</value>
<value>alfresco.module.org_alfresco_module_rm.messages.capability-service</value>
<value>alfresco.module.org_alfresco_module_rm.messages.dataset-service</value>
</list>
</property>
</bean>

View File

@@ -1306,7 +1306,6 @@
</bean>
<bean id="dataSetDOD5015" parent="dataSetBase">
<property name="label" value="DOD 5015 Example Data"/>
<property name="id" value="dod5015"/>
<property name="path" value="alfresco/module/org_alfresco_module_rm/dod5015/DODExampleFilePlan.xml" />
</bean>

View File

@@ -1,5 +1,8 @@
package org.alfresco.module.org_alfresco_module_rm.dataset;
import org.apache.commons.lang.StringUtils;
import org.springframework.extensions.surf.util.I18NUtil;
public class DataSetBase implements DataSet
{
@@ -30,7 +33,12 @@ public class DataSetBase implements DataSet
*/
public String getLabel()
{
return this.label;
String label = this.label;
if (StringUtils.isBlank(label))
{
label = I18NUtil.getMessage("dataset." + getId() + ".label");
}
return label;
}
/**