Merge branch 'master' into production

This commit is contained in:
Nick Winter 2014-11-29 16:03:09 -08:00
commit 4d0e50b91e
22 changed files with 44 additions and 31 deletions

View file

@ -17,6 +17,12 @@ module.exports = ModuleLoader = class ModuleLoader extends CocoClass
@loaded = {} @loaded = {}
@queue = new createjs.LoadQueue() @queue = new createjs.LoadQueue()
@queue.on('fileload', @onFileLoad, @) @queue.on('fileload', @onFileLoad, @)
wrapped = _.wrap window.require, (func, name, loaderPath) ->
# vendor libraries aren't actually wrapped with common.js, so short circuit those requires
return {} if _.string.startsWith(name, 'vendor/')
return func(name, loaderPath)
_.extend wrapped, window.require # for functions like 'list'
window.require = wrapped
load: (path, first=true) -> load: (path, first=true) ->
if first if first

View file

@ -56,7 +56,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
confirm: "Confirmar" confirm: "Confirmar"
owned: "Obtido" # For items you own owned: "Obtido" # For items you own
locked: "Bloqueado" locked: "Bloqueado"
# purchasable: "Purchasable" # For a hero you unlocked but haven't purchased purchasable: "Adquirível" # For a hero you unlocked but haven't purchased
available: "Disponível" available: "Disponível"
skills_granted: "Habilidades Garantidas" # Property documentation details skills_granted: "Habilidades Garantidas" # Property documentation details
heroes: "Heróis" # Tooltip on hero shop button from /play heroes: "Heróis" # Tooltip on hero shop button from /play
@ -247,7 +247,7 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
tome_select_a_thang: "Seleciona Alguém para " tome_select_a_thang: "Seleciona Alguém para "
tome_available_spells: "Feitiços Disponíveis" tome_available_spells: "Feitiços Disponíveis"
tome_your_skills: "As Tuas Habilidades" tome_your_skills: "As Tuas Habilidades"
# tome_help: "Help" tome_help: "Ajuda"
tome_current_method: "Método Atual" tome_current_method: "Método Atual"
hud_continue_short: "Continuar" hud_continue_short: "Continuar"
code_saved: "Código Guardado" code_saved: "Código Guardado"
@ -327,9 +327,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
purchasing: "A adquirir..." purchasing: "A adquirir..."
declined: "O teu cartão foi recusado." declined: "O teu cartão foi recusado."
retrying: "Erro do servidor, a tentar novamente." retrying: "Erro do servidor, a tentar novamente."
# prompt_title: "Not Enough Gems" prompt_title: "Sem Gemas Suficientes"
# prompt_body: "Do you want to get more?" prompt_body: "Queres obter mais?"
# prompt_button: "Enter Shop" prompt_button: "Entra na Loja"
choose_hero: choose_hero:
choose_hero: "Escolhe o Teu Herói" choose_hero: "Escolhe o Teu Herói"
@ -355,9 +355,9 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
range: "Alcance" # As in "attack or visual range" range: "Alcance" # As in "attack or visual range"
blocks: "Bloqueia" # As in "this shield blocks this much damage" blocks: "Bloqueia" # As in "this shield blocks this much damage"
skills: "Habilidades" skills: "Habilidades"
# available_for_purchase: "Available for Purchase" available_for_purchase: "Disponível para Aquirir"
# level_to_unlock: "Level to unlock:" level_to_unlock: "Nível para desbloquear:"
# restricted_to_certain_heroes: "Only certain heroes can play this level." restricted_to_certain_heroes: "Apenas certos heróis podem jogar este nível."
skill_docs: skill_docs:
writable: "escrevível" # Hover over "attack" in Your Skills while playing a level to see most of this writable: "escrevível" # Hover over "attack" in Your Skills while playing a level to see most of this
@ -793,13 +793,13 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
account: account:
recently_played: "Jogados Recentemente" recently_played: "Jogados Recentemente"
no_recent_games: "Sem jogos jogados nas passadas duas semanas." no_recent_games: "Sem jogos jogados nas passadas duas semanas."
# payments: "Payments" payments: "Pagamentos"
# service_apple: "Apple" service_apple: "Apple"
# service_web: "Web" service_web: "Web"
# paid_on: "Paid On" paid_on: "Pago Em"
# service: "Service" service: "Serviço"
# price: "Price" price: "Preço"
# gems: "Gems" gems: "Gemas"
loading_error: loading_error:
could_not_load: "Erro ao carregar do servidor" could_not_load: "Erro ao carregar do servidor"
@ -932,16 +932,16 @@ module.exports = nativeDescription: "Português (Portugal)", englishDescription:
# use_list_2: "If used on a website, include a link near the usage, for example underneath an image, or in a general attributions page where you might also mention other Creative Commons works and open source software being used on the site. Something that's already clearly referencing CodeCombat, such as a blog post mentioning CodeCombat, does not need some separate attribution." # use_list_2: "If used on a website, include a link near the usage, for example underneath an image, or in a general attributions page where you might also mention other Creative Commons works and open source software being used on the site. Something that's already clearly referencing CodeCombat, such as a blog post mentioning CodeCombat, does not need some separate attribution."
# art_paragraph_2: "If the content being used is created not by CodeCombat but instead by a user of codecombat.com, attribute them instead, and follow attribution directions provided in that resource's description if there are any." # art_paragraph_2: "If the content being used is created not by CodeCombat but instead by a user of codecombat.com, attribute them instead, and follow attribution directions provided in that resource's description if there are any."
rights_title: "Direitos Reservados" rights_title: "Direitos Reservados"
# rights_desc: "All rights are reserved for Levels themselves. This includes" rights_desc: "Todos os direitos estão reservados aos próprios Níveis. Isto inclui"
rights_scripts: "Scripts" rights_scripts: "Scripts"
rights_unit: "Configuração da unidade" rights_unit: "Configurações das unidades"
rights_description: "Descrição" rights_description: "Descrições"
# rights_writings: "Writings" rights_writings: "Textos"
# rights_media: "Media (sounds, music) and any other creative content made specifically for that Level and not made generally available when creating Levels." rights_media: "Mídia (sons, música) e quaisquer outros conteúdos criativos feitos especificamente para esse Nível e que não foram disponibilizados para a criação de Níveis."
# rights_clarification: "To clarify, anything that is made available in the Level Editor for the purpose of making levels is under CC, whereas the content created with the Level Editor or uploaded in the course of creation of Levels is not." # rights_clarification: "To clarify, anything that is made available in the Level Editor for the purpose of making levels is under CC, whereas the content created with the Level Editor or uploaded in the course of creation of Levels is not."
# nutshell_title: "In a Nutshell" nutshell_title: "Resumidamente"
# nutshell_description: "Any resources we provide in the Level Editor are free to use as you like for creating Levels. But we reserve the right to restrict distribution of the Levels themselves (that are created on codecombat.com) so that they may be charged for in the future, if that's what ends up happening." nutshell_description: "Qualquer um dos recursos que fornecemos no Editor de Níveis são de uso livre para criares Níveis. Mas reservamos o direito de distribuição restrita dos próprios Níveis (que são criados em codecombat.com) pelo que podemos cobrar por eles no futuro, se for isso que acabar por acontecer."
# canonical: "The English version of this document is the definitive, canonical version. If there are any discrepencies between translations, the English document takes precedence." canonical: "A versão Inglesa deste documento é a versão definitiva e soberana. Se houver discrepâncias entre traduções, o documento Inglês prevalece."
ladder_prizes: ladder_prizes:
title: "Prémios do Torneio" # This section was for an old tournament and doesn't need new translations now. title: "Prémios do Torneio" # This section was for an old tournament and doesn't need new translations now.

