Community Contributions

Other
PUBLIC PROFILE

L10N ConcourseConnect2.0.2 -- Partially done

Hi Guys,

I did some work on localizing connect2.0.2 from 2012-04-25 to the middle of 2012-06. Now I need to put my effort to some other thing and will suspend the localization work for some weeks.

The source code is at https://bitbucket.org/kerler/concourseconnectl10n.The code can be synchronized to your computer by TortoiseHG.

Short summary of the change:

a). The locale of the web site has been changed to: can select locale using URL(such like http://localhost:8080/connect/zh_CN/), the login-ed user's preferred locale, and the dropdown list of locales in layout.jsp. The current selected locale is put to ClientType in current session. TextUtils.localize() alwayse localize words according to ClientType in current session.

b). Added method TextUtils.localize() which can localize words using words in dictionary*.xml and db table language_* according to the clientType.getLanguage() in current session. The app checks the update of dictionary*.xml periodically and reload it if need. Method TextUtils.localize() records into LOGs the l10nkey which is not found in dictionary*.xml and db table language_*.

c). Added method StringUtils.encodeUrlTwice()/StringUtils.decodeUrlForEncodingTwice() to support double byte words in URL(such as wiki name in URL). (Tomcat's server.xml's 'Connector' need to contain: URIEncoding="UTF-8")

d). Localize <ccp:tz>, and the YUI calendar. Modify java(except asyn code such as code executed in quartz) and JSP to use current locale of session instead of user locale to display and parse date/time.

e). (Partially done)Many caches need to be changed so that the key contains the locale of current session. For cache list, check com.concursive.connect.Constants.java::*CACHE. Key for Constants.SYSTEM_DASHBOARD_PORTLET_CACHE has been changed to: String key = thisPage.getName() + "|" + thisPortlet.getWindowConfigId() + "|" + clientType.getLanguage();.

f). 'title'/'content'/'*message'/'hasMoreTitle' defined in dashboards_en_US.xml //For 'content', by: adding a <content_l10nkey>, modify corresponding portlet.java to process the content_l10nkey with calling TextUtils.localize(). Further, the PortalUtils.localizeWithRequestPreferences() can use the default l10nkey if the l10nkey is not specified in dictionary*.xml.

g). Localize column '*label'/'item_name'/'*catetory_name'/'*description' in db table 'lookup*'/'*category' (as well as *template which is not done), by adding column like '*label_l10nkey' into db table.

h). Wiki. In db table project_wiki, new column 'wiki_i18n_id' and 'language_locale' are added. Each of the Wiki rows with the same wiki_i18n_id is a localized version of the wiki.

i). Default document folder name when creating user.

j). Localize ActivityStream. Words in application.xml is described using the below way, where the 'application.xml.SaveAdEntryEvent.added a promotion' is the l10nkey used in dictionary*.xml.
<parameter name="history.text">$ @$ \] $</parameter>

TODO:
Email template;
Workflow.xml;
Content in content_en_US.xml, such as forum name;
Need to check DAO classes' corresponding cache/indexer/list classes, TODO words in BadgeCategoryList.java and other *CategoryList.java;
WikiForm;
A clear indicator for editing a wiki's current locale version or a wiki's I18N version;
Search string "preferenceMap" in all files, and find how to do localization;
Wording in some JSP pages;
Many other issues......

Thanks,
Baogang

Sign in to add your comment.