Merge branch 'master' into production

This commit is contained in:
Phoenix Eliot 2016-08-17 16:54:59 -07:00
commit 98e6347268
2 changed files with 65 additions and 84 deletions

View file

@ -11,7 +11,6 @@ AudioPlayer = require 'lib/AudioPlayer'
app = require 'core/application' app = require 'core/application'
World = require 'lib/world/world' World = require 'lib/world/world'
utils = require 'core/utils' utils = require 'core/utils'
{sendContactMessage} = require 'core/contact'
LOG = false LOG = false
@ -79,29 +78,11 @@ module.exports = class LevelLoader extends CocoClass
@listenToOnce @level, 'sync', @onLevelLoaded @listenToOnce @level, 'sync', @onLevelLoaded
reportLoadError: -> reportLoadError: ->
window.tracker?.trackEvent 'LevelLoadError', window.tracker?.trackEvent 'LevelLoadError',
category: 'Error', category: 'Error',
levelSlug: @work?.level?.slug, levelSlug: @work?.level?.slug,
unloaded: JSON.stringify(@supermodel.report().map (m) -> _.result(m.model, 'url')) unloaded: JSON.stringify(@supermodel.report().map (m) -> _.result(m.model, 'url'))
return if me.isAdmin() or /dev=true/.test(window.location?.href ? '') or reportedLoadErrorAlready
reportedLoadErrorAlready = true
context = email: me.get('email')
context.message = """
Automatic Report - Unable to Load Level (LevelLoader timeout)
URL: #{window?.location?.toString()}
These models are marked as having not loaded:
#{JSON.stringify(@supermodel.report().map (m) -> _.result(m.model, 'url'))}
Object.keys(supermodel.models):
#{JSON.stringify(Object.keys(@supermodel.models))}
"""
if $.browser
context.browser = "#{$.browser.platform} #{$.browser.name} #{$.browser.versionNumber}"
context.screenSize = "#{screen?.width ? $(window).width()} x #{screen?.height ? $(window).height()}"
context.subject = "Level Load Error: #{@work?.level?.name or 'Unknown Level'}"
context.levelSlug = @work?.level?.slug
sendContactMessage context
onLevelLoaded: -> onLevelLoaded: ->
if not @sessionless and @level.isType('hero', 'hero-ladder', 'hero-coop', 'course') if not @sessionless and @level.isType('hero', 'hero-ladder', 'hero-coop', 'course')
@sessionDependenciesRegistered = {} @sessionDependenciesRegistered = {}

View file

