This commit is contained in:
Nick Winter 2015-10-22 06:41:59 -07:00
commit 0ca3bdc597
24 changed files with 353 additions and 340 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -112,7 +112,7 @@ module.exports = class CocoRouter extends Backbone.Router
'multiplayer': go('MultiplayerView')
'play': go('play/CampaignView')
'play(/)': go('play/CampaignView') # extra slash is to get Facebook app to work
'play/ladder/:levelID/:leagueType/:leagueID': go('ladder/LadderView')
'play/ladder/:levelID': go('ladder/LadderView')
'play/ladder': go('ladder/MainLadderView')
@ -131,11 +131,15 @@ module.exports = class CocoRouter extends Backbone.Router
#'user/:slugOrID/profile': go('user/JobProfileView')
'user/:slugOrID/profile': go('EmployersView') # Show the not-recruiting-now screen
'*name/': 'removeTrailingSlash'
'*name': go('NotFoundView')
routeToServer: (e) ->
window.location.href = window.location.href
removeTrailingSlash: (e) ->
@navigate e, {trigger: true}
routeDirectly: (path, args) ->
path = "views/#{path}" if not _.string.startsWith(path, 'views/')
ViewClass = @tryToLoadModule path

View file

@ -13,6 +13,7 @@ module.exports.createAetherOptions = (options) ->
skipDuplicateUserInfoInFlow: true # Optimization that won't work if we are stepping with frames
yieldConditionally: options.functionName is 'plan'
simpleLoops: true
whileTrueAutoYield: true
globals: ['Vector', '_']
problems:
jshint_W040: {level: 'ignore'}

View file

