mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Multilingual Content Fixes
- Fixed parsing of locale string to use I18NUtil.parseLocale and not Locale constructor - Fixed type conversion of properties returned from MLPropertyInterceptor's directNodeService - Fixed handling of ALL_LANGUAGES filter selection - Fixed MultilingualContentService NPE when checking for duplicate locales git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5007 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -217,12 +217,6 @@ public class MultilingualContentServiceImpl implements MultilingualContentServic
|
||||
// The aspect is present, so just ensure that the locale is correct
|
||||
nodeService.setProperty(contentNodeRef, ContentModel.PROP_LOCALE, locale);
|
||||
}
|
||||
//get all the languages already there
|
||||
Map<Locale, NodeRef> existingLanguages = this.getTranslations(mlContainerNodeRef);
|
||||
if (existingLanguages.containsKey(locale))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Duplicate locale in document pool:" + locale.toString());
|
||||
}
|
||||
|
||||
// Do we make use of an existing container?
|
||||
if (mlContainerNodeRef == null)
|
||||
@@ -232,6 +226,13 @@ public class MultilingualContentServiceImpl implements MultilingualContentServic
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check that the language is not duplicated
|
||||
Map<Locale, NodeRef> existingLanguages = this.getTranslations(mlContainerNodeRef);
|
||||
if (existingLanguages.containsKey(locale))
|
||||
{
|
||||
throw new AlfrescoRuntimeException("Duplicate locale in document pool: " + locale);
|
||||
}
|
||||
|
||||
// Use the existing container
|
||||
nodeService.addChild(
|
||||
mlContainerNodeRef,
|
||||
|
Reference in New Issue
Block a user