diff --git a/app/core/Tracker.coffee b/app/core/Tracker.coffee index b2a31258b..5c987bc72 100644 --- a/app/core/Tracker.coffee +++ b/app/core/Tracker.coffee @@ -17,7 +17,7 @@ module.exports = class Tracker return unless me and @isProduction and analytics? and not me.isAdmin() # https://segment.io/docs/methods/identify traits ?= {} - for userTrait in ['email', 'anonymous', 'dateCreated', 'name', 'wizardColor1', 'testGroupNumber', 'gender'] + for userTrait in ['email', 'anonymous', 'dateCreated', 'name', 'wizardColor1', 'testGroupNumber', 'gender', 'lastLevel'] traits[userTrait] ?= me.get(userTrait) analytics.identify me.id, traits @@ -80,10 +80,10 @@ module.exports = class Tracker # Trimming properties we don't use internally # TODO: delete internalProperites.level for 'Saw Victory' after 2/8/15. Should be using levelID instead. if event in ['Clicked Level', 'Inventory Play', 'Heard Sprite', 'Started Level', 'Saw Victory', 'Click Play', 'Choose Inventory', 'Loaded World Map', 'Homepage Loaded', 'Change Hero'] - delete properties.category + delete properties.category delete properties.label else if event in ['Started Signup', 'Finished Signup', 'Login', 'Facebook Login', 'Google Login'] - delete properties.category + delete properties.category console.log 'Tracking internal analytics event:', event, properties if debugAnalytics request = @supermodel.addRequestResource 'log_event', { diff --git a/app/lib/surface/SegmentedSprite.coffee b/app/lib/surface/SegmentedSprite.coffee index a315775a2..c982a3f60 100644 --- a/app/lib/surface/SegmentedSprite.coffee +++ b/app/lib/surface/SegmentedSprite.coffee @@ -20,14 +20,14 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer @handleTick = undefined @baseMovieClip.inUse = false if @baseMovieClip @removeAllEventListeners() - + # CreateJS.Sprite-like interface - + play: -> @paused = false unless @baseMovieClip and @animLength > 1 stop: -> @paused = true gotoAndPlay: (actionName) -> @goto(actionName, false) gotoAndStop: (actionName) -> @goto(actionName, true) - + goto: (actionName, @paused=true) -> @removeAllChildren() @currentAnimation = actionName @@ -39,11 +39,11 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer action = @thangType.getActions()[actionName] randomStart = _.string.startsWith(actionName, 'move') - + # because the resulting segmented image is set to the size of the movie clip, you can use # the raw registration data without scaling it. reg = action.positions?.registration or @thangType.get('positions')?.registration or {x:0, y:0} - + if action.animation @regX = -reg.x @regY = -reg.y @@ -55,7 +55,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer @frames = (parseInt(f) for f in @frames.split(',')) if @frames @animLength = if @frames then @frames.length else @baseMovieClip.timeline.duration @paused = true if @animLength is 1 - + if @frames if randomStart @currentFrame = @frames[_.random(@frames.length - 1)] @@ -64,7 +64,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer else if randomStart @currentFrame = then Math.floor(Math.random() * @animLength) - else + else @currentFrame = 0 @baseMovieClip.specialGoToAndStop(@currentFrame) @@ -73,13 +73,13 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer movieClip.specialGoToAndStop(movieClip.startPosition) else movieClip.specialGoToAndStop(@currentFrame) - + @takeChildrenFromMovieClip(@baseMovieClip, @) @loop = action.loops isnt false @goesTo = action.goesTo @notifyActionNeedsRender(action) if @actionNotSupported @scaleX = @scaleY = action.scale ? @thangType.get('scale') ? 1 - + else if action.container # All transformations will be done to the child sprite @regX = @regY = 0 @@ -105,17 +105,17 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer sprite.scaleX = sprite.scaleY = 1 / @resolutionFactor @children = [] @addChild(sprite) - + else if action.goesTo @goto(action.goesTo, @paused) return - + @scaleX *= -1 if action.flipX @scaleY *= -1 if action.flipY @baseScaleX = @scaleX @baseScaleY = @scaleY return - + notifyActionNeedsRender: (action) -> @lank?.trigger('action-needs-render', @lank, action) @@ -127,7 +127,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer mc.gotoAndStop(mc.currentFrame+0.01) # just to make sure it has its children back @childMovieClips = mc.childMovieClips return mc - + raw = @thangType.get('raw') animData = raw.animations[animationName] @lastAnimData = animData @@ -144,7 +144,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer anim.initialize(mode ? createjs.MovieClip.INDEPENDENT, startPosition ? 0, loops ? true) anim.specialGoToAndStop = specialGoToAndStop - for tweenData in animData.tweens + for tweenData, i in animData.tweens stopped = false tween = createjs.Tween for func in tweenData @@ -162,7 +162,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer anim.frameBounds = (new createjs.Rectangle(bounds...) for bounds in animData.frameBounds) anim.childMovieClips = @childMovieClips - + @spriteSheet.mcPool[key].push(anim) return anim @@ -256,10 +256,10 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer @baseMovieClip.specialGoToAndStop(translatedFrame) for movieClip in @childMovieClips movieClip.specialGoToAndStop(if movieClip.mode is 'single' then movieClip.startPosition else newFrame) - + @children = [] @takeChildrenFromMovieClip(@baseMovieClip, @) - + takeChildrenFromMovieClip: (movieClip, recipientContainer) -> for child in movieClip.childrenCopy if child instanceof createjs.MovieClip @@ -270,7 +270,7 @@ module.exports = class SegmentedSprite extends createjs.SpriteContainer recipientContainer.addChild(childRecipient) else recipientContainer.addChild(child) - + # _getBounds: createjs.SpriteContainer.prototype.getBounds # getBounds: -> @baseMovieClip?.getBounds() or @children[0]?.getBounds() or @_getBounds() diff --git a/app/lib/world/names.coffee b/app/lib/world/names.coffee index e8b954ff8..10f2529cb 100644 --- a/app/lib/world/names.coffee +++ b/app/lib/world/names.coffee @@ -667,3 +667,18 @@ module.exports.thangNames = thangNames = 'Ulna' 'Yorick' ] + 'Ogre Headhunter': [ + 'Bob' + 'Deadtooth' + 'Ez the Cruel' + 'Grroq' + 'Mog' + 'Mogvar' + 'Ral\'thuk' + 'Soth' + 'Ulxx' + 'Ur' + 'Veznyr' + 'Warlegs' + 'Xul Gor' + ] diff --git a/app/locale/es-419.coffee b/app/locale/es-419.coffee index ea76ac31e..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!" @@ -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" @@ -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" 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" diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 75727fdc4..0e20791d5 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 бонусных самоцветов каждый месяц!" diff --git a/app/models/User.coffee b/app/models/User.coffee index e1ef3049b..dbc84e732 100644 --- a/app/models/User.coffee +++ b/app/models/User.coffee @@ -123,19 +123,6 @@ module.exports = class User extends CocoModel application.tracker.identify gemPromptGroup: @gemPromptGroup unless me.isAdmin() @gemPromptGroup - getSubscribeCopyGroup: -> - # A/B Testing alternate subscribe modal copy - return @subscribeCopyGroup if @subscribeCopyGroup - group = me.get('testGroupNumber') % 6 - @subscribeCopyGroup = switch group - when 0, 1, 2 then 'original' - when 3, 4, 5 then 'new' - if (not @get('preferredLanguage') or /^en/.test(@get('preferredLanguage'))) and not me.isAdmin() - application.tracker.identify subscribeCopyGroup: @subscribeCopyGroup - else - @subscribeCopyGroup = 'original' - @subscribeCopyGroup - getVideoTutorialStylesIndex: (numVideos=0)-> # A/B Testing video tutorial styles # Not a constant number of videos available (e.g. could be 0, 1, 3, or 4 currently) 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 diff --git a/app/styles/modal/subscribe-modal.sass b/app/styles/modal/subscribe-modal.sass index 8b3b24dbd..96a89f967 100644 --- a/app/styles/modal/subscribe-modal.sass +++ b/app/styles/modal/subscribe-modal.sass @@ -18,12 +18,6 @@ top: -61px left: 0px - #subscribe-gems - position: absolute - top: 155px - right: 65px - - //- Header h1 position: absolute @@ -37,7 +31,7 @@ text-shadow: black 4px 4px 0, black -4px -4px 0, black 4px -4px 0, black -4px 4px 0, black 4px 0px 0, black 0px -4px 0, black -4px 0px 0, black 0px 4px 0, black 6px 6px 6px font-variant: normal text-transform: uppercase - + //- Close modal button @@ -57,7 +51,7 @@ &:hover color: yellow - + //- Selling points #selling-points @@ -70,7 +64,7 @@ color: black font-family: $headings-font-family font-size: 18px - + .point width: 150px overflow: none @@ -85,22 +79,6 @@ text-decoration: underline cursor: pointer - #selling-points-BTest - position: absolute - left: 65px - top: 150px - width: 500px - font-weight: normal - line-height: 18px - color: black - font-family: $headings-font-family - font-size: 18px - - .point - overflow: none - text-align: left - margin: 20px - .popover z-index: 1050 @@ -138,7 +116,7 @@ padding: 2px 0 0 2px color: white - + //- Errors .alert @@ -155,7 +133,7 @@ html.no-borderimage #subscribe-modal background-image: url(/images/level/code_toolbar_submit_button_active.png) background-size: 100% 100% padding: 7px 10px 10px 10px - + &:hover background-image: url(/images/level/code_toolbar_submit_button_zazz.png) border: 0 @@ -164,4 +142,3 @@ html.no-borderimage #subscribe-modal background-image: url(/images/level/code_toolbar_submit_button_zazz_pressed.png) padding: 9px 8px 8px 12px border: 0 - diff --git a/app/templates/core/subscribe-modal.jade b/app/templates/core/subscribe-modal.jade index ad308192c..ecf13ba2d 100644 --- a/app/templates/core/subscribe-modal.jade +++ b/app/templates/core/subscribe-modal.jade @@ -7,39 +7,24 @@ #retrying-alert.alert.alert-danger(data-i18n="buy_gems.retrying") else - if BTest - img(src="/images/pages/play/modal/subscribe-background-blank.png")#subscribe-background - img(src="/images/pages/play/modal/subscribe-gems.png")#subscribe-gems - else - img(src="/images/pages/play/modal/subscribe-background.png")#subscribe-background - + img(src="/images/pages/play/modal/subscribe-background.png")#subscribe-background + h1(data-i18n="subscribe.subscribe_title") Subscribe div#close-modal span.glyphicon.glyphicon-remove - if BTest - #selling-points-BTest - #point-levels.point - .blurb(style="font-style:italic") "Great product ... I have been looking for a good tool to teach my kids programming." - #point-heroes.point - .blurb Join the CodeCombat subscription and get even more learn-to-code goodness! - #point-gems.point - .blurb For $#{price}/mo, you'll get access to bonus levels and 3500 extra gems per month! Players who complete bonus levels learn more programming and advance further in the game. - #point-items.point - .blurb There's no risk: 100% money back guarantee. - else - #selling-points - #point-levels.point - .blurb(data-i18n="subscribe.levels") - #point-heroes.point - .blurb(data-i18n="subscribe.heroes") - #point-gems.point - .blurb(data-i18n="subscribe.gems") - #point-items.point - .blurb(data-i18n="subscribe.items") + #selling-points + #point-levels.point + .blurb(data-i18n="subscribe.levels") + #point-heroes.point + .blurb(data-i18n="subscribe.heroes") + #point-gems.point + .blurb(data-i18n="subscribe.gems") + #point-items.point + .blurb(data-i18n="subscribe.items") - #parents-info(data-i18n="subscribe.parents") + #parents-info(data-i18n="subscribe.parents") button.btn.btn-lg.btn-illustrated.purchase-button(data-i18n="subscribe.subscribe_button") diff --git a/app/views/core/SubscribeModal.coffee b/app/views/core/SubscribeModal.coffee index 1567eb194..f6b1e673b 100644 --- a/app/views/core/SubscribeModal.coffee +++ b/app/views/core/SubscribeModal.coffee @@ -30,10 +30,6 @@ module.exports = class SubscribeModal extends ModalView c.stateMessage = @stateMessage c.price = @product.amount / 100 #c.price = 3.99 # Sale - - # A/B Testing alternate subscription copy - c.BTest = me.getSubscribeCopyGroup() is 'new' - return c afterRender: -> diff --git a/app/views/play/level/PlayLevelView.coffee b/app/views/play/level/PlayLevelView.coffee index dcb21d8e5..e445911dc 100644 --- a/app/views/play/level/PlayLevelView.coffee +++ b/app/views/play/level/PlayLevelView.coffee @@ -286,6 +286,7 @@ module.exports = class PlayLevelView extends RootView if not (@levelLoader.level.get('type') in ['ladder', 'ladder-tutorial']) me.set('lastLevel', @levelID) me.save() + application.tracker?.identify() @saveRecentMatch() if @otherSession @levelLoader.destroy() @levelLoader = null diff --git a/app/views/play/menu/GuideView.coffee b/app/views/play/menu/GuideView.coffee index dabbc2abd..335d06628 100644 --- a/app/views/play/menu/GuideView.coffee +++ b/app/views/play/menu/GuideView.coffee @@ -94,9 +94,17 @@ 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 + helpVideoURL = fixupUri(@helpVideos[@helpVideosIndex].url) @setupVimeoVideoPlayer helpVideoURL setupVimeoVideoPlayer: (helpVideoURL) -> diff --git a/config.coffee b/config.coffee index 7b9945fd8..3f520ee87 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 @@ -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 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: