joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.74k stars 3.64k forks source link

Wrong iso code in czech image in mod_languages #7218

Closed andrepereiradasilva closed 9 years ago

andrepereiradasilva commented 9 years ago

The Czech language code in mod_language images is wrong

How to reproduce

In https://github.com/joomla/joomla-cms/tree/staging/media/mod_languages/images Czech filename is cz.gif and cz_cz.gif when it should be cs.gif and cs_cz.gif.

Related questions

brianteeman commented 9 years ago

Based on the fact that czech translation pack defines it as cs-CZ it does sound like this is a mistake.

@infograf768 @Bakual

What is the best way to fix this? I am assuming that we would need to create "additional" images instead of simply renaming them as that could break existing sites

Bakual commented 9 years ago

Yeah, I think we can just copy the images to the correct name and leave the wrong ones there. This way nothing will break.

As for the related questions: I doubt we can replace the images with png within the 3.x series. It would break all sites which use the gif ones somewhere. We could go and add png files, but honestly I doubt duplicating all files is worth it.

Not sure what you mean with the unique css sprite for mod_language. Can you elaborate?

brianteeman commented 9 years ago

Please see #7220 for new flags

Bakual commented 9 years ago

Closing as we have a PR. Thanks Brian!

andrepereiradasilva commented 9 years ago

@brianteeman @Bakual That's not the only mistake, there are several others, for instance:

And many don't have the corresppondent [ISO 639-1]_[ISO 3166-2].gif image. only the [ISO 639-1].gif image.

It seems to me to be some confusion reggarding language codes and country codes. A language can be spoken in several countries with variations, english language (en) is a nice example of that, for instance, you can have en-GB, en-AU, en-US, en-CA, etc. Also, for instance, in the United kingdom (GB) you can have several languages too, en-GB, cy-GB, gd-GB, etc.

This principe is followed for instance where https://github.com/joomla/joomla-cms/tree/staging/installation/language . It seems only the language images are not with that logic, the rest otf joomla is.

