From a9d9a67383d1947eff9b011d3a379ea7308e1e4c Mon Sep 17 00:00:00 2001 From: duybkict Date: Thu, 2 Jun 2016 15:44:19 +0700 Subject: [PATCH 01/10] refactor LadderView --- app/templates/play/ladder/ladder.jade | 106 +++++++++++++------------- app/views/ladder/LadderView.coffee | 29 +++---- 2 files changed, 63 insertions(+), 72 deletions(-) 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/ladder/LadderView.coffee b/app/views/ladder/LadderView.coffee index 8e5d2240e..5a2e5d69b 100644 --- a/app/views/ladder/LadderView.coffee +++ b/app/views/ladder/LadderView.coffee @@ -41,11 +41,19 @@ module.exports = class LadderView extends RootView constructor: (options, @levelID, @leagueType, @leagueID) -> super(options) + + initialize: -> @level = @supermodel.loadModel(new Level(_id: @levelID)).model + @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 +76,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() From 51a37d9edc863d3163512b43fd063b641ed03c90 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Thu, 2 Jun 2016 15:32:54 -0700 Subject: [PATCH 02/10] Update licenses contact us form email routing --- server/lib/closeIO.coffee | 1 + 1 file changed, 1 insertion(+) 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 From 3485abd41363eaf272691aa766be9da35a5b1c06 Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 2 Jun 2016 18:46:47 -0700 Subject: [PATCH 03/10] Don't show indent guides for incorrect python indention. --- app/views/play/level/tome/SpellView.coffee | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 743b51a41..8de3a5bc4 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -314,13 +314,20 @@ 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*$)' + console.log requiredIndent + for crow in [docRange.start.row+1..docRange.end.row] + console.log("CROW", xstart, crow, lines[crow]) + 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) From e7f221813e247b28df3e6da48341d4e42f042c1e Mon Sep 17 00:00:00 2001 From: duybkict Date: Fri, 3 Jun 2016 09:23:35 +0700 Subject: [PATCH 04/10] remove constructor, handle load async process --- app/views/ladder/LadderView.coffee | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/ladder/LadderView.coffee b/app/views/ladder/LadderView.coffee index 5a2e5d69b..28076bc4a 100644 --- a/app/views/ladder/LadderView.coffee +++ b/app/views/ladder/LadderView.coffee @@ -39,12 +39,10 @@ module.exports = class LadderView extends RootView 'click a:not([data-toggle])': 'onClickedLink' 'click .spectate-button': 'onClickSpectateButton' - constructor: (options, @levelID, @leagueType, @leagueID) -> - super(options) - - initialize: -> + initialize: (options, @levelID, @leagueType, @leagueID) -> @level = @supermodel.loadModel(new Level(_id: @levelID)).model - @levelDescription = marked(@level.get('description')) if @level.get('description') + @level.once 'sync', => + @levelDescription = marked(@level.get('description')) if @level.get('description') @sessions = @supermodel.loadCollection(new LevelSessionsCollection(@levelID), 'your_sessions', {cache: false}).model @winners = require('./tournament_results')[@levelID] From 8d2df0baff90cce5efcae3e8a5d8847e445889d0 Mon Sep 17 00:00:00 2001 From: Rob Date: Thu, 2 Jun 2016 20:17:52 -0700 Subject: [PATCH 05/10] Kill some console logs @poojawins --- app/views/play/level/tome/SpellView.coffee | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/play/level/tome/SpellView.coffee b/app/views/play/level/tome/SpellView.coffee index 8de3a5bc4..2745e4777 100644 --- a/app/views/play/level/tome/SpellView.coffee +++ b/app/views/play/level/tome/SpellView.coffee @@ -317,9 +317,7 @@ module.exports = class SpellView extends CocoView xstart = startOfRow(row) if language is 'python' requiredIndent = new RegExp '^' + new Array(xstart / 4 + 2).join '( |\t)' + '(\\S|\\s*$)' - console.log requiredIndent for crow in [docRange.start.row+1..docRange.end.row] - console.log("CROW", xstart, crow, lines[crow]) unless requiredIndent.test lines[crow] docRange.end.row = crow - 1 break From a12c9402f40dea44198b6f40e42999d19ac3bb30 Mon Sep 17 00:00:00 2001 From: Oliver Harald Jessner Date: Fri, 3 Jun 2016 15:23:46 +0200 Subject: [PATCH 06/10] Adding some German words (#3699) In some strings the contexts are missing, so its hard to translate. --- app/locale/de-AT.coffee | 110 ++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index a9eb7afc1..d779b5509 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." @@ -102,7 +102,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: 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!" + 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,15 +168,15 @@ 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_prefix: "Wir veröffentlichen wöchentlichen neu Levels." + awaiting_levels_adventurer: "Melde dich als Abenteuerer an" # awaiting_levels_adventurer_suffix: "to be the first to play new levels." -# adjust_volume: "Adjust volume" + 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" @@ -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" @@ -1870,18 +1870,18 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: 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" + 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" From 5a6fe46b22a86f1d8c5ba94fd3b16b684cd60f10 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 3 Jun 2016 14:25:20 +0100 Subject: [PATCH 07/10] Uncomment an header in de-AT.coffee --- app/locale/de-AT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index d779b5509..d74c7be3b 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -1869,7 +1869,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: license: "Lizenz" oreilly: "Ebook deiner Wahl" -# calendar: + calendar: year: "Jahr" day: "Tag" month: "Monat" From 6829d60b80d965e3c58f2a40faf8ceab3ff1b34b Mon Sep 17 00:00:00 2001 From: Oliver Harald Jessner Date: Fri, 3 Jun 2016 21:02:26 +0200 Subject: [PATCH 08/10] Did more translations (#3711) - Finished the code section - Finished general section - nearly finished the play section - Still don't understand which/what kind of `"Poll" # Tooltip on poll button from /play` is meant. --- app/locale/de-AT.coffee | 144 ++++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index d74c7be3b..8e1ae0845 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -97,7 +97,7 @@ 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" @@ -114,7 +114,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: twitter_follow: "Twitter" students: "Studenten" teachers: "Lehrer" -# careers: "Careers" + careers: "Berufe" facebook: "Facebook" twitter: "Twitter" create_a_class: "Erstelle eine Klasse" @@ -175,62 +175,62 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: campaign_beginner: "Anfängerkampagne" awaiting_levels_adventurer_prefix: "Wir veröffentlichen wöchentlichen neu Levels." 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: "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" + 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." @@ -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" From e8896e4d496bb5b1c2e09ed8a74d903cdc8982ed Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Fri, 3 Jun 2016 20:03:09 +0100 Subject: [PATCH 09/10] Uncomment header in de-AT.coffee --- app/locale/de-AT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/de-AT.coffee b/app/locale/de-AT.coffee index 8e1ae0845..5314735d0 100644 --- a/app/locale/de-AT.coffee +++ b/app/locale/de-AT.coffee @@ -182,7 +182,7 @@ module.exports = nativeDescription: "Deutsch (Österreich)", englishDescription: 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: + 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" From 5e1942c0d3701611b3f9fef4809def7b0cd21743 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 3 Jun 2016 13:30:52 -0700 Subject: [PATCH 10/10] Fix adding levels to campaigns --- app/views/editor/campaign/CampaignEditorView.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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