[Building Sakai] Change proposal for 2.8: export_filename_date_format (i18n to configuration)

Feliz Gouveia fribeiro at ufp.edu.pt
Thu Jul 22 07:37:44 PDT 2010


I'm not sure that suits your needs, I usually do something like:

DateTime dt = new DateTime();
DateTimeFormatter fmt = DateTimeFormat.forPattern("yyyy-MM-dd_HHmmss");
return name+dt.toString(fmt);

of course the pattern part can be localized if needed, and there are
no spaces (just '-'). As for the name part, I replace spaces by
underscores, and chop the filename so that adding the date part does
not exceed 31 chars (because of windows limitations, I guess).

Feliz

On 22 July 2010 15:15, Beth Kirschner <bkirschn at umich.edu> wrote:
> Sorry -- I misunderstood. Setting the ISO default once is best.
>
> - Beth
>
> On Jul 22, 2010, at 10:10 AM, Jean-Francois Leveque wrote:
>
>> I think most non-English locale users are not comfortable with
>> English format.
>>
>> This is why I was suggesting using a ISO default and being able to
>> set the format through configuration once instead of 5 times through
>> localization right now.
>>
>> How is it less simple than your suggestion?
>>
>> J-F
>>
>> Beth Kirschner a écrit :
>>> Possibly true, but just aiming to simplify localization. I'm
>>> doubtful most translators will know how to 'localize' the date
>>> format string, so as long as folks are comfortable with most
>>> locales defaulting to a US format, than this shouldn't be a problem.
>>> - Beth
>>> On Jul 22, 2010, at 5:10 AM, Jean-Francois Leveque wrote:
>>>> I think your suggestion is not as simple as needed and may be
>>>> risky. Are we sure we only need to remove spaces in every locale
>>>> to have a suitable string for part of a file name? I wouldn't bet
>>>> on it.
>>>>
>>>> J-F
>>>>
>>>> Beth Kirschner a écrit :
>>>>> I would suggest formatting the date automatically, leveraging the
>>>>> Java DateFormat.getDateFormat() which takes Locale as an
>>>>> argument. The resulting date string can then be transformed into
>>>>> a suitable filename by removing spaces. Automating this would be
>>>>> one less thing to worry about when localizing Sakai.
>>>>> - Beth
>>>>> On Jul 21, 2010, at 10:49 AM, Jean-Francois Leveque wrote:
>>>>>> Hi all,
>>>>>>
>>>>>> I think export_filename_date_format (used in Gradebook, Roster,
>>>>>> Tests &
>>>>>> Quizzes (Samigo), User Membership and SiteStats) is not a i18n
>>>>>> property
>>>>>> but a configuration property.
>>>>>>
>>>>>> Because it's used in several tools, I would like it to become a
>>>>>> general
>>>>>> configuration property.
>>>>>>
>>>>>> I propose to use the name general.export_filename_date_format in
>>>>>> configuration and to set its default to the ISO date format of
>>>>>> yyyy-MM-dd.
>>>>>>
>>>>>> For further details and related problems, you can check:
>>>>>> http://jira.sakaiproject.org/browse/SAK-17240
>>>>>> http://jira.sakaiproject.org/browse/STAT-191
>>>>>> http://jira.sakaiproject.org/browse/SAK-15872
>>>>>> http://jira.sakaiproject.org/browse/SAK-15682
>>>>>>
>>>>>> What do the code owners and others devs think?
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Jean-Francois
>>
>>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>



-- 
Feliz Ribeiro Gouveia

Universidade Fernando Pessoa            http://www.ufp.pt
Centro de Recursos Multimediaticos      Tel 351-22.507.13.06
M.I.N.D. Lab                            Fax 351-22.550.82.69
Pr 9 de Abril 349                       fribeiro at ufp.edu.pt
P-4249-004 Porto


More information about the sakai-dev mailing list