From 14931100434d276021b0453b9148496e8e4e475b Mon Sep 17 00:00:00 2001 From: Gabriel Cesar Date: Tue, 14 Oct 2014 12:43:44 -0300 Subject: [PATCH 1/3] pt-BR.coffee updated. --- app/locale/pt-BR.coffee | 134 ++++++++++++++++++++-------------------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/app/locale/pt-BR.coffee b/app/locale/pt-BR.coffee index 999311233..407e13abf 100644 --- a/app/locale/pt-BR.coffee +++ b/app/locale/pt-BR.coffee @@ -107,13 +107,13 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: send_password: "Recuperar senha" recovery_sent: "Email de recuperação enviado." -# items: -# armor: "Armor" -# hands: "Hands" -# accessories: "Accessories" -# books: "Books" -# minions: "Minions" -# misc: "Misc" + items: + armor: "Armadura" + hands: "Mãos" + accessories: "Accessórios" + books: "Livross" + minions: "Minions" + misc: "Diversos" common: loading: "Carregando..." @@ -128,8 +128,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: fork: "Fork" play: "Jogar" # When used as an action verb, like "Play next level" retry: "Tente novamente" -# watch: "Watch" -# unwatch: "Unwatch" + watch: "Observar" + unwatch: "Não Observar" submit_patch: "Enviar arranjo" general: @@ -182,15 +182,15 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: play_level: done: "Pronto" home: "Início" -# skip: "Skip" -# game_menu: "Game Menu" + skip: "Pular" + game_menu: "Menu do Jogo" guide: "Guia" restart: "Reiniciar" goals: "Objetivos" -# goal: "Goal" + goal: "Objetivo" success: "Sucesso!" incomplete: "Incompleto" -# timed_out: "Ran out of time" + timed_out: "Tempo esgotado" failing: "Falta" action_timeline: "Linha do Tempo das Ações" click_to_select: "Clique em um personagem para selecioná-lo." @@ -204,7 +204,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: victory_rate_the_level: "Avalie o estágio: " # Only in old-style levels. victory_return_to_ladder: "Retornar para a Ladder" victory_play_next_level: "Jogar o próximo estágio" # Only in old-style levels. -# victory_play_continue: "Continue" + victory_play_continue: "Continue" victory_go_home: "Ir à página inicial" # Only in old-style levels. victory_review: "Diga-nos mais!" # Only in old-style levels. victory_hour_of_code_done: "Terminou?" @@ -219,23 +219,23 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: # tome_cast_button_run: "Run" # tome_cast_button_running: "Running" # tome_cast_button_ran: "Ran" -# tome_submit_button: "Submit" + tome_submit_button: "Enviar" # tome_reload_method: "Reload original code for this method" # Title text for individual method reload button. -# tome_select_method: "Select a Method" + tome_select_method: "Selecione um Método" # tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methdos). tome_select_a_thang: "Selecione alguém para " tome_available_spells: "Feitiços Disponíveis" -# tome_your_skills: "Your Skills" + tome_your_skills: "Suas habilidades" hud_continue: "Continue (tecle Shift+Space)" spell_saved: "Feitiço Salvo" skip_tutorial: "Pular (esc)" -# keyboard_shortcuts: "Key Shortcuts" + keyboard_shortcuts: "Teclas de atalho" loading_ready: "Pronto!" -# loading_start: "Start Level" -# time_current: "Now:" -# time_total: "Max:" -# time_goto: "Go to:" -# infinite_loop_try_again: "Try Again" + loading_start: "Iniciar fase" + time_current: "Agora:" + time_total: "Máximo:" + time_goto: "Ir para:" + infinite_loop_try_again: "Tentar novamente" # infinite_loop_reset_level: "Reset Level" # infinite_loop_comment_out: "Comment Out My Code" # tip_toggle_play: "Toggle play/paused with Ctrl+P." @@ -270,39 +270,39 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: customize_wizard: "Personalize o feiticeiro" game_menu: -# inventory_tab: "Inventory" -# choose_hero_tab: "Restart Level" -# save_load_tab: "Save/Load" -# options_tab: "Options" -# guide_tab: "Guide" + inventory_tab: "Inventário" + choose_hero_tab: "Reiniciar Nível" + save_load_tab: "Salvar/Carregar" + options_tab: "Opções" + guide_tab: "Guia" multiplayer_tab: "Multijogador" -# inventory_caption: "Equip your hero" + inventory_caption: "Equipar seu herói" # choose_hero_caption: "Choose hero, language" # save_load_caption: "... and view history" # options_caption: "Configure settings" -# guide_caption: "Docs and tips" + guide_caption: "Documentos e dicas" # multiplayer_caption: "Play with friends!" # inventory: # choose_inventory: "Equip Items" -# choose_hero: -# choose_hero: "Choose Your Hero" -# programming_language: "Programming Language" -# programming_language_description: "Which programming language do you want to use?" -# status: "Status" -# weapons: "Weapons" -# health: "Health" -# speed: "Speed" + choose_hero: + choose_hero: "Escolha seu Herói" + programming_language: "Linguagem de Programação" + programming_language_description: "Qual Linguagem de Programação você gostaria de usar?" + status: "Status" + weapons: "Armas" + health: "Vida" + speed: "Velocidade" -# save_load: -# granularity_saved_games: "Saved" -# granularity_change_history: "History" + save_load: + granularity_saved_games: "Salvo" + granularity_change_history: "Histórico" options: # general_options: "General Options" # Check out the Options tab in the Game Menu while playing a level -# volume_label: "Volume" -# music_label: "Music" + volume_label: "Volume" + music_label: "Música" # music_description: "Turn background music on/off." # autorun_label: "Autorun" # autorun_description: "Control automatic code execution." @@ -333,21 +333,21 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: why_paragraph_2_italic_caps: "NÃO MÃE EU PRECISO TERMINAR ESSE NÍVEL!" why_paragraph_2_suffix: "É por isso que o CodeCombat é um jogo multijogador, não uma aula que imita um jogo. Nós não iremos parar até você não conseguir parar--mas agora, isso é uma coisa boa." why_paragraph_3: "Se você vai se viciar em algum jogo, fique viciado nesse e se torne um dos magos da era da tecnologia." -# press_title: "Bloggers/Press" -# press_paragraph_1_prefix: "Want to write about us? Feel free to download and use all of the resources included in our" -# press_paragraph_1_link: "press packet" -# press_paragraph_1_suffix: ". All logos and images may be used without contacting us directly." -# team: "Team" -# george_title: "CEO" -# george_blurb: "Businesser" -# scott_title: "Programmer" -# scott_blurb: "Reasonable One" -# nick_title: "Programmer" -# nick_blurb: "Motivation Guru" -# michael_title: "Programmer" -# michael_blurb: "Sys Admin" -# matt_title: "Programmer" -# matt_blurb: "Bicyclist" + press_title: "Bloggers/Imprensa" + press_paragraph_1_prefix: "Quer escrever sobre nós? Fique à vontade para baixar e usar todos recursos inclusos em nosso" + press_paragraph_1_link: "Midia Kit" + press_paragraph_1_suffix: ". Todas as logomarcas e imagens podem ser usadas sem nos contactar previamente." + team: "Time" + george_title: "CEO" + george_blurb: "Administrador" # Businesser + scott_title: "Programador" + scott_blurb: "O Sensato" + nick_title: "Programador" + nick_blurb: "Guru Motivacional" + michael_title: "Programador" + michael_blurb: "Administrador de Sistemas" + matt_title: "PProgramador" + matt_blurb: "O Ciclista" versions: save_version_title: "Salvar nova versão" @@ -410,12 +410,12 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: wizard_tab: "Feiticeiro" wizard_color: "Cor das Roupas do Feiticeiro" -# keyboard_shortcuts: -# keyboard_shortcuts: "Keyboard Shortcuts" -# space: "Space" -# enter: "Enter" -# escape: "Escape" -# shift: "Shift" + keyboard_shortcuts: + keyboard_shortcuts: "Atalhos do Teclado" + space: "Espaço" + enter: "Enter" + escape: "Esc" + shift: "Shift" # cast_spell: "Cast current spell." # run_real_time: "Run in real time." # continue_script: "Continue past current script." @@ -443,8 +443,8 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: # find_us: "Find us on these sites" # social_blog: "Read the CodeCombat blog on Sett" # social_discource: "Join the discussion on our Discourse forum" -# social_facebook: "Like CodeCombat on Facebook" -# social_twitter: "Follow CodeCombat on Twitter" + social_facebook: "Curta o CodeCombat no Facebook" + social_twitter: "Siga o CodeCombat no Twitter" # social_gplus: "Join CodeCombat on Google+" # social_hipchat: "Chat with us in the public CodeCombat HipChat room" contribute_to_the_project: "Contribuir para o projeto" @@ -472,7 +472,7 @@ module.exports = nativeDescription: "português do Brasil", englishDescription: back: "Voltar" revert: "Reverter" revert_models: "Reverter Modelos" -# pick_a_terrain: "Pick A Terrain" + pick_a_terrain: "Escolha um Terreno" small: "Pequeno" # grassy: "Grassy" # fork_title: "Fork New Version" From 9826311656a9be585ab14683e893f5b0623c0f32 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 15 Oct 2014 10:28:29 -0700 Subject: [PATCH 2/3] Started playing menu music on WorldMapView. Only go full-screen on squat windows where we really need it (see #1669). --- app/lib/surface/MusicPlayer.coffee | 1 + app/views/play/WorldMapView.coffee | 13 +++++++++++++ app/views/play/modal/PlayLevelModal.coffee | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/lib/surface/MusicPlayer.coffee b/app/lib/surface/MusicPlayer.coffee index 2a26e1b4a..ddedecbf6 100644 --- a/app/lib/surface/MusicPlayer.coffee +++ b/app/lib/surface/MusicPlayer.coffee @@ -77,4 +77,5 @@ module.exports = class MusicPlayer extends CocoClass destroy: -> me.off 'change:music', @onMusicSettingChanged, @ + @fadeOutCurrentMusic() super() diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index eea4fa639..dff84567f 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -5,6 +5,8 @@ CocoCollection = require 'collections/CocoCollection' AudioPlayer = require 'lib/AudioPlayer' PlayLevelModal = require 'views/play/modal/PlayLevelModal' ThangType = require 'models/ThangType' +MusicPlayer = require 'lib/surface/MusicPlayer' +storage = require 'lib/storage' class LevelSessionsCollection extends CocoCollection url: '' @@ -37,6 +39,9 @@ module.exports = class WorldMapView extends RootView @getLevelPlayCounts() $(window).on 'resize', @onWindowResize @playAmbientSound() + @probablyCachedMusic = storage.load("loaded-menu-music-#{@terrain}") + musicDelay = if @probablyCachedMusic then 1000 else 10000 + @playMusicTimeout = _.delay (=> @playMusic() unless @destroyed), musicDelay @preloadTopHeroes() @hadEverChosenHero = me.get('heroConfig')?.thangType @@ -45,6 +50,8 @@ module.exports = class WorldMapView extends RootView if ambientSound = @ambientSound # Doesn't seem to work; stops immediately. createjs.Tween.get(ambientSound).to({volume: 0.0}, 1500).call -> ambientSound.stop() + @musicPlayer?.destroy() + clearTimeout @playMusicTimeout super() getLevelPlayCounts: -> @@ -202,6 +209,12 @@ module.exports = class WorldMapView extends RootView @ambientSound = createjs.Sound.play src, loop: -1, volume: 0.1 createjs.Tween.get(@ambientSound).to({volume: 1.0}, 1000) + playMusic: -> + @musicPlayer = new MusicPlayer() + musicFile = {Dungeon: '/music/music-menu-dungeon', Grass: '/music/music-menu-grass'}[@terrain] + Backbone.Mediator.publish 'music-player:play-music', play: true, file: musicFile + storage.save("loaded-menu-music-#{@terrain}", true) unless @probablyCachedMusic + preloadTopHeroes: -> for heroID in ['captain', 'knight'] url = "/db/thang.type/#{ThangType.heroes[heroID]}/version" diff --git a/app/views/play/modal/PlayLevelModal.coffee b/app/views/play/modal/PlayLevelModal.coffee index 167b39c9f..dba101b58 100644 --- a/app/views/play/modal/PlayLevelModal.coffee +++ b/app/views/play/modal/PlayLevelModal.coffee @@ -106,7 +106,7 @@ module.exports = class PlayLevelModal extends ModalView return if @$el.find('#play-level-button').prop 'disabled' @showLoading() ua = navigator.userAgent.toLowerCase() - unless hasGoneFullScreenOnce or (/safari/.test(ua) and not /chrome/.test(ua)) + unless hasGoneFullScreenOnce or (/safari/.test(ua) and not /chrome/.test(ua)) or $(window).height() >= 658 # Min vertical resolution needed at 1366px wide @toggleFullscreen() hasGoneFullScreenOnce = true @updateConfig => From d3f35f024adfd3972b145c1f6df94a28b2bd731a Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Wed, 15 Oct 2014 10:33:33 -0700 Subject: [PATCH 3/3] Fixed #1665. Fixed #1667. --- app/views/play/WorldMapView.coffee | 1 + app/views/play/modal/PlayLevelModal.coffee | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index dff84567f..0bcb43334 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -136,6 +136,7 @@ module.exports = class WorldMapView extends RootView levelID = $(e.target).parents('.level').data('level-id') @$levelInfo = @$el.find(".level-info-container[data-level-id=#{levelID}]").show() @adjustLevelInfoPosition e + @endHighlight() onMouseLeaveLevel: (e) -> return if application.isIPadApp diff --git a/app/views/play/modal/PlayLevelModal.coffee b/app/views/play/modal/PlayLevelModal.coffee index dba101b58..d4b700599 100644 --- a/app/views/play/modal/PlayLevelModal.coffee +++ b/app/views/play/modal/PlayLevelModal.coffee @@ -101,6 +101,7 @@ module.exports = class PlayLevelModal extends ModalView @chooseHeroView.$el.add('#choose-inventory-button, #choose-hero-header').removeClass 'secret' @inventoryView.$el.add('#choose-hero-button, #play-level-button, #choose-inventory-header').addClass 'secret' @chooseHeroView.onShown() + @inventoryView.endHighlight() onClickPlayLevel: (e) -> return if @$el.find('#play-level-button').prop 'disabled'