plone / plone.i18n

Text normalization logic and language, country, cctld data.
8 stars 11 forks source link

Use SVG Flags #35

Closed 1letter closed 1 year ago

1letter commented 3 years ago

We should use svg icons for the country flags.

1letter commented 3 years ago

Have anyone a opinion to use this repro for svg flag. i would replace all gifs with svg format.

agitator commented 3 years ago

Looks like they are not as unified as we would want them, viewBoxfor example ist quite different between individual svgs. Also looked around but haven't found something good yet

1letter commented 3 years ago

it's a little bit of work and diligence to correct the svg files. i would do that work. I think all viewports should be in the 3:2 format. But what speak against to use this repro as base (perhaps only the svg files)? I don't have an overview of copyright of the flags until now. I would use the country flags as inline svg, like the icons in the plone controlpanel.

agitator commented 3 years ago

Don't have a strong opinion on which one to use, was just a quick look ;-) Found these https://github.com/joielechong/iso-country-flags-svg-collection or https://github.com/hampusborgos/country-flags (has an npm package)

The flags should use the icon-resolver and be registered in staticresources. Bootstrap icons are added there as a dependency which made me look at https://www.npmjs.com/search?q=country-flag Would be even less work if we could use on of those packages...

1letter commented 3 years ago

Amazing! we have a iconresolver, i see it the first time in action. incredible!

1letter commented 3 years ago

I have open an issue in plone.staticresources

agitator commented 3 years ago

Example for the use of the icon resolver is in https://github.com/plone/Products.CMFPlone/blob/master/Products/CMFPlone/browser/templates/test_rendering.pt#L49

mauritsvanrees commented 1 year ago

I think this has been finished for a while and can be closed. I have just now removed the branch that belonged to the closed PR #36 which was superseded by #42 which adds SVG flag support. Thanks all!