View file

@ -1,5 +1,5 @@
CocoView = require 'views/core/CocoView' CocoView = require 'views/core/CocoView'
template = require 'templates/account/job_profile' template = require 'templates/account/job-profile-treema-view'
{me} = require 'core/auth' {me} = require 'core/auth'
module.exports = class JobProfileTreemaView extends CocoView module.exports = class JobProfileTreemaView extends CocoView

View file

@ -1,5 +1,5 @@
RootView = require 'views/core/RootView' RootView = require 'views/core/RootView'
template = require 'templates/account/unsubscribe' template = require 'templates/account/unsubscribe-view'
{me} = require 'core/auth' {me} = require 'core/auth'
module.exports = class UnsubscribeView extends RootView module.exports = class UnsubscribeView extends RootView

View file

@ -1,5 +1,5 @@
CocoView = require 'views/core/CocoView' CocoView = require 'views/core/CocoView'
template = require 'templates/account/wizard_settings' template = require 'templates/account/wizard-settings-view'
{me} = require 'core/auth' {me} = require 'core/auth'
ThangType = require 'models/ThangType' ThangType = require 'models/ThangType'
SpriteBuilder = require 'lib/sprites/SpriteBuilder' SpriteBuilder = require 'lib/sprites/SpriteBuilder'

