?
avatar a-roussos
a-roussos
25 Oct 2018

Steps to reproduce the issue

Enable the Language Switcher module on an English (for example)/Greek multilingual Joomla! site and look at the Greek flag.
Or, alternatively, just view these files from the media/mod_languages/images/ directory: el.gif el_gr.gif
Or, look at these images: el el_gr
(You may have to zoom in a bit.)
Notice how there are twelve horizontal stripes (there should be nine).

Expected result

The following flag image (from Wikipedia), has the correct number of alternating blue and white horizontal stripes:
200px-flag_of_greece svg

Actual result

In the Language Switcher module, the flag icon for Greece has 12 horizontal stripes instead of 9 which is the correct number.

System information (as much as possible)

Joomla! 3.8.13

Additional comments

From Wikipedia: According to popular tradition, the nine stripes represent the nine syllables of the phrase "Ελευθερία ή Θάνατος" ("Freedom or Death"), the five blue stripes for the syllables "Ελευθερία" and the four white stripes "ή Θάνατος".[2] The nine stripes are also said to represent the letters of the word "freedom" (Greek: ελευθερία).[2] There is also a different theory, that the nine stripes symbolise the nine Muses, the goddesses of art and civilisation (nine has traditionally been one of the numbers of reference for the Greeks).

avatar a-roussos a-roussos - open - 25 Oct 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Oct 2018
avatar infograf768
infograf768 - comment - 25 Oct 2018

You are correct. Has been like that since 1.6

avatar infograf768
infograf768 - comment - 25 Oct 2018

what we have now is

el_gr

Only way to keep the right # of stripes and proportions is to change the size of the flag to 15x9 (instead of the usual 18x12).
It would give

el

Otherwise we would have to dither the flag and obtain this

el_dithered

What do you prefer?

avatar a-roussos
a-roussos - comment - 25 Oct 2018

Thanks for the prompt reply, @infograf768.

You are correct. Has been like that since 1.6

?

What do you prefer?

I reckon the latter (dithered, 18x12) is the way to go, in the sense that a 15x9 image will probably look a bit odd next to other flag icons of bigger size. However, since the colour seems to change a bit as well in the dithered image, perhaps we should get more feedback on this? Do you know of some other Greek persons that we could CC on this issue? (I'm fairly new to Joomla! and this is my first issue here). If all else fails, I could try letting people know on the Greek Forum.

Apologies for being pedantic! ?

avatar Bakual
Bakual - comment - 25 Oct 2018

@nikosdion comes to mind as a greek person.

avatar nikosdion
nikosdion - comment - 25 Oct 2018

OK, if we want to be pedantic then the Greek flag should follow the official specifications.

First of all the colour is supposed to be #004C98 per the Summer Olympics 2012 manual. That's the closes RGB approximation of CMYK Reflex Blue which was officially used for the event.

The size of the flag is defined by Law 851/1978 (sorry, in rather archaic Greek only). The aspect ratio is basically 3:2. The prescribed sizes are sometimes not exactly 3:2 (some are 1:1.51) but that's mostly because they try to keep the size of the stripes an integer number of centimetres. But I digress.

If we take the smallest size (#8) for the flag and substitute pixels for centimetres we have a flag with dimensions 27x18 pixels, stripe width 2 pixels and the cross' blue box should be 10x10 pixels. We have roughly 2/3 of that space for the icon. Since we can't use fractional pixel values we need to dither so we can keep the correct aspect ratio of the flag.

As luck would have it, Jean-Marie was almost spot on with his idea :D

So... this is a long-winded way to say:

  • Use the dithered version (check!)
  • Size it 18x12 pixels (check!)
  • Use the colour #004C98 for the flag (that's the only thing you missed)
avatar brianteeman
brianteeman - comment - 25 Oct 2018

Almost all the flags with stripes are not correct. See en-us

avatar infograf768
infograf768 - comment - 26 Oct 2018

That's the best I can get from a vector based original where I modified the color to a true Reflex Blue C, then treated in Photoshop.

newgreek2

avatar nikosdion
nikosdion - comment - 26 Oct 2018

This is good enough for me. I can definitely see it's a Greek flag.

At some point Joomla! should consider replacing the images with vectors, or including 2x sizes since half of the screens being used to view our sites are now HiDPI / Retina. That's another fight for another day, though :)

avatar infograf768
infograf768 - comment - 26 Oct 2018

Please test #22823 and set your test OK on https://issues.joomla.org/tracker/joomla-cms/22823

avatar infograf768 infograf768 - change - 26 Oct 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-10-26 08:23:21
Closed_By infograf768
avatar infograf768 infograf768 - close - 26 Oct 2018
avatar infograf768
infograf768 - comment - 26 Oct 2018
avatar nikosdion
nikosdion - comment - 26 Oct 2018

Only if they embed JavaScript. However, when used with an IMG tag JavaScript is disabled by default exactly for this security reason. Since in our case a. Joomla provides the SVGs (and hopefully checks there's no embedded JS since they are, well, XML files making it easy for anyone to inspect) and b. they are indeed rendered as IMG tags we don't have a reason to worry.

avatar nikosdion
nikosdion - comment - 26 Oct 2018

Clarification: letting untrusted people upload SVGs is still (and will be possibly forever) a security risk because they could upload something that contains malicious code or links to untrusted external sources. Furthermore, the uploaded file could be used outside of the context of an IMG tag such as a direct download (which can be rendered inline by a browser) or an embed in which case you don't have any protection. That's why we have the oversimplified rule of "SVG is bad" when it comes to uploads. I hate oversimplifications because they distort the much more nuanced truth.

avatar brianteeman
brianteeman - comment - 26 Oct 2018

See #10734 and other related issues. basically in addition to what @nikosdion said svg would require a polyfill for IE support if this was in j3. Also some people prefer CSS flags instead of svg files

Add a Comment

Login with GitHub to post a comment