codecombat/app/views/contribute/DiplomatView.coffee

141 lines
6.8 KiB
CoffeeScript
Raw Normal View History

ContributeClassView = require './ContributeClassView'
template = require 'templates/contribute/diplomat'
{me} = require 'core/auth'
2014-11-30 13:57:17 -05:00
require("locale/en")
require("locale/en-US")
require("locale/en-GB")
require("locale/ru")
require("locale/de-DE")
require("locale/de-AT")
require("locale/de-CH")
require("locale/es-419")
require("locale/es-ES")
require("locale/zh-HANS")
require("locale/zh-HANT")
require("locale/zh-WUU-HANS")
require("locale/zh-WUU-HANT")
require("locale/fr")
require("locale/ja")
require("locale/ar")
require("locale/pt-BR")
require("locale/pt-PT")
require("locale/pl")
require("locale/it")
require("locale/tr")
require("locale/nl-BE")
require("locale/nl-NL")
require("locale/fa")
require("locale/cs")
require("locale/sv")
require("locale/id")
require("locale/el")
require("locale/ro")
require("locale/vi")
require("locale/hu")
require("locale/th")
require("locale/da")
require("locale/ko")
require("locale/sk")
require("locale/sl")
require("locale/fi")
require("locale/bg")
require("locale/nb")
require("locale/nn")
2014-11-30 13:57:17 -05:00
require("locale/he")
require("locale/lt")
require("locale/sr")
require("locale/uk")
require("locale/hi")
require("locale/ur")
require("locale/ms")
require("locale/ca")
require("locale/gl")
2014-12-28 19:03:09 -05:00
require("locale/mk-MK")
require("locale/eo")
2015-05-25 19:00:32 -04:00
require("locale/uz")
2015-08-02 10:42:27 -04:00
require("locale/my")
2015-10-28 09:26:01 -04:00
require("locale/et")
2014-11-30 13:57:17 -05:00
2014-01-06 18:18:40 -05:00
module.exports = class DiplomatView extends ContributeClassView
2014-06-30 22:16:26 -04:00
id: 'diplomat-view'
template: template
contributorClassName: 'diplomat'
calculateSpokenLanguageStats: ->
@locale ?= require 'locale/locale'
totalStrings = @countStrings @locale.en
languageStats = {}
for languageCode, language of @locale
2014-11-30 13:57:17 -05:00
continue if languageCode is 'update'
languageStats[languageCode] =
githubURL: "https://github.com/codecombat/codecombat/blob/master/app/locale/#{languageCode}.coffee"
completion: @countStrings(language) / totalStrings
nativeDescription: language.nativeDescription
englishDescription: language.englishDescription
diplomats: @diplomats[languageCode]
languageCode: languageCode
languageStats
countStrings: (language) ->
translated = 0
for section, strings of language.translation
translated += _.size strings
translated
diplomats:
en: [] # English - English
'en-US': [] # English (US), English (US)
'en-GB': [] # English (UK), English (UK)
2015-04-12 15:40:24 -04:00
ru: ['EagleTA', 'ImmortalJoker', 'Mr A', 'Shpionus', 'a1ip', 'fess89', 'iulianR', 'kerradus', 'kisik21', 'nixel', 'ser-storchak'] # русский язык, Russian
'de-DE': ['Anon', 'Dirk', 'HiroP0', 'bahuma20', 'bkimminich', 'djsmith85', 'dkundel', 'domenukk', 'faabsen'] # Deutsch (Deutschland), German (Germany)
'de-AT': ['djsmith85'] # Deutsch (Österreich), German (Austria)
'de-CH': ['greyhusky'] # Deutsch (Schweiz), German (Switzerland)
2015-04-12 15:40:24 -04:00
'es-419': ['2xG', 'Federico Tomas', 'Jesús Ruppel', 'Mariano Luzza', 'Matthew Burt'] # español (América Latina), Spanish (Latin America)
'es-ES': ['3rr3s3v3n', 'Anon', 'DanielRodriguezRivero', 'Matthew Burt', 'OviiiOne', 'Pouyio', 'Vindurrin'] # español (ES), Spanish (Spain)
'zh-HANS': ['1c7', 'Adam23', 'BonnieBBS', 'Cheng Zheng', 'Vic020', 'ZephyrSails', 'julycoolwind', 'onion7878', 'spacepope', 'yangxuan8282', 'yfdyh000'] # 简体中文, Chinese (Simplified)
'zh-HANT': ['Adam23', 'gintau'] # 繁体中文, Chinese (Traditional)
'zh-WUU-HANS': [] # 吴语, Wuu (Simplified)
'zh-WUU-HANT': ['benojan'] # 吳語, Wuu (Traditional)
2015-04-12 15:40:24 -04:00
fr: ['Anon', 'Armaldio', 'ChrisLightman', 'Elfisen', 'Feugy', 'MartinDelille', 'Oaugereau', 'Xeonarno', 'dc55028', 'jaybi', 'pstweb', 'veritable', 'xavismeh'] # français, French
ja: ['Coderaulic', 'g1itch', 'kengos', 'treby'] # 日本語, Japanese
ar: ['5y', 'ahmed80dz'] # العربية, Arabic
2015-11-24 16:16:10 -05:00
'pt-BR': ['Bia41', 'Gutenberg Barros', 'Kieizroe', 'Matthew Burt', 'brunoporto', 'cassiocardoso', 'jklemm', 'Arkhad'] # português do Brasil, Portuguese (Brazil)
2015-04-12 15:40:24 -04:00
'pt-PT': ['Imperadeiro98', 'Matthew Burt', 'ProgramadorLucas', 'ReiDuKuduro', 'batista', 'gutierri'] # Português (Portugal), Portuguese (Portugal)
2014-08-30 21:51:02 -04:00
pl: ['Anon', 'Kacper Ciepielewski', 'TigroTigro', 'kvasnyk'] # język polski, Polish
it: ['AlessioPaternoster', 'flauta', 'Atomk'] # italiano, Italian
2015-04-12 15:40:24 -04:00
tr: ['Nazım Gediz Aydındoğmuş', 'cobaimelan', 'gediz', 'ilisyus', 'wakeup'] # Türkçe, Turkish
'nl-BE': ['Glen De Cauwsemaecker', 'Ruben Vereecken'] # Nederlands (België), Dutch (Belgium)
2015-04-12 15:40:24 -04:00
'nl-NL': ['Guido Zuidhof', "Jasper D\'haene"] # Nederlands (Nederland), Dutch (Netherlands)
fa: ['Reza Habibi (Rehb)'] # فارسی, Persian
2015-04-12 16:09:46 -04:00
cs: ['Martin005', 'Gygram', 'vanous'] # čeština, Czech
2015-05-03 12:55:34 -04:00
sv: ['iamhj', 'Galaky'] # Svenska, Swedish
2014-08-30 21:51:02 -04:00
id: ['mlewisno-oberlin'] # Bahasa Indonesia, Indonesian
el: ['Stergios'] # ελληνικά, Greek
ro: [] # limba română, Romanian
vi: ['An Nguyen Hoang Thien'] # Tiếng Việt, Vietnamese
2015-04-12 15:40:24 -04:00
hu: ['Anon', 'atlantisguru', 'bbeasmile', 'csuvsaregal', 'divaDseidnA', 'ferpeter', 'kinez'] # magyar, Hungarian
th: ['Kamolchanok Jittrepit'] # ไทย, Thai
2015-06-10 18:35:56 -04:00
da: ['Anon', 'Einar Rasmussen', 'Rahazan', 'Randi Hillerøe', 'Silwing', 'marc-portier', 'sorsjen', 'Zleep-Dogg'] # dansk, Danish
2014-08-30 21:51:02 -04:00
ko: ['Melondonut'] # 한국어, Korean
2015-03-10 13:16:43 -04:00
sk: ['Anon', 'Juraj Pecháč'] # slovenčina, Slovak
sl: [] # slovenščina, Slovene
fi: [] # suomi, Finnish
bg: [] # български език, Bulgarian
2015-04-12 15:40:24 -04:00
nb: ['bardeh', 'ebirkenes', 'matifol', 'mcclane654', 'mogsie', 'torehaug'] # Norsk Bokmål, Norwegian (Bokmål)
nn: [] # Norsk Nynorsk, Norwegian (Nynorsk)
2014-08-30 21:51:02 -04:00
he: ['OverProgram', 'monetita'] # עברית, Hebrew
lt: [] # lietuvių kalba, Lithuanian
sr: [] # српски, Serbian
2015-04-12 15:40:24 -04:00
uk: ['ImmortalJoker', 'OlenaGapak', 'Rarst', 'endrilian', 'fess89', 'gorodsb', 'probil'] # українська мова, Ukrainian
hi: [] # मानक हिन्दी, Hindi
ur: [] # اُردُو, Urdu
ms: [] # Bahasa Melayu, Bahasa Malaysia
2014-08-30 21:51:02 -04:00
ca: ['ArniMcFrag'] # Català, Catalan
gl: ['mcaeiror'] # Galego, Galician
2014-12-28 19:03:09 -05:00
'mk-MK': ['SuperPranx'] # Македонски, Macedonian
eo: [] # Esperanto, Esperanto
2015-05-25 19:00:32 -04:00
uz: [] # O'zbekcha, Uzbek
2015-08-02 10:42:27 -04:00
my: [] # မြန်မာစကား, Myanmar language
2015-10-28 09:26:01 -04:00
et: [] # Eesti, Estonian