@ -7,7 +7,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# old_browser: "Uh oh, your browser is too old to run CodeCombat. Sorry!" # Warning that shows up on really old Firefox/Chrome/Safari
# old_browser_suffix: "You can try anyway, but it probably won't work."
# ipad_browser: "Bad news: CodeCombat doesn't run on iPad in the browser. Good news: our native iPad app is awaiting Apple approval."
# campaign: "Campaign"
campaign: "Kampanija"
for_beginners: "Naujokams"
# multiplayer: "Multiplayer" # Not currently shown on home page
# for_developers: "For Developers" # Not currently shown on home page.
@ -22,11 +22,11 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
account: "Paskyra"
profile: "Profilis"
stats: "Statistika"
# code: "Code"
# admin: "Admin" # Only shows up when you are an admin
code: "Kodas"
admin: "Administratorius" # Only shows up when you are an admin
home: "Pradžia"
# contribute: "Contribute"
# legal: "Legal"
contribute: "Prisidėti"
legal: "Teisė"
about: "Apie"
contact: "Kontaktai"
twitter_follow: "Sekti Twitter"
@ -59,8 +59,8 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
owned: "Turima" # For items you own
locked: "Užrakinta"
purchasable: "Perkamas" # For a hero you unlocked but haven't purchased
# available: "Available"
# skills_granted: "Skills Granted" # Property documentation details
available: "Prieinama"
skills_granted: "Suteikti įgūdžiai" # Property documentation details
heroes: "Herojai" # Tooltip on hero shop button from /play
achievements: "Pasiekimai" # Tooltip on achievement list button from /play
account: "Paskyra" # Tooltip on account button from /play
@ -69,15 +69,15 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
next: "Kitas" # Go from choose hero to choose inventory before playing a level
change_hero: "Keisti Herojų" # Go back from choose inventory to choose hero
choose_inventory: "Naudoti daiktus"
# buy_gems: "Buy Gems"
buy_gems: "Pirkti Deimantus"
# subscription_required: "Subscription Required"
# anonymous: "Anonymous Player"
level_difficulty: "Sudėtingumas: "
campaign_beginner: "Naujoko kampanija"
# awaiting_levels_adventurer_prefix: "We release new levels every week."
# awaiting_levels_adventurer: "Sign up as an Adventurer"
# awaiting_levels_adventurer_suffix: "to be the first to play new levels."
# adjust_volume: "Adjust volume"
awaiting_levels_adventurer_prefix: "Kiekvieną savaitę sukuriame naujus lygius."
awaiting_levels_adventurer: "Prisijunk kaip Nuotykių Ieškotojas"
awaiting_levels_adventurer_suffix: "kad pamatytum juos pirmas."
adjust_volume: "Reguliuoti garsą"
# campaign_multiplayer: "Multiplayer Arenas"
# campaign_multiplayer_description: "... in which you code head-to-head against other players."
# campaign_old_multiplayer: "(Deprecated) Old Multiplayer Arenas"
@ -91,76 +91,76 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# placeholder: "email address"
# title: "Excellent Work, Apprentice"
# login:
# sign_up: "Create Account"
# log_in: "Log In"
# logging_in: "Logging In"
# log_out: "Log Out"
# forgot_password: "Forgot your password?"
# authenticate_gplus: "Authenticate G+"
# load_profile: "Load G+ Profile"
# finishing: "Finishing"
# sign_in_with_facebook: "Sign in with Facebook"
# sign_in_with_gplus: "Sign in with G+"
# signup_switch: "Want to create an account?"
login:
sign_up: "Sukurti paskyrą"
log_in: "Prisijungti"
logging_in: "Prisijungimas..."
log_out: "Atsijungti"
forgot_password: "Pamiršote slaptažodį?"
authenticate_gplus: "Prisijungti su G+"
load_profile: "Kraunamas G+ profilis"
finishing: "Baiginėjama"
sign_in_with_facebook: "Prisijungti su Facebook"
sign_in_with_gplus: "Prisijungti su G+"
signup_switch: "Norite sukurti paskyrą?"
# signup:
# email_announcements: "Receive announcements by email"
# creating: "Creating Account..."
# sign_up: "Sign Up"
# log_in: "log in with password"
# social_signup: "Or, you can sign up through Facebook or G+:"
# required: "You need to log in before you can go that way."
# login_switch: "Already have an account?"
signup:
email_announcements: "Gauti pranešimus elektroniniu paštu"
creating: "Kuriama paskyra..."
sign_up: "Užsiregistruoti"
log_in: "prisijungti slaptažodžio pagalba"
social_signup: "Arba galite prisijungti Facebook arba G+:"
required: "PRieš tęsiant kelią turite prisijungti."
login_switch: "Jau turite paskyrą?"
# recover:
# recover_account_title: "Recover Account"
# send_password: "Send Recovery Password"
# recovery_sent: "Recovery email sent."
# items:
# primary: "Primary"
# secondary: "Secondary"
# armor: "Armor"
# accessories: "Accessories"
# misc: "Misc"
# books: "Books"
items:
primary: "Pagrindiniai"
secondary: "Pagalbiniai"
armor: "Šarvai"
accessories: "Priedai"
misc: "Kiti"
books: "Knygos"
common:
# back: "Back" # When used as an action verb, like "Navigate backward"
# continue: "Continue" # When used as an action verb, like "Continue forward"
loading: "Loading..."
# saving: "Saving..."
# sending: "Sending..."
# send: "Send"
# cancel: "Cancel"
# save: "Save"
# publish: "Publish"
# create: "Create"
# fork: "Fork"
# play: "Play" # When used as an action verb, like "Play next level"
# retry: "Retry"
# actions: "Actions"
# info: "Info"
# help: "Help"
back: "Atgal" # When used as an action verb, like "Navigate backward"
continue: "Tęsti" # When used as an action verb, like "Continue forward"
loading: "Kraunama..."
saving: "Saugoma..."
sending: "Siunčiama..."
send: "Siųsti"
cancel: "Atšaukti"
save: "Išsaugoti"
publish: "Paskelbti"
create: "Kurti"
fork: "Išsišakojimas"
play: "Žaisti" # When used as an action verb, like "Play next level"
retry: "Pakartoti"
actions: "Veiksmai"
info: "Informacija"
help: "Pagalba"
# watch: "Watch"
# unwatch: "Unwatch"
# submit_patch: "Submit Patch"
# submit_changes: "Submit Changes"
# save_changes: "Save Changes"
# general:
# and: "and"
# name: "Name"
# date: "Date"
general:
and: "ir"
name: "Vardas"
date: "Data"
# body: "Body"
# version: "Version"
# pending: "Pending"
# accepted: "Accepted"
# rejected: "Rejected"
# withdrawn: "Withdrawn"
# accept: "Accept"
# reject: "Reject"
accept: "Priimti"
reject: "Atmesti"
# withdraw: "Withdraw"
# submitter: "Submitter"
# submitted: "Submitted"
@ -176,131 +176,131 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# result: "Result"
# results: "Results"
# description: "Description"
# or: "or"
or: "arba"
# subject: "Subject"
# email: "Email"
# password: "Password"
password: "Slaptažodis"
# message: "Message"
# code: "Code"
code: "Kodas"
# ladder: "Ladder"
# when: "When"
# opponent: "Opponent"
# rank: "Rank"
rank: "Rangas"
# score: "Score"
# win: "Win"
# loss: "Loss"
# tie: "Tie"
# easy: "Easy"
# medium: "Medium"
# hard: "Hard"
# player: "Player"
# player_level: "Level" # Like player level 5, not like level: Dungeons of Kithgard
# warrior: "Warrior"
# ranger: "Ranger"
# wizard: "Wizard"
win: "Pergalė"
loss: "Pralaimėjimas"
tie: "Lygiosios"
easy: "Lengvas"
medium: "Vidutinis"
hard: "Sunkus"
player: "Žaidėjas"
player_level: "Lygis" # Like player level 5, not like level: Dungeons of Kithgard
warrior: "Karys"
ranger: "Žvalgas"
wizard: "Burtininkas"
# units:
# second: "second"
# seconds: "seconds"
# minute: "minute"
# minutes: "minutes"
# hour: "hour"
# hours: "hours"
# day: "day"
# days: "days"
# week: "week"
# weeks: "weeks"
# month: "month"
# months: "months"
# year: "year"
# years: "years"
units:
second: "sekundė"
seconds: "sekundės"
minute: "minutė"
minutes: "minutės"
hour: "valanda"
hours: "hours"
day: "diena"
days: "dienos"
week: "savaitė"
weeks: "savaitės"
month: "mėnuo"
months: "mėnesiai"
year: "metai"
years: "metai"
# play_level:
# done: "Done"
# next_game: "Next game"
# show_menu: "Show game menu"
play_level:
done: "Gerai"
next_game: "Kitas žaidimas"
show_menu: "Parodyti žaidimo meniu"
# home: "Home" # Not used any more, will be removed soon.
# level: "Level" # Like "Level: Dungeons of Kithgard"
# skip: "Skip"
# game_menu: "Game Menu"
# guide: "Guide"
# restart: "Restart"
# goals: "Goals"
# goal: "Goal"
# running: "Running..."
# success: "Success!"
# incomplete: "Incomplete"
# timed_out: "Ran out of time"
# failing: "Failing"
level: "Lygis" # Like "Level: Dungeons of Kithgard"
skip: "Praleisti"
game_menu: "Žaidimo meniu"
guide: "Vedlys"
restart: "Paleisti iš naujo"
goals: "Tikslai"
goal: "Tikslas"
running: "Leidžiama..."
success: "Sėkmingai!"
incomplete: "Neužbaigta"
timed_out: "Laikas baigėsi"
failing: "Nesėkmingai"
# action_timeline: "Action Timeline"
# click_to_select: "Click on a unit to select it."
# control_bar_multiplayer: "Multiplayer"
# control_bar_join_game: "Join Game"
# reload: "Reload"
# reload_title: "Reload All Code?"
# reload_really: "Are you sure you want to reload this level back to the beginning?"
# reload_confirm: "Reload All"
# victory: "Victory"
control_bar_multiplayer: "Žaidimas keliese"
control_bar_join_game: "Prisijungti prie žaidimo"
reload: "Perkrauti"
reload_title: "Perkrauti visą kodą?"
reload_really: "Ar tikrai norite atsukti visą lygį į pradžią?"
reload_confirm: "Perkrauti viską"
victory: "Pergalė"
# victory_title_prefix: ""
# victory_title_suffix: " Complete"
# victory_sign_up: "Sign Up to Save Progress"
# victory_sign_up_poke: "Want to save your code? Create a free account!"
victory_title_suffix: " baigta"
victory_sign_up: "Užsiregistruokite, kad išsaugotumėte pažangą"
victory_sign_up_poke: "Norite išsaugoti savo kodą? Sukurkite paskyrą nemokamai!"
# victory_rate_the_level: "Rate the level: " # Only in old-style levels.
# victory_return_to_ladder: "Return to Ladder"
# victory_play_continue: "Continue"
# victory_saving_progress: "Saving Progress"
# victory_go_home: "Go Home"
victory_play_continue: "Tęsti"
victory_saving_progress: "Išsaugoma pažanga"
victory_go_home: "Į Pradžią"
# victory_review: "Tell us more!"
# victory_review_placeholder: "How was the level?"
# victory_hour_of_code_done: "Are You Done?"
victory_review_placeholder: "Ar Jums patiko lygis?"
victory_hour_of_code_done: "Ar pabaigėte?"
# victory_hour_of_code_done_yes: "Yes, I'm finished with my Hour of Code™!"
# victory_experience_gained: "XP Gained"
# victory_gems_gained: "Gems Gained"
# victory_new_item: "New Item"
victory_experience_gained: "Gauta XP"
victory_gems_gained: "Gauta Deimantų"
victory_new_item: "Naujas Daiktas"
# victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
# victory_become_a_viking: "Become a Viking"
# victory_bloc: "Great work! Your skills are improving, and someone's taking notice. If you've considered becoming a software developer, this may be your lucky day. Bloc is an online bootcamp that pairs you 1-on-1 with an expert mentor who will help train you into a professional developer! By beating A Mayhem of Munchkins, you're now eligible for a $500 price reduction with the code: CCRULES"
# victory_bloc_cta: "Meet your mentor learn about Bloc"
# guide_title: "Guide"
guide_title: "Vedlys"
# tome_minion_spells: "Your Minions' Spells" # Only in old-style levels.
# tome_read_only_spells: "Read-Only Spells" # Only in old-style levels.
# tome_other_units: "Other Units" # Only in old-style levels.
# tome_cast_button_run: "Run"
# tome_cast_button_running: "Running"
# tome_cast_button_ran: "Ran"
# tome_submit_button: "Submit"
tome_cast_button_run: "Paleisti"
tome_cast_button_running: "Leidžiama"
tome_cast_button_ran: "Paleista"
tome_submit_button: "Pateikti"
# tome_reload_method: "Reload original code for this method" # Title text for individual method reload button.
# tome_select_method: "Select a Method"
# tome_see_all_methods: "See all methods you can edit" # Title text for method list selector (shown when there are multiple programmable methods).
tome_select_method: "Pasirinkti Metodą"
tome_see_all_methods: "Visi metodai, kuriuos galite keisti" # Title text for method list selector (shown when there are multiple programmable methods).
# tome_select_a_thang: "Select Someone for "
# tome_available_spells: "Available Spells"
# tome_your_skills: "Your Skills"
# tome_current_method: "Current Method"
# hud_continue_short: "Continue"
# code_saved: "Code Saved"
# skip_tutorial: "Skip (esc)"
# keyboard_shortcuts: "Key Shortcuts"
# loading_ready: "Ready!"
# loading_start: "Start Level"
# problem_alert_title: "Fix Your Code"
# time_current: "Now:"
# time_total: "Max:"
tome_available_spells: "Prieinami Kerai"
tome_your_skills: "Jūsų Įgūdžiai"
tome_current_method: "Vartojamas Metodas"
hud_continue_short: "Tęsti"
code_saved: "Kodas išsaugotas"
skip_tutorial: "Praleisti (ESC)"
keyboard_shortcuts: "Mygtukai"
loading_ready: "Pirmyn!"
loading_start: "Pradėti lygį"
problem_alert_title: "Taisyti kodą"
time_current: "Dabar:"
time_total: "Max:"
# time_goto: "Go to:"
# non_user_code_problem_title: "Unable to Load Level"
# infinite_loop_title: "Infinite Loop Detected"
non_user_code_problem_title: "Nepavyko pakrauti lygio"
infinite_loop_title: "Pastebėtas begalinis ciklas!"
# infinite_loop_description: "The initial code to build the world never finished running. It's probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn't fix it, please let us know."
# check_dev_console: "You can also open the developer console to see what might be going wrong."
# check_dev_console_link: "(instructions)"
# infinite_loop_try_again: "Try Again"
# infinite_loop_reset_level: "Reset Level"
# infinite_loop_comment_out: "Comment Out My Code"
# tip_toggle_play: "Toggle play/paused with Ctrl+P."
# tip_scrub_shortcut: "Use Ctrl+[ and Ctrl+] to rewind and fast-forward."
# tip_guide_exists: "Click the guide, inside game menu (at the top of the page), for useful info."
# tip_open_source: "CodeCombat is 100% open source!"
# tip_tell_friends: "Enjoying CodeCombat? Tell your friends about us!"
tip_toggle_play: "Įjunkite ir išjunkite Pauzę spaudžiant Ctrl+P."
tip_scrub_shortcut: "Naudokite Ctrl+[ ir Ctrl+] persukimui pirmyn ir atgal."
tip_guide_exists: "Pasirinkite punktą Vedlys žaidimo meniu (puslapio viršuje), jame rasite naudingos informacijos."
tip_open_source: "CodeCombat - 100% atviro kodo!"
tip_tell_friends: "Jums patinka CodeCombat? Papasakokite savo draugams!"
# tip_beta_launch: "CodeCombat launched its beta in October, 2013."
# tip_think_solution: "Think of the solution, not the problem."
tip_think_solution: "Galvok ne apie problemą, o apie sprendimą."
# 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_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
@ -345,22 +345,22 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# tip_paper_and_pen: "Before you start coding, you can always plan with a sheet of paper and a pen."
# solve_then_write: "First, solve the problem. Then, write the code. - John Johnson"
# game_menu:
# inventory_tab: "Inventory"
# save_load_tab: "Save/Load"
# options_tab: "Options"
# guide_tab: "Guide"
# guide_video_tutorial: "Video Tutorial"
# guide_tips: "Tips"
# multiplayer_tab: "Multiplayer"
# auth_tab: "Sign Up"
# inventory_caption: "Equip your hero"
# choose_hero_caption: "Choose hero, language"
# save_load_caption: "... and view history"
# options_caption: "Configure settings"
# guide_caption: "Docs and tips"
# multiplayer_caption: "Play with friends!"
# auth_caption: "Save your progress."
game_menu:
inventory_tab: "Inventorius"
save_load_tab: "Įrašyti / Atkurti"
options_tab: "Pasirinkimai"
guide_tab: "Vedlys"
guide_video_tutorial: "Video vadovėlis"
guide_tips: "Patarimai"
multiplayer_tab: "Žaidimas keliese"
auth_tab: "Registruotis"
inventory_caption: "Parenk savo herojų"
choose_hero_caption: "Pasirink herijų, kalbo"
save_load_caption: "... ir peržiūrėk istoriją"
options_caption: "Konfigūruoti nustatymus"
guide_caption: "Dokumentai ir patarimai"
multiplayer_caption: "Žaisk su draugais!"
auth_caption: "Išsaugok savo pažangą."
# leaderboard:
# leaderboard: "Leaderboard"
@ -376,18 +376,18 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# difficulty: "Difficulty"
# gold_collected: "Gold Collected"
# inventory:
# choose_inventory: "Equip Items"
# equipped_item: "Equipped"
# required_purchase_title: "Required"
# available_item: "Available"
# restricted_title: "Restricted"
# should_equip: "(double-click to equip)"
# equipped: "(equipped)"
# locked: "(locked)"
# restricted: "(restricted in this level)"
# equip: "Equip"
# unequip: "Unequip"
inventory:
choose_inventory: "Naudoti daiktus"
equipped_item: "Naudojama"
required_purchase_title: "Reikalaujama"
available_item: "Prieinama"
restricted_title: "Uždrausta"
should_equip: "(double-click kad naudotum)"
equipped: "(naudojama)"
locked: "(užrakinta)"
restricted: "(uždrausta šiame lygyje)"
equip: "Naudoti"
unequip: "Nenaudoti"
# buy_gems:
# few_gems: "A few gems"
@ -489,43 +489,43 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# subscribe_prepaid: "Click Subscribe to use prepaid code"
# using_prepaid: "Using prepaid code for monthly subscription"
# choose_hero:
# choose_hero: "Choose Your Hero"
# programming_language: "Programming Language"
# programming_language_description: "Which programming language do you want to use?"
# default: "Default"
choose_hero:
choose_hero: "Pasirink Herojų"
programming_language: "Programavimo kalba"
programming_language_description: "Kokią programavimo kalbą norėtum naudoti?"
default: "Numatytasis"
# experimental: "Experimental"
# python_blurb: "Simple yet powerful, great for beginners and experts."
# javascript_blurb: "The language of the web. (Not the same as Java.)"
# coffeescript_blurb: "Nicer JavaScript syntax."
# clojure_blurb: "A modern Lisp."
# lua_blurb: "Game scripting language."
python_blurb: "Paprasta bet galinga. Puikiai tinka ir naujokams ir ekspertams."
javascript_blurb: "WWW tinklo kalba. (Nepainiokite su Java.)"
coffeescript_blurb: "JavaScript su malonesne sintakse."
clojure_blurb: "Šiolaikinis Lisp."
lua_blurb: "Žaidimų skriptų kalba."
# io_blurb: "Simple but obscure."
# status: "Status"
# hero_type: "Type"
# weapons: "Weapons"
# weapons_warrior: "Swords - Short Range, No Magic"
# weapons_ranger: "Crossbows, Guns - Long Range, No Magic"
# weapons_wizard: "Wands, Staffs - Long Range, Magic"
# attack: "Damage" # Can also translate as "Attack"
# health: "Health"
# speed: "Speed"
# regeneration: "Regeneration"
# range: "Range" # As in "attack or visual range"
# blocks: "Blocks" # As in "this shield blocks this much damage"
# backstab: "Backstab" # As in "this dagger does this much backstab damage"
# skills: "Skills"
# attack_1: "Deals"
# attack_2: "of listed"
# attack_3: "weapon damage."
# health_1: "Gains"
# health_2: "of listed"
# health_3: "armor health."
# speed_1: "Moves at"
# speed_2: "meters per second."
# available_for_purchase: "Available for Purchase" # Shows up when you have unlocked, but not purchased, a hero in the hero store
# level_to_unlock: "Level to unlock:" # Label for which level you have to beat to unlock a particular hero (click a locked hero in the store to see)
# restricted_to_certain_heroes: "Only certain heroes can play this level."
hero_type: "Klasė"
weapons: "Ginklai"
weapons_warrior: "Kardai - artimas atstumas, be Kerų"
weapons_ranger: "Arbaletai, Šautuvai - tolimas atstumas, be Kerų"
weapons_wizard: "stebuklų lazdelės ir skipetrai - tolimas atstumas, magija"
attack: "Žala" # Can also translate as "Attack"
health: "Sveikata"
speed: "Greitis"
regeneration: "Atsistatymas"
range: "Nuotolis" # As in "attack or visual range"
blocks: "Blokuoja" # As in "this shield blocks this much damage"
backstab: "Slaptasis smūgis" # As in "this dagger does this much backstab damage"
skills: "Įgūdžiai"
attack_1: "Padaro"
attack_2: "įvardinto"
attack_3: "ginklo žalos."
health_1: "Gauna"
health_2: "įvardintų"
health_3: "šarvų sveikatos taškų."
speed_1: "Juda"
speed_2: "metrų per sekundę greičiu."
available_for_purchase: "Galima pirkti" # Shows up when you have unlocked, but not purchased, a hero in the hero store
level_to_unlock: "Atrakinama lygyje:" # Label for which level you have to beat to unlock a particular hero (click a locked hero in the store to see)
restricted_to_certain_heroes: "Tik kai kurie herojai gali žaisti šiame lygyje."
# skill_docs:
# writable: "writable" # Hover over "attack" in Your Skills while playing a level to see most of this
@ -755,25 +755,25 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# sample_profile: "See a sample profile"
# view_profile: "View Your Profile"
# keyboard_shortcuts:
# keyboard_shortcuts: "Keyboard Shortcuts"
# space: "Space"
# enter: "Enter"
# press_enter: "press enter"
# escape: "Escape"
# shift: "Shift"
# run_code: "Run current code."
# run_real_time: "Run in real time."
keyboard_shortcuts:
keyboard_shortcuts: "Mygtukai"
space: "Tarpas"
enter: "Enter"
press_enter: "paspauskite enter"
escape: "Escape"
shift: "Shift"
run_code: "Paleisti programos kodą."
run_real_time: "Paleisti realiuoju laiku."
# continue_script: "Continue past current script."
# skip_scripts: "Skip past all skippable scripts."
# toggle_playback: "Toggle play/pause."
toggle_playback: "Pauzė/Paleisti."
# scrub_playback: "Scrub back and forward through time."
# single_scrub_playback: "Scrub back and forward through time by a single frame."
# scrub_execution: "Scrub through current spell execution."
# toggle_debug: "Toggle debug display."
# toggle_grid: "Toggle grid overlay."
toggle_grid: "Įjungti tinklelį."
# toggle_pathfinding: "Toggle pathfinding overlay."
# beautify: "Beautify your code by standardizing its formatting."
beautify: "Tvarkyti Jūsų kodą standartizuojant jo formatą."
# maximize_editor: "Maximize/minimize code editor."
# community:
@ -1319,30 +1319,30 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# poll: "Poll"
# user_polls_record: "Poll Voting History"
# concepts:
concepts:
# advanced_strings: "Advanced Strings"
# algorithms: "Algorithms"
# arguments: "Arguments"
# arithmetic: "Arithmetic"
# arrays: "Arrays"
# basic_syntax: "Basic Syntax"
# boolean_logic: "Boolean Logic"
algorithms: "Algoritmai (Algorithms)"
arguments: "Argumentai (Arguments)"
arithmetic: "Aritmetika (Arithmetic)"
arrays: "Masyvai (Arrays)"
basic_syntax: "Pagrindinė sintaksė (Basic Syntax)"
boolean_logic: "Bulio logika (Boolean Logic)"
# break_statements: "Break Statements"
# classes: "Classes"
classes: "Klasės (Classes)"
# continue_statements: "Continue Statements"
# for_loops: "For Loops"
# functions: "Functions"
# graphics: "Graphics"
for_loops: "Ciklai 'For' (For Loops)"
functions: "Funkcijos (Functions)"
graphics: "Grafika (Graphics)"
# if_statements: "If Statements"
# input_handling: "Input Handling"
# math_operations: "Math Operations"
input_handling: "Įvesties apdirbimas (Input Handling)"
math_operations: "Matematiniai operatoriai )Math Operations)"
# object_literals: "Object Literals"
# parameters: "Parameters"
# strings: "Strings"
# variables: "Variables"
# vectors: "Vectors"
# while_loops: "Loops"
# recursion: "Recursion"
parameters: "Parametrai (Parameters)"
strings: "Eilutės (Strings)"
variables: "Kintamieji (Variables)"
vectors: "Vektoriai (Vectors)"
while_loops: "Ciklai (Loops)"
recursion: "Rekursija (Recursion)"
# delta:
# added: "Added"

