Merge pull request #1606 from codecombat/master

Master into production.
This commit is contained in:
Nick Winter 2014-09-26 03:54:49 -07:00
commit b48417e8e0
3 changed files with 47 additions and 46 deletions

View file

@ -90,8 +90,8 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
creating: "Creant Compte..." creating: "Creant Compte..."
sign_up: "Registrar-se" sign_up: "Registrar-se"
log_in: "Iniciar sessió amb la teva contrasenya" log_in: "Iniciar sessió amb la teva contrasenya"
# social_signup: "Or, you can sign up through Facebook or G+:" social_signup: "O, pots iniciar sesió desde Facebook o G+:"
# required: "You need to log in before you can go that way." required: "Neccesites iniciar sesió abans ."
home: home:
slogan: "Aprén a programar tot Jugant" slogan: "Aprén a programar tot Jugant"
@ -117,7 +117,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
adventurer_forum: "El fòrum de l'aventurer" adventurer_forum: "El fòrum de l'aventurer"
adventurer_suffix: "." adventurer_suffix: "."
campaign_beginner: "Campanya del principiant" campaign_beginner: "Campanya del principiant"
# campaign_old_beginner: "Old Beginner Campaign" campaign_old_beginner: "Antiga campanya del principiant"
campaign_beginner_description: "... on aprens la bruixeria de la programació." campaign_beginner_description: "... on aprens la bruixeria de la programació."
campaign_dev: "Nivells difícils aleatoris" campaign_dev: "Nivells difícils aleatoris"
campaign_dev_description: "... on aprens a interactuar amb la interfície tot fent coses un pèl més difícils." campaign_dev_description: "... on aprens a interactuar amb la interfície tot fent coses un pèl més difícils."
@ -140,8 +140,8 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
next: "Següent" next: "Següent"
previous: "Anterior" previous: "Anterior"
choose_inventory: "Equipar objectes" choose_inventory: "Equipar objectes"
# older_campaigns: "Older Campaigns" older_campaigns: "Campanyes antigues"
# anonymous: "Anonymous Player" anonymous: "Jugador anònim"
items: items:
armor: "Armadura" armor: "Armadura"
@ -180,13 +180,13 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
group: "Grup" group: "Grup"
clothes: "Roba" clothes: "Roba"
# trim: "Trim" # trim: "Trim"
# cloud: "Cloud" cloud: "Nuvol"
team: "Equip" team: "Equip"
# spell: "Spell" # spell: "Spell"
boots: "Botes" boots: "Botes"
# hue: "Hue" # hue: "Hue"
# saturation: "Saturation" saturation: "Saturació"
# lightness: "Lightness" lightness: "Brillantor"
account_settings: account_settings:
title: "Configuració de la compta" title: "Configuració de la compta"
@ -218,7 +218,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# contribute_page: "contribute page" # contribute_page: "contribute page"
# contribute_suffix: " to find out more." # contribute_suffix: " to find out more."
# email_toggle: "Toggle All" # email_toggle: "Toggle All"
# error_saving: "Error Saving" error_saving: "Error en desar"
saved: "Canvis desats" saved: "Canvis desats"
password_mismatch: "Les contrasenyes no coincideixen." password_mismatch: "Les contrasenyes no coincideixen."
password_repeat: "Siusplau, repetiu la contrasenya." password_repeat: "Siusplau, repetiu la contrasenya."
@ -231,9 +231,9 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
account_profile: account_profile:
settings: "Configuració" settings: "Configuració"
edit_profile: "Modifica el perfil" edit_profile: "Modifica el perfil"
# done_editing: "Done Editing" done_editing: "Acaba l'edició"
# profile_for_prefix: "Profile for " # profile_for_prefix: "Profile for "
# profile_for_suffix: "" profile_for_suffix: ""
# featured: "Featured" # featured: "Featured"
# not_featured: "Not Featured" # not_featured: "Not Featured"
looking_for: "Buscant:" looking_for: "Buscant:"
@ -310,7 +310,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# education_header: "Recount your academic ordeals" # education_header: "Recount your academic ordeals"
# education_blurb: "List your academic ordeals." # education_blurb: "List your academic ordeals."
education_school: "Escola" education_school: "Escola"
# education_school_help: "Name of your school." education_school_help: "Nom de la teva escola."
# education_degree: "Degree" # education_degree: "Degree"
# education_degree_help: "What was your degree and field of study?" # education_degree_help: "What was your degree and field of study?"
# education_duration: "Dates" # education_duration: "Dates"
@ -320,7 +320,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# our_notes: "CodeCombat's Notes" # our_notes: "CodeCombat's Notes"
# remarks: "Remarks" # remarks: "Remarks"
projects: "Projectes" projects: "Projectes"
# projects_header: "Add 3 projects" projects_header: "Afegeix 3 projectes"
# projects_header_2: "Projects (Top 3)" # projects_header_2: "Projects (Top 3)"
# projects_blurb: "Highlight your projects to amaze employers." # projects_blurb: "Highlight your projects to amaze employers."
project_name: "Nom del projecte" project_name: "Nom del projecte"
@ -329,7 +329,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# project_description_help: "Briefly describe the project." # project_description_help: "Briefly describe the project."
project_picture: "Imatge" project_picture: "Imatge"
# project_picture_help: "Upload a 230x115px or larger image showing off the project." # project_picture_help: "Upload a 230x115px or larger image showing off the project."
# project_link: "Link" project_link: "Enllaç"
# project_link_help: "Link to the project." # project_link_help: "Link to the project."
# player_code: "Player Code" # player_code: "Player Code"
@ -342,7 +342,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# filter_visa_yes: "US Authorized" # filter_visa_yes: "US Authorized"
# filter_visa_no: "Not Authorized" # filter_visa_no: "Not Authorized"
# filter_education_top: "Top School" # filter_education_top: "Top School"
# filter_education_other: "Other" filter_education_other: "Altres"
# filter_role_web_developer: "Web Developer" # filter_role_web_developer: "Web Developer"
# filter_role_software_developer: "Software Developer" # filter_role_software_developer: "Software Developer"
# filter_role_mobile_developer: "Mobile Developer" # filter_role_mobile_developer: "Mobile Developer"
@ -351,7 +351,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# filter_experience_junior: "Junior" # filter_experience_junior: "Junior"
# filter_experience_recent_grad: "Recent Grad" # filter_experience_recent_grad: "Recent Grad"
# filter_experience_student: "College Student" # filter_experience_student: "College Student"
# filter_results: "results" filter_results: "resultats"
# start_hiring: "Start hiring." # start_hiring: "Start hiring."
# reasons: "Three reasons you should hire through us:" # reasons: "Three reasons you should hire through us:"
# everyone_looking: "Everyone here is looking for their next opportunity." # everyone_looking: "Everyone here is looking for their next opportunity."
@ -380,7 +380,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
play_level: play_level:
done: "Fet" done: "Fet"
customize_wizard: "Personalitza el teu bruixot" customize_wizard: "Personalitza el teu bruixot"
# home: "Home" home: "Inici"
# skip: "Skip" # skip: "Skip"
game_menu: "Menu de joc" game_menu: "Menu de joc"
guide: "Guia" guide: "Guia"
@ -388,9 +388,9 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
goals: "Objectius" goals: "Objectius"
goal: "Objectiu" goal: "Objectiu"
success: "Exit!" success: "Exit!"
# incomplete: "Incomplete" incomplete: "Incomplet"
# timed_out: "Ran out of time" timed_out: "S'ha acabat el temps"
# failing: "Failing" failing: "Fallant"
# action_timeline: "Action Timeline" # action_timeline: "Action Timeline"
# click_to_select: "Click on a unit to select it." # click_to_select: "Click on a unit to select it."
# reload_title: "Reload All Code?" # reload_title: "Reload All Code?"
@ -404,14 +404,14 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# victory_return_to_ladder: "Return to Ladder" # victory_return_to_ladder: "Return to Ladder"
victory_play_next_level: "Jugar el següent nivell" victory_play_next_level: "Jugar el següent nivell"
victory_play_continue: "Continuar" victory_play_continue: "Continuar"
# victory_go_home: "Go Home" victory_go_home: "Tornar a l'inici"
# victory_review: "Tell us more!" victory_review: "Diguens més!"
# victory_hour_of_code_done: "Are You Done?" # victory_hour_of_code_done: "Are You Done?"
# victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!" # victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!"
guide_title: "Guia" guide_title: "Guia"
# tome_minion_spells: "Your Minions' Spells" # tome_minion_spells: "Your Minions' Spells"
# tome_read_only_spells: "Read-Only Spells" # tome_read_only_spells: "Read-Only Spells"
# tome_other_units: "Other Units" tome_other_units: "Altres unitats"
# tome_cast_button_castable: "Cast Spell" # Temporary, if tome_cast_button_run isn't translated. # tome_cast_button_castable: "Cast Spell" # Temporary, if tome_cast_button_run isn't translated.
# tome_cast_button_casting: "Casting" # Temporary, if tome_cast_button_running isn't translated. # tome_cast_button_casting: "Casting" # Temporary, if tome_cast_button_running isn't translated.
# tome_cast_button_cast: "Spell Cast" # Temporary, if tome_cast_button_ran isn't translated. # tome_cast_button_cast: "Spell Cast" # Temporary, if tome_cast_button_ran isn't translated.
@ -420,15 +420,15 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# tome_cast_button_ran: "Ran" # tome_cast_button_ran: "Ran"
# tome_submit_button: "Submit" # tome_submit_button: "Submit"
# tome_reload_method: "Reload original code for this method" # Title text for individual method reload button. # 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: "Selecciona un mètode"
# tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methdos). # 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: "Select Someone for " # tome_select_a_thang: "Select Someone for "
# tome_available_spells: "Available Spells" # tome_available_spells: "Available Spells"
# tome_your_skills: "Your Skills" # tome_your_skills: "Your Skills"
# hud_continue: "Continue (shift+space)" hud_continue: "Continuar (shift+espai)"
# spell_saved: "Spell Saved" # spell_saved: "Spell Saved"
# skip_tutorial: "Skip (esc)" # skip_tutorial: "Skip (esc)"
# keyboard_shortcuts: "Key Shortcuts" keyboard_shortcuts: "Dreceres del teclat"
# loading_ready: "Ready!" # loading_ready: "Ready!"
loading_start: "Comença el nivell" loading_start: "Comença el nivell"
# tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor." # tip_insert_positions: "Shift+Click a point on the map to insert it into the spell editor."
@ -438,7 +438,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# tip_open_source: "CodeCombat is 100% open source!" # tip_open_source: "CodeCombat is 100% open source!"
# tip_beta_launch: "CodeCombat launched its beta in October, 2013." # tip_beta_launch: "CodeCombat launched its beta in October, 2013."
# tip_js_beginning: "JavaScript is just the beginning." # tip_js_beginning: "JavaScript is just the beginning."
# tip_think_solution: "Think of the solution, not the problem." tip_think_solution: "Pensa en la solució,no en el problema."
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra" # tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra"
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis" # tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis"
# tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra" # tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
@ -462,15 +462,15 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law." # tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law."
# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth" # tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth"
# tip_brute_force: "When in doubt, use brute force. - Ken Thompson" # tip_brute_force: "When in doubt, use brute force. - Ken Thompson"
# time_current: "Now:" time_current: "Ara:"
# time_total: "Max:" # time_total: "Max:"
# time_goto: "Go to:" time_goto: "Ves a:"
infinite_loop_try_again: "Tornar a intentar" infinite_loop_try_again: "Tornar a intentar"
infinite_loop_reset_level: "Reiniciar nivell" infinite_loop_reset_level: "Reiniciar nivell"
# infinite_loop_comment_out: "Comment Out My Code" # infinite_loop_comment_out: "Comment Out My Code"
game_menu: game_menu:
# inventory_tab: "Inventory" inventory_tab: "Inventari"
choose_hero_tab: "Recomençar nivell" choose_hero_tab: "Recomençar nivell"
save_load_tab: "Desa/Carrega" save_load_tab: "Desa/Carrega"
options_tab: "Opcions" options_tab: "Opcions"
@ -480,7 +480,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# choose_hero_caption: "Choose hero, language" # choose_hero_caption: "Choose hero, language"
# save_load_caption: "... and view history" # save_load_caption: "... and view history"
options_caption: "Edita la configuració" options_caption: "Edita la configuració"
# guide_caption: "Docs and tips" guide_caption: "Documents i pistes"
multiplayer_caption: "Juga amb amics!" multiplayer_caption: "Juga amb amics!"
inventory: inventory:
@ -528,7 +528,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# temp: "Temp" # temp: "Temp"
multiplayer: multiplayer:
# multiplayer_title: "Multiplayer Settings" multiplayer_title: "Configuració multijugador"
multiplayer_toggle: "Activar multijugador" multiplayer_toggle: "Activar multijugador"
# multiplayer_toggle_description: "Allow others to join your game." # multiplayer_toggle_description: "Allow others to join your game."
# multiplayer_link_description: "Give this link to anyone to have them join you." # multiplayer_link_description: "Give this link to anyone to have them join you."
@ -577,7 +577,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# clas: "CLAs" # clas: "CLAs"
community: community:
# main_title: "CodeCombat Community" main_title: "Comunitat CodeCombat"
# introduction: "Check out the ways you can get involved below and decide what sounds the most fun. We look forward to working with you!" # introduction: "Check out the ways you can get involved below and decide what sounds the most fun. We look forward to working with you!"
# level_editor_prefix: "Use the CodeCombat" # level_editor_prefix: "Use the CodeCombat"
# level_editor_suffix: "to create and edit levels. Users have created levels for their classes, friends, hackathons, students, and siblings. If create a new level sounds intimidating you can start by forking one of ours!" # level_editor_suffix: "to create and edit levels. Users have created levels for their classes, friends, hackathons, students, and siblings. If create a new level sounds intimidating you can start by forking one of ours!"
@ -592,7 +592,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
social_twitter: "Segueix CodeCombat al Twitter" social_twitter: "Segueix CodeCombat al Twitter"
# social_gplus: "Join CodeCombat on Google+" # social_gplus: "Join CodeCombat on Google+"
# social_hipchat: "Chat with us in the public CodeCombat HipChat room" # social_hipchat: "Chat with us in the public CodeCombat HipChat room"
# contribute_to_the_project: "Contribute to the project" contribute_to_the_project: "Contribueix al projecte"
editor: editor:
# main_title: "CodeCombat Editors" # main_title: "CodeCombat Editors"
@ -611,7 +611,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# generate_terrain: "Generate Terrain" # generate_terrain: "Generate Terrain"
more: "Més" more: "Més"
wiki: "Wiki" wiki: "Wiki"
# live_chat: "Live Chat" live_chat: "Xat en directe"
# level_some_options: "Some Options?" # level_some_options: "Some Options?"
# level_tab_thangs: "Thangs" # level_tab_thangs: "Thangs"
# level_tab_scripts: "Scripts" # level_tab_scripts: "Scripts"
@ -625,7 +625,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# level_tab_thangs_add: "Add Thangs" # level_tab_thangs_add: "Add Thangs"
delete: "Esborrar" delete: "Esborrar"
duplicate: "Duplicar" duplicate: "Duplicar"
# level_settings_title: "Settings" level_settings_title: "Configuració"
# level_component_tab_title: "Current Components" # level_component_tab_title: "Current Components"
# level_component_btn_new: "Create New Component" # level_component_btn_new: "Create New Component"
# level_systems_tab_title: "Current Systems" # level_systems_tab_title: "Current Systems"
@ -665,8 +665,8 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
general: general:
# and: "and" # and: "and"
name: "Nom" name: "Nom"
# date: "Date" date: "Data"
# body: "Body" body: "Cos"
version: "Versió" version: "Versió"
# commit_msg: "Commit Message" # commit_msg: "Commit Message"
# version_history: "Version History" # version_history: "Version History"
@ -1018,7 +1018,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# moved_index: "Moved Index" # moved_index: "Moved Index"
# text_diff: "Text Diff" # text_diff: "Text Diff"
# merge_conflict_with: "MERGE CONFLICT WITH" # merge_conflict_with: "MERGE CONFLICT WITH"
# no_changes: "No Changes" no_changes: "Sense canvis"
user: user:
# stats: "Stats" # stats: "Stats"
@ -1030,7 +1030,7 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
status_completed: "Complet" status_completed: "Complet"
status_unfinished: "Inacabat" status_unfinished: "Inacabat"
no_singleplayer: "Encara no s'han jugat nivells individuals." no_singleplayer: "Encara no s'han jugat nivells individuals."
# no_multiplayer: "No Multiplayer games played yet." no_multiplayer: "Encara no s'han jugat nivells multijugador."
# no_achievements: "No Achievements earned yet." # no_achievements: "No Achievements earned yet."
# favorite_prefix: "Favorite language is " # favorite_prefix: "Favorite language is "
# favorite_postfix: "." # favorite_postfix: "."
@ -1039,10 +1039,10 @@ module.exports = nativeDescription: "Català", englishDescription: "Catalan", tr
# last_earned: "Last Earned" # last_earned: "Last Earned"
# amount_achieved: "Amount" # amount_achieved: "Amount"
# achievement: "Achievement" # achievement: "Achievement"
# category_contributor: "Contributor" category_contributor: "Contribuidor"
# category_miscellaneous: "Miscellaneous" # category_miscellaneous: "Miscellaneous"
category_levels: "Nivells" category_levels: "Nivells"
# category_undefined: "Uncategorized" category_undefined: "Sense categoria"
# current_xp_prefix: "" # current_xp_prefix: ""
current_xp_postfix: " en total" current_xp_postfix: " en total"
# new_xp_prefix: "" # new_xp_prefix: ""

