d8e17478f8
* Add flags for torrents Add a new field, .Language, to the Torrent model, and a new package, torrentLanguages, which maps languages to flags. Added also a flag icon pack from googlei18n/region-flags, with (mostly) public domain flags from Wikipedia. * Optimize flags * Use FlagSprites CSS instead of .png files * Only use flags for languages we support * Add test for CSS flags Ensure that we have all the flags for the languages we support. * Add AdditionalLanguages field to config This allows us to support additional languages for new uploaded torrents, even if we have no translation for it. * Minor CSS fix * Add "other" and "multiple" torrent languages Also removed the TorrentLanguage struct, as it wasn't much useful. * Fix test * Add colspan=2 to category when language is empty Also hide the language column if empty. * Add lang field to search. Hopefully it works with Elasticsearch as well, but I haven't tested (lol Java) * Add language field to ES index and settings * Add language column to JS template * Add keyword type to language ES field * Remove 'raw' from keyword * Set "simple" analyzer on language * Document .Language field on Torrent model
3 lignes
Pas d'EOL
1 Kio
CSS
3 lignes
Pas d'EOL
1 Kio
CSS
/*!
|
|
* Generated with CSS Flag Sprite generator (https://www.flag-sprites.com/)
|
|
*/.flag{display:inline-block;width:32px;height:32px;background:url('flags.png') no-repeat}.flag.flag-ru{background-position:0 -96px}.flag.flag-hu{background-position:0 -32px}.flag.flag-nl{background-position:-32px -64px}.flag.flag-ro{background-position:-128px -64px}.flag.flag-se{background-position:-32px -96px}.flag.flag-th{background-position:-64px -96px}.flag.flag-pt{background-position:-96px -64px}.flag.flag-no{background-position:-64px -64px}.flag.flag-kr{background-position:-128px -32px}.flag.flag-mx{background-position:0 -64px}.flag.flag-de{background-position:-64px 0}.flag.flag-tw{background-position:-96px -96px}.flag.flag-fr{background-position:-128px 0}.flag.flag-it{background-position:-64px -32px}.flag.flag-cn{background-position:-32px 0}.flag.flag-is{background-position:-32px -32px}.flag.flag-jp{background-position:-96px -32px}.flag.flag-br{background-position:0 0}.flag.flag-us{background-position:-128px -96px}.flag.flag-es{background-position:-96px 0} |