SchizoDuckie / DuckieTV

A web application built with AngularJS to track your favorite tv-shows with semi-automagic torrent integration
http://schizoduckie.github.io/DuckieTV/
Other
1.12k stars 275 forks source link

Wrong flags associated with subtitle languages #554

Closed najob closed 9 years ago

najob commented 9 years ago

As title says, I have noticed several wrongfully associated flags with languages. Yes, I am little bit interested in vexillology! :smile:

Screenshot Statistics

So, here we go (linking to Wikipedia):

Language Current flag Suggested flag
Arabic Flag of Argentina Flag of the Arab League*
Estonian Flag of Ethiopia Flag of Estonia
Indonesian Flag of India Flag of Indonesia
Khmer Flag of the Comoros Flag of Cambodia
Malay Flag of Montserrat Flag of Malaysia
Serbian Flag of Suriname Flag of Serbia
Slovenian Flag of Sierra Leone Flag of Slovenia
Swedish Flag of El Salvador Flag of Sweden
Tagalog Flag of East Timor Flag of the Philippines

*Less common used (on internet) Flag of the Arab Revolt.

I think these are not wrong (except Galician), but I am not expert in international relations, and I understand that this could be tricky for some people so maybe leave it as it is?

Language Current flag Suggested flag
Basque Flag of Spain Ikurriña
Catalan Flag of Spain Senyera
Galician Flag of Greenland Flag of Galicia

And the last thing, maybe Chinese(simplified) and Chinese(traditional) could be little closer.

garfield69 commented 9 years ago

@najob Thank you for spotting this.

It looks like our cross-matching tables of languages versus shortCodes has been incorrectly loaded. For reference, here are the two current tables:

        var languages = {
            alb: 'Albanian',
            ara: 'Arabic',
            baq: 'Basque',
            bul: 'Bulgarian',
            cat: 'Catalan',
            chi: 'Chinese (simplified)',
            cze: 'Czech',
            dan: 'Danish',
            dut: 'Dutch',
            eng: 'English',
            est: 'Estonian',
            fin: 'Finnish',
            fre: 'French',
            geo: 'Georgian',
            ger: 'German',
            glg: 'Galician',
            ell: 'Greek',
            heb: 'Hebrew',
            hin: 'Hindi',
            hrv: 'Croatian',
            hun: 'Hungarian',
            ice: 'Icelandic',
            ind: 'Indonesian',
            ita: 'Italian',
            jpn: 'Japanese',
            khm: 'Khmer',
            kor: 'Korean',
            mac: 'Macedonian',
            may: 'Malay',
            nor: 'Norwegian',
            per: 'Persian',
            pol: 'Polish',
            por: 'Portuguese',
            rus: 'Russian',
            scc: 'Serbian',
            sin: 'Sinhalese',
            slo: 'Slovak',
            slv: 'Slovenian',
            spa: 'Spanish',
            swe: 'Swedish',
            tgl: 'Tagalog',
            tha: 'Thai',
            tur: 'Turkish',
            ukr: 'Ukrainian',
            vie: 'Vietnamese',
            rum: 'Romanian',
            pob: 'Brazilian',
            zht: 'Chinese (traditional)'
        };

        var shortCodes = {
            alb: "al",
            ara: "ar",
            bul: "bg",
            baq: "es",
            cat: "es",
            cze: "cz",
            dan: "dk",
            dut: "nl",
            eng: "gb",
            epo: "eo",
            est: "et",
            fin: "fi",
            fre: "fr",
            geo: "ge",
            ger: "de",
            glg: "gl",
            ell: "gr",
            heb: "il",
            hin: "in",
            hrv: "hr",
            hun: "hu",
            ice: "is",
            ind: "in",
            ita: "it",
            jpn: "jp",
            kor: "kr",
            khm: "km",
            mac: "mk",
            may: "ms",
            nor: "no",
            per: "ir",
            pob: "br",
            pol: "pl",
            por: "pt",
            rus: "ru",
            scc: "sr",
            slo: "sk",
            sin: "lk",
            slv: "sl",
            spa: "es",
            swe: "sv",
            tgl: "tl",
            tha: "th",
            tur: "tr",
            ukr: "ua",
            vie: "vn",
            rum: "ro",
            zht: "cn",
            chi: "cn"
        };

The shortCodes table is supposed to be loaded with the ISO 3166-1 alpha-2 formatted Country codes, but clearly that data has been incorrectly loaded. for example, language ara (Arabic) has been incorrectly matched with country code ar (Argentina), which explains why the flags end up as they currently do.

Should be a simple matter to correct.

najob commented 9 years ago

I am glad if I could help. I just naively looked at DuckieTV/img/flags.png and assumed that maybe is just added wrong set of flags in flags.png because there are not any of them mentioned in my previous comment.

garfield69 commented 9 years ago

note: we are restricted to using flags available on https://www.flag-sprites.com/en_US/ which means we don't have access to the Arab League. Have flags for the 21 members of the league, but which one to pick as a representative?

garfield69 commented 9 years ago

I'm going to leave Basque and Catalan with the flag of Spain, and add Galician to that list. Since Egypt has the largest population of Arab speaking citizens, I will use that flag. I've corrected the remaining miss matches.

najob commented 9 years ago

It could be flag of Saudi Arabia, as well, but I am really going to leave you that decision. From mine standpoint everything that you previously said seems fine and understandable. Here are discussions on that topic, on Qoura and StackExchange.

And finally thank you for your response, making this great application even better.