Being unsatisfied with the murky looks of my native Danish flag and the (IMHO, ugly) compression of the UK one, I decided I'd do those over for my own site. Then I figured I might as well put those back up for the rest of the community. Then I decided to go all out and do this for all of the flags! (An added bonus is that most (I haven't checked all) of these new PNGs take up less bytes than the current ones. Not much, but...)

Procedure:
Found the flags on Wikipedia and ensured they were in the Public Domain.
Saved the SVGs locally and turned them into GIFs, with a height of 12px.

gif2png -nprsO *.gif
pngcrush -d new -brute -fix -reduce *.png
cd new && tar -czvf ../flags.tgz *.png

Notes:
I couldn't figure what flag to use for Arabic. The flags for Catalonia and Basque Country were licensed under GFDL and CC-sa respectively, thus not included. (Even if they probably aren't able to be licensed as such, as they consist "entirely of information that is common property and contains no original authorship", I thought it'd be safer/more polite to just leave them alone.) Hence why ar, ca, and eu are not included in this bundle.

CommentFileSizeAuthor
#17 ro.png146 byteskerberos
#14 pl.png121 bytesFreso
#12 ca.png132 bytesgeraldito
#10 pt-PT.png271 bytesFreso
#10 pt-BR.png313 bytesFreso
#10 ar.png272 bytesFreso
#9 sa.png430 bytesdoomed
#8 pt.png228 bytesdoomed
#6 ca.png130 bytesgeraldito
#1 flags2.zip19 KBpkej
flags.tgz6.52 KBFreso
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pkej’s picture

FileSize
19 KB

Adding flags for Norwegian Bokmål, Norwegian Nynorsk. (nn and nb) and Northern Sami (se).

Jose Reyero’s picture

Status: Reviewed & tested by the community » Needs review

These ones are different size, aren't they?

Freso’s picture

The current images aren't uniformly sized. Having them sized non-uniformly will allow the flags to actually keep their proper ratios, even when resized/uniformed - and it will allow sites to use flags in their proper ratio. (E.g. allow the Union Jack to be a bit wider than the Dannebrog.)

I'm fairly sure I presented quite some documentation about why this is a good thing in relation to a bug report where setting the (presented) flag image size to "" (empty string) yielded an error... but, alas, I can't find that one now. Anyway, forcing uniformity onto the flag image size will result in distorted images, like the not-so-pretty Dannebrog currently in the collection (which was the reason I started this little project in the first place). I still hold the claim that these images are (far?) better than the current ones, and that I don't see why non-uniformity is a bad thing, and that the current images aren't uniform with regards to size (not even height! at least this set have all height=12px).

Edit: Alright, so maybe there weren't a whole bunch of arguments, but I did note that flags currently in CVS are of different sizes and that the official flag specifications vary with regards to the dimensions. (E.g. Dannebrog (...) has a ratio of 28:37, while the Union Flag (...) has a 1:2 ratio.) See #197403: "Undefined offset" notices when giving an empty image size.

Jose Reyero’s picture

Version: master » 6.x-1.x-dev
Status: Needs review » Needs work

This makes sense.

However, if we are using different sized flags, we need some type of container for them, otherwise the UI won't look very nice.

We could either resize to some max width and height, then use a div container with fixed size or, maybe easier, add transparent margins to the flag so all the images are actually the same size.

Freso’s picture

Uhm, Jose, we are already using differently sized flags! And there's the "Image size" option on admin/settings/language/configure/icons which sets the image size and makes sure all the images appear similarly (#197403: "Undefined offset" notices when giving an empty image size fixed this for those of us who want to display the images in their proper ratio). All this batch does is update the flag graphics to be more true to the official flag colours and size ratios. Actually, this batch at least standardises on a height (12px), which is more than can be said about the images currently in the repos.

And I think I just realised that you may have simply meant something that would keep the text aligned. That is actually a good idea, but couldn't that be put into an issue of its own? I don't see why that should hold up adding these flag graphics to the repos, replacing the old ones.

geraldito’s picture

FileSize
130 bytes

As the flag for Catalonia at Wikipedia (http://ca.wikipedia.org/wiki/Imatge:Flag_of_Catalonia.svg) are non-free I just painted it. Attached in size 16x11.

I noticed a problem with Catalan at localizer: it uses CA as country code for Catalan but at the same time the country code top-level domain CA stands for Canada. so I just substituted the ca.png with the Catalan flag to make it work for me. but as solution I propose to change the extension localizer uses for Catalan language to CAT (official TLD for Catalan language) or AD-CA (Andorra is the only official state which uses Catalan as its official language).

Freso’s picture

@geraldito:

  1. Please make the flag have a height of 12px, so that the images may be consistent in one dimension.
  2. Country code and language code are not the same. The official language code for Catalan is, indeed, "ca". (Check Wikipedia's List of ISO 639-1 codes.) The official language codes for Canada would be en[-CA] and fr[-CA] – [Canadian] English and [Canadian] French respectively. (Also, if you find other issues in the future, it's generally better to open a new issue for them, so that issues can stay focussed.)
doomed’s picture

FileSize
228 bytes

Here's a flag for Portugal , 18x12 , 228 bytes (1kb)

According to Wikipedia:

Portuguese is one of the world's major languages, ranked sixth according to number of native speakers (approximately 250 million).

Btw, i did it, so its free to use.

doomed’s picture

FileSize
430 bytes

And inspired by the original post, i did a flag for Saudi Arabia.

I understand this is a very special flag, my drawing doesnt really have anything written in there, just something that looks like the original when seen in its original size which is 18x12 .

The S.A. flag for comparison - http://www.crwflags.com/fotw/images/s/sa.gif

Freso’s picture

FileSize
272 bytes
313 bytes
271 bytes

@doomed: As part Portuguese, I miss the little thingy in the yellow patch of the flag, so here that is. I've also attached a Brazilian flag for those preferring pt-BR to pt-PT. I also gave Saudi Arabia a shot. All three flags were made exactly as described initially (fetching SVG from Wikipedia, resizing into GIF, converting to PNG, "crushing", and done).

doomed’s picture

These are great!

geraldito’s picture

FileSize
132 bytes

Here comes the updated flag for Catalan with 16x12 px.

fletchgqc’s picture

Hi guys,

FYI, in 6.x-1.x-dev the Polish flag is missing. At least it's not working in my installation.

Freso’s picture

Status: Needs work » Needs review
FileSize
121 bytes

Setting this back to CNR to catch José's attention to my comment #5.

@fletchgqc: That's because there's no Polish flag in the current package. Upload the attached file into your i18n/flags folder and it should work. :)

fletchgqc’s picture

Thanks - well I'm still in dev so as long as the flag makes its way into the package I'm happy!

Jose Reyero’s picture

Project: Internationalization » Language Icons
kerberos’s picture

FileSize
146 bytes

Here's the flag for Romania (.ro) - my creation and free to use.

Freso’s picture

Component: User interface » Icon collection

@ Jose:
What's holding this back? Did you read my comment/rebuttal #5?

Freso’s picture

Status: Needs review » Fixed

Refreshed flags committed. Flags that did not already exist have not been added. Please open new issues for these.

seventhguardian’s picture

Status: Fixed » Active

The pt-pt and pt-br are not yet commited.

And please keep the file names lowercase.

Freso’s picture

Status: Active » Fixed

Flags that did not already exist have not been added. Please open new issues for these.

And you already did: #296104: Add flags for Portuguese

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.