Merge branch 'master' into production

This commit is contained in:
Scott Erickson 2016-06-03 13:35:32 -07:00
commit 50f77d98fe
6 changed files with 202 additions and 207 deletions

View file

@ -4,7 +4,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
no_ie: "CodeCombat läuft nicht im IE8 oder älteren Browsern. Tut uns Leid!" # Warning that only shows up in IE8 and older no_ie: "CodeCombat läuft nicht im IE8 oder älteren Browsern. Tut uns Leid!" # Warning that only shows up in IE8 and older
no_mobile: "CodeCombat ist nicht für Mobilgeräte optimiert und funktioniert möglicherweise nicht." # Warning that shows up on mobile devices no_mobile: "CodeCombat ist nicht für Mobilgeräte optimiert und funktioniert möglicherweise nicht." # Warning that shows up on mobile devices
play: "Spielen" # The big play button that opens up the campaign view. play: "Spielen" # The big play button that opens up the campaign view.
# play_campaign_version: "Play Campaign Version" # Shows up under big play button if you only play /courses play_campaign_version: "Spiele Kampagnen Version" # Shows up under big play button if you only play /courses
old_browser: "Oh! Dein Browser ist zu alt für CodeCombat. Sorry!" # Warning that shows up on really old Firefox/Chrome/Safari old_browser: "Oh! Dein Browser ist zu alt für CodeCombat. Sorry!" # Warning that shows up on really old Firefox/Chrome/Safari
old_browser_suffix: "Du kannst es trotzdem versuchen, aber es wird wahrscheinlich nicht funktionieren." old_browser_suffix: "Du kannst es trotzdem versuchen, aber es wird wahrscheinlich nicht funktionieren."
ipad_browser: "Schlechte Nachricht: CodeCombat funktioniert im iPad-Browser nicht. Gute Nachricht: Unsere iPad App wartet auf das OK von Apple." ipad_browser: "Schlechte Nachricht: CodeCombat funktioniert im iPad-Browser nicht. Gute Nachricht: Unsere iPad App wartet auf das OK von Apple."
@ -97,12 +97,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
nav: nav:
play: "Spielen" # The top nav bar entry where players choose which levels to play play: "Spielen" # The top nav bar entry where players choose which levels to play
community: "Community" community: "Community"
# courses: "Courses" courses: "Kurse"
editor: "Editor" editor: "Editor"
blog: "Blog" blog: "Blog"
forum: "Forum" forum: "Forum"
account: "Account" account: "Account"
# my_account: "My Account" my_account: "Mein Account"
profile: "Profil" profile: "Profil"
stats: "Statistiken" stats: "Statistiken"
code: "Code" code: "Code"
@ -112,24 +112,24 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
about: "Über" about: "Über"
contact: "Kontakt" contact: "Kontakt"
twitter_follow: "Twitter" twitter_follow: "Twitter"
# students: "Students" students: "Studenten"
teachers: "Lehrer" teachers: "Lehrer"
# careers: "Careers" careers: "Berufe"
# facebook: "Facebook" facebook: "Facebook"
# twitter: "Twitter" twitter: "Twitter"
# create_a_class: "Create a Class" create_a_class: "Erstelle eine Klasse"
# other: "Other" other: "Andere"
# learn_to_code: "Learn to Code!" learn_to_code: "Lerne zu programmieren!"
# toggle_nav: "Toggle navigation" toggle_nav: "Navigation umschalten"
# jobs: "Jobs" jobs: "Jobs"
# schools: "Schools" schools: "Schule"
# educator_wiki: "Educator Wiki" educator_wiki: "Educator Wiki"
# get_involved: "Get Involved" get_involved: "Werde eingebunden"
# open_source: "Open source (GitHub)" open_source: "Open source (GitHub)"
# support: "Support" support: "Support"
# faqs: "FAQs" faqs: "FAQs"
# help_pref: "Need help? Email" help_pref: "Brauchst du Hilfe? Email"
# help_suff: "and we'll get in touch!" help_suff: "und wir treten in Kontakt!"
modal: modal:
close: "Schließen" close: "Schließen"
@ -148,18 +148,18 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
play: play:
play_as: "Spiele als " # Ladder page play_as: "Spiele als " # Ladder page
# compete: "Compete!" # Course details page compete: "Abgeschlossen!" # Course details page
spectate: "Zuschauen" # Ladder page spectate: "Zuschauen" # Ladder page
players: "Spieler" # Hover over a level on /play players: "Spieler" # Hover over a level on /play
hours_played: "Stunden gespielt" # Hover over a level on /play hours_played: "Stunden gespielt" # Hover over a level on /play
items: "Gegenstände" # Tooltip on item shop button from /play items: "Gegenstände" # Tooltip on item shop button from /play
# unlock: "Unlock" # For purchasing items and heroes unlock: "Kaufen" # For purchasing items and heroes
confirm: "Bestätigen" confirm: "Bestätigen"
# owned: "Owned" # For items you own owned: "bereits im Besitz" # For items you own
locked: "Gesperrt" locked: "Gesperrt"
# purchasable: "Purchasable" # For a hero you unlocked but haven't purchased purchasable: "Erhältlich" # For a hero you unlocked but haven't purchased
available: "Verfügbar" available: "Verfügbar"
# skills_granted: "Skills Granted" # Property documentation details skills_granted: "Freischaltbare Fähigkeiten" # Property documentation details
heroes: "Helden" # Tooltip on hero shop button from /play heroes: "Helden" # Tooltip on hero shop button from /play
achievements: "Erfolge" # Tooltip on achievement list button from /play achievements: "Erfolge" # Tooltip on achievement list button from /play
account: "Account" # Tooltip on account button from /play account: "Account" # Tooltip on account button from /play
@ -168,69 +168,69 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
next: "Weiter" # Go from choose hero to choose inventory before playing a level next: "Weiter" # Go from choose hero to choose inventory before playing a level
change_hero: "Held wechseln" # Go back from choose inventory to choose hero change_hero: "Held wechseln" # Go back from choose inventory to choose hero
buy_gems: "Juwelen kaufen" buy_gems: "Juwelen kaufen"
# subscription_required: "Subscription Required" subscription_required: "Abonnement benötigt"
anonymous: "Anonymer Spieler" anonymous: "Anonymer Spieler"
level_difficulty: "Schwierigkeit: " level_difficulty: "Schwierigkeit: "
# play_classroom_version: "Play Classroom Version" # Choose a level in campaign version that you also can play in one of your courses play_classroom_version: "Spiele Kurs Version" # Choose a level in campaign version that you also can play in one of your courses
campaign_beginner: "Anfängerkampagne" campaign_beginner: "Anfängerkampagne"
# awaiting_levels_adventurer_prefix: "We release new levels every week." awaiting_levels_adventurer_prefix: "Wir veröffentlichen wöchentlichen neu Levels."
# awaiting_levels_adventurer: "Sign up as an Adventurer" awaiting_levels_adventurer: "Melde dich als Abenteuerer an"
# awaiting_levels_adventurer_suffix: "to be the first to play new levels." awaiting_levels_adventurer_suffix: "um der erste zu sein der neue Levels spielt."
# adjust_volume: "Adjust volume" adjust_volume: "Lautstärke anpassen"
campaign_multiplayer: "Multiplayerarena" campaign_multiplayer: "Multiplayerarena"
campaign_multiplayer_description: "... in der Du Kopf-an-Kopf gegen andere Spieler programmierst." campaign_multiplayer_description: "... in der Du Kopf-an-Kopf gegen andere Spieler programmierst."
# campaign_old_multiplayer: "(Deprecated) Old Multiplayer Arenas" campaign_old_multiplayer: "(Veraltet) Alte Multiplayer Arenen"
# campaign_old_multiplayer_description: "Relics of a more civilized age. No simulations are run for these older, hero-less multiplayer arenas." campaign_old_multiplayer_description: "Relikte eines zivilisierteren Zeitalters. Es werden keine Simulationen für diese älteren, heldenlosen Mehrspieler Arenen durchgeführt."
# code: code:
# if: "if" # Keywords--these translations show up on hover, so please translate them all, even if it's kind of long. (In the code editor, they will still be in English.) if: "wenn" # Keywords--these translations show up on hover, so please translate them all, even if it's kind of long. (In the code editor, they will still be in English.)
# else: "else" else: "sonst"
# elif: "else if" elif: "sonst wenn"
# while: "while" while: "so lange"
# loop: "loop" loop: "schleife"
# for: "for" for: "r"
# break: "break" break: "pause"
# continue: "continue" continue: "fortsetzen"
# pass: "pass" pass: "bestehen"
# return: "return" return: "zurückgeben"
# then: "then" then: "dann"
# do: "do" do: "mache"
# end: "end" end: "ende"
# function: "function" function: "funktion"
# def: "define" def: "definiere"
# var: "variable" var: "variable"
# self: "self" self: "selbst"
# hero: "hero" hero: "held"
# this: "this" this: "dies"
# or: "or" or: "oder"
# "||": "or" "||": "oder"
# and: "and" and: "und"
# "&&": "and" "&&": "und"
# not: "not" not: "nicht"
# "!": "not" "!": "nicht"
# "=": "assign" "=": "zuweisen"
# "==": "equals" "==": "entspricht"
# "===": "strictly equals" "===": "entspricht strikt"
# "!=": "does not equal" "!=": "entspricht nicht"
# "!==": "does not strictly equal" "!==": "entspricht strikt nicht"
# ">": "is greater than" ">": "ist größer als"
# ">=": "is greater than or equal" ">=": "ist größer als oder gleich"
# "<": "is less than" "<": "ist kleiner als"
# "<=": "is less than or equal" "<=": "ist kleiner als oder gleich"
# "*": "multiplied by" "*": "multipliziert um"
# "/": "divided by" "/": "dividiert durch"
# "+": "plus" "+": "plus"
# "-": "minus" "-": "minus"
# "+=": "add and assign" "+=": "addieren und zuweisen"
# "-=": "subtract and assign" "-=": "subtrahieren und zuweisen"
# True: "True" True: "Wahr"
# true: "true" true: "wahr"
# False: "False" False: "Falsch"
# false: "false" false: "falsch"
# undefined: "undefined" undefined: "undefiniert"
# null: "null" null: "nichts"
# nil: "nil" nil: "nichts"
# None: "None" None: "Kein"
# share_progress_modal: # share_progress_modal:
# blurb: "Youre making great progress! Tell your parent how much you've learned with CodeCombat." # blurb: "Youre making great progress! Tell your parent how much you've learned with CodeCombat."
@ -260,18 +260,18 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
log_in: "mit Passwort einloggen" log_in: "mit Passwort einloggen"
required: "Du musst dich vorher einloggen um dort hin zu gehen." required: "Du musst dich vorher einloggen um dort hin zu gehen."
login_switch: "Du hast bereits einen Account?" login_switch: "Du hast bereits einen Account?"
# school_name: "School Name and City" school_name: "Schulname und Stadt"
# optional: "optional" optional: "Optional"
# school_name_placeholder: "Example High School, Springfield, IL" school_name_placeholder: "Beispiel Schule, Springfield, IL"
# or_sign_up_with: "or sign up with" or_sign_up_with: "oder melde dich an mit"
# connected_gplus_header: "You've successfully connected with Google+!" connected_gplus_header: "Du hast dich erfolgreich über Google+ verbunden!"
# connected_gplus_p: "Finish signing up so you can log in with your Google+ account." connected_gplus_p: "Vervollständige die Anmeldung um dich mit deinem Google+ Account anzumelden."
# gplus_exists: "You already have an account associated with Google+!" gplus_exists: "Du hast bereits einen verknüpften Google+ Account!"
# connected_facebook_header: "You've successfully connected with Facebook!" connected_facebook_header: "Du hast dich erfolgreich über Facebook verbunden!"
# connected_facebook_p: "Finish signing up so you can log in with your Facebook account." connected_facebook_p: "Vervollständige die Anmeldung um dich mit deinem Facebook Account anzumelden."
# facebook_exists: "You already have an account associated with Facebook!" facebook_exists: "Du hast bereits einen verknüpften Facebook Account!"
# hey_students: "Students, enter the class code from your teacher." hey_students: "Schüler, gebt den Klassencode eures Lehrers ein."
# birthday: "Birthday" birthday: "Geburstag"
recover: recover:
recover_account_title: "Account Wiederherstellung" recover_account_title: "Account Wiederherstellung"
@ -316,23 +316,23 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
date: "Datum" date: "Datum"
body: "Inhalt" body: "Inhalt"
version: "Version" version: "Version"
# pending: "Pending" pending: "Ausstehend"
# accepted: "Accepted" accepted: "Akzeptiert"
# rejected: "Rejected" rejected: "Abgelehnt"
# withdrawn: "Withdrawn" withdrawn: "Zurückgezogen"
# accept: "Accept" accept: "Akzeptieren"
# reject: "Reject" reject: "Abgelehnen"
# withdraw: "Withdraw" withdraw: "Zurückziehen"
submitter: "Veröffentlicher" submitter: "Veröffentlicher"
submitted: "Veröffentlicht" submitted: "Veröffentlicht"
commit_msg: "Nachricht absenden" commit_msg: "Nachricht absenden"
version_history: "Versionshistorie" version_history: "Versionshistorie"
version_history_for: "Versionsgeschichte für: " version_history_for: "Versionsgeschichte für: "
# select_changes: "Select two changes below to see the difference." select_changes: "Wählen zwei Änderungen unterhalb um den Unterschied zu sehen."
# undo_prefix: "Undo" undo_prefix: "Rückgängig"
# undo_shortcut: "(Ctrl+Z)" undo_shortcut: "(Strg+Z)"
# redo_prefix: "Redo" redo_prefix: "Wiederherstellen"
# redo_shortcut: "(Ctrl+Shift+Z)" redo_shortcut: "(Strg+Umschalt+Z)"
play_preview: "Vorschau vom aktuellen Level spielen" play_preview: "Vorschau vom aktuellen Level spielen"
result: "Ergebnis" result: "Ergebnis"
results: "Ergebnisse" results: "Ergebnisse"
@ -341,7 +341,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
subject: "Betreff" subject: "Betreff"
email: "Email" email: "Email"
password: "Passwort" password: "Passwort"
# confirm_password: "Confirm Password" confirm_password: "Passwort bestätigen"
message: "Nachricht" message: "Nachricht"
code: "Code" code: "Code"
ladder: "Rangliste" ladder: "Rangliste"
@ -357,12 +357,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
hard: "Schwer" hard: "Schwer"
player: "Spieler" player: "Spieler"
player_level: "Spielerlevel" # Like player level 5, not like level: Dungeons of Kithgard player_level: "Spielerlevel" # Like player level 5, not like level: Dungeons of Kithgard
# warrior: "Warrior" warrior: "Krieger"
# ranger: "Ranger" ranger: "ger"
# wizard: "Wizard" wizard: "Hexer"
# first_name: "First Name" first_name: "Vorname"
# last_name: "Last Name" last_name: "Nachname"
# username: "Username" username: "Benutzername"
units: units:
second: "Sekunde" second: "Sekunde"
@ -1869,19 +1869,19 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription:
license: "Lizenz" license: "Lizenz"
oreilly: "Ebook deiner Wahl" oreilly: "Ebook deiner Wahl"
# calendar: calendar:
# year: "Year" year: "Jahr"
# day: "Day" day: "Tag"
# month: "Month" month: "Monat"
# january: "January" january: "Januar"
# february: "February" february: "Februar"
# march: "March" march: "März"
# april: "April" april: "April"
# may: "May" may: "Mai"
# june: "June" june: "Juni"
# july: "July" july: "Juli"
# august: "August" august: "August"
# september: "September" september: "September"
# october: "October" october: "Oktober"
# november: "November" november: "November"
# december: "December" december: "Dezember"

