Opened 7 years ago

Closed 7 years ago

#14593 closed bug (notabug)

Language files stored on github are not consistent

Reported by: Jobst Schmalenbach Owned by:
Priority: minor Milestone: none
Component: ui.core Version: 1.11.3
Keywords: Cc:
Blocked by: Blocking:

Description

Hi.

The language file stored in/at

https://github.com/jquery/jquery-ui/tree/master/ui/i18n

are inconsistent. For example the file for en-au contains

datepicker.regional[ "en-AU" ] = {

while the file for it contains

datepicker.regional.it = {

making the setting for the default language when using the datepicker tricky to call.

Should it not be consistent as in

datepicker.regionalen-AU? = { datepicker.regionalit? = {

In that case I only have to call the initialisation as

datepicker.setDefaults( datepicker.regionalit? );

or

datepicker.setDefaults( datepicker.regionalen-au? );

In case of the Italian language file it would raise an error "not defined".

thanks Jobst

Change History (2)

comment:1 Changed 7 years ago by Jobst Schmalenbach

Above was my first submission ... and it did not format as I thought it would, apologies. It should have been:

Should it not be consistent as in

    datepicker.regional['en-AU'] = {
  or
    datepicker.regional['it'] = {

In that case I only have to call the initialisation as

    datepicker.setDefaults(  datepicker.regional["it"] );
  or
    datepicker.setDefaults(  datepicker.regional["en-us"] );

In the case of the current italian file it raises an error "undefined".

comment:2 Changed 7 years ago by Scott González

Resolution: notabug
Status: newclosed

There's nothing tricky or inconsistent here. We use dot notation when bracket notation isn't necessary. You can use either in your code.

Note: See TracTickets for help on using tickets.