mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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:
@@ -18,7 +18,6 @@ package org.alfresco.web.app.servlet;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.portlet.PortletSession;
|
||||
import javax.servlet.ServletContext;
|
||||
@@ -229,8 +228,13 @@ public final class AuthenticationHelper
|
||||
String contentFilterLanguageStr = loginBean.getUserPreferencesBean().getContentFilterLanguage();
|
||||
if (contentFilterLanguageStr != null)
|
||||
{
|
||||
//set the cocale for the method interceptor for MLText properties
|
||||
I18NUtil.setContentLocale(new Locale(contentFilterLanguageStr));
|
||||
// Set the locale for the method interceptor for MLText properties
|
||||
I18NUtil.setContentLocale(I18NUtil.parseLocale(contentFilterLanguageStr));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Nothing has been selected, so remove the content filter
|
||||
I18NUtil.setContentLocale(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ public class UserPreferencesBean
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current content filter language
|
||||
* @return current content filter language, or <tt>null</tt> if all languages was selected
|
||||
*/
|
||||
public String getContentFilterLanguage()
|
||||
{
|
||||
@@ -116,7 +116,7 @@ public class UserPreferencesBean
|
||||
this.contentFilterLanguage = locale.toString();
|
||||
}
|
||||
}
|
||||
return contentFilterLanguage;
|
||||
return (contentFilterLanguage.equals(MSG_CONTENTALLLANGUAGES)) ? null : contentFilterLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user