Reggarding this issue and also the css sprites i refered, a Proof of Concept (http://wikisend.com/download/109706/lgflags.zip) with all the languages in their several codes and with css sprites.

In precisison, a language should not even be represented with country flag, because a language does not belong to a country, but that is understandable, all sites and apps do like this because the alternative has an image with, for instance, "en" written or only text, like some international organizations do (check EU site for instance http://europa.eu/). Also joomla provides the option to do it without flag so no problem here.

Bakual commented 9 years ago

ch.gif should be de_ch.gif ("ch" is not a language is a country)

I can only comment on this one as I'm from Switzerland. Since we have 4 official languages (german, french, italian and romansh), it would be wrong to name this icon de_ch.gif. So ch.gif is actually correct. As a language flag, it doesn't help at all. We usually use the flags for Germany, France and Italy as the language flags.

@infograf768 What was the original idea here?

andrepereiradasilva commented 9 years ago

@Bakual, i understand what you mean.

But according to do ISO codes that is not correct, because there isn't a "ch" language https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

So in Switzerland you have 4 languages:

So you have to have 4 image files.

If you are saying the Switzerland flag representes the Switzerland official language ... to which of the four languages are you reffering? German? Italian? French? Romansh?

If you want to use Joomla to make a site in Switzerland with the 4 languagues what would you use?

I'm realling asking this because, in my opinion, this is not an easy and linear matter.

Bakual commented 9 years ago

So in Switzerland you have 4 languages: So you have to have 4 image files.

Yes, we have those four languages. But the image we use for german is de.gif. We don't need any other for de_CH. The image doesn't necessary have to have the official language code.

If you are saying the Switzerland flag representes the Switzerland official language ... to which of the four languages are you reffering? German? Italian? French? Romansh?

I didn't say the Swiss flag does represent an official language. In fact it's pointless and probably never used.

If you want to use Joomla to make a site in Switzerland with the 4 languagues what would you use?

I have no clue what to use for the Romansh one, but since only a few tenthousand people actually speak that language it's not that issue :smile: For the others we almost always use the one from Germany, Italy and France as I wrote. Or we just don't use any flags.

I'm realling asking this because, in my opinion, this is not an easy thing.

Yeah, especially if you're not from the particular country/language, it's hard to judge if the flags are correct or not. Maybe leave it up to the translators to decide what they want here?

andrepereiradasilva commented 9 years ago

In fact it's pointless and probably never used.

That was my point.

I have no clue what to use for the Romansh one, but since only a few tenthousand people actually speak that language it's not that issue

I'm from portugal and we also have the "Mirandese" as official language but only like 0,001% of the portuguese people know the language. :)

For the others we almost always use the one from Germany, Italy and France as I wrote.

I find it odd using another country flag inside a country but i can understand some people do that. Since it's also an usability questions since people tend to identify better the languague change options with the flags.

Yeah, especially if you're not from the particular country/language, it's hard to judge if the flags are correct or not. Maybe leave it up to the translators to decide what they want here?

Sure of course the translators know better. Just raising an issue in this question.

But thinking better on this subject, a flag representes a country not a language so, IMHO the images should be identified ISO country codes (ISO_3166-2) not ISO language codes (ISO_639-1) and in the language option you can already choose the flag for a country if you want too.

Example for pt-BR language (pt language | BR country) image

But as you suggested i leave it to the translators.

infograf768 commented 9 years ago

@andrepereiradasilva Thanks for finding out the issue for Czech!

Many of the "mistakes" you state are not mistakes.

That's not the only mistake, there are several others, for instance: dk.gif | dk_dk.gif should be da.gif | da_dk.gif ("dk" is not a language is a country) hk.gif | hk_hk.gif should be zh_hk.gif ("hk" is not a language is a "country") km_kr.gif should be km_kh.gif ("kr" is not camboja code, is "kh") srp_me.gif should be sr_me.gif ("srp" is serbian so "sr") at.gif should be de_at.gif ("at" is not a language is a country) tw.gif should be zh_tw.gif ("tw" is not a language is a "country") ch.gif should be de_ch.gif ("ch" is not a language is a country)

When we implemented the language flags image names as "langISO_countryISO.gif", this was to cope with multilanguage installation at Joomla install time for available language packs. This meant we had to ADD flags in that format (based on the language tags) for the same language as before where it traditionally was "countryISO.gif" OR langISO.gif (See joomfish).

To be B/C, we kept the former files with their existing names. So, we may have 2 images of the same flag

So, we DO have these flags: da_dk.gif // (never had dk_dk.gif) km_kr.gif srp_me.gif // This is for the specific Montenegrin variation of Serbo-Croatian (ISO 639-3), NOT Serbian at.gif // was kept as we do not have any de-AT lang pack zh_tw.gif // as well as zh_cn we do have a Hong Kong Chinese flag (but no language pack). If someone was releasing a registered pack, we would indeed need a zh_hk.gif ch.gif // was kept as we do not have any de-CH or fr-CH or it-CH lang pack

infograf768 commented 9 years ago

Also, in cases where the flags do not fit your needs, you may OR create/add some specific images, OR use language names (in front-end). A good example is Switzerland where I personally would use language names instead of flags in frontend if I was doing a multilang site specific to the Swiss audience. (FYI, the ch.gif image was added as a user asked for it a while ago.)

andrepereiradasilva commented 9 years ago

@infograf768 thanks for your pacience and for all your work in Joomla!

I understand now what you mean: the current joomla logic is one flag with "langISO_countryISO.gif" matching each language pack, the rest of the flag images are for B/C.

I totally understand why you have to do this, but the flag folder organization it's now a little confusing, since there are iso country codes and language codes with 2 alpha charaters :) But if it has to be that way, so be it.

Reggarding the questions i pointed before:

da_dk.gif // (never had dk_dk.gif) zh_tw.gif // as well as zh_cn

true, errors on my behalf.

we do have a Hong Kong Chinese flag (but no language pack). If someone was releasing a registered pack, we would indeed need a zh_hk.gif

Understand, for B/C, since there is no language pack no need to add new images.

at.gif // was kept as we do not have any de-AT lang pack ch.gif // was kept as we do not have any de-CH or fr-CH or it-CH lang pack

True, but in German translation (http://community.joomla.org/translations/joomla-3-translations.html#de-de) you have: «Language: German (de-DE/de-CH/de-AT)» so IMHO there should be, by default, a de-CH and a de-AT image. The same seems to be valid for Arabic Unitag (ar-AA) «ar_DZ, ar-SA, ar-DZ, ar-EG, ar-TN, etc»

km_kr.gif

The thing with this one is: "km" is Cambojian language (https://en.wikipedia.org/?title=Khmer_language) and "kr" is South Korea country code (https://en.wikipedia.org/wiki/ISO_3166-2:KR) so this code represents Cambojian spoken in South Korea. I see there is no current joomla 3 language pack for Cambojian (in Camboja or in South korea), we can assume the image is there for somekind of B/C, so it's ok.

srp_me.gif // This is for the specific Montenegrin variation of Serbo-Croatian (ISO 639-3), NOT Serbian

Serbian-Croatian (ISO 639-3: hbs) is a macrolanguage that includes Bosnian; Croatian and Serbian. According to Wikipedia and other sites:

More info:

If, as you pointed, this language it's not Serbian, as explained, it shouldn't be "srp" (ISO 639-3) or "sr" (ISO 639-1). Maybe this translation is for Montenegrin language (see https://en.wikipedia.org/wiki/Montenegrin_language), that has no iso code, in that case, "mis" special code (http://www-01.sil.org/iso639-3/documentation.asp?id=mis) could be used, so "mis-ME".

But just pointing a question, i do really think the translators know better and had an objective when they choose the Serbian iso 639-3 code for this language.

One last note, the "ug-CN" image is missing http://community.joomla.org/translations/joomla-3-translations.html#ug-cn https://github.com/joomla/joomla-cms/tree/staging/media/mod_languages/images

infograf768 commented 9 years ago

True, but in German translation (http://community.joomla.org/translations/joomla-3-translations.html#de-de) you have: «Language: German (de-DE/de-CH/de-AT)» so IMHO there should be, by default, a de-CH and a de-AT image. The same seems to be valid for Arabic Unitag (ar-AA) «ar_DZ, ar-SA, ar-DZ, ar-EG, ar-TN, etc»

Disagree, we can't add all world flags. As we do NOT have a specific language pack for these, no need for flag. As said above, if someone needs it, one can add it manually. Concerning de, nobody from Austria or Switzerland ever asked for these. Same for Arabic speaking countries. In some cases, the "flags" are not country flags, they are neutral: this is the case for our Arabic Unitag and Tamil (India) for example. This was a very well thought decision by the TT coordination.

km_kr.gif

Agree. Should be km_kh.gif This was an error of mine when we added the new langcode_countrycode.gif images As we never got the registered Khmer language pack for the 3.x series (It is only available in 2.5), we could safely delete it and add a correctly named image when we get such a pack.

srp_me.gif

The choice was done (not directly by the Montenegrin TT) to make a real difference between Serbian and Montenegrin. The reasons are also political. As no official lang code had been officially internationally defined, we chose the 3 letter code for Serbian "srp" (which is also in ISO-639-2). Obviously, we will not change this now, and certainly not for "mis". screen shot 2015-06-22 at 08 39 18

Hope it helps.

infograf768 commented 9 years ago

We do indeed miss a ug_cn.gif We should ask the Uyghur language TT what image would fit.

andrepereiradasilva commented 9 years ago

Ok infograf768. Thanks for all your pacience.