View file

@ -4,10 +4,6 @@ module.exports =
'editor:campaign-analytics-modal-closed': c.object {title: 'Campaign editor analytics modal closed'},
targetLevelSlug: {type: 'string'}
'editor:save-new-version': c.object {title: 'Save New Version', description: 'Published when a version gets saved', required: ['major', 'commitMessage']},
major: {type: 'boolean'}
commitMessage: {type: 'string'}
'editor:view-switched': c.object {title: 'Level View Switched', description: 'Published whenever the view switches'},
targetURL: {type: 'string'}

View file

@ -1,3 +1,3 @@
#users, #months
#users-input, #months-input
max-width: 100px

View file

@ -14,6 +14,9 @@ h1, h2, h3, h4, h5, h6
a
cursor: pointer
iframe
border: none
.error
left: 8px

View file

@ -172,3 +172,15 @@ block content
| Illustration
p(data-i18n="about.retrostyle_blurb")
| RetroStyle Games
li.row
a(href="http://basicer.com/")
img(src="/images/pages/about/rob_small.png").img-thumbnail
.team_bio
h4.team_name
a(href="http://basicer.com/") Rob Blanckaert
p(data-i18n="about.rob_title")
| Compiler Engineer
p(data-i18n="about.rob_blurb")
| Codes things and stuff.

