diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index a9eb7afc1..5314735d0 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -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_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_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_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." @@ -97,12 +97,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: nav: play: "Spielen" # The top nav bar entry where players choose which levels to play community: "Community" -# courses: "Courses" + courses: "Kurse" editor: "Editor" blog: "Blog" forum: "Forum" account: "Account" -# my_account: "My Account" + my_account: "Mein Account" profile: "Profil" stats: "Statistiken" code: "Code" @@ -112,24 +112,24 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: about: "Über" contact: "Kontakt" twitter_follow: "Twitter" -# students: "Students" + students: "Studenten" teachers: "Lehrer" -# careers: "Careers" -# facebook: "Facebook" -# twitter: "Twitter" -# create_a_class: "Create a Class" -# other: "Other" -# learn_to_code: "Learn to Code!" -# toggle_nav: "Toggle navigation" -# jobs: "Jobs" -# schools: "Schools" -# educator_wiki: "Educator Wiki" -# get_involved: "Get Involved" -# open_source: "Open source (GitHub)" -# support: "Support" -# faqs: "FAQs" -# help_pref: "Need help? Email" -# help_suff: "and we'll get in touch!" + careers: "Berufe" + facebook: "Facebook" + twitter: "Twitter" + create_a_class: "Erstelle eine Klasse" + other: "Andere" + learn_to_code: "Lerne zu programmieren!" + toggle_nav: "Navigation umschalten" + jobs: "Jobs" + schools: "Schule" + educator_wiki: "Educator Wiki" + get_involved: "Werde eingebunden" + open_source: "Open source (GitHub)" + support: "Support" + faqs: "FAQs" + help_pref: "Brauchst du Hilfe? Email" + help_suff: "und wir treten in Kontakt!" modal: close: "Schließen" @@ -148,18 +148,18 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: play: play_as: "Spiele als " # Ladder page -# compete: "Compete!" # Course details page + compete: "Abgeschlossen!" # Course details page spectate: "Zuschauen" # Ladder page players: "Spieler" # 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 -# unlock: "Unlock" # For purchasing items and heroes + unlock: "Kaufen" # For purchasing items and heroes confirm: "Bestätigen" -# owned: "Owned" # For items you own + owned: "bereits im Besitz" # For items you own 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" -# skills_granted: "Skills Granted" # Property documentation details + skills_granted: "Freischaltbare Fähigkeiten" # Property documentation details heroes: "Helden" # Tooltip on hero shop button from /play achievements: "Erfolge" # Tooltip on achievement list 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 change_hero: "Held wechseln" # Go back from choose inventory to choose hero buy_gems: "Juwelen kaufen" -# subscription_required: "Subscription Required" + subscription_required: "Abonnement benötigt" anonymous: "Anonymer Spieler" 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" -# 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: "Wir veröffentlichen wöchentlichen neu Levels." + awaiting_levels_adventurer: "Melde dich als Abenteuerer an" + awaiting_levels_adventurer_suffix: "um der erste zu sein der neue Levels spielt." + adjust_volume: "Lautstärke anpassen" campaign_multiplayer: "Multiplayerarena" campaign_multiplayer_description: "... in der Du Kopf-an-Kopf gegen andere Spieler programmierst." -# campaign_old_multiplayer: "(Deprecated) Old Multiplayer Arenas" -# campaign_old_multiplayer_description: "Relics of a more civilized age. No simulations are run for these older, hero-less multiplayer arenas." + campaign_old_multiplayer: "(Veraltet) Alte Multiplayer Arenen" + campaign_old_multiplayer_description: "Relikte eines zivilisierteren Zeitalters. Es werden keine Simulationen für diese älteren, heldenlosen Mehrspieler Arenen durchgeführt." -# 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.) -# else: "else" -# elif: "else if" -# while: "while" -# loop: "loop" -# for: "for" -# break: "break" -# continue: "continue" -# pass: "pass" -# return: "return" -# then: "then" -# do: "do" -# end: "end" -# function: "function" -# def: "define" -# var: "variable" -# self: "self" -# hero: "hero" -# this: "this" -# or: "or" -# "||": "or" -# and: "and" -# "&&": "and" -# not: "not" -# "!": "not" -# "=": "assign" -# "==": "equals" -# "===": "strictly equals" -# "!=": "does not equal" -# "!==": "does not strictly equal" -# ">": "is greater than" -# ">=": "is greater than or equal" -# "<": "is less than" -# "<=": "is less than or equal" -# "*": "multiplied by" -# "/": "divided by" -# "+": "plus" -# "-": "minus" -# "+=": "add and assign" -# "-=": "subtract and assign" -# True: "True" -# true: "true" -# False: "False" -# false: "false" -# undefined: "undefined" -# null: "null" -# nil: "nil" -# None: "None" + code: + 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: "sonst" + elif: "sonst wenn" + while: "so lange" + loop: "schleife" + for: "für" + break: "pause" + continue: "fortsetzen" + pass: "bestehen" + return: "zurückgeben" + then: "dann" + do: "mache" + end: "ende" + function: "funktion" + def: "definiere" + var: "variable" + self: "selbst" + hero: "held" + this: "dies" + or: "oder" + "||": "oder" + and: "und" + "&&": "und" + not: "nicht" + "!": "nicht" + "=": "zuweisen" + "==": "entspricht" + "===": "entspricht strikt" + "!=": "entspricht nicht" + "!==": "entspricht strikt nicht" + ">": "ist größer als" + ">=": "ist größer als oder gleich" + "<": "ist kleiner als" + "<=": "ist kleiner als oder gleich" + "*": "multipliziert um" + "/": "dividiert durch" + "+": "plus" + "-": "minus" + "+=": "addieren und zuweisen" + "-=": "subtrahieren und zuweisen" + True: "Wahr" + true: "wahr" + False: "Falsch" + false: "falsch" + undefined: "undefiniert" + null: "nichts" + nil: "nichts" + None: "Kein" # share_progress_modal: # blurb: "You’re 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" required: "Du musst dich vorher einloggen um dort hin zu gehen." login_switch: "Du hast bereits einen Account?" -# school_name: "School Name and City" -# optional: "optional" -# school_name_placeholder: "Example High School, Springfield, IL" -# or_sign_up_with: "or sign up with" -# connected_gplus_header: "You've successfully connected with Google+!" -# connected_gplus_p: "Finish signing up so you can log in with your Google+ account." -# gplus_exists: "You already have an account associated with Google+!" -# connected_facebook_header: "You've successfully connected with Facebook!" -# connected_facebook_p: "Finish signing up so you can log in with your Facebook account." -# facebook_exists: "You already have an account associated with Facebook!" -# hey_students: "Students, enter the class code from your teacher." -# birthday: "Birthday" + school_name: "Schulname und Stadt" + optional: "Optional" + school_name_placeholder: "Beispiel Schule, Springfield, IL" + or_sign_up_with: "oder melde dich an mit" + connected_gplus_header: "Du hast dich erfolgreich über Google+ verbunden!" + connected_gplus_p: "Vervollständige die Anmeldung um dich mit deinem Google+ Account anzumelden." + gplus_exists: "Du hast bereits einen verknüpften Google+ Account!" + connected_facebook_header: "Du hast dich erfolgreich über Facebook verbunden!" + connected_facebook_p: "Vervollständige die Anmeldung um dich mit deinem Facebook Account anzumelden." + facebook_exists: "Du hast bereits einen verknüpften Facebook Account!" + hey_students: "Schüler, gebt den Klassencode eures Lehrers ein." + birthday: "Geburstag" recover: recover_account_title: "Account Wiederherstellung" @@ -316,23 +316,23 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: date: "Datum" body: "Inhalt" version: "Version" -# pending: "Pending" -# accepted: "Accepted" -# rejected: "Rejected" -# withdrawn: "Withdrawn" -# accept: "Accept" -# reject: "Reject" -# withdraw: "Withdraw" + pending: "Ausstehend" + accepted: "Akzeptiert" + rejected: "Abgelehnt" + withdrawn: "Zurückgezogen" + accept: "Akzeptieren" + reject: "Abgelehnen" + withdraw: "Zurückziehen" submitter: "Veröffentlicher" submitted: "Veröffentlicht" commit_msg: "Nachricht absenden" version_history: "Versionshistorie" version_history_for: "Versionsgeschichte für: " -# select_changes: "Select two changes below to see the difference." -# undo_prefix: "Undo" -# undo_shortcut: "(Ctrl+Z)" -# redo_prefix: "Redo" -# redo_shortcut: "(Ctrl+Shift+Z)" + select_changes: "Wählen zwei Änderungen unterhalb um den Unterschied zu sehen." + undo_prefix: "Rückgängig" + undo_shortcut: "(Strg+Z)" + redo_prefix: "Wiederherstellen" + redo_shortcut: "(Strg+Umschalt+Z)" play_preview: "Vorschau vom aktuellen Level spielen" result: "Ergebnis" results: "Ergebnisse" @@ -341,7 +341,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: subject: "Betreff" email: "Email" password: "Passwort" -# confirm_password: "Confirm Password" + confirm_password: "Passwort bestätigen" message: "Nachricht" code: "Code" ladder: "Rangliste" @@ -357,12 +357,12 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: hard: "Schwer" player: "Spieler" player_level: "Spielerlevel" # Like player level 5, not like level: Dungeons of Kithgard -# warrior: "Warrior" -# ranger: "Ranger" -# wizard: "Wizard" -# first_name: "First Name" -# last_name: "Last Name" -# username: "Username" + warrior: "Krieger" + ranger: "Jäger" + wizard: "Hexer" + first_name: "Vorname" + last_name: "Nachname" + username: "Benutzername" units: second: "Sekunde" @@ -1869,19 +1869,19 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: license: "Lizenz" oreilly: "Ebook deiner Wahl" -# calendar: -# year: "Year" -# day: "Day" -# month: "Month" -# january: "January" -# february: "February" -# march: "March" -# april: "April" -# may: "May" -# june: "June" -# july: "July" -# august: "August" -# september: "September" -# october: "October" -# november: "November" -# december: "December" + calendar: + year: "Jahr" + day: "Tag" + month: "Monat" + january: "Januar" + february: "Februar" + march: "März" + april: "April" + may: "Mai" + june: "Juni" + july: "Juli" + august: "August" + september: "September" + october: "Oktober" + november: "November" + december: "Dezember" diff --git a/app/templates/play/ladder/ladder.jade b/app/templates/play/ladder/ladder.jade index 31e1fceb4..b4f1075c5 100644 --- a/app/templates/play/ladder/ladder.jade +++ b/app/templates/play/ladder/ladder.jade @@ -4,10 +4,10 @@ block content div#ladder-top - if leagueType == 'course' && view.course.id + if view.leagueType === 'course' && view.course #course-header #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.spl Levels @@ -15,22 +15,21 @@ block content span#course-name span= view.course.get('name') span.spl - Arena - div#level-column - if levelDescription - div!= levelDescription + if view.levelDescription + div!= view.levelDescription - if leagueType === 'clan' + if view.leagueType === 'clan' 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 - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' .tournament-blurb h2 span(data-i18n="ladder.tournament_ended") Tournament ended - | #{tournamentTimeLeft} + | #{view.tournamentTimeLeft} 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 | @@ -63,11 +62,11 @@ block content a(href="http://aws.amazon.com/") img(src=base + "aws.png") - if level.get('name') == 'Criss-Cross' + if view.level.get('name') == 'Criss-Cross' .tournament-blurb h2 span(data-i18n="ladder.tournament_ended") Tournament ended - | #{tournamentTimeLeft} + | #{view.tournamentTimeLeft} 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 | @@ -86,13 +85,13 @@ block content a(href="http://discourse.codecombat.com/") the forum | 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 h2 span(data-i18n="ladder.tournament_ended") Tournament ended - | #{tournamentTimeLeft} + | #{view.tournamentTimeLeft} //span(data-i18n="ladder.tournament_started") , started - //| #{tournamentTimeElapsed} + //| #{view.tournamentTimeElapsed} 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 | @@ -109,14 +108,14 @@ block content a(href="http://discourse.codecombat.com/") the forum | 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 h2 //span(data-i18n="ladder.tournament_ends") Tournament ends span(data-i18n="ladder.tournament_ended") Tournament ended - | #{tournamentTimeLeft} + | #{view.tournamentTimeLeft} span(data-i18n="ladder.tournament_started") , started - | #{tournamentTimeElapsed} + | #{view.tournamentTimeElapsed} 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 | @@ -135,17 +134,18 @@ block content div#columns.row div.column.col-md-2 - for team in teams - div.column.col-md-4 - 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 + if view.teams + for team in view.teams + div.column.col-md-4 + 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 div.column.col-md-2 - if leagueType !== 'course' + if view.leagueType !== 'course' .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 ul.nav.nav-pills @@ -154,16 +154,16 @@ block content if !me.get('anonymous') li a(href="#my-matches", data-toggle="tab", data-i18n="ladder.my_matches") My Matches - if leagueType !== 'course' + if view.leagueType !== 'course' li a(href="#simulate", data-toggle="tab", data-i18n="ladder.simulate") Simulate - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' li a(href="#prizes", data-toggle="tab", data-i18n="ladder_prizes.prizes") Prizes - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' li 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 a(href="#winners", data-toggle="tab", data-i18n="ladder.winners") Winners @@ -174,7 +174,7 @@ block content #my-matches-tab-view .tab-pane.well#simulate #simulate-tab-view - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' .tab-pane.well#prizes h1(data-i18n="ladder_prizes.title") Tournament Prizes p @@ -740,7 +740,7 @@ block content | - $50 td $50 - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' .tab-pane.well#rules h1(data-i18n="ladder.tournament_rules") Tournament Rules h2 General @@ -802,7 +802,7 @@ block content 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 h1(data-i18n="ladder.winners") Winners @@ -810,71 +810,71 @@ block content thead tr 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 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 else th Human score - if level.get('name') == 'Zero Sum' + if view.level.get('name') == 'Zero Sum' 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 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 else th Ogre score th(data-i18n="play.spectate") Spectate tbody - each human, index in winners.humans - - var ogre = winners.ogres[index] + each human, index in view.winners.humans + - var ogre = view.winners.ogres[index] tr 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= 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 span.win= human.wins | - span.loss= human.losses | - - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' 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 else td span= Math.round(100 * human.score) if ogre - if level.get('name') == 'Zero Sum' + if view.level.get('name') == 'Zero Sum' 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= 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 span.win= ogre.wins | - span.loss= ogre.losses | - - if level.get('name') == 'Greed' + if view.level.get('name') == 'Greed' 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) else td span= Math.round(100 * ogre.score) 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 td td td - if level.get('name') == 'Ace of Coders' + if view.level.get('name') == 'Ace of Coders' .tab-pane.well#winners h1(data-i18n="ladder.winners") Winners @@ -888,7 +888,7 @@ block content th Losses th(data-i18n="play.spectate") Spectate tbody - each player in winners.humans + each player in view.winners.humans tr td= player.rank 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 td 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 - 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 diff --git a/app/views/editor/campaign/CampaignEditorView.coffee b/app/views/editor/campaign/CampaignEditorView.coffee index 7a0920023..17b182574 100644 --- a/app/views/editor/campaign/CampaignEditorView.coffee +++ b/app/views/editor/campaign/CampaignEditorView.coffee @@ -158,7 +158,7 @@ module.exports = class CampaignEditorView extends RootView index = 0 for levelOriginal, campaignLevel of campaignLevels level = @levels.findWhere({original: levelOriginal}) - if level.get('campaignIndex') isnt index + if level and level.get('campaignIndex') isnt index level.set('campaignIndex', index) campaignLevel.campaignIndex = index index += 1 diff --git a/app/views/ladder/LadderView.coffee b/app/views/ladder/LadderView.coffee index 8e5d2240e..28076bc4a 100644 --- a/app/views/ladder/LadderView.coffee +++ b/app/views/ladder/LadderView.coffee @@ -39,13 +39,19 @@ module.exports = class LadderView extends RootView 'click a:not([data-toggle])': 'onClickedLink' 'click .spectate-button': 'onClickSpectateButton' - constructor: (options, @levelID, @leagueType, @leagueID) -> - super(options) + initialize: (options, @levelID, @leagueType, @leagueID) -> @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 - @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() - @course = new Course() loadLeague: -> @leagueID = @leagueType = null unless @leagueType in ['clan', 'course'] @@ -68,23 +74,6 @@ module.exports = class LadderView extends RootView @teams = teamDataFromLevel @level 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: -> super() return unless @supermodel.finished() diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 743b51a41..2745e4777 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -314,13 +314,18 @@ module.exports = class SpellView extends CocoView if /^\s+$/.test lines[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 rend = @aceSession.documentToScreenPosition docRange.end.row, docRange.end.column range = new Range rstart.row, rstart.column, rend.row, rend.column - - xstart = startOfRow(row) level = Math.floor(xstart / 4) - indent = startOfRow(row + 1) color = colors[level % colors.length] bw = 3 to = markerLayer.$getTop(range.start.row, config) diff --git a/server/lib/closeIO.coffee b/server/lib/closeIO.coffee index 5e15b92a5..cb4825109 100644 --- a/server/lib/closeIO.coffee +++ b/server/lib/closeIO.coffee @@ -78,6 +78,7 @@ module.exports = 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) salesContactEmail = matches?[1] ? matches?[2] ? config.mail.supportSchools + salesContactEmail = config.mail.supportSchools if salesContactEmail?.indexOf('brian@codecombat.com') >= 0 postData = to: [salesContactEmail] sender: config.mail.username