2014-07-17 20:16:32 -04:00
ContributeClassView = require ' ./ContributeClassView '
2014-01-06 00:56:32 -05:00
template = require ' templates/contribute/diplomat '
2014-11-28 20:49:41 -05:00
{ me } = require ' core/auth '
2014-01-06 00:56:32 -05:00
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 " )
2015-02-10 17:13:15 -05:00
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 " )
2015-03-19 12:26:00 -04:00
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 " )
2016-07-29 15:20:24 -04:00
require ( " locale/hr " )
2016-07-29 15:34:34 -04:00
require ( " locale/mi " )
2016-08-08 16:10:28 -04:00
require ( " locale/haw " )
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 '
2014-01-06 00:56:32 -05:00
template: template
2016-06-07 06:09:00 -04:00
initialize: ->
@contributorClassName = ' diplomat '
2014-08-14 14:43:35 -04:00
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 '
2014-08-14 14:43:35 -04:00
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
2016-03-12 09:03:59 -05:00
' de-DE ' : [ ' Anon ' , ' Dirk ' , ' HiroP0 ' , ' bahuma20 ' , ' bkimminich ' , ' djsmith85 ' , ' dkundel ' , ' domenukk ' , ' faabsen ' , ' Zeldaretter ' ] # Deutsch (Deutschland), German (Germany)
2014-08-30 22:30:33 -04:00
' 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)
2016-06-24 10:40:50 -04:00
' zh-HANT ' : [ ' Adam23 ' , ' gintau ' , ' shuwn ' ] # 繁體中文, Chinese (Traditional)
2014-08-14 14:43:35 -04:00
' zh-WUU-HANS ' : [ ] # 吴语, Wuu (Simplified)
2014-08-30 22:30:33 -04:00
' 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
2015-05-20 09:15:34 -04:00
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
2014-08-30 22:30:33 -04:00
' 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)
2014-08-14 14:43:35 -04:00
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
2015-12-07 16:36:50 -05:00
el: [ ' Stergios ' , ' micman ' , ' zsdregas ' ] # ελληνικά, Greek
2014-08-14 14:43:35 -04:00
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
2014-08-14 14:43:35 -04:00
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
2014-08-14 14:43:35 -04:00
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)
2015-02-10 17:13:15 -05:00
nn: [ ] # Norsk Nynorsk, Norwegian (Nynorsk)
2014-08-30 21:51:02 -04:00
he: [ ' OverProgram ' , ' monetita ' ] # עברית, Hebrew
2014-08-14 14:43:35 -04:00
lt: [ ] # lietuvių kalba, Lithuanian
sr: [ ] # српски, Serbian
2015-04-12 15:40:24 -04:00
uk: [ ' ImmortalJoker ' , ' OlenaGapak ' , ' Rarst ' , ' endrilian ' , ' fess89 ' , ' gorodsb ' , ' probil ' ] # українська мова, Ukrainian
2014-08-14 14:43:35 -04:00
hi: [ ] # मानक हिन्दी, Hindi
ur: [ ] # اُردُو, Urdu
ms: [ ] # Bahasa Melayu, Bahasa Malaysia
2015-12-13 16:28:48 -05:00
ca: [ ' ArniMcFrag ' , ' Nainufar ' ] # Català, Catalan
2014-11-07 12:08:30 -05:00
gl: [ ' mcaeiror ' ] # Galego, Galician
2014-12-28 19:03:09 -05:00
' mk-MK ' : [ ' SuperPranx ' ] # Македонски, Macedonian
2015-03-19 13:18:53 -04:00
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
2016-07-29 15:53:01 -04:00
hr: [ ] # hrvatski jezik, Croatian
mi: [ ] # te reo Māori, Māori
2016-08-08 16:10:28 -04:00
haw: [ ] # ʻ Ōlelo Hawaiʻ i, Hawaiian