[WG: I18N & L10N] Re:Re: I18N support for Role name and Site type

Steve Swinsburg steve.swinsburg at gmail.com
Wed Mar 19 18:01:16 PDT 2014


Hi Gao Jun,

Yep sounds good.

cheers,
Steve


On Thu, Mar 20, 2014 at 11:32 AM, Gao Jun <gaojun at fudan.edu.cn> wrote:

>  Hi Steve,
>
> I think we have the same idea.
>
> Keeping the role id(maintian/access) and site type(project/course)
> UNCHANGED.
>
> Then add some support method to support L10N messages shown to users.
>
> Now I add a getName method to Role, and use this method to show the L10N
> label. The getId method won't be changed, and even no DB change is needed.
> Also, the getRole("access") you metioned will continue behave as the
> current way.
>
> Just like the tool menu did, it uses the tool id (sakai.profile2) or
> customized title stored in DB, and gives users the L10N label.
>
> Cheers,
> Gao Jun
>
>
> --
> Gao Jun
> Fudan University
>
> 于 2014年03月20日 07:17, Steve Swinsburg 写道:
>
>   Hi Gao Jun,
>
>  Assuming you are only talking about UI related changes then this is fine.
> If the value is persisted into the database as a primary identifier then it
> will need rethinking.
> For example, the site type is stored along with a site in the sakai_site
> table with the string project/course/whatever. And that should stay as
> those values. However on display to a user, it should have a label
> associated with it and you can present it however you like.
>
>  Likewise for role names that go into the database like
> access/maintain/Student. These are primary identifiers that link up with a
> role number (look at sakai_realm_role). So code that does a
> getRole("access") will no longer work if that value is not exactly that.
> Again, if those strings are display to the user then by all means they
> should be internationalised, but the values in the db need to stay as they
> are.
>
>  cheers,
> Steve
>
>
>
>
> On Wed, Mar 19, 2014 at 9:59 PM, gaojun <gaojun at fudan.edu.cn> wrote:
>
>> Hi Steve,
>>
>> In my university, not only one language is used by the instructors.
>>
>> Since we've translated almost everything in Sakai, the role name and site
>> type catch all Chinese users' eye.
>>
>> Of course, we can change the id of role to a Chinese word. But all
>> foreign instrictors in our iniversity would be confised.
>>
>> The id should not be i18ned, but the display could.
>>
>> Just like the tool menu, we have tool id, default L10N name and
>> customized value. It's my goal to make role name and site type behave the
>> same way.
>>
>>
>>
>> Steve Swinsburg <steve.swinsburg at gmail.com> 编写:
>>
>>
>> IMO these primary identifiers should not be internationalised. The reason
>> for this is that many parts of the code expect this to be a certain value,
>> some even hardcode it. Making this value a moving target *will* cause
>> difficulties. And how will it be handled in multiple locales? What will the
>> code be looking for? This is trouble waiting to happen.
>>
>>  In a perfect world these would not be an English string, but would be a
>> number or some other language agnostic identifier. Labels for roles should
>> be translated though so that anything user facing is i18n'ised.
>>
>>  cheers,
>> Steve
>>
>>
>>  On Wed, Mar 19, 2014 at 9:20 PM, Jean-Francois Leveque <
>> jean-francois.leveque at upmc.fr> wrote:
>>
>>>  Hi Jun,
>>>
>>> You could check https://jira.sakaiproject.org/browse/SAK-12397 and
>>> https://jira.sakaiproject.org/browse/SAK-22344 which might be the latest
>>> on both i18n of role names and site type labels.
>>>
>>> I think lots of us here would like this to be solved.
>>>
>>> If the names/labels are internationalized, they could be updated from
>>> database with https://jira.sakaiproject.org/browse/SAK-18678 and
>>> https://source.sakaiproject.org/contrib/rsmart/messagebundle/
>>> (https://jira.sakaiproject.org/browse/SAK-18984).
>>>
>>> Do you mean altering names on a site basis?
>>>
>>> Cheers,
>>>
>>> --
>>> Jean-François
>>> UPMC, Paris
>>>
>>> On 19/03/2014 09:34, Gao Jun wrote:
>>> > Hi all,
>>> >
>>> > I'm now working on I18N support for Role name (instructor, student,
>>> > maintain, etc.) and site type(course, project).
>>> > Since many tools use these names with string stored in DB, so a lot of
>>> > work need to be done.
>>> >
>>> > Up to now, I made I18N support for Role worked under site-manage and
>>> > authz tool, and the todo list is still long.
>>> >
>>> > I wonder if anyone has tried work on this before or any JIRA issue
>>> > already exists.
>>> > If there is no JIRA issue on this, I'll create a new one.
>>> >
>>> > Here is my solution(Role name for example)
>>> > Use a strategy like tool menu, which has default L10N message and user
>>> > can alter it.
>>> >
>>> > Add a new properties file under folder config/localization
>>> > Add a method getName to Role which use the way like get name of a tool.
>>> > Modify the corresponding tools to add I18N support.
>>> >
>>> > Is anyone interested in this?
>>> >
>>> >
>>> > --
>>> > Gao Jun
>>> > Fudan University
>>>   _______________________________________________
>>> i18n mailing list
>>> i18n at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/i18n
>>>
>>> TO UNSUBSCRIBE: send email to i18n-unsubscribe at collab.sakaiproject.orgwith a subject of "unsubscribe"
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/i18n/attachments/20140320/4ea39604/attachment.html 


More information about the i18n mailing list