View file

@ -4,10 +4,10 @@ block content
div#ladder-top div#ladder-top
if leagueType == 'course' && view.course.id if view.leagueType === 'course' && view.course
#course-header #course-header
#course-details-link #course-details-link
a(href="/courses/"+view.course.id+"/"+view.league.id) a(href="/courses/{#view.course.id}/{#view.league.id}")
span.glyphicon.glyphicon-arrow-left span.glyphicon.glyphicon-arrow-left
span.spl Levels span.spl Levels
@ -15,22 +15,21 @@ block content
span#course-name span#course-name
span= view.course.get('name') span= view.course.get('name')
span.spl - Arena span.spl - Arena
div#level-column div#level-column
if levelDescription if view.levelDescription
div!= levelDescription div!= view.levelDescription
if leagueType === 'clan' if view.leagueType === 'clan'
h1.league-header h1.league-header
a(href="/clans/#{league.id}")= league.get('name') a(href="/clans/#{view.league.id}")= view.league.get('name')
span.spl(data-i18n="ladder.league") League span.spl(data-i18n="ladder.league") League
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
.tournament-blurb .tournament-blurb
h2 h2
span(data-i18n="ladder.tournament_ended") Tournament ended span(data-i18n="ladder.tournament_ended") Tournament ended
| #{tournamentTimeLeft} | #{view.tournamentTimeLeft}
p p
span(data-i18n="ladder.tournament_blurb") Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details span(data-i18n="ladder.tournament_blurb") Write code, collect gold, build armies, crush foes, win prizes, and upgrade your career in our $40,000 Greed tournament! Check out the details
| |
@ -63,11 +62,11 @@ block content
a(href="http://aws.amazon.com/") a(href="http://aws.amazon.com/")
img(src=base + "aws.png") img(src=base + "aws.png")
if level.get('name') == 'Criss-Cross' if view.level.get('name') == 'Criss-Cross'
.tournament-blurb .tournament-blurb
h2 h2
span(data-i18n="ladder.tournament_ended") Tournament ended span(data-i18n="ladder.tournament_ended") Tournament ended
| #{tournamentTimeLeft} | #{view.tournamentTimeLeft}
p p
span(data-i18n="ladder.tournament_blurb_criss_cross") Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details span(data-i18n="ladder.tournament_blurb_criss_cross") Win bids, construct paths, outwit opponents, grab gems, and upgrade your career in our Criss-Cross tournament! Check out the details
| |
@ -86,13 +85,13 @@ block content
a(href="http://discourse.codecombat.com/") the forum a(href="http://discourse.codecombat.com/") the forum
| and discuss your strategies, your triumphs, and your turmoils. | and discuss your strategies, your triumphs, and your turmoils.
if level.get('name') == 'Zero Sum' && !league if view.level.get('name') == 'Zero Sum' && !view.league
.tournament-blurb .tournament-blurb
h2 h2
span(data-i18n="ladder.tournament_ended") Tournament ended span(data-i18n="ladder.tournament_ended") Tournament ended
| #{tournamentTimeLeft} | #{view.tournamentTimeLeft}
//span(data-i18n="ladder.tournament_started") , started //span(data-i18n="ladder.tournament_started") , started
//| #{tournamentTimeElapsed} //| #{view.tournamentTimeElapsed}
p p
span(data-i18n="ladder.tournament_blurb_zero_sum") Unleash your coding creativity in both gold gathering and battle tactics in this alpine mirror match between red sorcerer and blue sorcerer. The tournament began on Friday, March 27 and will run until Monday, April 6 at 5PM PDT. Compete for fun and glory! Check out the details span(data-i18n="ladder.tournament_blurb_zero_sum") Unleash your coding creativity in both gold gathering and battle tactics in this alpine mirror match between red sorcerer and blue sorcerer. The tournament began on Friday, March 27 and will run until Monday, April 6 at 5PM PDT. Compete for fun and glory! Check out the details
| |
@ -109,14 +108,14 @@ block content
a(href="http://discourse.codecombat.com/") the forum a(href="http://discourse.codecombat.com/") the forum
| and discuss your strategies, your triumphs, and your turmoils. | and discuss your strategies, your triumphs, and your turmoils.
if level.get('name') == 'Ace of Coders' if view.level.get('name') == 'Ace of Coders'
.tournament-blurb .tournament-blurb
h2 h2
//span(data-i18n="ladder.tournament_ends") Tournament ends //span(data-i18n="ladder.tournament_ends") Tournament ends
span(data-i18n="ladder.tournament_ended") Tournament ended span(data-i18n="ladder.tournament_ended") Tournament ended
| #{tournamentTimeLeft} | #{view.tournamentTimeLeft}
span(data-i18n="ladder.tournament_started") , started span(data-i18n="ladder.tournament_started") , started
| #{tournamentTimeElapsed} | #{view.tournamentTimeElapsed}
p p
span(data-i18n="ladder.tournament_blurb_ace_of_coders") Battle it out in the frozen glacier in this domination-style mirror match! The tournament began on Wednesday, September 16 and will run until Wednesday, October 14 at 5PM PDT. Check out the details span(data-i18n="ladder.tournament_blurb_ace_of_coders") Battle it out in the frozen glacier in this domination-style mirror match! The tournament began on Wednesday, September 16 and will run until Wednesday, October 14 at 5PM PDT. Check out the details
| |
@ -135,17 +134,18 @@ block content
div#columns.row div#columns.row
div.column.col-md-2 div.column.col-md-2
for team in teams if view.teams
div.column.col-md-4 for team in view.teams
a(class="play-button btn btn-illustrated btn-block btn-lg " + (team.id == 'ogres' ? 'btn-primary' : 'btn-danger'), data-team=team.id) div.column.col-md-4
span(data-i18n="play.play_as") Play As a(class="play-button btn btn-illustrated btn-block btn-lg " + (team.id == 'ogres' ? 'btn-primary' : 'btn-danger'), data-team=team.id)
| span(data-i18n="play.play_as") Play As
span= team.displayName |
span= team.displayName
div.column.col-md-2 div.column.col-md-2
if leagueType !== 'course' if view.leagueType !== 'course'
.spectate-button-container .spectate-button-container
a(href="/play/spectate/#{level.get('slug')}" + (league ? "?league=" + league.id : "")).spectate-button.btn.btn-illustrated.btn-info.center a(href="/play/spectate/#{view.level.get('slug')}" + (view.league ? "?league=" + view.league.id : "")).spectate-button.btn.btn-illustrated.btn-info.center
span(data-i18n="play.spectate") Spectate span(data-i18n="play.spectate") Spectate
ul.nav.nav-pills ul.nav.nav-pills
@ -154,16 +154,16 @@ block content
if !me.get('anonymous') if !me.get('anonymous')
li li
a(href="#my-matches", data-toggle="tab", data-i18n="ladder.my_matches") My Matches a(href="#my-matches", data-toggle="tab", data-i18n="ladder.my_matches") My Matches
if leagueType !== 'course' if view.leagueType !== 'course'
li li
a(href="#simulate", data-toggle="tab", data-i18n="ladder.simulate") Simulate a(href="#simulate", data-toggle="tab", data-i18n="ladder.simulate") Simulate
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
li li
a(href="#prizes", data-toggle="tab", data-i18n="ladder_prizes.prizes") Prizes a(href="#prizes", data-toggle="tab", data-i18n="ladder_prizes.prizes") Prizes
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
li li
a(href="#rules", data-toggle="tab", data-i18n="ladder.rules") Rules a(href="#rules", data-toggle="tab", data-i18n="ladder.rules") Rules
if level.get('name') == 'Greed' || level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' || level.get('name') == 'Ace of Coders' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum' || view.level.get('name') == 'Ace of Coders'
li li
a(href="#winners", data-toggle="tab", data-i18n="ladder.winners") Winners a(href="#winners", data-toggle="tab", data-i18n="ladder.winners") Winners
@ -174,7 +174,7 @@ block content
#my-matches-tab-view #my-matches-tab-view
.tab-pane.well#simulate .tab-pane.well#simulate
#simulate-tab-view #simulate-tab-view
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
.tab-pane.well#prizes .tab-pane.well#prizes
h1(data-i18n="ladder_prizes.title") Tournament Prizes h1(data-i18n="ladder_prizes.title") Tournament Prizes
p p
@ -740,7 +740,7 @@ block content
| - $50 | - $50
td $50 td $50
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
.tab-pane.well#rules .tab-pane.well#rules
h1(data-i18n="ladder.tournament_rules") Tournament Rules h1(data-i18n="ladder.tournament_rules") Tournament Rules
h2 General h2 General
@ -802,7 +802,7 @@ block content
a(href="http://discourse.codecombat.com/") Discourse forum a(href="http://discourse.codecombat.com/") Discourse forum
| . | .
if level.get('name') == 'Greed' || level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum'
.tab-pane.well#winners .tab-pane.well#winners
h1(data-i18n="ladder.winners") Winners h1(data-i18n="ladder.winners") Winners
@ -810,71 +810,71 @@ block content
thead thead
tr tr
th(data-i18n="ladder_prizes.rank") Rank th(data-i18n="ladder_prizes.rank") Rank
if level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum'
th th
th Human th Human
if level.get('name') == 'Greed' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Zero Sum'
th Human wins/losses/ties th Human wins/losses/ties
else else
th Human score th Human score
if level.get('name') == 'Zero Sum' if view.level.get('name') == 'Zero Sum'
th th
if level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum'
th th
th Ogre th Ogre
if level.get('name') == 'Greed' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Zero Sum'
th Ogre wins/losses/ties th Ogre wins/losses/ties
else else
th Ogre score th Ogre score
th(data-i18n="play.spectate") Spectate th(data-i18n="play.spectate") Spectate
tbody tbody
each human, index in winners.humans each human, index in view.winners.humans
- var ogre = winners.ogres[index] - var ogre = view.winners.ogres[index]
tr tr
td= human.rank td= human.rank
if level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum'
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + human.codeLanguage + "_icon.png)" title=_.string.capitalize(human.codeLanguage)) td.code-language-cell(style="background-image: url(/images/common/code_languages/" + human.codeLanguage + "_icon.png)" title=_.string.capitalize(human.codeLanguage))
td= human.name td= human.name
if level.get('name') == 'Greed' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Zero Sum'
td td
span.win= human.wins span.win= human.wins
| - | -
span.loss= human.losses span.loss= human.losses
| - | -
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
span.tie= 377 - human.wins - human.losses span.tie= 377 - human.wins - human.losses
else if level.get('name') == 'Zero Sum' else if view.level.get('name') == 'Zero Sum'
span.tie= 108 - human.wins - human.losses span.tie= 108 - human.wins - human.losses
else else
td td
span= Math.round(100 * human.score) span= Math.round(100 * human.score)
if ogre if ogre
if level.get('name') == 'Zero Sum' if view.level.get('name') == 'Zero Sum'
td= ogre.rank td= ogre.rank
if level.get('name') == 'Criss-Cross' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Criss-Cross' || view.level.get('name') == 'Zero Sum'
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + ogre.codeLanguage + "_icon.png)" title=_.string.capitalize(ogre.codeLanguage)) td.code-language-cell(style="background-image: url(/images/common/code_languages/" + ogre.codeLanguage + "_icon.png)" title=_.string.capitalize(ogre.codeLanguage))
td= ogre.name td= ogre.name
if level.get('name') == 'Greed' || level.get('name') == 'Zero Sum' if view.level.get('name') == 'Greed' || view.level.get('name') == 'Zero Sum'
td td
span.win= ogre.wins span.win= ogre.wins
| - | -
span.loss= ogre.losses span.loss= ogre.losses
| - | -
if level.get('name') == 'Greed' if view.level.get('name') == 'Greed'
span.tie= 407 - ogre.wins - ogre.losses span.tie= 407 - ogre.wins - ogre.losses
else if level.get('name') == 'Zero Sum' else if view.level.get('name') == 'Zero Sum'
span.tie= Math.max(0, 163 - ogre.wins - ogre.losses) span.tie= Math.max(0, 163 - ogre.wins - ogre.losses)
else else
td td
span= Math.round(100 * ogre.score) span= Math.round(100 * ogre.score)
td td
a(href="/play/spectate/" + level.get('slug') + "?session-one=" + human.sessionID + "&session-two=" + ogre.sessionID, data-i18n="ladder.watch_battle") Watch the battle a(href="/play/spectate/" + view.level.get('slug') + "?session-one=" + human.sessionID + "&session-two=" + ogre.sessionID, data-i18n="ladder.watch_battle") Watch the battle
else else
td td
td td
td td
if level.get('name') == 'Ace of Coders' if view.level.get('name') == 'Ace of Coders'
.tab-pane.well#winners .tab-pane.well#winners
h1(data-i18n="ladder.winners") Winners h1(data-i18n="ladder.winners") Winners
@ -888,7 +888,7 @@ block content
th Losses th Losses
th(data-i18n="play.spectate") Spectate th(data-i18n="play.spectate") Spectate
tbody tbody
each player in winners.humans each player in view.winners.humans
tr tr
td= player.rank td= player.rank
td.code-language-cell(style="background-image: url(/images/common/code_languages/" + player.codeLanguage + "_icon.png)" title=_.string.capitalize(player.codeLanguage)) td.code-language-cell(style="background-image: url(/images/common/code_languages/" + player.codeLanguage + "_icon.png)" title=_.string.capitalize(player.codeLanguage))
@ -899,6 +899,6 @@ block content
span.loss= player.losses span.loss= player.losses
td td
if player.team == "ogres" if player.team == "ogres"
a(href="/play/spectate/" + level.get('slug') + "?session-one=55df8c9207d920b7e4262f33" + "&session-two=" + player.sessionID, data-i18n="ladder.watch_battle") Watch the battle a(href="/play/spectate/" + view.level.get('slug') + "?session-one=55df8c9207d920b7e4262f33" + "&session-two=" + player.sessionID, data-i18n="ladder.watch_battle") Watch the battle
else else
a(href="/play/spectate/" + level.get('slug') + "?session-one=" + player.sessionID + "&session-two=55e1d23686c019bc47b640fe", data-i18n="ladder.watch_battle") Watch the battle a(href="/play/spectate/" + view.level.get('slug') + "?session-one=" + player.sessionID + "&session-two=55e1d23686c019bc47b640fe", data-i18n="ladder.watch_battle") Watch the battle

