David Roldán Martínez
Analista de Sistemas/Aplicaciones
Área de Sistemas de Información y Comunicaciones
Universidad Politécnica de Valencia
Camino de Vera, s/n
46022 Valencia
This information is also available at SAK-7272
I attach a file containing a description of the changes we have made to internationalize content tool. To summarized, they are the following:
To avoid missunderstandings, content\content-impl\impl\src\bundle\content_XX.properties have been renamed as content\content-impl\impl\src\bundle\content-impl_XX.properties. On the other side, these files are used
in BaseContentService (gen.drop, gen.reso, use1, use2). Literals not used have been deleted.
content\content-impl\impl\src\java\org\sakaiproject\content\impl\BaseContentService.java uses ResourceBundle instead of ResourceLoader, this is a bug that must be changed. Besides, as a consequence of the modification described before, properties file invokation should be changed as well. Also this class
need for further changes, as it uses static variables to store messages displayed to the user. This can cause those messages not to be updated when user preferences changes.
content\content-impl\impl\src\java\org\sakaiproject\content\impl\SiteEmailNotificationContent.java also uses ResourceBundle instead of ResourceLoader, so the same changes as before must be carried out.
content\content-impl\impl\src\java\org\sakaiproject\content\impl\CollectionAccessFormatter.java some display messages hardcoded in English in the code in method format. To internationalize them, some literals (control_panel_title, path, up_one_level,folder, file_folder, choose) should be included in content\content-impl\impl\src\bundle\content-impl_XX.properties
content\content-tool\tool\src\bundle\content_XX.properties has been updated because there were some literals included in the English version and not in the Spanish one. We also have found hardcoded messages in ResourceAction.copyrightChoicesIntoContext() method. To solve them some literals should be included in the properties files.
The following literals have been added to internationalize several files:
- revise_document
- content\content-tool\tool\src\webapp\vm\content\chef_resources_edit.vm(1331)
- content\content-tool\tool\src\webapp\vm\content\chef_resources_properties.vm(172)
- could_not_add_item
- content\content-tool\tool\src\java\org\sakaiproject\content\tool\ResourcesAction.java(6873, 7483, 8411, 14346 y 14595)
- list.view, list.of, list.items
- content\content-tool\tool\src\webapp\vm\content\chef_resources_attach.vm(330)
- content\content-tool\tool\src\webapp\vm\content\chef_resources_list.vm(673)
- content\content-tool\tool\src\webapp\vm\content\chef_resources_select.vm(348)
- content\content-tool\tool\src\webapp\vm\content\sakai_resources_list.vm(673)
- replace_document
- content\content-tool\tool\src\webapp\vm\content\chef_resources_edit.vm(1332)
- content\content-tool\tool\src\webapp\vm\content\chef_resources_properties.vm(173)
content\content-tool\tool\src\bundle\type_es.properties has been created
Also content\content-tool\tool\src\java\org\sakaiproject\content\tool\ResourcesAction.java uses static constants to display messages to the user. This can cause internationalization problems and, thus,
they have been substituted for a reference to the rb.getString("XXXX") instead of the corresponding constant. These constants are:
private static final String DUPLICATE_STRING = rb.getString("copyof") + " "; private static final String SHORTCUT_STRING = rb.getString("shortcut"); private static final String COPYRIGHT_SYMBOL = rb.getString("cpright1"); private static final String COPYRIGHT_SELF_COPYRIGHT = rb.getString("cpright2"); private static final String COPYRIGHT_NEW_COPYRIGHT = rb.getString("cpright3"); private static final String RESOURCE_NOT_EXIST_STRING = rb.getString("notexist1"); private static final String RESOURCE_INVALID_TITLE_STRING = rb.getString("titlecannot"); private static final String RESOURCE_INVALID_OPERATION_ON_COLLECTION_STRING = rb.getString("notsupported");