[WG: I18N & L10N] [Building Sakai] Presence's getLocationDescription and i18n

Jean-Francois Leveque jean-francois.leveque at upmc.fr
Wed Apr 2 07:27:32 PDT 2014


Hi,

I've found the folllowing in 
presence/presence-impl/impl/src/java/org/sakaiproject/presence/impl/BasePresenceService.java

>
>          public String getLocationDescription(String location)
>         {
>                 // TODO: get a description for a placement!
>                 return "location: " + location;
>         }

It is called by 
presence/presence-tool/tool/src/webapp/vm/presence/chef_presence-List.vm

> <h4>$tlang.getString("presence.list1.location") $validator.escapeHtml($location) : $validator.escapeHtml($service.getLocationDescription($location))</h4>

I intend to clean this by :
- Using getFormattedMessage instead of getString to get the place of the 
value of $validator.escapeHtml($location) configurable by Localization.
- Remove the second part of the h4 which is not useful at all

I'm sure

> at location: ~admin-presence

will provide as much information as

> at location: ~admin-presence : location: ~admin-presence

BTW, location in the second part is hard-coded in 
getLocationDescription's code as you can see.

Still learning a lot while working on a translation and checking 
internationalization when in doubt. ;)

Cheers,

J-F


More information about the i18n mailing list