View file

@ -158,7 +158,7 @@ module.exports = class CampaignEditorView extends RootView
index = 0 index = 0
for levelOriginal, campaignLevel of campaignLevels for levelOriginal, campaignLevel of campaignLevels
level = @levels.findWhere({original: levelOriginal}) level = @levels.findWhere({original: levelOriginal})
if level.get('campaignIndex') isnt index if level and level.get('campaignIndex') isnt index
level.set('campaignIndex', index) level.set('campaignIndex', index)
campaignLevel.campaignIndex = index campaignLevel.campaignIndex = index
index += 1 index += 1

View file

@ -39,13 +39,19 @@ module.exports = class LadderView extends RootView
'click a:not([data-toggle])': 'onClickedLink' 'click a:not([data-toggle])': 'onClickedLink'
'click .spectate-button': 'onClickSpectateButton' 'click .spectate-button': 'onClickSpectateButton'
constructor: (options, @levelID, @leagueType, @leagueID) -> initialize: (options, @levelID, @leagueType, @leagueID) ->
super(options)
@level = @supermodel.loadModel(new Level(_id: @levelID)).model @level = @supermodel.loadModel(new Level(_id: @levelID)).model
@level.once 'sync', =>
@levelDescription = marked(@level.get('description')) if @level.get('description')
@sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model @sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model
@teams = [] @winners = require('./tournament_results')[@levelID]
if tournamentEndDate = {greed: 1402444800000, 'criss-cross': 1410912000000, 'zero-sum': 1428364800000, 'ace-of-coders': 1444867200000}[@levelID]
@tournamentTimeLeft = moment(new Date(tournamentEndDate)).fromNow()
if tournamentStartDate = {'zero-sum': 1427472000000, 'ace-of-coders': 1442417400000}[@levelID]
@tournamentTimeElapsed = moment(new Date(tournamentStartDate)).fromNow()
@loadLeague() @loadLeague()
@course = new Course()
loadLeague: -> loadLeague: ->
@leagueID = @leagueType = null unless @leagueType in ['clan', 'course'] @leagueID = @leagueType = null unless @leagueType in ['clan', 'course']
@ -68,23 +74,6 @@ module.exports = class LadderView extends RootView
@teams = teamDataFromLevel @level @teams = teamDataFromLevel @level
super() super()
getRenderData: ->
ctx = super()
ctx.level = @level
ctx.link = "/play/level/#{@level.get('name')}"
ctx.teams = @teams
ctx.levelID = @levelID
ctx.levelDescription = marked(@level.get('description')) if @level.get('description')
ctx.leagueType = @leagueType
ctx.league = @league
ctx._ = _
if tournamentEndDate = {greed: 1402444800000, 'criss-cross': 1410912000000, 'zero-sum': 1428364800000, 'ace-of-coders': 1444867200000}[@levelID]
ctx.tournamentTimeLeft = moment(new Date(tournamentEndDate)).fromNow()
if tournamentStartDate = {'zero-sum': 1427472000000, 'ace-of-coders': 1442417400000}[@levelID]
ctx.tournamentTimeElapsed = moment(new Date(tournamentStartDate)).fromNow()
ctx.winners = require('./tournament_results')[@levelID]
ctx
afterRender: -> afterRender: ->
super() super()
return unless @supermodel.finished() return unless @supermodel.finished()

