From a96d5df78e2ee88e69fddd6fb1f3c20e2c62d62c Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 13 Jun 2016 16:21:22 -0700 Subject: [PATCH 1/3] Don't protect APIs in game-dev levels --- app/views/play/level/tome/Spell.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/play/level/tome/Spell.coffee b/app/views/play/level/tome/Spell.coffee index dd0cf0936..358f2f6df 100644 --- a/app/views/play/level/tome/Spell.coffee +++ b/app/views/play/level/tome/Spell.coffee @@ -164,7 +164,7 @@ module.exports = class Spell createAether: (thang) -> writable = @permissions.readwrite.length > 0 and not @isAISource - skipProtectAPI = @skipProtectAPI or not writable + skipProtectAPI = @skipProtectAPI or not writable or @levelType in ['game-dev'] problemContext = @createProblemContext thang includeFlow = (@levelType in ['hero', 'hero-ladder', 'hero-coop', 'course', 'course-ladder', 'game-dev']) and not skipProtectAPI aetherOptions = createAetherOptions From 6cd1bfac7155c3d4eb332dcbdf2cbdd6967d9b9b Mon Sep 17 00:00:00 2001 From: Diego Toala Date: Tue, 14 Jun 2016 05:29:25 -0500 Subject: [PATCH 2/3] Update es-419.coffee (#3734) I want to contribute translating to Spanish (Latam). This is a test to know I am doing right. --- app/locale/es-419.coffee | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index e765d040e..443f55a6e 100644 --- a/app/locale/es-419.coffee +++ b/app/locale/es-419.coffee @@ -265,13 +265,13 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip school_name_placeholder: "Ejemplo: High School, Springfield, IL" or_sign_up_with: "o conectate a travez de:" connected_gplus_header: "Te haz conectado exitosamente a travez de Google+!" -# connected_gplus_p: "Finish signing up so you can log in con your Google+ cuenta." -# gplus_exists: "You already have an cuenta associated con Google+!" + connected_gplus_p: "Termina el registro para que inicies sesión con tu cuenta de Google+." + gplus_exists: "Ya tienes asociada una cuenta con Google+!" connected_facebook_header: "Te haz conectado exitosamente a travez de Facebook!" -# connected_facebook_p: "Finish signing up so you can log in con your Facebook cuenta." -# facebook_exists: "You already have an cuenta associated con Facebook!" -# hey_students: "Estudiantes, enter the class code from your maestro." - birthday: "Compleaños" + connected_facebook_p: "Termina el registro para que inicies sesión con tu cuenta de Facebook." + facebook_exists: "Ya tienes asociada una cuenta Facebook!" + hey_students: "Estudiante, ingresa el coódigo de clase de tu maestro." + birthday: "Cumpleaños" recover: recover_account_title: "recuperar cuenta" @@ -853,12 +853,12 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip college_plus: "Universidad o superior" anything_else: "¿Algo más que deberíamos saber?" thanks_header: "¡Gracias por solicitar un presupuesto!" # {change} -# thanks_sub_header: "Gracias por expressing interest in CodeCombat for your school." + thanks_sub_header: "Gracias por el interés de su institución en CodeCombat" #"Gracias por expressing interest in CodeCombat for your school." thanks_p: "Estaremos en contacto pronto. ¿Preguntas? Escríbenos:" # {change} -# back_to_classes: "Back to Clases" + back_to_classes: "Volver a las clases"#"Back to Clases" finish_signup: "Termine la creación de su cuenta de maestro:" -# finish_signup_p: "Create an account to set up a class, add your students, and monitor their progress as they learn computer science." -# signup_with: "Sign up con:" + finish_signup_p: "Crear una cuenta para configurar la clase, agregar estudiante y monitorear su progreso a medida que aprenden programacioón"#"Create an account to set up a class, add your students, and monitor their progress as they learn computer science." + signup_with: "Registrarse con:" connect_with: "Conectar con:" # conversion_warning: "WARNING: Your current account is a Student Account. Once you submit this form, your account will be updated to a Teacher Account." # learn_more_modal: "Teacher accounts on CodeCombat have the ability to monitor student progress, assign enrollments and manage classrooms. Teacher accounts cannot be a part of a classroom - if you are currently enrolled in a class using this account, you will no longer be able to access it once you update to a Teacher Account." From ecb5169ca7e2fef8a3ddec6cb1172dc86a2138a5 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Tue, 14 Jun 2016 10:29:30 -0700 Subject: [PATCH 3/3] Add hintsB to level schema --- app/schemas/models/level.coffee | 9 ++++++++- app/views/i18n/I18NEditLevelView.coffee | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/schemas/models/level.coffee b/app/schemas/models/level.coffee index a6f7a42e7..caca6a8b8 100644 --- a/app/schemas/models/level.coffee +++ b/app/schemas/models/level.coffee @@ -279,7 +279,14 @@ _.extend LevelSchema.properties, documentation: c.object {title: 'Documentation', description: 'Documentation articles relating to this level.', 'default': {specificArticles: [], generalArticles: []}}, specificArticles: c.array {title: 'Specific Articles', description: 'Specific documentation articles that live only in this level.', uniqueItems: true }, SpecificArticleSchema generalArticles: c.array {title: 'General Articles', description: 'General documentation articles that can be linked from multiple levels.', uniqueItems: true}, GeneralArticleSchema - hints: c.array {title: 'Hints', description: 'Hints that will be gradually revealed to the player.', uniqueItems: true }, { + hints: c.array {title: 'Hints', description: 'Tips and tricks to help unstick a player for the level.', uniqueItems: true }, { + type: 'object' + properties: { + body: {type: 'string', title: 'Content', description: 'The body content of the article, in Markdown.', format: 'markdown'} + i18n: {type: 'object', format: 'i18n', props: ['body'], description: 'Help translate this hint'} + } + } + hintsB: c.array {title: 'HintsB', description: '2nd style of hints for a/b testing significant variations', uniqueItems: true }, { type: 'object' properties: { body: {type: 'string', title: 'Content', description: 'The body content of the article, in Markdown.', format: 'markdown'} diff --git a/app/views/i18n/I18NEditLevelView.coffee b/app/views/i18n/I18NEditLevelView.coffee index 6a333ab09..375d67c3a 100644 --- a/app/views/i18n/I18NEditLevelView.coffee +++ b/app/views/i18n/I18NEditLevelView.coffee @@ -34,6 +34,10 @@ module.exports = class I18NEditLevelView extends I18NEditModelView if i18n = hint.i18n name = "Hint #{index+1}" @wrapRow "'#{name}' body", ['body'], hint.body, i18n[lang]?.body, ['documentation', 'hints', index], 'markdown' + for hint, index in @model.get('documentation')?.hintsB ? [] + if i18n = hint.i18n + name = "Hint #{index+1}" + @wrapRow "'#{name}' body", ['body'], hint.body, i18n[lang]?.body, ['documentation', 'hints', index], 'markdown' # sprite dialogues for script, scriptIndex in @model.get('scripts') ? []