View file

@ -2,6 +2,8 @@ RootView = require 'views/core/RootView'
template = require 'templates/admin/growth' template = require 'templates/admin/growth'
RealTimeCollection = require 'collections/RealTimeCollection' RealTimeCollection = require 'collections/RealTimeCollection'
require 'vendor/d3'
# Growth View ################### # Growth View ###################
# #
# Display interesting growth data. # Display interesting growth data.

View file

@ -1,5 +1,5 @@
ModalView = require 'views/core/ModalView' ModalView = require 'views/core/ModalView'
template = require 'templates/modal/wizard_settings' template = require 'templates/modal/wizard-settings-modal'
WizardLank = require 'lib/surface/WizardLank' WizardLank = require 'lib/surface/WizardLank'
ThangType = require 'models/ThangType' ThangType = require 'models/ThangType'
{me} = require 'core/auth' {me} = require 'core/auth'

View file

@ -7,6 +7,7 @@ User = require 'models/User'
LeaderboardCollection = require 'collections/LeaderboardCollection' LeaderboardCollection = require 'collections/LeaderboardCollection'
{teamDataFromLevel} = require './utils' {teamDataFromLevel} = require './utils'
ModelModal = require 'views/modal/ModelModal' ModelModal = require 'views/modal/ModelModal'
require 'vendor/d3'
HIGHEST_SCORE = 1000000 HIGHEST_SCORE = 1000000

View file

@ -4,6 +4,7 @@ LevelSession = require 'models/LevelSession'
LeaderboardCollection = require 'collections/LeaderboardCollection' LeaderboardCollection = require 'collections/LeaderboardCollection'
LadderSubmissionView = require 'views/play/common/LadderSubmissionView' LadderSubmissionView = require 'views/play/common/LadderSubmissionView'
{teamDataFromLevel} = require './utils' {teamDataFromLevel} = require './utils'
require 'vendor/d3'
module.exports = class MyMatchesTabView extends CocoView module.exports = class MyMatchesTabView extends CocoView
id: 'my-matches-tab-view' id: 'my-matches-tab-view'

View file

@ -1,9 +1,9 @@
ModalView = require 'views/core/ModalView' ModalView = require 'views/core/ModalView'
template = require 'templates/account/job_profile_code_modal' template = require 'templates/account/job-profile-code-modal'
LevelSessionCodeView = require 'views/common/LevelSessionCodeView' LevelSessionCodeView = require 'views/common/LevelSessionCodeView'
module.exports = class JobProfileCodeModal extends ModalView module.exports = class JobProfileCodeModal extends ModalView
id: 'job_profile_code_modal' id: 'job-profile-code-modal'
template: template template: template
modalWidthPercent: 90 modalWidthPercent: 90
plain: true plain: true

View file

@ -1,5 +1,5 @@
UserView = require 'views/common/UserView' UserView = require 'views/common/UserView'
template = require 'templates/account/profile' template = require 'templates/account/job-profile-view'
User = require 'models/User' User = require 'models/User'
LevelSession = require 'models/LevelSession' LevelSession = require 'models/LevelSession'
CocoCollection = require 'collections/CocoCollection' CocoCollection = require 'collections/CocoCollection'

View file

@ -64,7 +64,7 @@ exports.config =
#- vendor.js, all the vendor libraries #- vendor.js, all the vendor libraries
'javascripts/vendor.js': [ 'javascripts/vendor.js': [
regJoin('^vendor/(?!scripts/Box2d)') regJoin('^vendor/(?!scripts/Box2d)')
regJoin('^bower_components/(?!aether)') regJoin('^bower_components/(?!(aether|d3))')
] ]
#- Other vendor libraries in separate bunches #- Other vendor libraries in separate bunches
@ -76,6 +76,9 @@ exports.config =
'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js') 'javascripts/lodash.js': regJoin('^bower_components/lodash/dist/lodash.js')
'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js') 'javascripts/aether.js': regJoin('^bower_components/aether/build/aether.js')
# Any vendor libraries we don't want the client to load immediately
'javascripts/app/vendor/d3.js': regJoin('^bower_components/d3')
#- test, demo libraries #- test, demo libraries
'javascripts/test-app.js': regJoin('^test/app/') 'javascripts/test-app.js': regJoin('^test/app/')
'javascripts/demo-app.js': regJoin('^test/demo/') 'javascripts/demo-app.js': regJoin('^test/demo/')