openpsa / jsgrid

Fork of last jqGrid version before license change
http://openpsa.github.io/jsgrid/
Other
28 stars 12 forks source link

Fixing problems with some locale files #70

Closed smartcorestudio closed 9 years ago

smartcorestudio commented 9 years ago

Refs #52

flack commented 9 years ago

Merged, thanks!

meh-uk commented 9 years ago

Have the release notes been updated accordingly?

flack commented 9 years ago

Not yet, but I can do that real quick.

Another question: The release notes are easily overlooked right now (they are not linked from anywhere). What do you think about moving them to docs (and thus, to the website)?

meh-uk commented 9 years ago

Works for me.

flack commented 9 years ago

OK, I've moved the file now:

http://openpsa.github.io/grid.js/releaseNotes.html

I've also restructured (and rewritten) it somewhat to remove some redundancies and grammar errors

OlegKi commented 9 years ago

I'm not sure, which language code was used by jqGrid before. There are exist many standards. Some from standards used the language as the main criteria, another used countries/province/dependent territories and so on. For example there are exist ISO 3166 (see ISO_3166-1 and ISO_3166-2 standards. The standards are a little more neutral to countries/dependent territories. One will find the following two in the classification:

dk - Denmark (not da like in ISO 639-1) me - Montenegro (not sr-ME like a part of Serbia) cn - China (not like zh or zh-CH) tw - Taiwan, Province of China (not as zh-TW) ua - Ukraine

So one can't definitively say that the above codes used by jqGrid are wrong. It's important just the users who use the languages are able to find there.

The only files which should be really renamed are http://en.wikipedia.org/wiki/ISO_3166-2:ES

grid.locale-cat.js with Catalan translation should be renamed into grid.locale-ca.js (ISO 639-1 or ISO_3166-2) grid.locale-mne.js with Montenegrin translation is renamed into grid.locale-me.js (ISO 3166-2) or in grid.locale-sr-ME.js which I personally find not full political correct because Montenegro is independence from Serbia from the middle of 2006.

On the other side the Language is the mostly important aspect, which one need for locale file. So I find personally your new names like grid.locale-zh-TW.js, grid.locale-zh-CN.js, grid.locale-pt-BR.js better as in jqGrid before.

I wrote the post mostly because of renaming grid.locale-mne.js in grid.locale-sr-ME.js. I would suggest you to use the name grid.locale-me.js instead.

flack commented 9 years ago

I'm glad that we mostly agree for once :-)

IMO, we should definitely use language codes and not region/country codes, simply because in a lot of countries/regions, more than one language is spoken. With this in mind, sr-ME does not mean that Montenegro is still politically connected to Serbia, it means that Montenegrin is a variant of the Serbian language. It is the same situation as with pt-BR. Brasil is politically independent from Portugal since 1820, but their language is still a variant of Portuguese.

I've researched a bit, and I've always found sr-ME as the recommended identifier (for example here: http://symbolcodes.tlt.psu.edu/bylanguage/serbocroatian.html). But I don't have any strong opinion on the subject, it would be best to hear from some native speaker to see what they prefer

meh-uk commented 9 years ago

I think we have to follow the standard language names as per http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx

meh-uk commented 9 years ago

Which sr-ME does.

OlegKi commented 9 years ago

I'm really have no knowledge about the languages Montenegrin and Serbian languages. I want just inform you about one possible problem. One can see that grid.locale-mne.js are written with another alphabet. Moreover the settings from grid.locale-XX.js locales are not only language specific, but it have some country specific information like date or number format. The settings have no direct connection with the language specific.

I don't want to start new new discussion. I just examined the changes in your repository. I can see that additional translation from FR and DE locals are important to use.

I wanted just make simple changes in grid.locale-XX.js which would allow to switch locale dynamically. See here and here. As the next step (in new release) one could allow to specify the locale for the grid, so that multiple grids in different language/locales (for example en-US, en-GB and en-IN) could be displayed on one page.

meh-uk commented 9 years ago

And you can't easily switch dynamically without using the standard language codes...

meh-uk commented 9 years ago

Seriously Oleg I cannot believe you're arguing this after the Microsoft and psu.edu have been sources showing the same thing. This really isn't a productive use of anyone's time.

flack commented 9 years ago

I like the idea of specifying the locale per grid (although I have to real use for it). But it would be a nice feature to have to a demo (if the language can be switched again after the grid init).

I don't know anything about Montenegrin either, but wikipedia has this to say:

Montenegrin /ˌmɒntɪˈniːɡrɪn/ (crnogorski/црногорски) is the standardized variety of the Serbo-Croatian used by Montenegrins and the official language of Montenegro. Standard Montenegrin is based on the most widespread dialect of Serbo-Croatian, Shtokavian, more specifically on Eastern Herzegovinian, which is also the basis of Standard Croatian, Serbian, and Bosnian.[2]

Somewhere else it says that all the Serbian variants can be written in both the Latin and the Cyrillic alphabet, so that is nothing to worry about (at least not until we have locale files for both alphabets).

OlegKi commented 9 years ago

The demos which I made for jqGrid 3.8.2 are here: simple and advanced. After very simple modification of locale file one could include multipel locales on one page and to activate the current locale (on the page) dynamically. The corresponding changes to make grid specific locale require more changes in the main code of jqGrid, so I don't want to implement that in the current release.