View file

@ -15,7 +15,7 @@ else
- var godmode = me.get('permissions', true).indexOf('godmode') != -1;
.form-group
label.control-label(for="name", data-i18n="general.name") Name
input#name.form-control(name="name", type="text", value="#{name}")
input#name-input.form-control(name="name", type="text", value="#{name}")
.form-group
label.control-label(for="email", data-i18n="general.email") Email
input#email.form-control(name="email", type="text", value="#{email}")
@ -31,7 +31,7 @@ else
.panel.panel-default
.panel-heading
.panel-title(data-i18n="account_settings.picture_tab")
.panel-body
#profile-photo-panel-body.panel-body
img.profile-photo(src=me.getPhotoURL(230), draggable="false")
input#photoURL(type="hidden", value=me.get('photoURL')||'')
button#upload-photo-button.btn.form-control.btn-primary(data-i18n="account_settings.upload_picture")
@ -59,9 +59,11 @@ else
.form-group
label.control-label(for="password1", data-i18n="account_settings.type_in_password")
input#password1.form-control(name="password1", type="password")
button#delete-account-button.btn.form-control.btn-primary(data-i18n="account_settings.delete_this_account")
button#delete-account-btn.btn.form-control.btn-primary(data-i18n="account_settings.delete_this_account")
.col-md-6
- var subs = view.getEmailSubsDict();
#email-panel.panel.panel-default
.panel-heading
@ -159,6 +161,6 @@ else
input#email_ambassadorNews(name="email_ambassadorNews", type="checkbox", checked=subs.ambassadorNews)
span(data-i18n="contribute.ambassador_subscribe_desc").help-block Get emails on support updates and multiplayer developments.
button#toggle-all-button.btn.btn-primary.form-control(data-i18n="account_settings.email_toggle") Toggle All
button#toggle-all-btn.btn.btn-primary.form-control(data-i18n="account_settings.email_toggle") Toggle All
.clearfix

View file

@ -10,7 +10,7 @@ block content
a(href="/account", data-i18n="nav.account")
li.active(data-i18n="account.payments")
if payments.models.length
if view.payments.models.length
table.table.table-striped
tr
th(data-i18n="account.purchased")
@ -18,7 +18,7 @@ block content
th(data-i18n="account.service")
th(data-i18n="account.price")
th(data-i18n="account.gems")
for payment in payments.models
for payment in view.payments.models
- var service = payment.get('service')
tr
if payment.get('productID')

View file

@ -30,17 +30,17 @@ block content
.form-group
label.control-label.col-md-2(for="users") Users
.col-md-2
input#users.form-control(name="users", type="number", value="#{purchase.users}", min=1)
input#users-input.form-control(name="users", type="number", value="#{purchase.users}", min=1)
.form-group
label.control-label.col-md-2(for="months") Months
.col-md-2
input#months.form-control(name="months", type="number", value="#{purchase.months}", min=1)
input#months-input.form-control(name="months", type="number", value="#{purchase.months}", min=1)
.form-group
label.control-label.col-md-2(data-i18n="account_prepaid.purchase_total")
.col-md-10
p.form-control-static $
span#total #{purchase.total.toFixed(2)}
button#purchase-button.btn.btn-success.pull-right(data-i18n="account_prepaid.purchase_button")
button#purchase-btn.btn.btn-success.pull-right(data-i18n="account_prepaid.purchase_button")
.row
.col-md-12
.panel.panel-default
@ -60,9 +60,9 @@ block content
!= info
p
span.spr
button.btn.btn-info.btn-check-code Lookup prepaid code
button#lookup-code-btn.btn.btn-info Lookup prepaid code
span
button.btn.btn-success.btn-redeem-code Apply to your account
button#redeem-code-btn.btn.btn-success Apply to your account
.row
.col-md-12
.panel.panel-default

View file

@ -26,10 +26,10 @@ block outer_content
.alert.alert-danger.lt-ie9
strong(data-i18n="home.no_ie") CodeCombat does not run in Internet Explorer 8 or older. Sorry!
if isIPadBrowser || isMobile
if view.isIPadBrowser() || view.isMobile()
.alert.alert-danger.mobile
strong(data-i18n="home.no_mobile") CodeCombat wasn't designed for mobile devices and may not work!
else if isOldBrowser
else if view.isOldBrowser()
.alert.alert-danger.old-browser
strong(data-i18n="home.old_browser") Uh oh, your browser is too old to run CodeCombat. Sorry!
br
@ -37,7 +37,7 @@ block outer_content
block extra_footer_content
if explainsHourOfCode
if view.explainsHourOfCode
// Does not show up unless lang is en-US.
div.hour-of-code-explanation
| The 'Hour of Code' is a nationwide initiative by

View file

@ -6,7 +6,7 @@ module.exports = class HomeView extends RootView
template: template
events:
'click #play-button': 'onClickBeginnerCampaign'
'click #play-button': 'onClickPlayButton'
constructor: ->
super()
@ -18,23 +18,7 @@ module.exports = class HomeView extends RootView
# Show the Hour of Code footer explanation in English until it's been more than a day
@explainsHourOfCode = true
getRenderData: ->
c = super()
if $.browser
majorVersion = $.browser.versionNumber
c.isOldBrowser = true if $.browser.mozilla && majorVersion < 25
c.isOldBrowser = true if $.browser.chrome && majorVersion < 31 # Noticed Gems in the Deep not loading with 30
c.isOldBrowser = true if $.browser.safari && majorVersion < 6 # 6 might have problems with Aether, or maybe just old minors of 6: https://errorception.com/projects/51a79585ee207206390002a2/errors/547a202e1ead63ba4e4ac9fd
else
console.warn 'no more jquery browser version...'
c.isEnglish = _.string.startsWith (me.get('preferredLanguage') or 'en'), 'en'
c.languageName = me.get('preferredLanguage')
c.explainsHourOfCode = @explainsHourOfCode
c.isMobile = @isMobile()
c.isIPadBrowser = @isIPadBrowser()
c
onClickBeginnerCampaign: (e) ->
onClickPlayButton: (e) ->
@playSound 'menu-button-click'
e.preventDefault()
e.stopImmediatePropagation()
@ -45,6 +29,16 @@ module.exports = class HomeView extends RootView
super(arguments...)
@$el.addClass 'hour-of-code' if @explainsHourOfCode
isOldBrowser: ->
if $.browser
majorVersion = $.browser.versionNumber
return true if $.browser.mozilla && majorVersion < 25
return true if $.browser.chrome && majorVersion < 31 # Noticed Gems in the Deep not loading with 30
return true if $.browser.safari && majorVersion < 6 # 6 might have problems with Aether, or maybe just old minors of 6: https://errorception.com/projects/51a79585ee207206390002a2/errors/547a202e1ead63ba4e4ac9fd
else
console.warn 'no more jquery browser version...'
return false
setUpHourOfCode: ->
# All this HoC stuff is for the 2014-2015 year. 2015-2016 year lands at /hoc instead (the courses view).
# TODO: get rid of all this sometime in November 2015 when code.org/learn updates to the new version for Hour of Code tutorials.

View file

@ -13,12 +13,11 @@ module.exports = class AccountSettingsView extends CocoView
className: 'countainer-fluid'
events:
'change .panel input': 'onInputChanged'
'change #name': 'checkNameExists'
'click #toggle-all-button': 'toggleEmailSubscriptions'
'click .profile-photo': 'onEditProfilePhoto'
'click #upload-photo-button': 'onEditProfilePhoto'
'click #delete-account-button': 'confirmAccountDeletion'
'change .panel input': 'onChangePanelInput'
'change #name-input': 'onChangeNameInput'
'click #toggle-all-btn': 'onClickToggleAllButton'
'click #profile-photo-panel-body': 'onClickProfilePhotoPanelBody'
'click #delete-account-btn': 'onClickDeleteAccountButton'
constructor: (options) ->
super options
@ -29,29 +28,27 @@ module.exports = class AccountSettingsView extends CocoView
super()
@openModalView new AuthModal() if me.get('anonymous')
getRenderData: ->
c = super()
return c unless me
c.subs = {}
c.subs[sub] = 1 for sub in me.getEnabledEmails()
c
getEmailSubsDict: ->
subs = {}
return subs unless me
subs[sub] = 1 for sub in me.getEnabledEmails()
return subs
#- Form input callbacks
onInputChanged: (e) ->
onChangePanelInput: (e) ->
$(e.target).addClass 'changed'
if (JSON.stringify(document.getElementById('email1').className)).indexOf("changed") > -1 or (JSON.stringify(document.getElementById('password1').className)).indexOf("changed") > -1
$(e.target).removeClass 'changed'
else
@trigger 'input-changed'
toggleEmailSubscriptions: =>
onClickToggleAllButton: ->
subs = @getSubscriptions()
$('#email-panel input[type="checkbox"]', @$el).prop('checked', not _.any(_.values(subs))).addClass('changed')
@trigger 'input-changed'
checkNameExists: =>
name = $('#name', @$el).val()
onChangeNameInput: ->
name = $('#name-input', @$el).val()
return if name is me.get 'name'
User.getUnconflictedName name, (newName) =>
forms.clearFormAlerts(@$el)
@ -67,7 +64,7 @@ module.exports = class AccountSettingsView extends CocoView
#- Just copied from OptionsView, TODO refactor
confirmAccountDeletion: ->
onClickDeleteAccountButton: ->
forms.clearFormAlerts(@$el)
myEmail = me.get 'email'
email1 = document.getElementById('email1').value
@ -141,7 +138,7 @@ module.exports = class AccountSettingsView extends CocoView
layout: 'topCenter'
url: "/db/user/#{myID}"
onEditProfilePhoto: (e) ->
onClickProfilePhotoPanelBody: (e) ->
return if window.application.isIPadApp # TODO: have an iPad-native way of uploading a photo, since we don't want to load FilePicker on iPad (memory)
photoContainer = @$el.find('.profile-photo')
onSaving = =>
@ -229,8 +226,8 @@ module.exports = class AccountSettingsView extends CocoView
$('.nano').nanoScroller({scrollTo: @$el.find('.has-error')})
grabOtherData: ->
@$el.find('#name').val @suggestedName if @suggestedName
me.set 'name', @$el.find('#name').val()
@$el.find('#name-input').val @suggestedName if @suggestedName
me.set 'name', @$el.find('#name-input').val()
me.set 'email', @$el.find('#email').val()
for emailName, enabled of @getSubscriptions()
me.setEmailSubscription emailName, enabled

View file

@ -11,8 +11,3 @@ module.exports = class PaymentsView extends RootView
super(options)
@payments = new CocoCollection([], { url: '/db/payment', model: Payment, comparator:'_id' })
@supermodel.loadCollection(@payments, 'payments', {cache: false})
getRenderData: ->
c = super()
c.payments = @payments
c

View file

@ -16,12 +16,12 @@ module.exports = class PrepaidView extends RootView
className: 'container-fluid'
events:
'change #users': 'onUsersChanged'
'change #months': 'onMonthsChanged'
'click #purchase-button': 'onPurchaseClicked'
'click #redeem-button': 'onRedeemClicked'
'click .btn-check-code': 'onClickCheckCode'
'click .btn-redeem-code': 'onClickRedeemCode'
'change #users-input': 'onChangeUsersInput'
'change #months-input': 'onChangeMonthsInput'
'click #purchase-btn': 'onClickPurchaseButton'
'click #redeem-btn': 'onClickRedeemButton' # DNE?
'click #lookup-code-btn': 'onClickLookupCodeButton'
'click #redeem-code-btn': 'onClickRedeemCodeButton'
subscriptions:
'stripe:received-token': 'onStripeReceivedToken'
@ -63,10 +63,10 @@ module.exports = class PrepaidView extends RootView
updateTotal: ->
@purchase.total = getPrepaidCodeAmount(@baseAmount, @purchase.users, @purchase.months)
@renderSelectors("#total", "#users", "#months")
@renderSelectors("#total", "#users-input", "#months-input")
# Form Input Callbacks
onUsersChanged: (e) ->
onChangeUsersInput: (e) ->
newAmount = $(e.target).val()
newAmount = 1 if newAmount < 1
@purchase.users = newAmount
@ -81,7 +81,7 @@ module.exports = class PrepaidView extends RootView
@updateTotal()
onMonthsChanged: (e) ->
onChangeMonthsInput: (e) ->
newAmount = $(e.target).val()
newAmount = 1 if newAmount < 1
@purchase.months = newAmount
@ -96,8 +96,8 @@ module.exports = class PrepaidView extends RootView
@updateTotal()
onPurchaseClicked: (e) ->
return unless $("#users").val() >= 3 or $("#months").val() >= 3
onClickPurchaseButton: (e) ->
return unless $("#users-input").val() >= 3 or $("#months-input").val() >= 3
@purchaseTimestamp = new Date().getTime()
@stripeAmount = @purchase.total * 100
@description = "Prepaid Code for " + @purchase.users + " users / " + @purchase.months + " months"
@ -108,7 +108,7 @@ module.exports = class PrepaidView extends RootView
bitcoin: true
alipay: if me.get('country') is 'china' or (me.get('preferredLanguage') or 'en-US')[...2] is 'zh' then true else 'auto'
onRedeemClicked: (e) ->
onClickRedeemButton: (e) ->
@ppc = $('#ppc').val()
unless @ppc
@ -209,7 +209,7 @@ module.exports = class PrepaidView extends RootView
@prepaid = new Prepaid()
@prepaid.fetch(options)
onClickCheckCode: (e) ->
onClickLookupCodeButton: (e) ->
@ppc = $('.input-ppc').val()
unless @ppc
@statusMessage "You must enter a code.", "error"
@ -218,7 +218,7 @@ module.exports = class PrepaidView extends RootView
@render?()
@loadPrepaid(@ppc)
onClickRedeemCode: (e) ->
onClickRedeemCodeButton: (e) ->
@ppc = $('.input-ppc').val()
options =
url: '/db/subscription/-/subscribe_prepaid'

View file

@ -16,9 +16,6 @@ module.exports = class ArticleEditView extends RootView
'click #history-button': 'showVersionHistory'
'click #save-button': 'openSaveModal'
subscriptions:
'editor:save-new-version': 'saveNewArticle'
constructor: (options, @articleID) ->
super options
@article = new Article(_id: @articleID)
@ -82,7 +79,10 @@ module.exports = class ArticleEditView extends RootView
return false
openSaveModal: ->
@openModalView(new SaveVersionModal({model: @article}))
modal = new SaveVersionModal({model: @article})
@openModalView(modal)
@listenToOnce modal, 'save-new-version', @saveNewArticle
@listenToOnce modal, 'hidden', -> @stopListening(modal)
saveNewArticle: (e) ->
@treema.endExistingEdits()

View file

@ -45,7 +45,7 @@ module.exports = class SaveVersionModal extends ModalView
if @isPatch then @submitPatch() else @saveChanges()
saveChanges: ->
Backbone.Mediator.publish 'editor:save-new-version', {
@trigger 'save-new-version', {
major: @$el.find('#major-version').prop('checked')
commitMessage: @$el.find('#commit-message').val()
}

View file

@ -167,7 +167,6 @@ module.exports = class ThangTypeEditView extends RootView
subscriptions:
'editor:thang-type-color-groups-changed': 'onColorGroupsChanged'
'editor:save-new-version': 'saveNewThangType'
# init / render
@ -590,7 +589,10 @@ module.exports = class ThangTypeEditView extends RootView
_.delay((-> document.location.reload()), 500)
openSaveModal: ->
@openModalView new SaveVersionModal model: @thangType
modal = new SaveVersionModal model: @thangType
@openModalView modal
@listenToOnce modal, 'save-new-version', @saveNewThangType
@listenToOnce modal, 'hidden', -> @stopListening(modal)
startForking: (e) ->
@openModalView new ForkModal model: @thangType, editorPath: 'thang'

View file

@ -152,7 +152,13 @@ module.exports = class Spell
skipProtectAPI = @skipProtectAPI or not writable
problemContext = @createProblemContext thang
includeFlow = (@levelType in ['hero', 'hero-ladder', 'hero-coop', 'course', 'course-ladder']) and not skipProtectAPI
aetherOptions = createAetherOptions functionName: @name, codeLanguage: @language, functionParameters: @parameters, skipProtectAPI: skipProtectAPI, includeFlow: includeFlow, problemContext: problemContext
aetherOptions = createAetherOptions
functionName: @name
codeLanguage: @language
functionParameters: @parameters
skipProtectAPI: skipProtectAPI
includeFlow: includeFlow
problemContext: problemContext
aether = new Aether aetherOptions
if @worker
workerMessage =

View file

@ -121,7 +121,7 @@ module.exports = class LevelGuideView extends CocoView
tag.src = helpVideoURL + "?api=1&badge=0&byline=0&portrait=0&title=0"
tag.height = @helpVideoHeight
tag.width = @helpVideoWidth
tag.frameborder = '0'
tag.allowFullscreen = true
@$el.find('#help-video-player').replaceWith(tag)
@onMessageReceived = (e) =>

View file

@ -43,6 +43,9 @@ exports.config =
watcher:
usePolling: true
server:
command: 'nodemon . --ext ".coffee|.js" --watch server --watch server_config.js --watch server_setup.coffee --watch app' + sysPath.sep + "schemas"
files:
javascripts:
defaultExtension: 'coffee'

View file

@ -32,7 +32,11 @@
"start": "node ./index.js",
"test": "./node_modules/.bin/karma start",
"predeploy": "echo Starting deployment--hold onto your butts.; echo Skipping brunch build --production",
"postdeploy": "echo Deployed. Unclench."
"postdeploy": "echo Deployed. Unclench.",
"postinstall": "bower install && brunch build",
"brunch": "brunch",
"bower": "bower",
"dev": "brunch watch --server"
},
"main": "index.js",
"keywords": [
@ -83,7 +87,7 @@
"coffee-script-brunch": "https://github.com/brunch/coffee-script-brunch/tarball/master",
"coffeelint-brunch": "> 1.0 < 1.8",
"compressible": "~1.0.1",
"commonjs-require-definition": "~0.2.0",
"commonjs-require-definition": "0.2.0",
"css-brunch": "> 1.0 < 1.8",
"jade": "0.33.x",
"jade-brunch": "> 1.0 < 1.8",

View file

@ -128,11 +128,6 @@ setupRedirectMiddleware = (app) ->
nameOrID = req.path.split('/')[3]
res.redirect 301, "/user/#{nameOrID}/profile"
setupTrailingSlashRemovingMiddleware = (app) ->
app.use (req, res, next) ->
# Remove trailing slashes except for in /file/.../ URLs, because those are treated as directory listings.
return res.redirect 301, req.url[...-1] if req.url.length > 1 and req.url.slice(-1) is '/' and not /\/file\//.test req.url
next()
exports.setupMiddleware = (app) ->
setupCountryRedirectMiddleware app, "china", "CN", "zh", "tokyo"
@ -141,7 +136,6 @@ exports.setupMiddleware = (app) ->
setupExpressMiddleware app
setupPassportMiddleware app
setupOneSecondDelayMiddleware app
setupTrailingSlashRemovingMiddleware app
setupRedirectMiddleware app
setupErrorMiddleware app
setupJavascript404s app