Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/translations
Ramon Dantas d8e17478f8 Country flags (language) for torrents. (#970)
* 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
2017-06-12 09:14:26 +10:00
..
ca-es.json Update Catalan translation (#981) 2017-06-12 09:13:30 +10:00
de-de.all.json typo 2017-06-07 16:14:50 +02:00
en-us.all.json Country flags (language) for torrents. (#970) 2017-06-12 09:14:26 +10:00
es-es.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
fr-fr.all.json Updated translation. (#975) 2017-06-10 21:09:14 +10:00
hu-hu.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
is-is.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
it-it.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
ja-jp.all.json Update Japanese translation (#974) 2017-06-10 13:50:58 +10:00
ko-kr.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
nb-no.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
nl-nl.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
pt-br.all.json Updated pt-br ~ (#978) 2017-06-11 09:04:42 +10:00
pt-pt.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
README.md Country flags (language) for torrents. (#970) 2017-06-12 09:14:26 +10:00
ro-ro.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
ru-ru.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
sv-se.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
th-th.all.json Update th-th.all.json (#959) 2017-06-07 21:47:49 +10:00
zh-cn.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00
zh-tw.all.json HTML tag fixes #904 2017-06-06 22:46:05 +02:00

After creating a new translation, create a new translation string inside "en-us.all.json", like the following:

    ...
    },
    {
        "id": "language_(languageCode)_name",
        "translation": "(your language name, in English)"
    },
    ...

where languageCode is the newly created ISO code (eg. ja-jp, pt-br).