View file

@ -314,13 +314,18 @@ module.exports = class SpellView extends CocoView
if /^\s+$/.test lines[docRange.end.row+1] if /^\s+$/.test lines[docRange.end.row+1]
docRange.end.row += 1 docRange.end.row += 1
xstart = startOfRow(row)
if language is 'python'
requiredIndent = new RegExp '^' + new Array(xstart / 4 + 2).join '( |\t)' + '(\\S|\\s*$)'
for crow in [docRange.start.row+1..docRange.end.row]
unless requiredIndent.test lines[crow]
docRange.end.row = crow - 1
break
rstart = @aceSession.documentToScreenPosition docRange.start.row, docRange.start.column rstart = @aceSession.documentToScreenPosition docRange.start.row, docRange.start.column
rend = @aceSession.documentToScreenPosition docRange.end.row, docRange.end.column rend = @aceSession.documentToScreenPosition docRange.end.row, docRange.end.column
range = new Range rstart.row, rstart.column, rend.row, rend.column range = new Range rstart.row, rstart.column, rend.row, rend.column
xstart = startOfRow(row)
level = Math.floor(xstart / 4) level = Math.floor(xstart / 4)
indent = startOfRow(row + 1)
color = colors[level % colors.length] color = colors[level % colors.length]
bw = 3 bw = 3
to = markerLayer.$getTop(range.start.row, config) to = markerLayer.$getTop(range.start.row, config)

View file

@ -78,6 +78,7 @@ module.exports =
return done("Error getting sales contact for #{fromAddress}: #{err}") if err return done("Error getting sales contact for #{fromAddress}: #{err}") if err
matches = salesContactEmail.match(/^[a-zA-Z_]+ <(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3})>$|(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3})/i) matches = salesContactEmail.match(/^[a-zA-Z_]+ <(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3})>$|(\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3})/i)
salesContactEmail = matches?[1] ? matches?[2] ? config.mail.supportSchools salesContactEmail = matches?[1] ? matches?[2] ? config.mail.supportSchools
salesContactEmail = config.mail.supportSchools if salesContactEmail?.indexOf('brian@codecombat.com') >= 0
postData = postData =
to: [salesContactEmail] to: [salesContactEmail]
sender: config.mail.username sender: config.mail.username