From 2004e91e383dc3f59973835fb38366886fa9886f Mon Sep 17 00:00:00 2001 From: Pavan Kate Date: Sun, 25 Jan 2015 06:03:41 +0530 Subject: [PATCH 01/13] #2125 Long player names overflow --- app/styles/common/site-chrome.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/styles/common/site-chrome.sass b/app/styles/common/site-chrome.sass index c9b3c5349..d0b1b2380 100644 --- a/app/styles/common/site-chrome.sass +++ b/app/styles/common/site-chrome.sass @@ -111,7 +111,7 @@ .user-dropdown-header background: #E4CF8C - height: 160px + height: auto padding: 10px text-align: center color: black From 7cb6791a58c3182f0bdc546b9c4bb73476038b3f Mon Sep 17 00:00:00 2001 From: Richard Siwady Date: Tue, 27 Jan 2015 23:16:08 -0600 Subject: [PATCH 02/13] Fixed lua_blurb es-419 translation. --- app/locale/es-419.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index ea76ac31e..e0583a75c 100644 --- a/app/locale/es-419.coffee +++ b/app/locale/es-419.coffee @@ -401,7 +401,7 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip javascript_blurb: "El lenguaje de la web (no es Java)." coffeescript_blurb: "JavaScript pero más bonito." clojure_blurb: "Un Lisp moderno." - lua_blurb: "Lenguaje ara Juegos." + lua_blurb: "Lenguaje para Juegos." io_blurb: "Simple pero oscuro." status: "Estado" weapons: "Armas" From 8d001a6281a1e266c62f59a3a5a35bde1c31f148 Mon Sep 17 00:00:00 2001 From: Richard Siwady Date: Wed, 28 Jan 2015 00:12:40 -0600 Subject: [PATCH 03/13] Update spanish translations for es-419 --- app/locale/es-419.coffee | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index e0583a75c..d1eda2836 100644 --- a/app/locale/es-419.coffee +++ b/app/locale/es-419.coffee @@ -81,7 +81,7 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip awaiting_levels_adventurer_prefix: "Nosotros creamos 5 nuevos niveles cada semana" awaiting_levels_adventurer: "Registrate como un aventurero" awaiting_levels_adventurer_suffix: "para ser el primero en jugar nuevos niveles." -# adjust_volume: "Adjust volume" + adjust_volume: "Ajustar el volumen" choose_your_level: "Elige tu nivel" # The rest of this section is the old play view at /play-old and isn't very important. adventurer_prefix: "Puedes saltar a cualquier nivel de abajo, o discutir los niveles en " adventurer_forum: "el foro del aventurero" @@ -160,10 +160,10 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip date: "Fecha" body: "Cuerpo" version: "Versión" -# pending: "Pending" -# accepted: "Accepted" -# rejected: "Rejected" -# withdrawn: "Withdrawn" + pending: "Pendiente" + accepted: "Aceptado" + rejected: "Rechazado" + withdrawn: "Retirado" submitter: "Emisor" submitted: "Enviado" commit_msg: "Enviar mensaje" @@ -171,10 +171,10 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip version_history: "Historial de Versiones" version_history_for: "Historial de Versiones para: " select_changes: "Selcciona dos cambios abajo para ver la diferencia" -# undo_prefix: "Undo" -# undo_shortcut: "(Ctrl+Z)" -# redo_prefix: "Redo" -# redo_shortcut: "(Ctrl+Shift+Z)" + undo_prefix: "Deshacer" + undo_shortcut: "(Ctrl+Z)" + redo_prefix: "Rehacer" + redo_shortcut: "(Ctrl+Shift+Z)" play_preview: "Mira el avance del nivel" result: "Resultado" results: "Resultados" @@ -198,9 +198,9 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip hard: "Difícil" player: "Jugador" player_level: "Nivel" # Like player level 5, not like level: Dungeons of Kithgard -# warrior: "Warrior" -# ranger: "Ranger" -# wizard: "Wizard" + warrior: "Guerrero" + ranger: "Guardabosques" + wizard: "Mago" units: second: "segundo" @@ -371,13 +371,13 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip subscribe: subscribe_title: "Suscribirse" unsubscribe: "Des-suscribirse" -# confirm_unsubscribe: "Confirm Unsubscribe" -# never_mind: "Never Mind, I Still Love You" -# thank_you_months_prefix: "Thank you for supporting us these last" -# thank_you_months_suffix: "months." -# thank_you: "Thank you for supporting CodeCombat." -# sorry_to_see_you_go: "Sorry to see you go! Please let us know what we could have done better." -# unsubscribe_feedback_placeholder: "O, what have we done?" + confirm_unsubscribe: "Confirmar cancelacion de suscripción" + never_mind: "Olvidalo, Te sigo queriendo" + thank_you_months_prefix: "Gracias por tu apoyo en estos ultimos" + thank_you_months_suffix: "meses." + thank_you: "Gracias por apoyar CodeCombat." + sorry_to_see_you_go: "¡Sentimos que te vayas! Por favor, haznos saber lo que podríamos haber hecho mejor." + unsubscribe_feedback_placeholder: "¿Pero qué hemos hecho?" levels: "Adquirí más practica con un nivel bonus!" heroes: "Héroes más poderosos!" gems: "Bonus de 3500 todos los meses!" @@ -625,12 +625,12 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip revert: "Revertir" revert_models: "Revertir Modelos" pick_a_terrain: "Elije un Terreno" -# dungeon: "Dungeon" -# indoor: "Indoor" -# desert: "Desert" + dungeon: "Calabozo" + indoor: "Interior" + desert: "Desierto" grassy: "Herboso" small: "Pequeño" -# large: "Large" + large: "Grande" fork_title: "Fork de Nueva Versión" fork_creating: "Creando Fork..." generate_terrain: "Generar terreno" @@ -651,9 +651,9 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip level_tab_thangs_all: "Todo" level_tab_thangs_conditions: "Condiciones Iniciales" level_tab_thangs_add: "Agregar Thangs" -# add_components: "Add Components" -# component_configs: "Component Configurations" -# config_thang: "Double click to configure a thang" + add_components: "Agregar Componentes" + component_configs: "Configuraciones del Componente" + config_thang: "Doble clic para configurar un thang" delete: "Borrar" duplicate: "Duplicar" # stop_duplicate: "Stop Duplicate" @@ -691,7 +691,7 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip # achievement_query_goals: "Key achievement off of level goals" # level_completion: "Level Completion" # pop_i18n: "Populate I18N" -# tasks: "Tasks" + tasks: "Tareas" article: edit_btn_preview: "Vista previa" @@ -900,7 +900,7 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip leaderboard: "Clasificación" user_schema: "Esquema de Usuario" user_profile: "Perfil de Usuario" -# patch: "Patch" + patch: "Parche" patches: "Parches" patched_model: "Documento fuente" model: "Modelo" @@ -923,13 +923,13 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip employers: "Empleadores" candidates: "Candidatos" candidate_sessions: "Sesión de candidato" -# user_remark: "User Remark" -# user_remarks: "User Remarks" + user_remark: "Observación del usuario" + user_remarks: "Observaciones del usuario" versions: "Versiones" items: "Items" heroes: "Héroes" achievement: "Logros" -# clas: "CLAs" + clas: "CLAs" play_counts: "Conteo de juegos" feedback: "Feedback" payment_info: "Información de pago" @@ -965,7 +965,7 @@ module.exports = nativeDescription: "Español (América Latina)", englishDescrip archmage_wiki_url: "nuestra wiki de Archimago" opensource_description_suffix: "Para la lista de softwares que hacen al juego posible." practices_title: "Mejores prácticas respetuosas" -# practices_description: "These are our promises to you, the player, in slightly less legalese." + practices_description: "Estas son nuestras promesas hacia ti, el jugador, en términos menos legales." privacy_title: "Privacidad" privacy_description: "No vederemos nada sobre tu información personalWe will not sell any of your personal information." security_title: "Seguridad" From 8cf424f7ef23f2a63261f74a6320d4a7b3087c14 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Wed, 28 Jan 2015 18:16:34 +0000 Subject: [PATCH 04/13] Update pt-PT.coffee --- app/locale/pt-PT.coffee | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/locale/pt-PT.coffee b/app/locale/pt-PT.coffee index a035ff8b4..66400af18 100644 --- a/app/locale/pt-PT.coffee +++ b/app/locale/pt-PT.coffee @@ -323,8 +323,8 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: tip_reusable_software: "Antes de um software poder ser reutilizável, primeiro tem de ser utilizável." tip_optimization_operator: "Todas as linguagens têm um operador de otimização. Na maior parte delas esse operador é ‘//’." tip_lines_of_code: "Medir o progresso em programação pelo número de linhas de código é como medir o progresso da construção de um avião pelo peso. — Bill Gates" -# tip_source_code: "I want to change the world but they would not give me the source code." -# tip_javascript_java: "Java is to JavaScript what Car is to Carpet. - Chris Heilmann" + tip_source_code: "Quero mudar o mundo, mas não há maneira de me darem o código-fonte." + tip_javascript_java: "Java é para JavaScript o mesmo que Carro (Car) para Tapete (Carpet). - Chris Heilmann" game_menu: inventory_tab: "Inventário" @@ -371,13 +371,13 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: subscribe: subscribe_title: "Subscrever" unsubscribe: "Cancelar Subscrição" -# confirm_unsubscribe: "Confirm Unsubscribe" -# never_mind: "Never Mind, I Still Love You" -# thank_you_months_prefix: "Thank you for supporting us these last" -# thank_you_months_suffix: "months." -# thank_you: "Thank you for supporting CodeCombat." -# sorry_to_see_you_go: "Sorry to see you go! Please let us know what we could have done better." -# unsubscribe_feedback_placeholder: "O, what have we done?" + confirm_unsubscribe: "Confirmar Cancelamento da Subscrição" + never_mind: "Não Importa, Gostamos de Ti à Mesma" + thank_you_months_prefix: "Obrigado por nos teres apoiado neste(s) último(s)" + thank_you_months_suffix: "mês(meses)." + thank_you: "Obrigado por apoiares o CodeCombat." + sorry_to_see_you_go: "Lamentamos ver-te partir! Por favor, diz-nos o que podíamos ter feito melhor." + unsubscribe_feedback_placeholder: "Oh, o que fomos fazer?" levels: "Pratica mais com níveis bónus!" heroes: "Heróis mais poderosos!" gems: "3500 gemas de bónus todos os meses!" @@ -865,8 +865,8 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription: price: "Preço" gems: "Gemas" active: "Activa" - subscribed: "Subscrito" - unsubscribed: "Não Subscrito" + subscribed: "Subscrito(a)" + unsubscribed: "Não Subscrito(a)" active_until: "Ativa Até" cost: "Custo" next_payment: "Próximo Pagamento" From d086555fb78bce4b330ac95d4910712573fc79b5 Mon Sep 17 00:00:00 2001 From: nixel2007 Date: Wed, 28 Jan 2015 21:50:16 +0300 Subject: [PATCH 05/13] Update ru.coffee --- app/locale/ru.coffee | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 75727fdc4..aafd0b447 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -323,8 +323,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi tip_reusable_software: "Прежде, чем программное обеспечение станет повторно используемым, оно должно стать в принципе используемым." tip_optimization_operator: "В каждом языке есть оператор оптимизации. В большинстве языков это оператор ‘//’" tip_lines_of_code: "Измерение прогресса программирования в строках кода - это как измерять прогресс построения самолета по его весу. — Bill Gates" -# tip_source_code: "I want to change the world but they would not give me the source code." -# tip_javascript_java: "Java is to JavaScript what Car is to Carpet. - Chris Heilmann" + tip_source_code: "Я хочу изменить мир, но они вряд ли дадут мне исходники." + tip_javascript_java: "Java к JavaScript относится так же, как кол относится к колонке. - Chris Heilmann (перефраз.)" game_menu: inventory_tab: "Инвентарь" @@ -371,13 +371,13 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi subscribe: subscribe_title: "Подпишись" unsubscribe: "Отписаться" -# confirm_unsubscribe: "Confirm Unsubscribe" -# never_mind: "Never Mind, I Still Love You" -# thank_you_months_prefix: "Thank you for supporting us these last" -# thank_you_months_suffix: "months." -# thank_you: "Thank you for supporting CodeCombat." -# sorry_to_see_you_go: "Sorry to see you go! Please let us know what we could have done better." -# unsubscribe_feedback_placeholder: "O, what have we done?" + confirm_unsubscribe: "Подтвердить отмену подписки" + never_mind: "Неважно, Я Все Равно Тебя Люблю" + thank_you_months_prefix: "Спасибо Вам за поддерживание нас в течение последних" + thank_you_months_suffix: "месяцев." + thank_you: "Спасибо за поддержку CodeCombat." + sorry_to_see_you_go: "Жаль, что вы уходите! Пожалуйста, расскажите нам, что мы могли бы сделать лучше." + unsubscribe_feedback_placeholder: "О, что мы наделали?" levels: "Получите больше практики с бонусными уровнями!" heroes: "Более сильные герои!" gems: "3500 бонусных самоцветов каждый месяц!" From 1ff58324360b584b355140dcab2268abff4e16e4 Mon Sep 17 00:00:00 2001 From: nixel2007 Date: Wed, 28 Jan 2015 22:07:19 +0300 Subject: [PATCH 06/13] fix ru.coffee --- app/locale/ru.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index aafd0b447..0e20791d5 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -324,7 +324,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi tip_optimization_operator: "В каждом языке есть оператор оптимизации. В большинстве языков это оператор ‘//’" tip_lines_of_code: "Измерение прогресса программирования в строках кода - это как измерять прогресс построения самолета по его весу. — Bill Gates" tip_source_code: "Я хочу изменить мир, но они вряд ли дадут мне исходники." - tip_javascript_java: "Java к JavaScript относится так же, как кол относится к колонке. - Chris Heilmann (перефраз.)" + tip_javascript_java: "Java к JavaScript относится так же, как кол относится к колготкам. - Chris Heilmann (перефраз.)" game_menu: inventory_tab: "Инвентарь" From fa1b1d1c1fb8eccd07aef3178449c691c1ace1b2 Mon Sep 17 00:00:00 2001 From: yaur Date: Wed, 28 Jan 2015 15:45:18 -0500 Subject: [PATCH 07/13] replace all slashes instead of the first one --- config.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.coffee b/config.coffee index 7b9945fd8..7b8991eb5 100644 --- a/config.coffee +++ b/config.coffee @@ -8,7 +8,7 @@ TRAVIS = process.env.COCO_TRAVIS_TEST #- regJoin replace a single '/' with '[\/\\]' so it can handle either forward or backslash -regJoin = (s) -> new RegExp(s.replace(/\//, '[\\\/\\\\]')) +regJoin = (s) -> new RegExp(s.replace(/\//g, '[\\\/\\\\]')) #- Build the config From 03093fc4a521ae6506d047a23cf61ec1984b916d Mon Sep 17 00:00:00 2001 From: yaur Date: Wed, 28 Jan 2015 17:23:03 -0500 Subject: [PATCH 08/13] Don't match to string literals, because the path seperator is different on windows --- config.coffee | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/config.coffee b/config.coffee index 7b8991eb5..3f520ee87 100644 --- a/config.coffee +++ b/config.coffee @@ -197,12 +197,8 @@ exports.config = modules: definition: (path, data) -> - needHeaders = [ - 'public/javascripts/app.js' - 'public/javascripts/world.js' - 'public/javascripts/whole-app.js' - ] - defn = if path in needHeaders then commonjsHeader else '' + needHeaderExpr = regJoin('^public/javascripts/?(app.js|world.js|whole-app.js)') + defn = if path.match(needHeaderExpr) then commonjsHeader else '' return defn #- Find all .coffee and .jade files in /app From 30f918809091725a08ff5703fb690cb308b1391c Mon Sep 17 00:00:00 2001 From: yaur Date: Wed, 28 Jan 2015 18:33:28 -0500 Subject: [PATCH 09/13] Remove the scheme from help videos so that they maintain the scheme of the calling page --- app/views/play/menu/GuideView.coffee | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/play/menu/GuideView.coffee b/app/views/play/menu/GuideView.coffee index dabbc2abd..aebe363e1 100644 --- a/app/views/play/menu/GuideView.coffee +++ b/app/views/play/menu/GuideView.coffee @@ -94,9 +94,18 @@ module.exports = class LevelGuideView extends CocoView window.tracker?.trackEvent 'Finish help video', level: @levelID, ls: @sessionID, style: @helpVideos[@helpVideosIndex].style @trackedHelpVideoFinish = true + # we wan't to always use the same scheme (HTTP/HTTPS) as the page was loaded with, but don't want to require Artisans to have to remember + # not to include a scheme in help video url + fixupUri = (uri) -> + n = uri.indexOf('/') + if n < 1 + return uri + return uri.slice(n) + setupVideoPlayer: () -> return unless @helpVideos.length > 0 - helpVideoURL = @helpVideos[@helpVideosIndex].url + console.log(@helpVideos[@helpVideosIndex].url) + helpVideoURL = fixupUri(@helpVideos[@helpVideosIndex].url) @setupVimeoVideoPlayer helpVideoURL setupVimeoVideoPlayer: (helpVideoURL) -> From dc39a55cf82b8b65673ab054124e3cb7405149be Mon Sep 17 00:00:00 2001 From: yaur Date: Wed, 28 Jan 2015 18:37:07 -0500 Subject: [PATCH 10/13] remove logging --- app/views/play/menu/GuideView.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/play/menu/GuideView.coffee b/app/views/play/menu/GuideView.coffee index aebe363e1..335d06628 100644 --- a/app/views/play/menu/GuideView.coffee +++ b/app/views/play/menu/GuideView.coffee @@ -104,7 +104,6 @@ module.exports = class LevelGuideView extends CocoView setupVideoPlayer: () -> return unless @helpVideos.length > 0 - console.log(@helpVideos[@helpVideosIndex].url) helpVideoURL = fixupUri(@helpVideos[@helpVideosIndex].url) @setupVimeoVideoPlayer helpVideoURL From c2abefb637bf0f98d90b4736b920e4417decedf9 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Wed, 28 Jan 2015 16:07:24 -0800 Subject: [PATCH 11/13] Updating internal analytics scripts Result of some data sleuthing. They are only used for investigations, and not production aggregation. Hence, a bit ugly and unfinished. --- scripts/analytics/mixpanelGetEvent.py | 184 +++++++++++ scripts/analytics/mixpanelLevelRates.py | 138 ++++++-- .../analytics/mongodb/queries/levelRates.js | 307 +++++++++++------- 3 files changed, 488 insertions(+), 141 deletions(-) create mode 100644 scripts/analytics/mixpanelGetEvent.py diff --git a/scripts/analytics/mixpanelGetEvent.py b/scripts/analytics/mixpanelGetEvent.py new file mode 100644 index 000000000..5a4fd53c5 --- /dev/null +++ b/scripts/analytics/mixpanelGetEvent.py @@ -0,0 +1,184 @@ +# Get mixpanel event data via export API +# Useful for debugging Mixpanel data weirdness + +targetLevels = ['dungeons-of-kithgard', 'the-raised-sword', 'endangered-burl'] +targetLevels = ['dungeons-of-kithgard'] +eventFunnel = ['Started Level', 'Saw Victory'] +# eventFunnel = ['Saw Victory'] +# eventFunnel = ['Started Level'] + +import sys +from pprint import pprint +from datetime import datetime, timedelta +from mixpanel import Mixpanel + +try: + import json +except ImportError: + import simplejson as json + +# NOTE: mixpanel dates are by day and inclusive +# E.g. '2014-12-08' is any date that day, up to 2014-12-09 12am + +if __name__ == '__main__': + if not len(sys.argv) is 3: + print "Script format: