|
[
Permlink
| « Hide
]
Peter A. Knoop added a comment - 24-Mar-2007 14:55
[Bulk Comment] This issue is currenlty classified as a Task scheduled to be addressed for 2.4, however, we are now past the Sakai 2.4 Code Freeze. At this time, work should be focused only on resolving Bugs and addressing release-related Tasks; no features should be added or modified at this point without notifying the Release Mangement team. Please update the estimated Fix Version of this issue to reflect more accurately when it will get addressed, such as in the next release, 2.5.0.000 [Tentative], or set it to Unknown. Thanks.
I have done a patch that translate page names according to the locale. Here is the logic and shortcomings. When a tool is created, the page that will contain it gets the default tool title. There is also an entry in the Tools database pointing to the page, as well as the Unique ID (sakai.tooltitle). At run-time, any time that a page is retreived, I now get the Unique ID of the first tool in this page, and then I get the localized title of this tool (as in
If the static tool title in the database is the same as the page title in the database, I assume the localised title acquired earlier will be right. If they're not equal, that means that the page title was changed or choosen by the user, or that it is a multi-tool page. These special cases constitutes dynamic user-generated content that cannot be translated in the same way as the rest of the default tool names. So in short, right now, the tool menu on the right is completely localised for out-of-the box content. I'll make so QA and post the patch, and then we should create another issue for dynamic content. This issue was reported against Nightly/SVN-Trunk after 2.3.1 was released. It is still unresolved at this point, therefore, it is most likely affecting 2.4.0 as well, and Affects Version is being updated to the current 2.4 tag (2.4.0.010) to reflect this.
Note from Internationalization BOF: The worksite setup tool needs to aware of any internationalized page/tool titles and still represent the correct list of selected/unselected tools.
Zip file contains the patches developed by Tom Landry to support translation of tool titles and site page titles. There are limitations and restrictions on functionality. Home page is never translated. News and Web Content are not either. Pages containing multiple tools are not either.
Zip file contains Raui's i18nString class and a PDF explaining it. Raul indicates that this was put into Sakai trunk.
Neither Tom's or Raul's patch has been put into trunk (as of today, April 14th).
After extensive experimentation, I have checked a fix into the
Implementation Design: Local tool titles are put in a file named using the format of [toolId][_][localCode].properties in the /tool/ directory of a Sakai application. Title properties have a key of "title". The ToolListener was modified to detect the above files and add them to a map in the Tool manager implementation via a new API method called setResourceBundle(). This method was added to the ToolMaanager API, both covers (ToolManager and ActiveToolManager) and implemented in ToolComponent. The implementation maintains a Map of locale codes to Properties objects. The default properties set is called DEFAULT. A three tier access method is implemented in Tool.getTitle: 1. If a central tool resource bundle exists, return that localized title. 2. If a localized tool resource exists, return that localized title. 3. Otherwise default to the tool title in the tool registration file (not localized). Additionally, a change was made to the Placement implementation. Placement maintains a copy of the tool title and is initialized in the register() methods of the ToolManager before the ToolListener loads local tool resources. The order of fetching the title was reversed. It now checks for a tool title using getTitle() before using the local copy. In all, the following files were modified for this fix: kernel-impl/src/main/java/org/sakaiproject/tool/impl/ToolComponent.java kernel-util/src/main/java/org/sakaiproject/util/Tool.java kernel-util/src/main/java/org/sakaiproject/util/Placement.java api/src/main/java/org/sakaiproject/tool/api/ToolManager.java api/src/main/java/org/sakaiproject/tool/cover/ActiveToolManager.java api/src/main/java/org/sakaiproject/tool/cover/ToolManager.java api/src/main/java/org/sakaiproject/util/ToolListener.java These were checked into SVN as revs 51546 to 51552. NOTE: These changes only localize tool titles. They do not attempt to localize page names, which is a harder problem. Furthermore, tool descriptions are not currently localized. I have uploaded a patch (UPV Patch i18n for Sakai 2.5.2.zip) for achieving full internationalization in Sakai, so it's possible to have all the Sakai interface portal (pages and tools) displayed in the language chosen by the user in Preferences.
This patch is not "official", isn't accepted by the Sakai community and hasn't support of any type. Is easy to apply and to reverse, because it doesn't include too many changes. It's used in production by the UPV with Sakai 2.4. I adapted the patch to the 2.5.2 version but we haven't tested it in production still, so you must be careful of backing up your changes, in order to return if something goes wrong. The autors of the original patch for Sakai 2.4 are Raul Mengod and David Roldan, of the Universidad Politecnica de Valencia (UPV) - Spain. Actually, the tools internationalization is completed in the future Sakai 2.6 and the pages internationalization is going on, so the future Sakai probably won't need this patch. This is for solving the problem just now. This is David Roldán Martínez from UPV. We are currently working on 2.6.x and trunk. With these two version we have reach i18n for tools and pages using ActiveToolManager.getLocalizedProperty method. As soon as we have tested it properly I will post the patch to this jira. Anyway, if anybody of you wants the patch right now and/or would like to help us to test it, please, send a mail to darolmar@upvnet.upv.es.
Thank you very much in advance. David This is the patch I was talking about. It only affects to config (to include tools title and description) and portal.
One NOTE about i18_tools_pages.diff is has been generated for sakai 2-6-x.
This is the right one for sakai 2.6.x. The other was to sakai 2.4.x. I'm sorry for the mistake.
How does it work?
How does it work with Page Order Tool? Outstanding issues now include:
- Differences between default admin tool titles and default page tool titles (tool titles are wordy) - finding a more extensible way to identify 'exceptions' to localization (e.g. iframe, news, linktool and pages modified via page order tool) perhaps a set a 'custom' page property? The custom page property seems good to me! In fact, that's the approach of the page order tool for marking a site with a custom ordering of tools (using a table column instead of a page property, but the page property suits this case better, I think!).
Perhaps, as with the custom ordering of tools, a reset button on this same tool is desirable to reset page titles to default (localized) one... maybe a button next to the tool title in the Page Order Tool, alongside with the three existing (edit, hide, remove)? (just some ideas...) Finally! Page and tool titles are now dynamically localizable: they will respond to the user's language/locale preference. The page title will be translated based on the user's language/locale preference using the page tool's translated title.
Exceptions to dynamic localization are as follows: - If a page contains multiple tools - If a page contains a tool that allows multiple instances and custom titles (e.g. Web Content) - If a page title has been changed via the Page Order tool For me this is one of the issues that could be considered both a bug and a new feature. I'm not sure it should be merged to 2.6.x
From my i18n point of view, it's a bug. I think it should be merged with
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||