View file

@ -73,6 +73,6 @@ module.exports = class User extends CocoModel
gemsSpent = sum(purchased.heroes) + sum(purchased.items) + sum(purchased.levels) gemsSpent = sum(purchased.heroes) + sum(purchased.items) + sum(purchased.levels)
gemsEarned + gemsPurchased - gemsSpent gemsEarned + gemsPurchased - gemsSpent
earnedHero: (heroOriginal) -> heroOriginal in me.get('earned')?.heroes ? [] earnedHero: (heroOriginal) -> heroOriginal in (me.get('earned')?.heroes ? [])
earnedItem: (itemOriginal) -> itemOriginal in me.get('earned')?.items ? [] earnedItem: (itemOriginal) -> itemOriginal in (me.get('earned')?.items ? [])
earnedLevel: (levelOriginal) -> levelOriginal in me.get('earned')?.levels ? [] earnedLevel: (levelOriginal) -> levelOriginal in (me.get('earned')?.levels ? [])

View file

@ -68,7 +68,8 @@ module.exports = class WorldMapView extends RootView
for level, index in campaign.levels for level, index in campaign.levels
level.x ?= 10 + 80 * Math.random() level.x ?= 10 + 80 * Math.random()
level.y ?= 10 + 80 * Math.random() level.y ?= 10 + 80 * Math.random()
level.locked = index > 0 and not me.earnedLevel level.original #level.locked = index > 0 and not me.earnedLevel level.original
level.locked = false # Not working yet, but time for sleep.
context.levelStatusMap = @levelStatusMap context.levelStatusMap = @levelStatusMap
context.levelPlayCountMap = @levelPlayCountMap context.levelPlayCountMap = @levelPlayCountMap
context.isIPadApp = application.isIPadApp context.isIPadApp = application.isIPadApp