mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Merge branch 'master' of https://github.com/codecombat/codecombat
Conflicts: app/views/play/ladder/ladder_tab.coffee
This commit is contained in:
commit
06f164525f
41 changed files with 866 additions and 251 deletions
|
@ -98,6 +98,10 @@ module.exports = class ThangState
|
||||||
storage = @trackedPropertyValues[propIndex]
|
storage = @trackedPropertyValues[propIndex]
|
||||||
value = @getStoredProp propIndex, type, storage
|
value = @getStoredProp propIndex, type, storage
|
||||||
if prop is "pos"
|
if prop is "pos"
|
||||||
|
if @thang.pos.distanceSquared(value) > 900
|
||||||
|
# Don't interpolate; it was probably a teleport. https://github.com/codecombat/codecombat/issues/738
|
||||||
|
@thang.pos = value
|
||||||
|
else
|
||||||
@thang.pos = @thang.pos.copy()
|
@thang.pos = @thang.pos.copy()
|
||||||
@thang.pos.x = inverse * @thang.pos.x + ratio * value.x
|
@thang.pos.x = inverse * @thang.pos.x + ratio * value.x
|
||||||
@thang.pos.y = inverse * @thang.pos.y + ratio * value.y
|
@thang.pos.y = inverse * @thang.pos.y + ratio * value.y
|
||||||
|
|
|
@ -12,6 +12,7 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
|
||||||
manual: "Manual"
|
manual: "Manual"
|
||||||
fork: "Fork"
|
fork: "Fork"
|
||||||
play: "Play"
|
play: "Play"
|
||||||
|
retry: "Retry"
|
||||||
|
|
||||||
units:
|
units:
|
||||||
second: "second"
|
second: "second"
|
||||||
|
@ -602,3 +603,27 @@ module.exports = nativeDescription: "English", englishDescription: "English", tr
|
||||||
tutorial: "tutorial"
|
tutorial: "tutorial"
|
||||||
new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
|
new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
|
||||||
so_ready: "I Am So Ready for This"
|
so_ready: "I Am So Ready for This"
|
||||||
|
|
||||||
|
loading_error:
|
||||||
|
could_not_load: "Error loading from server"
|
||||||
|
connection_failure: "Connection failed."
|
||||||
|
unauthorized: "You need to be signed in. Do you have cookies disabled?"
|
||||||
|
forbidden: "You do not have the permissions."
|
||||||
|
not_found: "Not found."
|
||||||
|
not_allowed: "Method not allowed."
|
||||||
|
timeout: "Server timeout."
|
||||||
|
conflict: "Resource conflict."
|
||||||
|
bad_input: "Bad input."
|
||||||
|
server_error: "Server error."
|
||||||
|
unknown: "Unknown error."
|
||||||
|
|
||||||
|
resources:
|
||||||
|
your_sessions: "Your Sessions"
|
||||||
|
level: "Level"
|
||||||
|
social_network_apis: "Social Network APIs"
|
||||||
|
facebook_status: "Facebook Status"
|
||||||
|
facebook_friends: "Facebook Friends"
|
||||||
|
facebook_friend_sessions: "Facebook Friend Sessions"
|
||||||
|
gplus_friends: "G+ Friends"
|
||||||
|
gplus_friend_sessions: "G+ Friend Sessions"
|
||||||
|
leaderboard: 'leaderboard'
|
|
@ -5,7 +5,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
|
||||||
sending: "Enviando..."
|
sending: "Enviando..."
|
||||||
cancel: "Cancelar"
|
cancel: "Cancelar"
|
||||||
save: "Guardar"
|
save: "Guardar"
|
||||||
# create: "Create"
|
create: "Crear"
|
||||||
delay_1_sec: "1 segundo"
|
delay_1_sec: "1 segundo"
|
||||||
delay_3_sec: "3 segundos"
|
delay_3_sec: "3 segundos"
|
||||||
delay_5_sec: "5 segundos"
|
delay_5_sec: "5 segundos"
|
||||||
|
@ -13,13 +13,13 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
|
||||||
fork: "Bifurcar"
|
fork: "Bifurcar"
|
||||||
play: "Jugar"
|
play: "Jugar"
|
||||||
|
|
||||||
# units:
|
units:
|
||||||
# second: "second"
|
second: "segundo"
|
||||||
# seconds: "seconds"
|
seconds: "segundos"
|
||||||
# minute: "minute"
|
minute: "minuto"
|
||||||
# minutes: "minutes"
|
minutes: "minutos"
|
||||||
# hour: "hour"
|
hour: "hora"
|
||||||
# hours: "hours"
|
hours: "horas"
|
||||||
|
|
||||||
modal:
|
modal:
|
||||||
close: "Cerrar"
|
close: "Cerrar"
|
||||||
|
@ -53,7 +53,7 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
|
||||||
login:
|
login:
|
||||||
sign_up: "Crear una cuenta"
|
sign_up: "Crear una cuenta"
|
||||||
log_in: "Entrar"
|
log_in: "Entrar"
|
||||||
# logging_in: "Logging In"
|
logging_in: "Entrando..."
|
||||||
log_out: "Salir"
|
log_out: "Salir"
|
||||||
recover: "recuperar cuenta"
|
recover: "recuperar cuenta"
|
||||||
|
|
||||||
|
@ -76,12 +76,12 @@ module.exports = nativeDescription: "español (ES)", englishDescription: "Spanis
|
||||||
no_ie: "CodeCombat no funciona en Internet Explorer 9 o anteriores. ¡Lo sentimos!"
|
no_ie: "CodeCombat no funciona en Internet Explorer 9 o anteriores. ¡Lo sentimos!"
|
||||||
no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y puede que no funcione!"
|
no_mobile: "¡CodeCombat no fue diseñado para dispositivos móviles y puede que no funcione!"
|
||||||
play: "Jugar"
|
play: "Jugar"
|
||||||
# old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!"
|
old_browser: "Ay, su navegador es demasiado viejo para ejecutar CodeCombat. ¡Lo sentimos!"
|
||||||
# old_browser_suffix: "You can try anyway, but it probably won't work."
|
old_browser_suffix: "Puede tentar de todos modos, pero probablemente no va a funcionar."
|
||||||
# campaign: "Campaign"
|
campaign: "Campaña"
|
||||||
# for_beginners: "For Beginners"
|
for_beginners: "Para principiantes"
|
||||||
# multiplayer: "Multiplayer"
|
multiplayer: "Multijugador"
|
||||||
# for_developers: "For Developers"
|
for_developers: "Para programadores"
|
||||||
|
|
||||||
play:
|
play:
|
||||||
choose_your_level: "Elige tu nivel"
|
choose_your_level: "Elige tu nivel"
|
||||||
|
|
|
@ -5,7 +5,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
|
||||||
sending: "Enviando..."
|
sending: "Enviando..."
|
||||||
cancel: "Cancelar"
|
cancel: "Cancelar"
|
||||||
save: "Salvar"
|
save: "Salvar"
|
||||||
# create: "Create"
|
create: "Criar"
|
||||||
delay_1_sec: "1 segundo"
|
delay_1_sec: "1 segundo"
|
||||||
delay_3_sec: "3 segundos"
|
delay_3_sec: "3 segundos"
|
||||||
delay_5_sec: "5 segundos"
|
delay_5_sec: "5 segundos"
|
||||||
|
@ -13,13 +13,13 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
|
||||||
fork: "Fork"
|
fork: "Fork"
|
||||||
play: "Jogar"
|
play: "Jogar"
|
||||||
|
|
||||||
# units:
|
unidades:
|
||||||
# second: "second"
|
second: "segundo"
|
||||||
# seconds: "seconds"
|
seconds: "segundos"
|
||||||
# minute: "minute"
|
minute: "minuto"
|
||||||
# minutes: "minutes"
|
minutes: "minutos"
|
||||||
# hour: "hour"
|
hour: "hora"
|
||||||
# hours: "hours"
|
hours: "horas"
|
||||||
|
|
||||||
modal:
|
modal:
|
||||||
close: "Fechar"
|
close: "Fechar"
|
||||||
|
@ -53,7 +53,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription:
|
||||||
login:
|
login:
|
||||||
sign_up: "Criar conta"
|
sign_up: "Criar conta"
|
||||||
log_in: "Entrar"
|
log_in: "Entrar"
|
||||||
# logging_in: "Logging In"
|
logging_in: "Entrando"
|
||||||
log_out: "Sair"
|
log_out: "Sair"
|
||||||
recover: "Recuperar sua conta"
|
recover: "Recuperar sua conta"
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
sending: "Se trimite..."
|
sending: "Se trimite..."
|
||||||
cancel: "Anulează"
|
cancel: "Anulează"
|
||||||
save: "Salvează"
|
save: "Salvează"
|
||||||
# create: "Create"
|
create: "Crează"
|
||||||
delay_1_sec: "1 secundă"
|
delay_1_sec: "1 secundă"
|
||||||
delay_3_sec: "3 secunde"
|
delay_3_sec: "3 secunde"
|
||||||
delay_5_sec: "5 secunde"
|
delay_5_sec: "5 secunde"
|
||||||
|
@ -13,13 +13,13 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
fork: "Fork"
|
fork: "Fork"
|
||||||
play: "Joacă"
|
play: "Joacă"
|
||||||
|
|
||||||
# units:
|
units:
|
||||||
# second: "second"
|
second: "secundă"
|
||||||
# seconds: "seconds"
|
seconds: "secunde"
|
||||||
# minute: "minute"
|
minute: "minut"
|
||||||
# minutes: "minutes"
|
minutes: "minute"
|
||||||
# hour: "hour"
|
hour: "oră"
|
||||||
# hours: "hours"
|
hours: "ore"
|
||||||
|
|
||||||
modal:
|
modal:
|
||||||
close: "Inchide"
|
close: "Inchide"
|
||||||
|
@ -53,7 +53,7 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
login:
|
login:
|
||||||
sign_up: "Crează cont"
|
sign_up: "Crează cont"
|
||||||
log_in: "Log In"
|
log_in: "Log In"
|
||||||
# logging_in: "Logging In"
|
logging_in: "Se conectează"
|
||||||
log_out: "Log Out"
|
log_out: "Log Out"
|
||||||
recover: "recuperează cont"
|
recover: "recuperează cont"
|
||||||
|
|
||||||
|
@ -226,8 +226,8 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
skip_tutorial: "Sari peste (esc)"
|
skip_tutorial: "Sari peste (esc)"
|
||||||
editor_config: "Editor Config"
|
editor_config: "Editor Config"
|
||||||
editor_config_title: "Configurare Editor"
|
editor_config_title: "Configurare Editor"
|
||||||
# editor_config_language_label: "Programming Language"
|
editor_config_language_label: "Limbaj de Programare"
|
||||||
# editor_config_language_description: "Define the programming language you want to code in."
|
editor_config_language_description: "Definește limbajul de programare în care vrei să codezi."
|
||||||
editor_config_keybindings_label: "Mapare taste"
|
editor_config_keybindings_label: "Mapare taste"
|
||||||
editor_config_keybindings_default: "Default (Ace)"
|
editor_config_keybindings_default: "Default (Ace)"
|
||||||
editor_config_keybindings_description: "Adaugă comenzi rapide suplimentare cunoscute din editoarele obisnuite."
|
editor_config_keybindings_description: "Adaugă comenzi rapide suplimentare cunoscute din editoarele obisnuite."
|
||||||
|
@ -246,17 +246,17 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
tip_beta_launch: "CodeCombat a fost lansat beta in Octombrie 2013."
|
tip_beta_launch: "CodeCombat a fost lansat beta in Octombrie 2013."
|
||||||
tip_js_beginning: "JavaScript este doar începutul."
|
tip_js_beginning: "JavaScript este doar începutul."
|
||||||
tip_autocast_setting: "Ajutează setările de autocast apăsând pe rotița de pe buton."
|
tip_autocast_setting: "Ajutează setările de autocast apăsând pe rotița de pe buton."
|
||||||
# think_solution: "Think of the solution, not the problem."
|
think_solution: "Gândește-te la soluție, nu la problemă."
|
||||||
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra"
|
tip_theory_practice: "Teoretic nu este nici o diferență înte teorie și practică. Dar practic este. - Yogi Berra"
|
||||||
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis"
|
tip_error_free: "Există doar două metode de a scrie un program fără erori; numai a treia funcționează. - Alan Perlis"
|
||||||
# tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
|
tip_debugging_program: "Dacă a face debuggin este procesul de a scoate bug-uri, atunci a programa este procesul de a introduce bug-uri. - Edsger W. Dijkstra"
|
||||||
# tip_forums: "Head over to the forums and tell us what you think!"
|
tip_forums: "Intră pe forum și spune-ți părerea!"
|
||||||
tip_baby_coders: "În vitor până și bebelușii vor fi Archmage."
|
tip_baby_coders: "În vitor până și bebelușii vor fi Archmage."
|
||||||
tip_morale_improves: "Se va încărca până până când va crește moralul."
|
tip_morale_improves: "Se va încărca până până când va crește moralul."
|
||||||
tip_all_species: "Noi credem în șanse egale de a învăța programare pentru toate speciile."
|
tip_all_species: "Noi credem în șanse egale de a învăța programare pentru toate speciile."
|
||||||
# tip_reticulating: "Reticulating spines."
|
tip_reticulating: "Reticulating spines."
|
||||||
tip_harry: "Ha un Wizard, "
|
tip_harry: "Ha un Wizard, "
|
||||||
# tip_great_responsibility: "With great coding skill comes great debug responsibility."
|
tip_great_responsibility: "With great coding skill comes great debug responsibility."
|
||||||
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep."
|
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep."
|
||||||
# tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't."
|
# tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't."
|
||||||
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda"
|
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda"
|
||||||
|
@ -587,16 +587,16 @@ module.exports = nativeDescription: "limba română", englishDescription: "Roman
|
||||||
warmup: "Încălzire"
|
warmup: "Încălzire"
|
||||||
vs: "VS"
|
vs: "VS"
|
||||||
|
|
||||||
# multiplayer_launch:
|
multiplayer_launch:
|
||||||
# introducing_dungeon_arena: "Introducing Dungeon Arena"
|
introducing_dungeon_arena: "Prezentăm Dungeon Arena"
|
||||||
# new_way: "The new way to compete with code."
|
new_way: "Noul mod de a concura prin linii de cod."
|
||||||
# to_battle: "To Battle, Developers!"
|
to_battle: "La luptă, Developers!"
|
||||||
# modern_day_sorcerer: "You know how to code? That's badass. You're a modern-day sorcerer! Isn't about time that you used your magic coding powers to command your minions in epic combat? And we're not talking robots here."
|
modern_day_sorcerer: "Știi să programezie? Tare. Ești un vrăjitor al noii ere! Nu crezi ca este timpul să îți folosești puterile de programare pentru a conduce în lupte epice minionii tăi? Și nu vorbim despre roboți aici."
|
||||||
# arenas_are_here: "CodeCombat head-to-head multiplayer arenas are here."
|
arenas_are_here: "Arenele CodeCombat multiplayer 1v1 sunt aici."
|
||||||
# ladder_explanation: "Choose your heroes, enchant your human or ogre armies, and climb your way over defeated fellow Wizards to reach the top of the ladders–then challenge your friends in our glorious, asynchronous multiplayer coding arenas. If you're feeling creative, you can even"
|
ladder_explanation: "Alegeți eroii,vrăjește armatele de orci sau oameni, și croiește-ți drumul luptând și învingând alți Vrăjitori pentru a ajunge în topul clasamentului. Dacă te simți creativ poți chiar să"
|
||||||
# fork_our_arenas: "fork our arenas"
|
fork_our_arenas: "să dai fork la arenele noastre"
|
||||||
# create_worlds: "and create your own worlds."
|
create_worlds: "și să îți creezi propriile lumi."
|
||||||
# javascript_rusty: "JavaScript a bit rusty? Don't worry; there's a"
|
javascript_rusty: "N-ai mai pus mâna pe JavaScript? Nicio problemă; există un"
|
||||||
# tutorial: "tutorial"
|
tutorial: "tutorial"
|
||||||
# new_to_programming: ". New to programming? Hit our beginner campaign to skill up."
|
new_to_programming: ". Nou in tainele programării? Încearcă campania de începători pentru ați dezolvata abilitățile."
|
||||||
# so_ready: "I Am So Ready for This"
|
so_ready: "Sunt atât de pregătit pentru asta!"
|
||||||
|
|
|
@ -226,8 +226,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
|
||||||
skip_tutorial: "Пропуск (Esc)"
|
skip_tutorial: "Пропуск (Esc)"
|
||||||
editor_config: "Настройки редактора"
|
editor_config: "Настройки редактора"
|
||||||
editor_config_title: "Настройки редактора"
|
editor_config_title: "Настройки редактора"
|
||||||
# editor_config_language_label: "Programming Language"
|
editor_config_language_label: "Язык программирования"
|
||||||
# editor_config_language_description: "Define the programming language you want to code in."
|
editor_config_language_description: "Определяет язык, на котором вы хотите программировать."
|
||||||
editor_config_keybindings_label: "Сочетания клавиш"
|
editor_config_keybindings_label: "Сочетания клавиш"
|
||||||
editor_config_keybindings_default: "По умолчанию (Ace)"
|
editor_config_keybindings_default: "По умолчанию (Ace)"
|
||||||
editor_config_keybindings_description: "Добавляет дополнительные сочетания, известные из популярных редакторов."
|
editor_config_keybindings_description: "Добавляет дополнительные сочетания, известные из популярных редакторов."
|
||||||
|
@ -264,8 +264,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi
|
||||||
tip_patience: "Терпением ты обладать должен, юный падаван. - Yoda"
|
tip_patience: "Терпением ты обладать должен, юный падаван. - Yoda"
|
||||||
tip_documented_bug: "Документированный баг не является багом; это фича."
|
tip_documented_bug: "Документированный баг не является багом; это фича."
|
||||||
tip_impossible: "Это всегда кажется невозможным, пока не сделано. - Nelson Mandela"
|
tip_impossible: "Это всегда кажется невозможным, пока не сделано. - Nelson Mandela"
|
||||||
# tip_talk_is_cheap: "Talk is cheap. Show me the code. - Linus Torvalds"
|
tip_talk_is_cheap: "Слова ничего не стоят. Покажи мне код. - Linus Torvalds"
|
||||||
# tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay"
|
tip_first_language: "Наиболее катастрофическая вещь, которую вы можете выучить - ваш первый язык программирования. - Alan Kay"
|
||||||
time_current: "Текущее:"
|
time_current: "Текущее:"
|
||||||
time_total: "Максимальное:"
|
time_total: "Максимальное:"
|
||||||
time_goto: "Перейти на:"
|
time_goto: "Перейти на:"
|
||||||
|
|
|
@ -167,7 +167,15 @@ a[data-toggle="modal"]
|
||||||
width: 50%
|
width: 50%
|
||||||
margin: 0 25%
|
margin: 0 25%
|
||||||
.progress-bar
|
.progress-bar
|
||||||
width: 100%
|
width: 0%
|
||||||
|
transition: width 0.1s ease
|
||||||
|
|
||||||
|
.errors .alert
|
||||||
|
padding: 5px
|
||||||
|
display: block
|
||||||
|
margin: 10px auto
|
||||||
|
.btn
|
||||||
|
margin-left: 10px
|
||||||
|
|
||||||
.modal
|
.modal
|
||||||
.wait
|
.wait
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
.loading-screen
|
.loading-screen
|
||||||
h1(data-i18n="common.loading") Loading...
|
h1(data-i18n="common.loading") Loading...
|
||||||
.progress.progress-striped.active
|
.progress
|
||||||
.progress-bar
|
.progress-bar
|
||||||
|
|
||||||
|
.errors
|
31
app/templates/loading_error.jade
Normal file
31
app/templates/loading_error.jade
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
.alert.alert-danger.loading-error-alert
|
||||||
|
span(data-i18n="loading_error.could_not_load") Error loading from server
|
||||||
|
span (
|
||||||
|
span(data-i18n="resources.#{name}")
|
||||||
|
span )
|
||||||
|
if !responseText
|
||||||
|
strong(data-i18n="loading_error.connection_failure") Connection failed.
|
||||||
|
else if status === 401
|
||||||
|
strong(data-i18n="loading_error.unauthorized") You need to be signed in. Do you have cookies disabled?
|
||||||
|
else if status === 403
|
||||||
|
strong(data-i18n="loading_error.forbidden") You do not have the permissions.
|
||||||
|
else if status === 404
|
||||||
|
strong(data-i18n="loading_error.not_found") Not found.
|
||||||
|
else if status === 405
|
||||||
|
strong(data-i18n="loading_error.not_allowed") Method not allowed.
|
||||||
|
else if status === 408
|
||||||
|
strong(data-i18n="loading_error.timeout") Server timeout.
|
||||||
|
else if status === 409
|
||||||
|
strong(data-i18n="loading_error.conflict") Resource conflict.
|
||||||
|
else if status === 422
|
||||||
|
strong(data-i18n="loading_error.bad_input") Bad input.
|
||||||
|
else if status >= 500
|
||||||
|
strong(data-i18n="loading_error.server_error") Server error.
|
||||||
|
else
|
||||||
|
strong(data-i18n="loading_error.unknown") Unknown error.
|
||||||
|
|
||||||
|
if resourceIndex !== undefined
|
||||||
|
button.btn.btn-sm.retry-loading-resource(data-i18n="common.retry", data-resource-index=resourceIndex) Retry
|
||||||
|
if requestIndex !== undefined
|
||||||
|
button.btn.btn-sm.retry-loading-request(data-i18n="common.retry", data-request-index=requestIndex) Retry
|
||||||
|
|
|
@ -2,6 +2,7 @@ SuperModel = require 'models/SuperModel'
|
||||||
utils = require 'lib/utils'
|
utils = require 'lib/utils'
|
||||||
CocoClass = require 'lib/CocoClass'
|
CocoClass = require 'lib/CocoClass'
|
||||||
loadingScreenTemplate = require 'templates/loading'
|
loadingScreenTemplate = require 'templates/loading'
|
||||||
|
loadingErrorTemplate = require 'templates/loading_error'
|
||||||
|
|
||||||
visibleModal = null
|
visibleModal = null
|
||||||
waitingModal = null
|
waitingModal = null
|
||||||
|
@ -18,13 +19,26 @@ module.exports = class CocoView extends Backbone.View
|
||||||
'click a': 'toggleModal'
|
'click a': 'toggleModal'
|
||||||
'click button': 'toggleModal'
|
'click button': 'toggleModal'
|
||||||
'click li': 'toggleModal'
|
'click li': 'toggleModal'
|
||||||
|
'click .retry-loading-resource': 'onRetryResource'
|
||||||
|
'click .retry-loading-request': 'onRetryRequest'
|
||||||
|
|
||||||
subscriptions: {}
|
subscriptions: {}
|
||||||
shortcuts: {}
|
shortcuts: {}
|
||||||
|
|
||||||
|
# load progress properties
|
||||||
|
loadProgress:
|
||||||
|
num: 0
|
||||||
|
denom: 0
|
||||||
|
showing: false
|
||||||
|
resources: [] # models and collections
|
||||||
|
requests: [] # jqxhr's
|
||||||
|
somethings: [] # everything else
|
||||||
|
progress: 0
|
||||||
|
|
||||||
# Setup, Teardown
|
# Setup, Teardown
|
||||||
|
|
||||||
constructor: (options) ->
|
constructor: (options) ->
|
||||||
|
@loadProgress = _.cloneDeep @loadProgress
|
||||||
@supermodel ?= options?.supermodel or new SuperModel()
|
@supermodel ?= options?.supermodel or new SuperModel()
|
||||||
@options = options
|
@options = options
|
||||||
@subscriptions = utils.combineAncestralObject(@, 'subscriptions')
|
@subscriptions = utils.combineAncestralObject(@, 'subscriptions')
|
||||||
|
@ -33,6 +47,7 @@ module.exports = class CocoView extends Backbone.View
|
||||||
@shortcuts = utils.combineAncestralObject(@, 'shortcuts')
|
@shortcuts = utils.combineAncestralObject(@, 'shortcuts')
|
||||||
@subviews = {}
|
@subviews = {}
|
||||||
@listenToShortcuts()
|
@listenToShortcuts()
|
||||||
|
@updateProgressBar = _.debounce @updateProgressBar, 100
|
||||||
# Backbone.Mediator handles subscription setup/teardown automatically
|
# Backbone.Mediator handles subscription setup/teardown automatically
|
||||||
super options
|
super options
|
||||||
|
|
||||||
|
@ -74,7 +89,7 @@ module.exports = class CocoView extends Backbone.View
|
||||||
return @template if _.isString(@template)
|
return @template if _.isString(@template)
|
||||||
@$el.html @template(@getRenderData())
|
@$el.html @template(@getRenderData())
|
||||||
@afterRender()
|
@afterRender()
|
||||||
@showLoading() if @startsLoading
|
@showLoading() if @startsLoading or @loading() # TODO: Remove startsLoading entirely
|
||||||
@$el.i18n()
|
@$el.i18n()
|
||||||
@
|
@
|
||||||
|
|
||||||
|
@ -90,6 +105,101 @@ module.exports = class CocoView extends Backbone.View
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
|
|
||||||
|
# Resource and request loading management for any given view
|
||||||
|
|
||||||
|
addResourceToLoad: (modelOrCollection, name, value=1) ->
|
||||||
|
@loadProgress.resources.push {resource:modelOrCollection, value:value, name:name}
|
||||||
|
@listenToOnce modelOrCollection, 'sync', @updateProgress
|
||||||
|
@listenTo modelOrCollection, 'error', @onResourceLoadFailed
|
||||||
|
@updateProgress()
|
||||||
|
|
||||||
|
addRequestToLoad: (jqxhr, name, retryFunc, value=1) ->
|
||||||
|
@loadProgress.requests.push {request:jqxhr, value:value, name: name, retryFunc: retryFunc}
|
||||||
|
jqxhr.done @updateProgress
|
||||||
|
jqxhr.fail @onRequestLoadFailed
|
||||||
|
|
||||||
|
addSomethingToLoad: (name, value=1) ->
|
||||||
|
@loadProgress.somethings.push {loaded: false, name: name, value: value}
|
||||||
|
@updateProgress()
|
||||||
|
|
||||||
|
somethingLoaded: (name) ->
|
||||||
|
r = _.find @loadProgress.somethings, {name: name}
|
||||||
|
return console.error 'Could not find something called', name if not r
|
||||||
|
r.loaded = true
|
||||||
|
@updateProgress(name)
|
||||||
|
|
||||||
|
loading: ->
|
||||||
|
return false if @loaded
|
||||||
|
for r in @loadProgress.resources
|
||||||
|
return true if not r.resource.loaded
|
||||||
|
for r in @loadProgress.requests
|
||||||
|
return true if not r.request.status
|
||||||
|
for r in @loadProgress.somethings
|
||||||
|
return true if not r.loaded
|
||||||
|
return false
|
||||||
|
|
||||||
|
updateProgress: =>
|
||||||
|
console.debug 'Loaded', r.name if arguments[0] and r = _.find @loadProgress.resources, {resource:arguments[0]}
|
||||||
|
console.debug 'Loaded', r.name if arguments[2] and r = _.find @loadProgress.requests, {request:arguments[2]}
|
||||||
|
console.debug 'Loaded', r.name if arguments[0] and r = _.find @loadProgress.somethings, {name:arguments[0]}
|
||||||
|
|
||||||
|
denom = 0
|
||||||
|
denom += r.value for r in @loadProgress.resources
|
||||||
|
denom += r.value for r in @loadProgress.requests
|
||||||
|
denom += r.value for r in @loadProgress.somethings
|
||||||
|
num = @loadProgress.num
|
||||||
|
num += r.value for r in @loadProgress.resources when r.resource.loaded
|
||||||
|
num += r.value for r in @loadProgress.requests when r.request.status
|
||||||
|
num += r.value for r in @loadProgress.somethings when r.loaded
|
||||||
|
#console.log 'update progress', @, num, denom, arguments
|
||||||
|
|
||||||
|
progress = if denom then num / denom else 0
|
||||||
|
# sometimes the denominator isn't known from the outset, so make sure the overall progress only goes up
|
||||||
|
@loadProgress.progress = progress if progress > @loadProgress.progress
|
||||||
|
@updateProgressBar()
|
||||||
|
if num is denom and not @loaded
|
||||||
|
@loaded = true
|
||||||
|
@onLoaded()
|
||||||
|
|
||||||
|
updateProgressBar: =>
|
||||||
|
prog = "#{parseInt(@loadProgress.progress*100)}%"
|
||||||
|
@$el.find('.loading-screen .progress-bar').css('width', prog)
|
||||||
|
|
||||||
|
onLoaded: ->
|
||||||
|
@render()
|
||||||
|
|
||||||
|
# Error handling for loading
|
||||||
|
|
||||||
|
onResourceLoadFailed: (resource, jqxhr) ->
|
||||||
|
for r, index in @loadProgress.resources
|
||||||
|
break if r.resource is resource
|
||||||
|
@$el.find('.loading-screen .errors').append(loadingErrorTemplate({
|
||||||
|
status:jqxhr.status,
|
||||||
|
name: r.name
|
||||||
|
resourceIndex: index,
|
||||||
|
responseText: jqxhr.responseText
|
||||||
|
})).i18n()
|
||||||
|
|
||||||
|
onRetryResource: (e) ->
|
||||||
|
r = @loadProgress.resources[$(e.target).data('resource-index')]
|
||||||
|
r.resource.fetch()
|
||||||
|
$(e.target).closest('.loading-error-alert').remove()
|
||||||
|
|
||||||
|
onRequestLoadFailed: (jqxhr) =>
|
||||||
|
for r, index in @loadProgress.requests
|
||||||
|
break if r.request is jqxhr
|
||||||
|
@$el.find('.loading-screen .errors').append(loadingErrorTemplate({
|
||||||
|
status:jqxhr.status,
|
||||||
|
name: r.name
|
||||||
|
requestIndex: index,
|
||||||
|
responseText: jqxhr.responseText
|
||||||
|
}))
|
||||||
|
|
||||||
|
onRetryRequest: (e) ->
|
||||||
|
r = @loadProgress.requests[$(e.target).data('request-index')]
|
||||||
|
@[r.retryFunc]?()
|
||||||
|
$(e.target).closest('.loading-error-alert').remove()
|
||||||
|
|
||||||
# Modals
|
# Modals
|
||||||
|
|
||||||
toggleModal: (e) ->
|
toggleModal: (e) ->
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
CocoView = require 'views/kinds/CocoView'
|
CocoView = require 'views/kinds/CocoView'
|
||||||
|
CocoClass = require 'lib/CocoClass'
|
||||||
Level = require 'models/Level'
|
Level = require 'models/Level'
|
||||||
LevelSession = require 'models/LevelSession'
|
LevelSession = require 'models/LevelSession'
|
||||||
CocoCollection = require 'models/CocoCollection'
|
CocoCollection = require 'models/CocoCollection'
|
||||||
|
@ -18,7 +19,6 @@ class LevelSessionsCollection extends CocoCollection
|
||||||
module.exports = class LadderTabView extends CocoView
|
module.exports = class LadderTabView extends CocoView
|
||||||
id: 'ladder-tab-view'
|
id: 'ladder-tab-view'
|
||||||
template: require 'templates/play/ladder/ladder_tab'
|
template: require 'templates/play/ladder/ladder_tab'
|
||||||
startsLoading: true
|
|
||||||
|
|
||||||
events:
|
events:
|
||||||
'click .connect-facebook': 'onConnectFacebook'
|
'click .connect-facebook': 'onConnectFacebook'
|
||||||
|
@ -32,6 +32,7 @@ module.exports = class LadderTabView extends CocoView
|
||||||
|
|
||||||
constructor: (options, @level, @sessions) ->
|
constructor: (options, @level, @sessions) ->
|
||||||
super(options)
|
super(options)
|
||||||
|
@addSomethingToLoad("social_network_apis")
|
||||||
@teams = teamDataFromLevel @level
|
@teams = teamDataFromLevel @level
|
||||||
@leaderboards = {}
|
@leaderboards = {}
|
||||||
@refreshLadder()
|
@refreshLadder()
|
||||||
|
@ -39,15 +40,16 @@ module.exports = class LadderTabView extends CocoView
|
||||||
|
|
||||||
checkFriends: ->
|
checkFriends: ->
|
||||||
return if @checked or (not window.FB) or (not window.gapi)
|
return if @checked or (not window.FB) or (not window.gapi)
|
||||||
|
@somethingLoaded("social_network_apis")
|
||||||
@checked = true
|
@checked = true
|
||||||
|
|
||||||
@loadingFacebookFriends = true
|
@addSomethingToLoad("facebook_status")
|
||||||
FB.getLoginStatus (response) =>
|
FB.getLoginStatus (response) =>
|
||||||
@facebookStatus = response.status
|
@facebookStatus = response.status
|
||||||
if @facebookStatus is 'connected' then @loadFacebookFriendSessions() else @loadingFacebookFriends = false
|
@somethingLoaded("facebook_status")
|
||||||
|
@loadFacebookFriends() if @facebookStatus is 'connected'
|
||||||
|
|
||||||
if application.gplusHandler.loggedIn is undefined
|
if application.gplusHandler.loggedIn is undefined
|
||||||
@loadingGPlusFriends = true
|
|
||||||
@listenToOnce(application.gplusHandler, 'checked-state', @gplusSessionStateLoaded)
|
@listenToOnce(application.gplusHandler, 'checked-state', @gplusSessionStateLoaded)
|
||||||
else
|
else
|
||||||
@gplusSessionStateLoaded()
|
@gplusSessionStateLoaded()
|
||||||
|
@ -60,16 +62,24 @@ module.exports = class LadderTabView extends CocoView
|
||||||
|
|
||||||
onConnectedWithFacebook: -> location.reload() if @connecting
|
onConnectedWithFacebook: -> location.reload() if @connecting
|
||||||
|
|
||||||
loadFacebookFriendSessions: ->
|
loadFacebookFriends: ->
|
||||||
FB.api '/me/friends', (response) =>
|
@addSomethingToLoad("facebook_friends")
|
||||||
|
FB.api '/me/friends', @onFacebookFriendsLoaded
|
||||||
|
|
||||||
|
onFacebookFriendsLoaded: (response) =>
|
||||||
|
@somethingLoaded("facebook_friends")
|
||||||
@facebookData = response.data
|
@facebookData = response.data
|
||||||
|
@loadFacebookFriendSessions()
|
||||||
|
|
||||||
|
loadFacebookFriendSessions: ->
|
||||||
levelFrag = "#{@level.get('original')}.#{@level.get('version').major}"
|
levelFrag = "#{@level.get('original')}.#{@level.get('version').major}"
|
||||||
url = "/db/level/#{levelFrag}/leaderboard_facebook_friends"
|
url = "/db/level/#{levelFrag}/leaderboard_facebook_friends"
|
||||||
$.ajax url, {
|
jqxhr = $.ajax url, {
|
||||||
data: { friendIDs: (f.id for f in @facebookData) }
|
data: { friendIDs: (f.id for f in @facebookData) }
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
success: @onFacebookFriendSessionsLoaded
|
success: @onFacebookFriendSessionsLoaded
|
||||||
}
|
}
|
||||||
|
@addRequestToLoad(jqxhr, 'facebook_friend_sessions', 'loadFacebookFriendSessions')
|
||||||
|
|
||||||
onFacebookFriendSessionsLoaded: (result) =>
|
onFacebookFriendSessionsLoaded: (result) =>
|
||||||
friendsMap = {}
|
friendsMap = {}
|
||||||
|
@ -79,8 +89,6 @@ module.exports = class LadderTabView extends CocoView
|
||||||
friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
|
friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
|
||||||
friend.imageSource = "http://graph.facebook.com/#{friend.facebookID}/picture"
|
friend.imageSource = "http://graph.facebook.com/#{friend.facebookID}/picture"
|
||||||
@facebookFriendSessions = result
|
@facebookFriendSessions = result
|
||||||
@loadingFacebookFriends = false
|
|
||||||
@renderMaybe()
|
|
||||||
|
|
||||||
# GOOGLE PLUS
|
# GOOGLE PLUS
|
||||||
|
|
||||||
|
@ -93,21 +101,23 @@ module.exports = class LadderTabView extends CocoView
|
||||||
|
|
||||||
gplusSessionStateLoaded: ->
|
gplusSessionStateLoaded: ->
|
||||||
if application.gplusHandler.loggedIn
|
if application.gplusHandler.loggedIn
|
||||||
@loadingGPlusFriends = true
|
@addSomethingToLoad("gplus_friends")
|
||||||
application.gplusHandler.loadFriends @gplusFriendsLoaded
|
application.gplusHandler.loadFriends @gplusFriendsLoaded
|
||||||
else
|
|
||||||
@loadingGPlusFriends = false
|
|
||||||
@renderMaybe()
|
|
||||||
|
|
||||||
gplusFriendsLoaded: (friends) =>
|
gplusFriendsLoaded: (friends) =>
|
||||||
|
@somethingLoaded("gplus_friends")
|
||||||
@gplusData = friends.items
|
@gplusData = friends.items
|
||||||
|
@loadGPlusFriendSessions()
|
||||||
|
|
||||||
|
loadGPlusFriendSessions: ->
|
||||||
levelFrag = "#{@level.get('original')}.#{@level.get('version').major}"
|
levelFrag = "#{@level.get('original')}.#{@level.get('version').major}"
|
||||||
url = "/db/level/#{levelFrag}/leaderboard_gplus_friends"
|
url = "/db/level/#{levelFrag}/leaderboard_gplus_friends"
|
||||||
$.ajax url, {
|
jqxhr = $.ajax url, {
|
||||||
data: { friendIDs: (f.id for f in @gplusData) }
|
data: { friendIDs: (f.id for f in @gplusData) }
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
success: @onGPlusFriendSessionsLoaded
|
success: @onGPlusFriendSessionsLoaded
|
||||||
}
|
}
|
||||||
|
@addRequestToLoad(jqxhr, 'gplus_friend_sessions', 'loadGPlusFriendSessions')
|
||||||
|
|
||||||
onGPlusFriendSessionsLoaded: (result) =>
|
onGPlusFriendSessionsLoaded: (result) =>
|
||||||
friendsMap = {}
|
friendsMap = {}
|
||||||
|
@ -117,29 +127,16 @@ module.exports = class LadderTabView extends CocoView
|
||||||
friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
|
friend.otherTeam = if friend.team is 'humans' then 'ogres' else 'humans'
|
||||||
friend.imageSource = friendsMap[friend.gplusID].image.url
|
friend.imageSource = friendsMap[friend.gplusID].image.url
|
||||||
@gplusFriendSessions = result
|
@gplusFriendSessions = result
|
||||||
@loadingGPlusFriends = false
|
|
||||||
@renderMaybe()
|
|
||||||
|
|
||||||
# LADDER LOADING
|
# LADDER LOADING
|
||||||
|
|
||||||
refreshLadder: ->
|
refreshLadder: ->
|
||||||
promises = []
|
|
||||||
for team in @teams
|
for team in @teams
|
||||||
@leaderboards[team.id]?.off 'sync'
|
@leaderboards[team.id]?.destroy()
|
||||||
teamSession = _.find @sessions.models, (session) -> session.get('team') is team.id
|
teamSession = _.find @sessions.models, (session) -> session.get('team') is team.id
|
||||||
@leaderboards[team.id] = new LeaderboardData(@level, team.id, teamSession)
|
@leaderboards[team.id] = new LeaderboardData(@level, team.id, teamSession)
|
||||||
promises.push @leaderboards[team.id].promise
|
|
||||||
@loadingLeaderboards = true
|
|
||||||
$.when(promises...).then(@leaderboardsLoaded)
|
|
||||||
|
|
||||||
leaderboardsLoaded: =>
|
@addResourceToLoad @leaderboards[team.id], 'leaderboard', 3
|
||||||
@loadingLeaderboards = false
|
|
||||||
@renderMaybe()
|
|
||||||
|
|
||||||
renderMaybe: ->
|
|
||||||
return if @loadingFacebookFriends or @loadingLeaderboards or @loadingGPlusFriends
|
|
||||||
@startsLoading = false
|
|
||||||
@render()
|
|
||||||
|
|
||||||
render: ->
|
render: ->
|
||||||
super()
|
super()
|
||||||
|
@ -232,9 +229,16 @@ module.exports = class LadderTabView extends CocoView
|
||||||
sessions.reverse()
|
sessions.reverse()
|
||||||
sessions
|
sessions
|
||||||
|
|
||||||
class LeaderboardData
|
class LeaderboardData extends CocoClass
|
||||||
|
###
|
||||||
|
Consolidates what you need to load for a leaderboard into a single Backbone Model-like object.
|
||||||
|
###
|
||||||
|
|
||||||
constructor: (@level, @team, @session) ->
|
constructor: (@level, @team, @session) ->
|
||||||
_.extend @, Backbone.Events
|
super()
|
||||||
|
@fetch()
|
||||||
|
|
||||||
|
fetch: ->
|
||||||
@topPlayers = new LeaderboardCollection(@level, {order:-1, scoreOffset: HIGHEST_SCORE, team: @team, limit: 20})
|
@topPlayers = new LeaderboardCollection(@level, {order:-1, scoreOffset: HIGHEST_SCORE, team: @team, limit: 20})
|
||||||
promises = []
|
promises = []
|
||||||
promises.push @topPlayers.fetch()
|
promises.push @topPlayers.fetch()
|
||||||
|
@ -245,19 +249,25 @@ class LeaderboardData
|
||||||
promises.push @playersAbove.fetch()
|
promises.push @playersAbove.fetch()
|
||||||
@playersBelow = new LeaderboardCollection(@level, {order:-1, scoreOffset: score, limit: 4, team: @team})
|
@playersBelow = new LeaderboardCollection(@level, {order:-1, scoreOffset: score, limit: 4, team: @team})
|
||||||
promises.push @playersBelow.fetch()
|
promises.push @playersBelow.fetch()
|
||||||
level = "#{level.get('original')}.#{level.get('version').major}"
|
level = "#{@level.get('original')}.#{@level.get('version').major}"
|
||||||
success = (@myRank) =>
|
success = (@myRank) =>
|
||||||
promises.push $.ajax "/db/level/#{level}/leaderboard_rank?scoreOffset=#{@session.get('totalScore')}&team=#{@team}", {success}
|
promises.push $.ajax "/db/level/#{level}/leaderboard_rank?scoreOffset=#{@session.get('totalScore')}&team=#{@team}", {success}
|
||||||
@promise = $.when(promises...)
|
@promise = $.when(promises...)
|
||||||
@promise.then @onLoad
|
@promise.then @onLoad
|
||||||
|
@promise.fail @onFail
|
||||||
@promise
|
@promise
|
||||||
|
|
||||||
onLoad: =>
|
onLoad: =>
|
||||||
|
return if @destroyed
|
||||||
@loaded = true
|
@loaded = true
|
||||||
@trigger 'sync'
|
@trigger 'sync', @
|
||||||
# TODO: cache user ids -> names mapping, and load them here as needed,
|
# TODO: cache user ids -> names mapping, and load them here as needed,
|
||||||
# and apply them to sessions. Fetching each and every time is too costly.
|
# and apply them to sessions. Fetching each and every time is too costly.
|
||||||
|
|
||||||
|
onFail: (resource, jqxhr) =>
|
||||||
|
return if @destroyed
|
||||||
|
@trigger 'error', @, jqxhr
|
||||||
|
|
||||||
inTopSessions: ->
|
inTopSessions: ->
|
||||||
return me.id in (session.attributes.creator for session in @topPlayers.models)
|
return me.id in (session.attributes.creator for session in @topPlayers.models)
|
||||||
|
|
||||||
|
@ -273,3 +283,7 @@ class LeaderboardData
|
||||||
startRank = @myRank - 4
|
startRank = @myRank - 4
|
||||||
session.rank = startRank + i for session, i in l
|
session.rank = startRank + i for session, i in l
|
||||||
l
|
l
|
||||||
|
|
||||||
|
allResources: ->
|
||||||
|
resources = [@topPlayers, @playersAbove, @playersBelow]
|
||||||
|
return (r for r in resources when r)
|
||||||
|
|
|
@ -24,7 +24,6 @@ class LevelSessionsCollection extends CocoCollection
|
||||||
module.exports = class LadderView extends RootView
|
module.exports = class LadderView extends RootView
|
||||||
id: 'ladder-view'
|
id: 'ladder-view'
|
||||||
template: require 'templates/play/ladder'
|
template: require 'templates/play/ladder'
|
||||||
startsLoading: true
|
|
||||||
|
|
||||||
subscriptions:
|
subscriptions:
|
||||||
'application:idle-changed': 'onIdleChanged'
|
'application:idle-changed': 'onIdleChanged'
|
||||||
|
@ -38,18 +37,18 @@ module.exports = class LadderView extends RootView
|
||||||
constructor: (options, @levelID) ->
|
constructor: (options, @levelID) ->
|
||||||
super(options)
|
super(options)
|
||||||
@level = new Level(_id:@levelID)
|
@level = new Level(_id:@levelID)
|
||||||
p1 = @level.fetch()
|
@level.fetch()
|
||||||
@sessions = new LevelSessionsCollection(levelID)
|
@sessions = new LevelSessionsCollection(levelID)
|
||||||
p2 = @sessions.fetch({})
|
@sessions.fetch({})
|
||||||
|
@addResourceToLoad(@sessions, 'your_sessions')
|
||||||
|
@addResourceToLoad(@level, 'level')
|
||||||
@simulator = new Simulator()
|
@simulator = new Simulator()
|
||||||
@listenTo(@simulator, 'statusUpdate', @updateSimulationStatus)
|
@listenTo(@simulator, 'statusUpdate', @updateSimulationStatus)
|
||||||
@teams = []
|
@teams = []
|
||||||
$.when(p1, p2).then @onLoaded
|
|
||||||
|
|
||||||
onLoaded: =>
|
onLoaded: ->
|
||||||
@teams = teamDataFromLevel @level
|
@teams = teamDataFromLevel @level
|
||||||
@startsLoading = false
|
super()
|
||||||
@render()
|
|
||||||
|
|
||||||
getRenderData: ->
|
getRenderData: ->
|
||||||
ctx = super()
|
ctx = super()
|
||||||
|
@ -63,7 +62,7 @@ module.exports = class LadderView extends RootView
|
||||||
|
|
||||||
afterRender: ->
|
afterRender: ->
|
||||||
super()
|
super()
|
||||||
return if @startsLoading
|
return if @loading()
|
||||||
@insertSubView(@ladderTab = new LadderTabView({}, @level, @sessions))
|
@insertSubView(@ladderTab = new LadderTabView({}, @level, @sessions))
|
||||||
@insertSubView(@myMatchesTab = new MyMatchesTabView({}, @level, @sessions))
|
@insertSubView(@myMatchesTab = new MyMatchesTabView({}, @level, @sessions))
|
||||||
@refreshInterval = setInterval(@fetchSessionsAndRefreshViews.bind(@), 10 * 1000)
|
@refreshInterval = setInterval(@fetchSessionsAndRefreshViews.bind(@), 10 * 1000)
|
||||||
|
@ -72,7 +71,7 @@ module.exports = class LadderView extends RootView
|
||||||
@showPlayModal(hash) if @sessions.loaded
|
@showPlayModal(hash) if @sessions.loaded
|
||||||
|
|
||||||
fetchSessionsAndRefreshViews: ->
|
fetchSessionsAndRefreshViews: ->
|
||||||
return if @destroyed or application.userIsIdle or @$el.find('#simulate.active').length or (new Date() - 2000 < @lastRefreshTime) or @startsLoading
|
return if @destroyed or application.userIsIdle or @$el.find('#simulate.active').length or (new Date() - 2000 < @lastRefreshTime) or @loading()
|
||||||
@sessions.fetch({"success": @refreshViews})
|
@sessions.fetch({"success": @refreshViews})
|
||||||
|
|
||||||
refreshViews: =>
|
refreshViews: =>
|
||||||
|
|
|
@ -78,7 +78,7 @@ module.exports = class VictoryModal extends View
|
||||||
c = super()
|
c = super()
|
||||||
c.body = @body
|
c.body = @body
|
||||||
c.me = me
|
c.me = me
|
||||||
c.hasNextLevel = _.isObject(@level.get('nextLevel')) and (@level.get('name') isnt "Mobile Artillery")
|
c.hasNextLevel = _.isObject(@level.get('nextLevel'))
|
||||||
c.levelName = utils.i18n @level.attributes, 'name'
|
c.levelName = utils.i18n @level.attributes, 'name'
|
||||||
c.level = @level
|
c.level = @level
|
||||||
if c.level.get('type') is 'ladder'
|
if c.level.get('type') is 'ladder'
|
||||||
|
|
|
@ -63,7 +63,7 @@ module.exports = class SpellView extends View
|
||||||
@createFirepad()
|
@createFirepad()
|
||||||
else
|
else
|
||||||
# needs to happen after the code generating this view is complete
|
# needs to happen after the code generating this view is complete
|
||||||
setTimeout @onLoaded, 1
|
setTimeout @onAllLoaded, 1
|
||||||
|
|
||||||
createACE: ->
|
createACE: ->
|
||||||
# Test themes and settings here: http://ace.ajax.org/build/kitchen-sink.html
|
# Test themes and settings here: http://ace.ajax.org/build/kitchen-sink.html
|
||||||
|
@ -178,9 +178,9 @@ module.exports = class SpellView extends View
|
||||||
else
|
else
|
||||||
@ace.setValue @previousSource
|
@ace.setValue @previousSource
|
||||||
@ace.clearSelection()
|
@ace.clearSelection()
|
||||||
@onLoaded()
|
@onAllLoaded()
|
||||||
|
|
||||||
onLoaded: =>
|
onAllLoaded: =>
|
||||||
@spell.transpile @spell.source
|
@spell.transpile @spell.source
|
||||||
@spell.loaded = true
|
@spell.loaded = true
|
||||||
Backbone.Mediator.publish 'tome:spell-loaded', spell: @spell
|
Backbone.Mediator.publish 'tome:spell-loaded', spell: @spell
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
<variables>
|
<variables>
|
||||||
<version>1.0</version>
|
<version>1.2</version>
|
||||||
<author>GlenDC</author>
|
<author>GlenDC</author>
|
||||||
<copyright>CodeCombat.com © 2013-2014</copyright>
|
<copyright>CodeCombat.com © 2013-2014</copyright>
|
||||||
|
<github_url>https://github.com/codecombat/codecombat.git</github_url>
|
||||||
|
<github_ssh>git@github.com:codecombat/codecombat.git</github_ssh>
|
||||||
</variables>
|
</variables>
|
|
@ -4,21 +4,35 @@
|
||||||
<b32>
|
<b32>
|
||||||
<nodejs>http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi</nodejs>
|
<nodejs>http://nodejs.org/dist/v0.10.25/node-v0.10.25-x86.msi</nodejs>
|
||||||
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct</ruby>
|
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353.exe?direct</ruby>
|
||||||
<python>http://www.python.org/ftp/python/2.7.6/python-2.7.6.msi</python>
|
<python>http://s3.amazonaws.com/CodeCombatLargeFiles/python-32.msi</python>
|
||||||
|
<vs12redist>http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x86.exe</vs12redist>
|
||||||
</b32>
|
</b32>
|
||||||
<b64>
|
<b64>
|
||||||
<nodejs>http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi</nodejs>
|
<nodejs>http://nodejs.org/dist/v0.10.25/x64/node-v0.10.25-x64.msi</nodejs>
|
||||||
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct</ruby>
|
<ruby>http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.0.0-p353-x64.exe?direct</ruby>
|
||||||
<python>http://www.python.org/ftp/python/2.7.6/python-2.7.6.amd64.msi</python>
|
<python>http://s3.amazonaws.com/CodeCombatLargeFiles/python-64.msi</python>
|
||||||
|
<winsdk>http://download.microsoft.com/download/A/6/A/A6AC035D-DA3F-4F0C-ADA4-37C8E5D34E3D/winsdk_web.exe</winsdk>
|
||||||
|
<vs12redist>http://download.microsoft.com/download/1/6/B/16B06F60-3B20-4FF2-B699-5E9B7962F9AE/VSU_4/vcredist_x64.exe</vs12redist>
|
||||||
</b64>
|
</b64>
|
||||||
|
<general>
|
||||||
<gitbash>https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe</gitbash>
|
<gitbash>https://msysgit.googlecode.com/files/Git-1.8.5.2-preview20131230.exe</gitbash>
|
||||||
|
<vs10redist>http://download.microsoft.com/download/C/6/D/C6D0FD4E-9E53-4897-9B91-836EBA2AACD3/vcredist_x86.exe</vs10redist>
|
||||||
</general>
|
</general>
|
||||||
<win7>
|
</general>
|
||||||
<b32>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</b32>
|
<Win7>
|
||||||
<b64>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.5.4.zip</b64>
|
<b32>
|
||||||
</win7>
|
<mongodb>http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</mongodb>
|
||||||
<vista>
|
</b32>
|
||||||
<b32>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</b32>
|
<b64>
|
||||||
<b64>mongodb=http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.5.4.zip</b64>
|
<mongodb>http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.5.4.zip</mongodb>
|
||||||
</vista>
|
</b64>
|
||||||
|
</Win7>
|
||||||
|
<Vista>
|
||||||
|
<b32>
|
||||||
|
<mongodb>http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.5.4.zip</mongodb>
|
||||||
|
</b32>
|
||||||
|
<b64>
|
||||||
|
<mongodb>http://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2.5.4.zip</mongodb>
|
||||||
|
</b64>
|
||||||
|
</Vista>
|
||||||
</variables>
|
</variables>
|
|
@ -4,4 +4,4 @@
|
||||||
4) Having questions/suggestions? Talk with us on HipChat via CodeCombat.com
|
4) Having questions/suggestions? Talk with us on HipChat via CodeCombat.com
|
||||||
|
|
||||||
You can find a step-by-step guide for this installation on our wiki.
|
You can find a step-by-step guide for this installation on our wiki.
|
||||||
https://github.com/codecombat/codecombat/wiki/<guide_path>
|
github.com/codecombat/codecombat/wiki/Setup-on-Windows:-a-step-by-step-guide
|
|
@ -15,10 +15,11 @@
|
||||||
<sks>Sind die für CodeCombat benötigten Programme bereits installiert?</sks>
|
<sks>Sind die für CodeCombat benötigten Programme bereits installiert?</sks>
|
||||||
<skq>Wir empfehlen Ihnen, mit „Nein“ zu antorten, falls Sie unsicher sind.</skq>
|
<skq>Wir empfehlen Ihnen, mit „Nein“ zu antorten, falls Sie unsicher sind.</skq>
|
||||||
<skc>Überspringe Installation der Programme...</skc>
|
<skc>Überspringe Installation der Programme...</skc>
|
||||||
<1>Ohne Software von Drittanbietern könnte CodeCombat nicht entwickelt werden.</1>
|
<s1>Ohne Software von Drittanbietern könnte CodeCombat nicht entwickelt werden.</s1>
|
||||||
<2>Aus diesem Grund müssen Sie diese Software installieren,</2>
|
<s2>Aus diesem Grund müssen Sie diese Software installieren,</s2>
|
||||||
<3>um sich in der Community zu engagieren.</3>
|
<s3>um sich in der Community zu engagieren.</s3>
|
||||||
<4>Wenn Sie ein Programm bereits installiert haben, brechen Sie die Installation bitte ab.</4>
|
<s4>Wenn Sie ein Programm bereits installiert haben, brechen Sie die Installation bitte ab.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
<prefix>Haben Sie bereits die aktuellste Version von</prefix>
|
<prefix>Haben Sie bereits die aktuellste Version von</prefix>
|
||||||
<sufix>installiert?</sufix>
|
<sufix>installiert?</sufix>
|
||||||
<downloading>wird heruntergeladen...</downloading>
|
<downloading>wird heruntergeladen...</downloading>
|
||||||
|
@ -30,16 +31,16 @@
|
||||||
</install>
|
</install>
|
||||||
<github>
|
<github>
|
||||||
<intro>
|
<intro>
|
||||||
<opensource>Wie Du bereits weißt, ist CodeCombat Open Source.
|
<opensource>Wie Du bereits weißt, ist CodeCombat Open Source.</opensource>
|
||||||
<online>Unser Quellcode ist komplett auf Github.
|
<online>Unser Quellcode ist komplett auf Github.</online>
|
||||||
<manual>Wenn Du möchtest, kannst du das komplette Git Repository selbst herunterladen und nach deinen wünschen einrichten.
|
<manual>Wenn Du möchtest, kannst du das komplette Git Repository selbst herunterladen und nach deinen wünschen einrichten.</manual>
|
||||||
<norec>Allerdings empfehlen wir, dass du den Prozess statt dessen uns überlässt.
|
<norec>Allerdings empfehlen wir, dass du den Prozess statt dessen uns überlässt.</norec>
|
||||||
</intro>
|
</intro>
|
||||||
<skip>
|
<skip>
|
||||||
<question>Willst du das lokale Git Setup selbst vornehmen?
|
<question>Willst du das lokale Git Setup selbst vornehmen?</question>
|
||||||
<consequence>Bit vergewissere dich, dass das Repository korrekt heruntergeladen wurde, bevor du fortfährst.
|
<consequence>Bit vergewissere dich, dass das Repository korrekt heruntergeladen wurde, bevor du fortfährst.</consequence>
|
||||||
<donotclose>Bitte schließe dieses Fenster nicht.
|
<donotclose>Bitte schließe dieses Fenster nicht.</donotclose>
|
||||||
<wait>Wenn du fertig bist, drücke eine beliebige Taste zum Fortfahren...
|
<wait>Wenn du fertig bist, drücke eine beliebige Taste zum Fortfahren...</wait>
|
||||||
</skip>
|
</skip>
|
||||||
<process>
|
<process>
|
||||||
<path>Gebe bitte den kompletten Pfad zu deinem CodeCombat Git Repository ein: </path>
|
<path>Gebe bitte den kompletten Pfad zu deinem CodeCombat Git Repository ein: </path>
|
||||||
|
@ -62,7 +63,7 @@
|
||||||
<script>Preparing the automatic startup script for you...</script>
|
<script>Preparing the automatic startup script for you...</script>
|
||||||
</npm>
|
</npm>
|
||||||
<error>
|
<error>
|
||||||
<path>Dieser Pfad existiert bereits. Willst du ihn wirklich überschreiben?<path>
|
<path>Dieser Pfad existiert bereits. Willst du ihn wirklich überschreiben?</path>
|
||||||
<exist>Dieser Pfad exisitert nicht. Bitte versuche es erneut...</exist>
|
<exist>Dieser Pfad exisitert nicht. Bitte versuche es erneut...</exist>
|
||||||
</error>
|
</error>
|
||||||
<end>
|
<end>
|
||||||
|
@ -71,11 +72,11 @@
|
||||||
<readme>Willst du das README lesen, um weitere Informationen zu erhalten?</readme>
|
<readme>Willst du das README lesen, um weitere Informationen zu erhalten?</readme>
|
||||||
</end>
|
</end>
|
||||||
<start>
|
<start>
|
||||||
<1>Von nun an kannst du die Entwicklungsumgebung starten unter</1>
|
<s1>Von nun an kannst du die Entwicklungsumgebung starten unter</s1>
|
||||||
<2>einmal mit der Maus klicken.</2>
|
<s2>einmal mit der Maus klicken.</s2>
|
||||||
<3> 1) Einfach Doppelklicken</3>
|
<s3> 1) Einfach Doppelklicken</s3>
|
||||||
<4>und warten bis die Entwicklungsumgebung fertig geladen hat.</4>
|
<s4>und warten bis die Entwicklungsumgebung fertig geladen hat.</s4>
|
||||||
<5> 2) Jetzt 'localhost:3000' in deinem bevorzugten Browser aufrufen.</5>
|
<s5> 2) Jetzt 'localhost:3000' in deinem bevorzugten Browser aufrufen.</s5>
|
||||||
<6>Fertig. Du bist nun bereit, bei CodeCombat mitzuarbeiten!</6>
|
<s6>Fertig. Du bist nun bereit, bei CodeCombat mitzuarbeiten!</s6>
|
||||||
</start>
|
</start>
|
||||||
</variables>
|
</variables>
|
|
@ -15,10 +15,11 @@
|
||||||
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||||
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||||
<skc>Skipping the installation of the software...</skc>
|
<skc>Skipping the installation of the software...</skc>
|
||||||
<1>CodeCombat couldn't be developed without third-party software.</1>
|
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||||
<2>That's why you'll need to install this software,</2>
|
<s2>That's why you'll need to install this software,</s2>
|
||||||
<3>in order to start contributing to our community.</3>
|
<s3>in order to start contributing to our community.</s3>
|
||||||
<4>Cancel the installation if you already have the application.</4>
|
<s4>Cancel the installation if you already have the application.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
<prefix>Do you already have the latest version of</prefix>
|
<prefix>Do you already have the latest version of</prefix>
|
||||||
<sufix>installed?</sufix>
|
<sufix>installed?</sufix>
|
||||||
<downloading>is downloading...</downloading>
|
<downloading>is downloading...</downloading>
|
||||||
|
@ -71,11 +72,11 @@
|
||||||
<readme>Do you want to read the README for more information?</readme>
|
<readme>Do you want to read the README for more information?</readme>
|
||||||
</end>
|
</end>
|
||||||
<start>
|
<start>
|
||||||
<1>From now on you can start the dev. environment at</1>
|
<s1>From now on you can start the dev. environment at</s1>
|
||||||
<2>the touch of a single mouse click.</2>
|
<s2>the touch of a single mouse click.</s2>
|
||||||
<3> 1) Just double click</3>
|
<s3> 1) Just double click</s3>
|
||||||
<4> and let the environment start up.</4>
|
<s4> and let the environment start up.</s4>
|
||||||
<5> 2) Now just open 'localhost:3000' in your prefered browser.</5>
|
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||||
<6>That's it, you're now ready to start working on CodeCombat!</6>
|
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||||
</start>
|
</start>
|
||||||
</variables>
|
</variables>
|
82
scripts/windows/coco-dev-setup/batch/localisation/fr.coco
Executable file
82
scripts/windows/coco-dev-setup/batch/localisation/fr.coco
Executable file
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
<variables>
|
||||||
|
<global>
|
||||||
|
<native>français</native>
|
||||||
|
<intro>From now on we'll send our feedback in English!</intro>
|
||||||
|
</global>
|
||||||
|
<install>
|
||||||
|
<system>
|
||||||
|
<bit>-bit computer detected.</bit>
|
||||||
|
<prefix>The operating system</prefix>
|
||||||
|
<sufix>was detected.</sufix>
|
||||||
|
<xp>We don't support Windows XP, installation cancelled.</xp>
|
||||||
|
</system>
|
||||||
|
<process>
|
||||||
|
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||||
|
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||||
|
<skc>Skipping the installation of the software...</skc>
|
||||||
|
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||||
|
<s2>That's why you'll need to install this software,</s2>
|
||||||
|
<s3>in order to start contributing to our community.</s3>
|
||||||
|
<s4>Cancel the installation if you already have the application.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
|
<prefix>Do you already have the latest version of</prefix>
|
||||||
|
<sufix>installed?</sufix>
|
||||||
|
<downloading>is downloading...</downloading>
|
||||||
|
<installing>is installing...</installing>
|
||||||
|
<unzipping>is unzipping...</unzipping>
|
||||||
|
<cleaning>is cleaning...</cleaning>
|
||||||
|
<mongodbpath>Please define the full path where mongodb should be installed</mongodbpath>
|
||||||
|
</process>
|
||||||
|
</install>
|
||||||
|
<github>
|
||||||
|
<intro>
|
||||||
|
<opensource>CodeCombat is opensource, like you already know.</opensource>
|
||||||
|
<online>All our sourcecode can be found online at Github.</online>
|
||||||
|
<manual>You can choose to do the entire Git setup yourself.</manual>
|
||||||
|
<norec>However we recommend that you instead let us handle it instead.</norec>
|
||||||
|
</intro>
|
||||||
|
<skip>
|
||||||
|
<question>Do you want to do the Local Git setup manually yourself?</question>
|
||||||
|
<consequence>Make sure you have correctly setup your repository before processing.</consequence>
|
||||||
|
<donotclose>Do not close this window please.</donotclose>
|
||||||
|
<wait>When you're ready, press any key to continue...</wait>
|
||||||
|
</skip>
|
||||||
|
<process>
|
||||||
|
<path>Please give the full path of your CodeCombat git repository: </path>
|
||||||
|
<checkout>Please enter the full path where you want to install your CodeCombat environment</checkout>
|
||||||
|
<bashi>This installation requires Git Bash.</bashi>
|
||||||
|
<bashp64>Git bash is by default installed at 'C:\Program Files (x86)\Git'.</bashp64>
|
||||||
|
<bashp32>Git bash is by default installed at 'C:\Program Files\Git'.</bashp32>
|
||||||
|
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
|
||||||
|
<ssh>Do you want to checkout the repository via ssh?</ssh>
|
||||||
|
</process>
|
||||||
|
</github>
|
||||||
|
<npm>
|
||||||
|
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||||
|
<binstall>Installing bower packages...</binstall>
|
||||||
|
<sass>Installing sass...</sass>
|
||||||
|
<npm>Installing npm...</npm>
|
||||||
|
<brnch>Starting brunch....</brnch>
|
||||||
|
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||||
|
<db>Downloading the last version of the CodeCombat database...</db>
|
||||||
|
<script>Preparing the automatic startup script for you...</script>
|
||||||
|
</npm>
|
||||||
|
<error>
|
||||||
|
<path>That path already exists, are you sure you want to overwrite it?</path>
|
||||||
|
<exist>That path doesn't exist. Please try again...</exist>
|
||||||
|
</error>
|
||||||
|
<end>
|
||||||
|
<succesfull>The setup of the CodeCombat Dev. Environment was succesfull.</succesfull>
|
||||||
|
<thankyou>Thank you already for your contribution and see you soon.</thankyou>
|
||||||
|
<readme>Do you want to read the README for more information?</readme>
|
||||||
|
</end>
|
||||||
|
<start>
|
||||||
|
<s1>From now on you can start the dev. environment at</s1>
|
||||||
|
<s2>the touch of a single mouse click.</s2>
|
||||||
|
<s3> 1) Just double click</s3>
|
||||||
|
<s4> and let the environment start up.</s4>
|
||||||
|
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||||
|
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||||
|
</start>
|
||||||
|
</variables>
|
|
@ -1,3 +1,7 @@
|
||||||
en
|
en
|
||||||
nl
|
nl
|
||||||
de
|
de
|
||||||
|
fr
|
||||||
|
zh
|
||||||
|
zh-HANT
|
||||||
|
zh-HANS
|
|
@ -15,10 +15,11 @@
|
||||||
<sks>Heb je alle benodige software al geinstalleerd?</sks>
|
<sks>Heb je alle benodige software al geinstalleerd?</sks>
|
||||||
<skq>We raden aan dat je negatief antwoord indien je niet zeker bent.</skq>
|
<skq>We raden aan dat je negatief antwoord indien je niet zeker bent.</skq>
|
||||||
<skc>De installatie van software wordt geanulleerd...</skc>
|
<skc>De installatie van software wordt geanulleerd...</skc>
|
||||||
<1>CodeCombat kon niet worden ontwikkeld zonder third-party software.</1>
|
<s1>CodeCombat kon niet worden ontwikkeld zonder third-party software.</s1>
|
||||||
<2>Dat is waarom je deze software moet installeren,</2>
|
<s2>Dat is waarom je deze software moet installeren,</s2>
|
||||||
<3>zodat je je kan beginnen met het bijdragen tot onze gemeenschap.</3>
|
<s3>zodat je je kan beginnen met het bijdragen tot onze gemeenschap.</s3>
|
||||||
<4>Annuleer de installatie als je de applicatie al hebt.</4>
|
<s4>Annuleer de installatie als je de applicatie al hebt.</s4>
|
||||||
|
<winpath>Zorg er zeker voor dat je de optie selecteert dat de applicatie aan je Windows Path toevoegt, als de optie beschikbaar is.</winpath>
|
||||||
<prefix>Heb je al de laatste versie van</prefix>
|
<prefix>Heb je al de laatste versie van</prefix>
|
||||||
<sufix>geinstalleerd?</sufix>
|
<sufix>geinstalleerd?</sufix>
|
||||||
<downloading>is aan het downloaden...</downloading>
|
<downloading>is aan het downloaden...</downloading>
|
||||||
|
@ -71,11 +72,11 @@
|
||||||
<readme>Wil je de LEESMIJ lezen voor meer informatie?</readme>
|
<readme>Wil je de LEESMIJ lezen voor meer informatie?</readme>
|
||||||
</end>
|
</end>
|
||||||
<start>
|
<start>
|
||||||
<1>Vanaf nu kan je de ontwikkelings omgeving opstarten</1>
|
<s1>Vanaf nu kan je de ontwikkelings omgeving opstarten</s1>
|
||||||
<2>met het gemak van een enkele muisklik.</2>
|
<s2>met het gemak van een enkele muisklik.</s2>
|
||||||
<3> 1) Dubbelklik op</3>
|
<s3> 1) Dubbelklik op</s3>
|
||||||
<4>en laat de omgeving opstarten.</4>
|
<s4>en laat de omgeving opstarten.</s4>
|
||||||
<5> 2) Nu kan je 'localhost:3000' openen in je browser naar voorkeur.</5>
|
<s5> 2) Nu kan je 'localhost:3000' openen in je browser naar voorkeur.</s5>
|
||||||
<6>Dat is het, je bent nu klaar om te starten met je werk aan CodeCombat.</6>
|
<s6>Dat is het, je bent nu klaar om te starten met je werk aan CodeCombat.</s6>
|
||||||
</start>
|
</start>
|
||||||
</variables>
|
</variables>
|
82
scripts/windows/coco-dev-setup/batch/localisation/zh-HANS.coco
Executable file
82
scripts/windows/coco-dev-setup/batch/localisation/zh-HANS.coco
Executable file
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
<variables>
|
||||||
|
<global>
|
||||||
|
<native>简体中文</native>
|
||||||
|
<intro>From now on we'll send our feedback in English!</intro>
|
||||||
|
</global>
|
||||||
|
<install>
|
||||||
|
<system>
|
||||||
|
<bit>-bit computer detected.</bit>
|
||||||
|
<prefix>The operating system</prefix>
|
||||||
|
<sufix>was detected.</sufix>
|
||||||
|
<xp>We don't support Windows XP, installation cancelled.</xp>
|
||||||
|
</system>
|
||||||
|
<process>
|
||||||
|
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||||
|
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||||
|
<skc>Skipping the installation of the software...</skc>
|
||||||
|
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||||
|
<s2>That's why you'll need to install this software,</s2>
|
||||||
|
<s3>in order to start contributing to our community.</s3>
|
||||||
|
<s4>Cancel the installation if you already have the application.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
|
<prefix>Do you already have the latest version of</prefix>
|
||||||
|
<sufix>installed?</sufix>
|
||||||
|
<downloading>is downloading...</downloading>
|
||||||
|
<installing>is installing...</installing>
|
||||||
|
<unzipping>is unzipping...</unzipping>
|
||||||
|
<cleaning>is cleaning...</cleaning>
|
||||||
|
<mongodbpath>Please define the full path where mongodb should be installed</mongodbpath>
|
||||||
|
</process>
|
||||||
|
</install>
|
||||||
|
<github>
|
||||||
|
<intro>
|
||||||
|
<opensource>CodeCombat is opensource, like you already know.</opensource>
|
||||||
|
<online>All our sourcecode can be found online at Github.</online>
|
||||||
|
<manual>You can choose to do the entire Git setup yourself.</manual>
|
||||||
|
<norec>However we recommend that you instead let us handle it instead.</norec>
|
||||||
|
</intro>
|
||||||
|
<skip>
|
||||||
|
<question>Do you want to do the Local Git setup manually yourself?</question>
|
||||||
|
<consequence>Make sure you have correctly setup your repository before processing.</consequence>
|
||||||
|
<donotclose>Do not close this window please.</donotclose>
|
||||||
|
<wait>When you're ready, press any key to continue...</wait>
|
||||||
|
</skip>
|
||||||
|
<process>
|
||||||
|
<path>Please give the full path of your CodeCombat git repository: </path>
|
||||||
|
<checkout>Please enter the full path where you want to install your CodeCombat environment</checkout>
|
||||||
|
<bashi>This installation requires Git Bash.</bashi>
|
||||||
|
<bashp64>Git bash is by default installed at 'C:\Program Files (x86)\Git'.</bashp64>
|
||||||
|
<bashp32>Git bash is by default installed at 'C:\Program Files\Git'.</bashp32>
|
||||||
|
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
|
||||||
|
<ssh>Do you want to checkout the repository via ssh?</ssh>
|
||||||
|
</process>
|
||||||
|
</github>
|
||||||
|
<npm>
|
||||||
|
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||||
|
<binstall>Installing bower packages...</binstall>
|
||||||
|
<sass>Installing sass...</sass>
|
||||||
|
<npm>Installing npm...</npm>
|
||||||
|
<brnch>Starting brunch....</brnch>
|
||||||
|
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||||
|
<db>Downloading the last version of the CodeCombat database...</db>
|
||||||
|
<script>Preparing the automatic startup script for you...</script>
|
||||||
|
</npm>
|
||||||
|
<error>
|
||||||
|
<path>That path already exists, are you sure you want to overwrite it?</path>
|
||||||
|
<exist>That path doesn't exist. Please try again...</exist>
|
||||||
|
</error>
|
||||||
|
<end>
|
||||||
|
<succesfull>The setup of the CodeCombat Dev. Environment was succesfull.</succesfull>
|
||||||
|
<thankyou>Thank you already for your contribution and see you soon.</thankyou>
|
||||||
|
<readme>Do you want to read the README for more information?</readme>
|
||||||
|
</end>
|
||||||
|
<start>
|
||||||
|
<s1>From now on you can start the dev. environment at</s1>
|
||||||
|
<s2>the touch of a single mouse click.</s2>
|
||||||
|
<s3> 1) Just double click</s3>
|
||||||
|
<s4> and let the environment start up.</s4>
|
||||||
|
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||||
|
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||||
|
</start>
|
||||||
|
</variables>
|
82
scripts/windows/coco-dev-setup/batch/localisation/zh-HANT.coco
Executable file
82
scripts/windows/coco-dev-setup/batch/localisation/zh-HANT.coco
Executable file
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
<variables>
|
||||||
|
<global>
|
||||||
|
<native>繁体中文</native>
|
||||||
|
<intro>From now on we'll send our feedback in English!</intro>
|
||||||
|
</global>
|
||||||
|
<install>
|
||||||
|
<system>
|
||||||
|
<bit>-bit computer detected.</bit>
|
||||||
|
<prefix>The operating system</prefix>
|
||||||
|
<sufix>was detected.</sufix>
|
||||||
|
<xp>We don't support Windows XP, installation cancelled.</xp>
|
||||||
|
</system>
|
||||||
|
<process>
|
||||||
|
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||||
|
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||||
|
<skc>Skipping the installation of the software...</skc>
|
||||||
|
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||||
|
<s2>That's why you'll need to install this software,</s2>
|
||||||
|
<s3>in order to start contributing to our community.</s3>
|
||||||
|
<s4>Cancel the installation if you already have the application.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
|
<prefix>Do you already have the latest version of</prefix>
|
||||||
|
<sufix>installed?</sufix>
|
||||||
|
<downloading>is downloading...</downloading>
|
||||||
|
<installing>is installing...</installing>
|
||||||
|
<unzipping>is unzipping...</unzipping>
|
||||||
|
<cleaning>is cleaning...</cleaning>
|
||||||
|
<mongodbpath>Please define the full path where mongodb should be installed</mongodbpath>
|
||||||
|
</process>
|
||||||
|
</install>
|
||||||
|
<github>
|
||||||
|
<intro>
|
||||||
|
<opensource>CodeCombat is opensource, like you already know.</opensource>
|
||||||
|
<online>All our sourcecode can be found online at Github.</online>
|
||||||
|
<manual>You can choose to do the entire Git setup yourself.</manual>
|
||||||
|
<norec>However we recommend that you instead let us handle it instead.</norec>
|
||||||
|
</intro>
|
||||||
|
<skip>
|
||||||
|
<question>Do you want to do the Local Git setup manually yourself?</question>
|
||||||
|
<consequence>Make sure you have correctly setup your repository before processing.</consequence>
|
||||||
|
<donotclose>Do not close this window please.</donotclose>
|
||||||
|
<wait>When you're ready, press any key to continue...</wait>
|
||||||
|
</skip>
|
||||||
|
<process>
|
||||||
|
<path>Please give the full path of your CodeCombat git repository: </path>
|
||||||
|
<checkout>Please enter the full path where you want to install your CodeCombat environment</checkout>
|
||||||
|
<bashi>This installation requires Git Bash.</bashi>
|
||||||
|
<bashp64>Git bash is by default installed at 'C:\Program Files (x86)\Git'.</bashp64>
|
||||||
|
<bashp32>Git bash is by default installed at 'C:\Program Files\Git'.</bashp32>
|
||||||
|
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
|
||||||
|
<ssh>Do you want to checkout the repository via ssh?</ssh>
|
||||||
|
</process>
|
||||||
|
</github>
|
||||||
|
<npm>
|
||||||
|
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||||
|
<binstall>Installing bower packages...</binstall>
|
||||||
|
<sass>Installing sass...</sass>
|
||||||
|
<npm>Installing npm...</npm>
|
||||||
|
<brnch>Starting brunch....</brnch>
|
||||||
|
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||||
|
<db>Downloading the last version of the CodeCombat database...</db>
|
||||||
|
<script>Preparing the automatic startup script for you...</script>
|
||||||
|
</npm>
|
||||||
|
<error>
|
||||||
|
<path>That path already exists, are you sure you want to overwrite it?</path>
|
||||||
|
<exist>That path doesn't exist. Please try again...</exist>
|
||||||
|
</error>
|
||||||
|
<end>
|
||||||
|
<succesfull>The setup of the CodeCombat Dev. Environment was succesfull.</succesfull>
|
||||||
|
<thankyou>Thank you already for your contribution and see you soon.</thankyou>
|
||||||
|
<readme>Do you want to read the README for more information?</readme>
|
||||||
|
</end>
|
||||||
|
<start>
|
||||||
|
<s1>From now on you can start the dev. environment at</s1>
|
||||||
|
<s2>the touch of a single mouse click.</s2>
|
||||||
|
<s3> 1) Just double click</s3>
|
||||||
|
<s4> and let the environment start up.</s4>
|
||||||
|
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||||
|
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||||
|
</start>
|
||||||
|
</variables>
|
82
scripts/windows/coco-dev-setup/batch/localisation/zh.coco
Executable file
82
scripts/windows/coco-dev-setup/batch/localisation/zh.coco
Executable file
|
@ -0,0 +1,82 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||||
|
<variables>
|
||||||
|
<global>
|
||||||
|
<native>中文</native>
|
||||||
|
<intro>From now on we'll send our feedback in English!</intro>
|
||||||
|
</global>
|
||||||
|
<install>
|
||||||
|
<system>
|
||||||
|
<bit>-bit computer detected.</bit>
|
||||||
|
<prefix>The operating system</prefix>
|
||||||
|
<sufix>was detected.</sufix>
|
||||||
|
<xp>We don't support Windows XP, installation cancelled.</xp>
|
||||||
|
</system>
|
||||||
|
<process>
|
||||||
|
<sks>Have you already installed all the software needed for CodeCombat?</sks>
|
||||||
|
<skq>We recommand that you reply negative in case you're not sure.</skq>
|
||||||
|
<skc>Skipping the installation of the software...</skc>
|
||||||
|
<s1>CodeCombat couldn't be developed without third-party software.</s1>
|
||||||
|
<s2>That's why you'll need to install this software,</s2>
|
||||||
|
<s3>in order to start contributing to our community.</s3>
|
||||||
|
<s4>Cancel the installation if you already have the application.</s4>
|
||||||
|
<winpath>Make sure to select the option that adds the application to your Windows Path, if the option is available.</winpath>
|
||||||
|
<prefix>Do you already have the latest version of</prefix>
|
||||||
|
<sufix>installed?</sufix>
|
||||||
|
<downloading>is downloading...</downloading>
|
||||||
|
<installing>is installing...</installing>
|
||||||
|
<unzipping>is unzipping...</unzipping>
|
||||||
|
<cleaning>is cleaning...</cleaning>
|
||||||
|
<mongodbpath>Please define the full path where mongodb should be installed</mongodbpath>
|
||||||
|
</process>
|
||||||
|
</install>
|
||||||
|
<github>
|
||||||
|
<intro>
|
||||||
|
<opensource>CodeCombat is opensource, like you already know.</opensource>
|
||||||
|
<online>All our sourcecode can be found online at Github.</online>
|
||||||
|
<manual>You can choose to do the entire Git setup yourself.</manual>
|
||||||
|
<norec>However we recommend that you instead let us handle it instead.</norec>
|
||||||
|
</intro>
|
||||||
|
<skip>
|
||||||
|
<question>Do you want to do the Local Git setup manually yourself?</question>
|
||||||
|
<consequence>Make sure you have correctly setup your repository before processing.</consequence>
|
||||||
|
<donotclose>Do not close this window please.</donotclose>
|
||||||
|
<wait>When you're ready, press any key to continue...</wait>
|
||||||
|
</skip>
|
||||||
|
<process>
|
||||||
|
<path>Please give the full path of your CodeCombat git repository: </path>
|
||||||
|
<checkout>Please enter the full path where you want to install your CodeCombat environment</checkout>
|
||||||
|
<bashi>This installation requires Git Bash.</bashi>
|
||||||
|
<bashp64>Git bash is by default installed at 'C:\Program Files (x86)\Git'.</bashp64>
|
||||||
|
<bashp32>Git bash is by default installed at 'C:\Program Files\Git'.</bashp32>
|
||||||
|
<bashq>Please enter the full path where git bash is installed or just press enter if it's in the default location</bashq>
|
||||||
|
<ssh>Do you want to checkout the repository via ssh?</ssh>
|
||||||
|
</process>
|
||||||
|
</github>
|
||||||
|
<npm>
|
||||||
|
<install>Installing bower, brunch, nodemon and sendwithus...</install>
|
||||||
|
<binstall>Installing bower packages...</binstall>
|
||||||
|
<sass>Installing sass...</sass>
|
||||||
|
<npm>Installing npm...</npm>
|
||||||
|
<brnch>Starting brunch....</brnch>
|
||||||
|
<mongodb>Setting up a MongoDB database for you...</mongodb>
|
||||||
|
<db>Downloading the last version of the CodeCombat database...</db>
|
||||||
|
<script>Preparing the automatic startup script for you...</script>
|
||||||
|
</npm>
|
||||||
|
<error>
|
||||||
|
<path>That path already exists, are you sure you want to overwrite it?</path>
|
||||||
|
<exist>That path doesn't exist. Please try again...</exist>
|
||||||
|
</error>
|
||||||
|
<end>
|
||||||
|
<succesfull>The setup of the CodeCombat Dev. Environment was succesfull.</succesfull>
|
||||||
|
<thankyou>Thank you already for your contribution and see you soon.</thankyou>
|
||||||
|
<readme>Do you want to read the README for more information?</readme>
|
||||||
|
</end>
|
||||||
|
<start>
|
||||||
|
<s1>From now on you can start the dev. environment at</s1>
|
||||||
|
<s2>the touch of a single mouse click.</s2>
|
||||||
|
<s3> 1) Just double click</s3>
|
||||||
|
<s4> and let the environment start up.</s4>
|
||||||
|
<s5> 2) Now just open 'localhost:3000' in your prefered browser.</s5>
|
||||||
|
<s6>That's it, you're now ready to start working on CodeCombat!</s6>
|
||||||
|
</start>
|
||||||
|
</variables>
|
|
@ -6,8 +6,8 @@ if NOT exist "%temp_directory%" (
|
||||||
md %temp_directory%
|
md %temp_directory%
|
||||||
)
|
)
|
||||||
|
|
||||||
call get_local_text install-process-prefix
|
call get_local_text install_process_prefix install process prefix
|
||||||
call get_local_text install-process-sufix
|
call get_local_text install_process_sufix install process sufix
|
||||||
|
|
||||||
call ask_question "!install_process_prefix! %1 !install_process_sufix!"
|
call ask_question "!install_process_prefix! %1 !install_process_sufix!"
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ if "%result%"=="true" (
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_extension %2 download_extension
|
call get_extension %2 download_extension
|
||||||
call get_local_text install-process-downloading
|
call get_local_text install_process_downloading install process downloading
|
||||||
echo %1 !install_process_downloading!
|
echo %1 !install_process_downloading!
|
||||||
set "install_file=!temp_directory!%1.!download_extension!"
|
set "install_file=!temp_directory!%1.!download_extension!"
|
||||||
%curl_app% -k %2 -o !install_file!
|
%curl_app% -k %2 -o !install_file!
|
||||||
|
@ -34,10 +34,10 @@ if "%download_extension%"=="zip" (
|
||||||
goto:get_mongodb_path
|
goto:get_mongodb_path
|
||||||
|
|
||||||
:get_mongodb_path
|
:get_mongodb_path
|
||||||
call get_local_text install-process-mongodbpath
|
call get_local_text install_process_mongodbpath install process mongodbpath
|
||||||
set /p "mongodb_path=!install_process_mongodbpath!: "
|
set /p "mongodb_path=!install_process_mongodbpath!: "
|
||||||
if exist "%mongodb_path%" (
|
if exist "%mongodb_path%" (
|
||||||
call get_local_text error-path
|
call get_local_text error_path error path
|
||||||
call ask_question "!error_path!"
|
call ask_question "!error_path!"
|
||||||
if "!result!"=="false" (
|
if "!result!"=="false" (
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
@ -52,14 +52,14 @@ if "%download_extension%"=="zip" (
|
||||||
goto:clean_up
|
goto:clean_up
|
||||||
)
|
)
|
||||||
|
|
||||||
call get_local_text install-process-installing
|
call get_local_text install_process_installing install process installing
|
||||||
echo %1 !install_process_installing!
|
echo %1 !install_process_installing!
|
||||||
echo.
|
echo.
|
||||||
start /WAIT !install_file!
|
start /WAIT !install_file!
|
||||||
goto:clean_up
|
goto:clean_up
|
||||||
|
|
||||||
:clean_up
|
:clean_up
|
||||||
call get_local_text install-process-cleaning
|
call get_local_text install_process_cleaning install process cleaning
|
||||||
echo %1 !install_process_cleaning!
|
echo %1 !install_process_cleaning!
|
||||||
rmdir /s /q "!temp_directory!"
|
rmdir /s /q "!temp_directory!"
|
||||||
goto:exit_installation
|
goto:exit_installation
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
call print_install_header
|
call print_install_header
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text install-process-sks
|
call get_local_text install_process_sks install process sks
|
||||||
echo !install_process_sks!
|
echo !install_process_sks!
|
||||||
|
|
||||||
call get_local_text install-process-skq
|
call get_local_text install_process_skq install process skq
|
||||||
call ask_question "!install_process_skq!"
|
call ask_question "!install_process_skq!"
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
if "%result%"=="true" (
|
if "%result%"=="true" (
|
||||||
call get_local_text install-process-skc
|
call get_local_text install_process_skc install process skc
|
||||||
echo !install_process_skc!
|
echo !install_process_skc!
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
goto:exit_setup
|
goto:exit_setup
|
||||||
|
@ -20,22 +20,27 @@ call get_system_information
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
if %system_info_os% == XP (
|
if %system_info_os% == XP (
|
||||||
call get_local_text install-system-xp
|
call get_local_text install_system_xp install system xp
|
||||||
echo !install_system_xp!
|
echo !install_system_xp!
|
||||||
call print_exit
|
call print_exit
|
||||||
)
|
)
|
||||||
|
|
||||||
call get_category ..\\config\\downloads.coco downloads download_names downloads_count general-general general-%system_info_bit% %system_info_os%-%system_info_bit%
|
call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 0 general general
|
||||||
|
call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 2 %system_info_os% b%system_info_bit%
|
||||||
|
call get_variables ..\\config\\downloads.coco downloads download_names downloads_count 3 general b%system_info_bit%
|
||||||
|
|
||||||
call get_local_text install-process-1
|
call get_local_text install_process_s1 install process s1
|
||||||
call get_local_text install-process-2
|
call get_local_text install_process_s2 install process s2
|
||||||
call get_local_text install-process-3
|
call get_local_text install_process_s3 install process s3
|
||||||
call get_local_text install-process-4
|
call get_local_text install_process_s4 install process s4
|
||||||
|
call get_local_text install_process_winpath install process winpath
|
||||||
|
|
||||||
echo !install_process_1!
|
echo !install_process_s1!
|
||||||
echo !install_process_2!
|
echo !install_process_s2!
|
||||||
echo !install_process_3!
|
echo !install_process_s3!
|
||||||
echo !install_process_4!
|
echo !install_process_s4!
|
||||||
|
echo.
|
||||||
|
echo !install_process_winpath!
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
call run_script .\get_var.ps1 ..\config\config.coco %1
|
for /F "delims=" %%F in ('call run_script .\\get_var.ps1 ..\\config\\config.coco %1') do (
|
||||||
|
set "%1=%%F"
|
||||||
|
)
|
|
@ -1,3 +1,3 @@
|
||||||
call run_script .\get_var.ps1 ..\\config\\downloads.coco %2 %3 %4 %5 %6 > var.tmp
|
for /F "delims=" %%F in ('call run_script .\\get_var.ps1 ..\\config\\downloads.coco %2 %3 %4 %5') do (
|
||||||
set /p %1= < var.tmp
|
set "%1=%%F"
|
||||||
del /q var.tmp
|
)
|
|
@ -1,3 +1,3 @@
|
||||||
for /f "delims=" %%a in ('..\\utilities\\get_extension.exe %1 %2') do (
|
for /F "delims=" %%F in ('call run_script .\\get_extension.ps1 %1') do (
|
||||||
%%a
|
set "%2=%%F"
|
||||||
)
|
)
|
18
scripts/windows/coco-dev-setup/batch/scripts/get_extension.ps1
Executable file
18
scripts/windows/coco-dev-setup/batch/scripts/get_extension.ps1
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
$url = ($args[0].ToLower())
|
||||||
|
|
||||||
|
if($url.Contains("zip"))
|
||||||
|
{
|
||||||
|
Write-Host "zip"
|
||||||
|
}
|
||||||
|
elseif($url.Contains("exe"))
|
||||||
|
{
|
||||||
|
Write-Host "exe"
|
||||||
|
}
|
||||||
|
elseif($url.Contains("msi"))
|
||||||
|
{
|
||||||
|
Write-Host "msi"
|
||||||
|
}
|
||||||
|
elseif($url.Contains("tar.gz"))
|
||||||
|
{
|
||||||
|
Write-Host "tar.gz"
|
||||||
|
}
|
|
@ -1 +1 @@
|
||||||
call get_text %language_id% %1 %2 %3 %4 %5
|
call get_text !language_id! %1 %2 %3 %4 %5
|
|
@ -16,15 +16,15 @@ if "%version%" == "6.3" ( call:set_os Win7 )
|
||||||
goto:end
|
goto:end
|
||||||
|
|
||||||
:set_bit
|
:set_bit
|
||||||
call get_local_text install-system-bit
|
call get_local_text install_system_bit install system bit
|
||||||
set system_info_bit=%~1
|
set system_info_bit=%~1
|
||||||
echo %system_info_bit%%install_system_bit%
|
echo %system_info_bit%%install_system_bit%
|
||||||
goto:eof
|
goto:eof
|
||||||
|
|
||||||
:set_os
|
:set_os
|
||||||
set system_info_os=%~1
|
set system_info_os=%~1
|
||||||
call get_local_text install-system-prefix
|
call get_local_text install_system_prefix install system prefix
|
||||||
call get_local_text install-system-sufix
|
call get_local_text install_system_sufix install system sufix
|
||||||
echo %install_system_prefix% %system_info_os% %install_system_sufix%
|
echo %install_system_prefix% %system_info_os% %install_system_sufix%
|
||||||
goto:eof
|
goto:eof
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
call run_script .\get_var.ps1 ..\\localisation\\%1.coco %3 %4 %5 %6 %7 > var.tmp
|
for /F "delims=" %%F in ('call run_script .\\get_var.ps1 ..\\localisation\\%1.coco %3 %4 %5 %6') do (
|
||||||
set /p %2= < var.tmp
|
set "%2=%%F"
|
||||||
del /q var.tmp
|
)
|
|
@ -1,17 +1,27 @@
|
||||||
$xml_file = [xml](get-content $args[0])
|
$xml_file = [xml](get-content $args[0])
|
||||||
if($args.count -eq 3)
|
if($args.count -eq 2)
|
||||||
{
|
{
|
||||||
cmd /c "set_var.bat" ($args[1]) ($xml_file.variables.($args[2]))
|
$var_output = ($xml_file.variables.($args[1]))
|
||||||
|
}
|
||||||
|
elseif($args.count -eq 3)
|
||||||
|
{
|
||||||
|
$var_output = ($xml_file.variables.($args[1]).($args[2]))
|
||||||
}
|
}
|
||||||
elseif($args.count -eq 4)
|
elseif($args.count -eq 4)
|
||||||
{
|
{
|
||||||
cmd /c "set_var.bat" ($args[1]) ($xml_file.variables.($args[2]).($args[3]))
|
$var_output = ($xml_file.variables.($args[1]).($args[2]).($args[3]))
|
||||||
}
|
}
|
||||||
elseif($args.count -eq 5)
|
elseif($args.count -eq 5)
|
||||||
{
|
{
|
||||||
cmd /c "set_var.bat" ($args[1]) ($xml_file.variables.($args[2]).($args[3]).($args[4]))
|
$var_output = ($xml_file.variables.($args[1]).($args[2]).($args[3]).($args[4]))
|
||||||
}
|
}
|
||||||
elseif($args.count -eq 6)
|
elseif($args.count -eq 6)
|
||||||
{
|
{
|
||||||
cmd /c "set_var.bat" ($args[1]) ($xml_file.variables.($args[2]).($args[3]).($args[4]).($args[5]))
|
$var_output = ($xml_file.variables.($args[1]).($args[2]).($args[3]).($args[4]).($args[5]))
|
||||||
}
|
}
|
||||||
|
elseif($args.count -eq 7)
|
||||||
|
{
|
||||||
|
$var_output = ($xml_file.variables.($args[1]).($args[2]).($args[3]).($args[4]).($args[5]).($args[6]))
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "$var_output"
|
4
scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat
Executable file
4
scripts/windows/coco-dev-setup/batch/scripts/get_variables.bat
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
set count=0
|
||||||
|
for /F "delims=" %%F in ('call run_script.bat .\\get_variables.ps1 %*') do (
|
||||||
|
%%F
|
||||||
|
)
|
33
scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1
Executable file
33
scripts/windows/coco-dev-setup/batch/scripts/get_variables.ps1
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
$xml_file = [xml](get-content $args[0])
|
||||||
|
$arr_value = $args[1]
|
||||||
|
$arr_name = $args[2]
|
||||||
|
$arr_counter = $args[3]
|
||||||
|
$counter = $args[4]
|
||||||
|
|
||||||
|
if($args.count -eq 6)
|
||||||
|
{
|
||||||
|
$root = $xml_file.variables.($args[5])
|
||||||
|
}
|
||||||
|
elseif($args.count -eq 7)
|
||||||
|
{
|
||||||
|
$root = $xml_file.variables.($args[5]).($args[6])
|
||||||
|
}
|
||||||
|
elseif($args.count -eq 8)
|
||||||
|
{
|
||||||
|
$root = $xml_file.variables.($args[5]).($args[6]).($args[7])
|
||||||
|
}
|
||||||
|
elseif($args.count -eq 9)
|
||||||
|
{
|
||||||
|
$nodes = $xml_file.variables.($args[5]).($args[6]).($args[7]).($args[8])
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($node in $root.ChildNodes)
|
||||||
|
{
|
||||||
|
$counter += 1
|
||||||
|
$value = $node.InnerText
|
||||||
|
$name = $node.Name
|
||||||
|
Write-Host set "$arr_value[$counter]=$value"
|
||||||
|
Write-Host set "$arr_name[$counter]=$name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host set "$arr_counter=$counter"
|
|
@ -1,10 +1,10 @@
|
||||||
call print_github_header
|
call print_github_header
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text github-intro-opensource
|
call get_local_text github_intro_opensource github intro opensource
|
||||||
call get_local_text github-intro-online
|
call get_local_text github_intro_online github intro online
|
||||||
call get_local_text github-intro-manual
|
call get_local_text github_intro_manual github intro manual
|
||||||
call get_local_text github-intro-norec
|
call get_local_text github_intro_norec github intro norec
|
||||||
|
|
||||||
echo !github_intro_opensource!
|
echo !github_intro_opensource!
|
||||||
echo !github_intro_online!
|
echo !github_intro_online!
|
||||||
|
@ -13,23 +13,23 @@ echo !github_intro_norec!
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text github-skip-question
|
call get_local_text github_skip_question github skip question
|
||||||
call ask_question "!github_skip_question!"
|
call ask_question "!github_skip_question!"
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
if "%result%"=="true" (
|
if "%result%"=="true" (
|
||||||
call get_local_text github-skip-consequence
|
call get_local_text github_skip_consequence github skip consequence
|
||||||
echo !github_skip_consequence!
|
echo !github_skip_consequence!
|
||||||
|
|
||||||
call get_local_text github-skip-donotclose
|
call get_local_text github_skip_donotclose github skip donotclose
|
||||||
echo !github_skip_donotclose!
|
echo !github_skip_donotclose!
|
||||||
|
|
||||||
call get_local_text github-skip-wait
|
call get_local_text github_skip_wait github skip wait
|
||||||
set /p "github_skip_wait=!github_skip_wait!"
|
set /p "github_skip_wait=!github_skip_wait!"
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text github-process-path
|
call get_local_text github_process_path github process path
|
||||||
call get_path_safe "!github_process_path!"
|
call get_path_safe "!github_process_path!"
|
||||||
set "repository_path=!tmp_safe_path!"
|
set "repository_path=!tmp_safe_path!"
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ if "%result%"=="true" (
|
||||||
goto:get_bash_path
|
goto:get_bash_path
|
||||||
|
|
||||||
:get_bash_path
|
:get_bash_path
|
||||||
call get_local_text github-process-bashi
|
call get_local_text github_process_bashi github process bashi
|
||||||
echo !github_process_bashi!
|
echo !github_process_bashi!
|
||||||
|
|
||||||
if not defined install_system_bit (
|
if not defined install_system_bit (
|
||||||
|
@ -49,14 +49,14 @@ goto:get_bash_path
|
||||||
)
|
)
|
||||||
|
|
||||||
if "%system_info_bit%"=="64" (
|
if "%system_info_bit%"=="64" (
|
||||||
call get_local_text github-process-bashp64
|
call get_local_text github_process_bashp64 github process bashp64
|
||||||
echo !github_process_bashp64!
|
echo !github_process_bashp64!
|
||||||
) else (
|
) else (
|
||||||
call get_local_text github-process-bashp32
|
call get_local_text github_process_bashp32 github process bashp32
|
||||||
echo !github_process_bashp32!
|
echo !github_process_bashp32!
|
||||||
)
|
)
|
||||||
|
|
||||||
call get_local_text github-process-bashq
|
call get_local_text github_process_bashq github process bashq
|
||||||
set /p "git_bash_path=!github_process_bashq!: "
|
set /p "git_bash_path=!github_process_bashq!: "
|
||||||
|
|
||||||
if not defined git_bash_path (
|
if not defined git_bash_path (
|
||||||
|
@ -69,7 +69,7 @@ goto:get_bash_path
|
||||||
)
|
)
|
||||||
|
|
||||||
if not exist "%git_bash_path%" (
|
if not exist "%git_bash_path%" (
|
||||||
call get_local_text error-exist
|
call get_local_text error_exist error exist
|
||||||
echo !error_exist!
|
echo !error_exist!
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
goto:get_bash_path
|
goto:get_bash_path
|
||||||
|
@ -80,10 +80,10 @@ goto:eof
|
||||||
|
|
||||||
:get_git_path
|
:get_git_path
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
call get_local_text github-process-checkout
|
call get_local_text github_process_checkout github process checkout
|
||||||
set /p "repository_path=!github_process_checkout!: "
|
set /p "repository_path=!github_process_checkout!: "
|
||||||
if exist !repository_path! (
|
if exist !repository_path! (
|
||||||
call get_local_text error-path
|
call get_local_text error_path error path
|
||||||
call ask_question "!error_path!"
|
call ask_question "!error_path!"
|
||||||
if "!result!"=="false" (
|
if "!result!"=="false" (
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
@echo off
|
||||||
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& "%*"
|
PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& "%*"
|
|
@ -2,7 +2,7 @@
|
||||||
setlocal EnableDelayedExpansion
|
setlocal EnableDelayedExpansion
|
||||||
|
|
||||||
Color 0A
|
Color 0A
|
||||||
mode con: cols=78 lines=55
|
mode con: cols=79 lines=55
|
||||||
|
|
||||||
call print_header
|
call print_header
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
@ -14,8 +14,6 @@ echo Welcome to the automated Installation of the CodeCombat Dev. Environment!
|
||||||
echo v%version% authored by %author% and published by %copyright%.
|
echo v%version% authored by %author% and published by %copyright%.
|
||||||
call print_seperator
|
call print_seperator
|
||||||
|
|
||||||
pause
|
|
||||||
|
|
||||||
echo Before we start the installation, here are some tips:
|
echo Before we start the installation, here are some tips:
|
||||||
call print_tips
|
call print_tips
|
||||||
call print_seperator
|
call print_seperator
|
||||||
|
@ -34,32 +32,32 @@ call github_setup
|
||||||
call print_finished_header
|
call print_finished_header
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text end-succesfull
|
call get_local_text end_succesfull end succesfull
|
||||||
call get_local_text end-thankyou
|
call get_local_text end_thankyou end thankyou
|
||||||
echo %end_succesfull%
|
echo %end_succesfull%
|
||||||
echo %end_thankyou%
|
echo %end_thankyou%
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text start-1
|
call get_local_text start_s1 start s1
|
||||||
call get_local_text start-2
|
call get_local_text start_s2 start s2
|
||||||
call get_local_text start-3
|
call get_local_text start_s3 start s3
|
||||||
call get_local_text start-4
|
call get_local_text start_s4 start s4
|
||||||
call get_local_text start-5
|
call get_local_text start_s5 start s5
|
||||||
call get_local_text start-6
|
call get_local_text start_s6 start s6
|
||||||
|
|
||||||
echo !start_1!
|
echo !start_s1!
|
||||||
echo !start_2!
|
echo !start_s2!
|
||||||
echo.
|
echo.
|
||||||
echo !start_3! '!repository_path!\coco\SCOCODE.bat'
|
echo !start_s3! '!repository_path!\coco\SCOCODE.bat'
|
||||||
echo !start_4!
|
echo !start_s4!
|
||||||
echo !start_5!
|
echo !start_s5!
|
||||||
echo.
|
echo.
|
||||||
echo !start_6!
|
echo !start_s6!
|
||||||
|
|
||||||
call print_dashed_seperator
|
call print_dashed_seperator
|
||||||
|
|
||||||
call get_local_text end-readme
|
call get_local_text end_readme end readme
|
||||||
call ask_question "!end_readme!"
|
call ask_question "!end_readme!"
|
||||||
|
|
||||||
if "%result%"=="true" (
|
if "%result%"=="true" (
|
||||||
|
|
Loading…
Reference in a new issue