@ -71,21 +71,21 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
curriculum: "Horas totais do currículo:" curriculum: "Horas totais do currículo:"
ffa: "Grátis para todos os estudantes" ffa: "Grátis para todos os estudantes"
lesson_time: "Tempo de aula:" lesson_time: "Tempo de aula:"
coming_soon: "Chega neste outono!" coming_soon: "Mais, brevemente!"
courses_available_in: "Os cursos estão disponíveis em JavaScript, Python, e Java (brevemente!)" courses_available_in: "Os cursos estão disponíveis em JavaScript, Python, e Java (brevemente!)"
# boast: "Boasts riddles that are complex enough to fascinate gamers and coders alike." # boast: "Boasts riddles that are complex enough to fascinate gamers and coders alike."
# winning: "A winning combination of RPG gameplay and programming homework that pulls off making kid-friendly education legitimately enjoyable." # winning: "A winning combination of RPG gameplay and programming homework that pulls off making kid-friendly education legitimately enjoyable."
run_class: "Tudo o que precisas para teres uma turma de ciência da computação na tua escola hoje, sem serem necessárias bases de CC." run_class: "Tudo o que precisas para teres uma turma de ciência da computação na tua escola hoje, sem serem necessárias bases de CC."
# teachers: "Teachers!" teachers: "Professores!"
# teachers_and_educators: "Teachers & Educators" teachers_and_educators: "Professores e Educadores"
# class_in_box: "Learn how our classroom-in-a-box platform fits into your curriculum." # class_in_box: "Learn how our classroom-in-a-box platform fits into your curriculum."
# get_started: "Get Started" get_started: "Começar"
# students: "Students:" students: "Estudantes:"
# join_class: "Join Class" # join_class: "Join Class"
# role: "Your role:" role: "O teu papel:"
# student_count: "Number of students:" student_count: "Número de estudantes:"
# start_playing_for_free: "Start Playing for Free!" start_playing_for_free: "Começa a Jogar Gratuitamente!"
# students_and_players: "Students & Players" students_and_players: "Estudantes e Jogadores"
goto_classes: "Ir para As Minhas Turmas" goto_classes: "Ir para As Minhas Turmas"
view_profile: "Ver o Meu Perfil" view_profile: "Ver o Meu Perfil"
view_progress: "Ver Progresso" view_progress: "Ver Progresso"
@ -282,45 +282,45 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
# classroom_not_found: "No classes exist with this Class Code. Check your spelling or ask your teacher for help." # classroom_not_found: "No classes exist with this Class Code. Check your spelling or ask your teacher for help."
# checking: "Checking..." # checking: "Checking..."
# account_exists: "This email is already in use:" # account_exists: "This email is already in use:"
# sign_in: "Sign in" sign_in: "Iniciar sessão"
# email_good: "Email looks good!" # email_good: "Email looks good!"
# name_taken: "Username already taken! Try {{suggestedName}}?" # name_taken: "Username already taken! Try {{suggestedName}}?"
# name_available: "Username available!" # name_available: "Username available!"
# name_is_email: "Username may not be an email" # name_is_email: "Username may not be an email"
# choose_type: "Choose your account type:" choose_type: "Escolhe o teu tipo de conta:"
# teacher_type_1: "Teach programming using CodeCombat!" teacher_type_1: "Ensina programção usando o CodeCombat!"
# teacher_type_2: "Set up your class" teacher_type_2: "Configura a tua turma"
# teacher_type_3: "Access Course Guides" teacher_type_3: "Acede aos Guias dos Cursos"
# teacher_type_4: "View student progress" teacher_type_4: "Vê o progresso dos estudantes"
# signup_as_teacher: "Sign up as a Teacher" signup_as_teacher: "Registar como Professor"
# student_type_1: "Learn to program while playing an engaging game!" student_type_1: "Aprende a programar enquanto jogas um jogo cativante!"
# student_type_2: "Play with your class" student_type_2: "Joga com a tua turma"
# student_type_3: "Compete in arenas" student_type_3: "Compete em arenas"
# student_type_4: "Choose your hero!" student_type_4: "Escolhe o teu herói!"
# student_type_5: "Have your Class Code ready!" student_type_5: "Prepara o teu Código de Turma!"
# signup_as_student: "Sign up as a Student" signup_as_student: "Registar como Estudante"
# individuals_or_parents: "Individuals & Parents" individuals_or_parents: "Individuais e Educadores"
# individual_type: "For players learning to code outside of a class. Parents should sign up for an account here." individual_type: "Para jogadores a aprender a programar fora de uma turma. Os educadores devem registar-se aqui."
# signup_as_individual: "Sign up as an Individual" signup_as_individual: "Registar como Individual"
# enter_class_code: "Enter your Class Code" enter_class_code: "Introduz o teu Código de Turma"
# enter_birthdate: "Enter your birthdate:" enter_birthdate: "Introduz a tua data de nascimento:"
# parent_use_birthdate: "Parents, use your own birthdate." parent_use_birthdate: "Educadores, usem a vossa data de nascimento."
# ask_teacher_1: "Ask your teacher for your Class Code." ask_teacher_1: "Pergunta ao teu professor pelo teu Código de Turma."
# ask_teacher_2: "Not part of a class? Create an " ask_teacher_2: "Não fazes parte de uma turma? Cria uma "
# ask_teacher_3: "Individual Account" ask_teacher_3: "Conta Individual"
# ask_teacher_4: " instead." ask_teacher_4: " então."
# about_to_join: "You're about to join:" # about_to_join: "You're about to join:"
# enter_parent_email: "Enter your parents email address:" enter_parent_email: "Introduz o e-mail do teu educador:"
# parent_email_error: "Something went wrong when trying to send the email. Check the email address and try again." # parent_email_error: "Something went wrong when trying to send the email. Check the email address and try again."
# parent_email_sent: "Weve sent an email with further instructions on how to create an account. Ask your parent to check their inbox." # parent_email_sent: "Weve sent an email with further instructions on how to create an account. Ask your parent to check their inbox."
# account_created: "Account Created!" account_created: "Conta Criada!"
# confirm_student_blurb: "Write down your information so that you don't forget it. Your teacher can also help you reset your password at any time." # confirm_student_blurb: "Write down your information so that you don't forget it. Your teacher can also help you reset your password at any time."
# confirm_individual_blurb: "Write down your login information in case you need it later. Verify your email so you can recover your account if you ever forget your password - check your inbox!" # confirm_individual_blurb: "Write down your login information in case you need it later. Verify your email so you can recover your account if you ever forget your password - check your inbox!"
# write_this_down: "Write this down:" write_this_down: "Aponta isto:"
# start_playing: "Start Playing!" start_playing: "Começar a Jogar!"
# sso_connected: "Successfully connected with:" # sso_connected: "Successfully connected with:"
# select_your_starting_hero: "Select Your Starting Hero:" select_your_starting_hero: "Escolhe o Teu Herói Inicial:"
# you_can_always_change_your_hero_later: "You can always change your hero later." you_can_always_change_your_hero_later: "Podes sempre mudar o teu herói mais tarde."
recover: recover:
recover_account_title: "Recuperar Conta" recover_account_title: "Recuperar Conta"
@ -337,13 +337,13 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
common: common:
back: "Voltar" # When used as an action verb, like "Navigate backward" back: "Voltar" # When used as an action verb, like "Navigate backward"
# coming_soon: "Coming soon!" coming_soon: "Brevemente!"
continue: "Continuar" # When used as an action verb, like "Continue forward" continue: "Continuar" # When used as an action verb, like "Continue forward"
# default_code: "Default Code" default_code: "Código Original"
loading: "A Carregar..." loading: "A Carregar..."
# overview: "Overview" overview: "Visão Geral"
# solution: "Solution" solution: "Solução"
# intro: "Intro" intro: "Introdução"
saving: "A Guardar..." saving: "A Guardar..."
sending: "A Enviar..." sending: "A Enviar..."
send: "Enviar" send: "Enviar"
@ -364,7 +364,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
submit_patch: "Submeter Atualização" submit_patch: "Submeter Atualização"
submit_changes: "Submeter Alterações" submit_changes: "Submeter Alterações"
save_changes: "Guardar Alterações" save_changes: "Guardar Alterações"
required_field: "Campo Necessário" # {change} required_field: "necessário"
general: general:
and: "e" and: "e"
@ -444,9 +444,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
done: "Concluir" done: "Concluir"
next_level: "Próximo Nível" next_level: "Próximo Nível"
next_game: "Próximo jogo" next_game: "Próximo jogo"
# language: "Language" language: "Linguagem"
# languages: "Languages" languages: "Linguagens"
# programming_language: "Programming language" programming_language: "Linguagem de programação"
show_menu: "Mostrar o menu do jogo" show_menu: "Mostrar o menu do jogo"
home: "Início" # Not used any more, will be removed soon. home: "Início" # Not used any more, will be removed soon.
level: "Nível" # Like "Level: Dungeons of Kithgard" level: "Nível" # Like "Level: Dungeons of Kithgard"
@ -481,7 +481,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
victory_experience_gained: "XP Ganho" victory_experience_gained: "XP Ganho"
victory_gems_gained: "Gemas Ganhas" victory_gems_gained: "Gemas Ganhas"
victory_new_item: "Novo Item" victory_new_item: "Novo Item"
# victory_new_hero: "New Hero" victory_new_hero: "Novo Herói"
# victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks." # victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
victory_become_a_viking: "Torna-te um Viking" victory_become_a_viking: "Torna-te um Viking"
victory_no_progress_for_teachers: "O progresso não é guardado para professores. Mas podes adicionar à tua turma uma conta de estudante para ti." victory_no_progress_for_teachers: "O progresso não é guardado para professores. Mas podes adicionar à tua turma uma conta de estudante para ti."
@ -579,17 +579,17 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
# tip_programming_not_about_computers: "Computer Science is no more about computers than astronomy is about telescopes. - Edsger Dijkstra" # tip_programming_not_about_computers: "Computer Science is no more about computers than astronomy is about telescopes. - Edsger Dijkstra"
# tip_mulan: "Believe you can, then you will. - Mulan" # tip_mulan: "Believe you can, then you will. - Mulan"
# play_game_dev_level: play_game_dev_level:
# created_by: "Created by {{name}}" created_by: "Criado por {{name}}"
# how_to_play_title: "How to play:" how_to_play_title: "Como jogar:"
# how_to_play_1: "Use the mouse to control the hero!" how_to_play_1: "Usa o rato para controlares o herói!"
# how_to_play_2: "Click anywhere on the map to move to that location." how_to_play_2: "Clica em qualquer sítio do mapa para te moveres para esse local."
# how_to_play_3: "Click on the ogres to attack them." how_to_play_3: "Clica nos ogres para os atacares."
# restart: "Restart Level" restart: "Recomeçar Nível"
# play: "Play Level" play: "Jogar Nível"
# play_more_codecombat: "Play More CodeCombat" play_more_codecombat: "Jogar Mais CodeCombat"
# default_student_instructions: "Click to control your hero and win your game!" default_student_instructions: "Clica para controlares o teu herói e ganhares o teu jogo!"
# back_to_coding: "Back to Coding" back_to_coding: "Voltar à Programação"
game_menu: game_menu:
inventory_tab: "Inventário" inventory_tab: "Inventário"
@ -767,8 +767,8 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
current_value: "Valor Atual" current_value: "Valor Atual"
default_value: "Valor Predefinido" default_value: "Valor Predefinido"
parameters: "Parâmetros" parameters: "Parâmetros"
# required_parameters: "Required Parameters" required_parameters: "Parâmetros Necessários"
# optional_parameters: "Optional Parameters" optional_parameters: "Parâmetros Opcionais"
returns: "Devolve" returns: "Devolve"
granted_by: "Garantido por" granted_by: "Garantido por"
@ -825,7 +825,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
elliot_title: "Gestor de Parcerias" elliot_title: "Gestor de Parcerias"
elliot_blurb: "Leitora de Mentes" elliot_blurb: "Leitora de Mentes"
lisa_title: "Representante do Desenvolvimento de Mercado" lisa_title: "Representante do Desenvolvimento de Mercado"
# sean_title: "Territory Manager" sean_title: "Gestor do Território"
retrostyle_title: "Ilustração" retrostyle_title: "Ilustração"
retrostyle_blurb: "'RetroStyle Games'" retrostyle_blurb: "'RetroStyle Games'"
jose_title: "Música" jose_title: "Música"
@ -874,8 +874,8 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
# screenshots: "Screenshots" # screenshots: "Screenshots"
# character_art: "Character Art" # character_art: "Character Art"
# download_all: "Download All" # download_all: "Download All"
# previous: "Previous" previous: "Anterior"
# next: "Next" next: "Seguinte"
# location_title: "We're located in downtown SF:" # location_title: "We're located in downtown SF:"
teachers: teachers: