Merge branch 'master' into production

This commit is contained in:
Matt Lott 2016-03-18 10:35:42 -07:00
commit 2091a47801
19 changed files with 614 additions and 452 deletions

View file

@ -530,11 +530,20 @@ module.exports = Surface = class Surface extends CocoClass
newWidth = 0.55 * pageWidth newWidth = 0.55 * pageWidth
newHeight = newWidth / aspectRatio newHeight = newWidth / aspectRatio
return unless newWidth > 0 and newHeight > 0 return unless newWidth > 0 and newHeight > 0
return if newWidth is oldWidth and newHeight is oldHeight and not @options.spectateGame
return if newWidth < 200 or newHeight < 200
#scaleFactor = if application.isIPadApp then 2 else 1 # Retina #scaleFactor = if application.isIPadApp then 2 else 1 # Retina
scaleFactor = 1 scaleFactor = 1
@normalCanvas.add(@webGLCanvas).attr width: newWidth * scaleFactor, height: newHeight * scaleFactor if @options.stayVisible
availableHeight = window.innerHeight
availableHeight -= $('.ad-container').outerHeight()
availableHeight -= $('#game-area').outerHeight() - $('#canvas-wrapper').outerHeight()
scaleFactor = availableHeight / newHeight if availableHeight < newHeight
newWidth *= scaleFactor
newHeight *= scaleFactor
return if newWidth is oldWidth and newHeight is oldHeight and not @options.spectateGame
return if newWidth < 200 or newHeight < 200
@normalCanvas.add(@webGLCanvas).attr width: newWidth, height: newHeight
# Cannot do this to the webGLStage because it does not use scaleX/Y. # Cannot do this to the webGLStage because it does not use scaleX/Y.
# Instead the LayerAdapter scales webGL-enabled layers. # Instead the LayerAdapter scales webGL-enabled layers.

View file

@ -27,6 +27,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
classroom_in_a_box: "Ein Klassenraum in-einer-Box um Informatik zu lehren." classroom_in_a_box: "Ein Klassenraum in-einer-Box um Informatik zu lehren."
codecombat_is: "CodeCombat ist eine Plattform für Schüler um Informatik zu lernen während sie ein echtes Spiel spielen." codecombat_is: "CodeCombat ist eine Plattform für Schüler um Informatik zu lernen während sie ein echtes Spiel spielen."
our_courses: "Unsere Kurse wurden genau getestet um im Klassenraum zu bestehen, auch bei Lehrkräften mit wenig bis keiner Programmiererfahrung." our_courses: "Unsere Kurse wurden genau getestet um im Klassenraum zu bestehen, auch bei Lehrkräften mit wenig bis keiner Programmiererfahrung."
top_screenshots_hint: "Schüler schreiben Code und ihre Veränderungen werden in Echtzeit sichtbar"
designed_with: "Designed um Lehrkräften zu helfen" designed_with: "Designed um Lehrkräften zu helfen"
real_code: "Real, getipper Code" real_code: "Real, getipper Code"
from_the_first_level: "vom ersten Level an" from_the_first_level: "vom ersten Level an"
@ -57,10 +58,17 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
great_game: "In einem guten Spiel geht es um mehr als nur Abzeichen und Erfolge - es geht um die Reise eines Spielers, gut-designte Rätsel, und die Fähigkeit Herausforderungen mit Kraft und Selbsvertrauen anzupacken." great_game: "In einem guten Spiel geht es um mehr als nur Abzeichen und Erfolge - es geht um die Reise eines Spielers, gut-designte Rätsel, und die Fähigkeit Herausforderungen mit Kraft und Selbsvertrauen anzupacken."
agency: "CodeCombat ist ein Spiel, das Spielern die Kraft und das Selbstbewusstsein gibt durch unsere robuste Programmiereingabe-Engine, die sowohl Anfänger als auch fortgeschrittenen Schülern dabei hilft richtigen, validen Code zu schreiben." agency: "CodeCombat ist ein Spiel, das Spielern die Kraft und das Selbstbewusstsein gibt durch unsere robuste Programmiereingabe-Engine, die sowohl Anfänger als auch fortgeschrittenen Schülern dabei hilft richtigen, validen Code zu schreiben."
curious: "Neugierig? Fragen Sie nach einer Demo und wir werden Ihnen zeigen wie es geht" curious: "Neugierig? Fragen Sie nach einer Demo und wir werden Ihnen zeigen wie es geht"
request_demo_title: "Fangen Sie noch heute mit ihren Schülern an!"
request_demo_subtitle: "Fragen Sie nach einer Demo und lassen Sie ihre Schüler in weniger als einer Stunde anfangen."
get_started_title: "Erstellen Sie noch heute ihre Klasse"
get_started_subtitle: "Erstellen Sie eine Klasse, fügen Sie Schüler hinzu und verfolgen Sie ihren Fortschritt während sie Informatik lernen."
create_class: "Oder erstellen Sie eine Klasse und sehen Sie selbst!" create_class: "Oder erstellen Sie eine Klasse und sehen Sie selbst!"
teacher_screenshots_hint: "Schüler schreiben Code und ihre Veränderungen werden in Echtzeit sichtbar"
request_demo: "Demo anfragen" request_demo: "Demo anfragen"
create_a_class: "Erstellen Sie eine Klasse" create_a_class: "Erstellen Sie eine Klasse"
setup_a_class: "Eine Klasse erstellen"
have_an_account: "Haben Sie bereits einen Account?" have_an_account: "Haben Sie bereits einen Account?"
log_in: "Einloggen"
logged_in_as: "Sie sind zurzeit eingeloggt als" logged_in_as: "Sie sind zurzeit eingeloggt als"
view_my_classes: "Zeige meine Klassen" view_my_classes: "Zeige meine Klassen"
computer_science: "Informatikkurse für alle Altersgruppen" computer_science: "Informatikkurse für alle Altersgruppen"
@ -128,7 +136,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
locked: "Gesperrt" locked: "Gesperrt"
purchasable: "Zu kaufen" # For a hero you unlocked but haven't purchased purchasable: "Zu kaufen" # For a hero you unlocked but haven't purchased
available: "Verfügbar" available: "Verfügbar"
skills_granted: "Verfügbare Fähigkeiten" # Property documentation details skills_granted: "Erhaltene" # Property documentation details
heroes: "Helden" # Tooltip on hero shop button from /play heroes: "Helden" # Tooltip on hero shop button from /play
achievements: "Errungenschaften" # Tooltip on achievement list button from /play achievements: "Errungenschaften" # Tooltip on achievement list button from /play
account: "Account" # Tooltip on account button from /play account: "Account" # Tooltip on account button from /play
@ -182,6 +190,14 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
school_name: "Schulname und Stadt" school_name: "Schulname und Stadt"
optional: "optional" optional: "optional"
school_name_placeholder: "Beispiel Gymnasium, Musterdorf, DE" school_name_placeholder: "Beispiel Gymnasium, Musterdorf, DE"
or_sign_up_with: "oder registrieren mit"
connected_gplus_header: "Du wurdest erfolgreich mit Google+ verknüpft!"
connected_gplus_p: "Schließe das Registrieren ab, so dass du dich mit deinem Google+ Account einloggen."
gplus_exists: "Du hast bereits einen Account mit Google+ verknüpft!"
connected_facebook_header: "Du wurdest erfolgreich mit Facebook verknüpft!"
connected_facebook_p: "Schließe das Registrieren ab, so dass du dich mit deinem Facebook Account einloggen."
facebook_exists: "Du hast bereits einen Account mit Facebook verknüpft!"
hey_students: "Schüler, gib den Klassencode von deinem Lehrer ein."
recover: recover:
recover_account_title: "Account-Wiederherstellung" recover_account_title: "Account-Wiederherstellung"
@ -666,7 +682,7 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
jobs_title: "Komm arbeite mit uns und hilf mit CodeCombat Geschichte zu schreiben!" jobs_title: "Komm arbeite mit uns und hilf mit CodeCombat Geschichte zu schreiben!"
jobs_subtitle: "Nichts gutes gefunden aber du bist trotzdem interessiert mit uns zu arbeiten? Schau dir unseren \"Kreiere deinen Eigenen\" Eintrag an." jobs_subtitle: "Nichts gutes gefunden aber du bist trotzdem interessiert mit uns zu arbeiten? Schau dir unseren \"Kreiere deinen Eigenen\" Eintrag an."
jobs_benefits: "Angestellten Vorteile" jobs_benefits: "Angestellten Vorteile"
# jobs_benefit_1: "Competitive salary and options" # jobs_benefit_1: "Competitive salary and options" {I would not translate this because it is only for people who wants to work in the U.S. so they have to speak English, or if they work at home some of these benefits won't fit in Germany because we already have a health insurance...}
# jobs_benefit_2: "15 day minimum vacation policy, excluding company holidays" # jobs_benefit_2: "15 day minimum vacation policy, excluding company holidays"
# jobs_benefit_3: "Work from home flexibility" # jobs_benefit_3: "Work from home flexibility"
# jobs_benefit_4: "Unlimited sick/personal days" # jobs_benefit_4: "Unlimited sick/personal days"
@ -701,37 +717,38 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
more_info_3: "ist eine gute Anlaufstelle, um mit anderen Lehrer in Kontakt zu treten, die CodeCombat benutzen." more_info_3: "ist eine gute Anlaufstelle, um mit anderen Lehrer in Kontakt zu treten, die CodeCombat benutzen."
teachers_quote: teachers_quote:
# name: "Quote Form" name: "Demo Fragebogen"
# title: "Request a Quote" title: "Eine Demo beantragen"
# subtitle: "Get CodeCombat in your classroom, club, school or district!" subtitle: "Holen Sie sich CodeCombat in ihren Klassenraum, Club, ihre Schule oder Ortsteil!"
# email_exists: "User exists with this email." email_exists: "Benutzer mit dieser Email existiert bereits."
phone_number: "Telephonnummer" phone_number: "Telephonnummer"
# phone_number_help: "Where can we reach you during the workday?" phone_number_help: "Wo können wir Sie wochentags erreichen?"
role_label: "Ihre Rolle" role_label: "Ihre Rolle"
role_help: "Wählen Sie ihre primäre Rolle." role_help: "Wählen Sie ihre primäre Rolle."
# tech_coordinator: "Technology coordinator" tech_coordinator: "Technologie-Koordinator"
# advisor: "Advisor" advisor: "Berater"
# principal: "Principal" principal: "Direktor"
# superintendent: "Superintendent" superintendent: "Leiter"
parent: "Elternteil" parent: "Elternteil"
organization_label: "Name der Schule/Bezirk" organization_label: "Name der Schule/Bezirk"
city: "Stadt" city: "Stadt"
state: "Bundesland" state: "Bundesland"
country: "Land" country: "Land"
# num_students_help: "How many do you anticipate enrolling in CodeCombat?" num_students_help: "Wie viele beabsichtichen Sie in CodeCombat einzuschreiben?"
# education_level_label: "Education Level of Students" education_level_label: "Bildungslevel der Schüler"
# education_level_help: "Choose as many as apply." education_level_help: "Wählen Sie so viele wie zutreffen."
elementary_school: "Grundschule" elementary_school: "Grundschule"
high_school: "Gymnasium" high_school: "Gymnasium"
please_explain: "(bitte erklären)" please_explain: "(bitte erklären)"
middle_school: "Mittelschule" middle_school: "Mittelschule"
college_plus: "Hochschule oder höher" college_plus: "Hochschule oder höher"
anything_else: "Weitere Dinge die wir wissen sollten?" anything_else: "Weitere Dinge die wir wissen sollten?"
# thanks_header: "Thanks for requesting a quote!" thanks_header: "Danke dass Sie eine Demo beantragen!"
thanks_p: "Wir melden uns bald. Fragen? Schreiben Sie uns eine Email :" thanks_p: "Wir melden uns bald. Fragen? Schreiben Sie uns eine Email:"
# thanks_anon: "Login or sign up with your account below to access your two free enrollments (well notify you by email when they have been approved, which usually takes less than 48 hours). As always, the first hour of content is free for an unlimited number of students." thanks_anon: "Loggen Sie sich unten ein oder Erstellen Sie einen Account um Zugang zu ihren zwei kostenlosen Einschreibungen zu erhalten (Wir werden Sie per Email benachrichtigen nach der Überprüfung, die normalerweise weniger als 48 Stunden dauert. So wie immer ist die erste Stunde des Inhaltes kostenlos für eine unbegrenzte Anzahl von Schülern."
# thanks_logged_in: "Your two free enrollments are pending approval. Well notify you by email when they have been approved (usually within 48 hours). As always, the first hour of content is free for an unlimited number of students." thanks_logged_in: "Ihre zwei kostenlosen Einschreiben werden gerade überprüft. Wir werden Sie per Email nach der Überprüfung benachrichtigen, die normalerweise weniger als 48 Stunden dauert. So wie immer ist die erste Stunde des Inhaltes kostenlos für eine unbegrenzte Anzahl von Schülern."
setup_a_class: "Eine Klasse erstellen"
versions: versions:
save_version_title: "Neue Version speichern" save_version_title: "Neue Version speichern"
new_major_version: "Neue Hauptversion" new_major_version: "Neue Hauptversion"
@ -916,28 +933,28 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
edit_settings: "Klasseneinstellungen bearbeiten" edit_settings: "Klasseneinstellungen bearbeiten"
edit_settings1: "Klasseneinstellungen bearbeiten" edit_settings1: "Klasseneinstellungen bearbeiten"
progress: "Klassenfortschritt" progress: "Klassenfortschritt"
add_students: "Studenten hinzufügen" add_students: "Schüler hinzufügen"
stats: "Statistiken" stats: "Statistiken"
total_students: "Anzahl Studenten:" total_students: "Anzahl Schüler:"
average_time: "Durchschnittliche Levelspielzeit:" average_time: "Durchschnittliche Levelspielzeit:"
total_time: "Gesamte Spielzeit:" total_time: "Gesamte Spielzeit:"
average_levels: "Durchschnittliche abgeschlossene Level:" average_levels: "Durchschnittliche abgeschlossene Level:"
total_levels: "Anzahl abgeschlossener Level:" total_levels: "Anzahl abgeschlossener Level:"
furthest_level: "Höchster abgeschlossener Level:" furthest_level: "Höchster abgeschlossener Level:"
concepts_covered: "Abgedeckte Konzepte" concepts_covered: "Abgedeckte Konzepte"
students: "Studenten" students: "Schüler"
students1: "Studenten" students1: "Schüler"
concepts: "Konzepten" concepts: "Konzepten"
levels: "level" levels: "level"
played: "Gespielt" played: "Gespielt"
play_time: "Spielzeit:" play_time: "Spielzeit:"
completed: "Abgeschlossen:" completed: "Abgeschlossen:"
invite_students: "Studenten einladen dieser Klasse beizutreten." invite_students: "Schüler einladen dieser Klasse beizutreten."
invite_link_header: "Link um dem Kurs beizutreten" invite_link_header: "Link um dem Kurs beizutreten"
invite_link_p_1: "Gib diesen Link an Schüler weiter, die dem Kurs beitreten sollen." invite_link_p_1: "Gib diesen Link an Schüler weiter, die dem Kurs beitreten sollen."
invite_link_p_2: "Oder lass sie durch uns direkt anschreiben:" invite_link_p_2: "Oder lass sie durch uns direkt anschreiben:"
capacity_used: "Benutzte Kurs-Slots:" capacity_used: "Benutzte Kurs-Slots:"
enter_emails: "Studenten-Emails eingeben zum hinzufügen, eine per Zeile" enter_emails: "Schüler-Emails eingeben zum hinzufügen, eine Adresse pro Zeile"
send_invites: "Einladung senden" send_invites: "Einladung senden"
title: "Titel" title: "Titel"
description: "Beschreibung" description: "Beschreibung"
@ -948,189 +965,190 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
create_class: "Klasse erstellen" create_class: "Klasse erstellen"
select_all_courses: "Wählen Sie 'Alle Kurse' für einen 50% Rabatt!" select_all_courses: "Wählen Sie 'Alle Kurse' für einen 50% Rabatt!"
all_courses: "Alle Kurse" all_courses: "Alle Kurse"
number_students: "Anzahl der Studenten" number_students: "Anzahl der Schüler"
enter_number_students: "Geben Sie die Anzahl der Studenten ein, die Sie für diese Klasse brauchen." enter_number_students: "Geben Sie die Anzahl der Schüler ein, die Sie für diese Klasse brauchen."
name_class: "Benennen Sie ihre Klasse" name_class: "Benennen Sie ihre Klasse"
displayed_course_page: "Diese Seite wird für Sie und ihre Schüler auf der Kursseite angezeigt. Sie kann später verändert werden." displayed_course_page: "Diese Seite wird für Sie und ihre Schüler auf der Kursseite angezeigt. Sie kann später verändert werden."
buy: "Kaufen" buy: "Kaufen"
purchasing_for: "Sie sind dabei eine Lizenz für" purchasing_for: "Sie sind dabei eine Lizenz für"
creating_for: "Sie sind dabei eine Klasse zu erstellen für" creating_for: "Sie sind dabei eine Klasse zu erstellen für"
for: "für" # Like in 'for 30 students' for: "für" # Like in 'for 30 students'
# receive_code: "Afterwards you will receive an unlock code to distribute to your students, which they can use to enroll in your class." receive_code: "Danach werden Sie einen Einschreibecode zum Verteilen an ihre Schüler bekommen, den diese benutzen können um sich in die Klasse einzuschreiben."
# free_trial: "Free trial for teachers!" free_trial: "Kostenloser Testversion für Lehrer!"
# get_access: "to get individual access to all courses for evalutaion purposes." get_access: "um Zugang zu allen Kursen zur Evaluation zu bekommen."
questions: "Fragen?" questions: "Fragen?"
teachers_click: "Lehrkräfte klicken hier" teachers_click: "Lehrkräfte klicken hier"
students_click: "Schüler klicken hier" students_click: "Schüler klicken hier"
courses_on_coco: "Kurse auf CodeCombat" courses_on_coco: "Kurse auf CodeCombat"
# designed_to: "Courses are designed to introduce computer science concepts using CodeCombat's fun and engaging environment. CodeCombat levels are organized around key topics to encourage progressive learning, over the course of 5 hours." designed_to: "Die Kurse sind designt um in Informatikkonzepte einzuführen mit Hilfe von CodeCombat's spaßiger und fesselnder Umgebung. CodeCombat-Level sind um Schlüsselthemen organisiert um ein schrittweises Lernen zu fördern, in einem Kurs von fünf Stunden."
# more_in_less: "Learn more in less time" more_in_less: "Lernen Sie mehr in weniger Zeit"
# no_experience: "No coding experience necesssary" no_experience: "Keine Programmiererfahrung nötig"
# easy_monitor: "Easily monitor student progress" easy_monitor: "Verfolgen Sie einfach den Fortschritt ihrer Schüler"
# purchase_for_class: "Purchase a course for your entire class. It's easy to sign up your students!" purchase_for_class: "Bestellen Sie einen Kurs für die ganze Klasse. Es ist einfach für ihre Studenten sich anzumelden!"
# see_the: "See the" see_the: "Sehen Sie"
more_info: "für weitere Informationen." more_info: "für weitere Informationen."
# choose_course: "Choose Your Course:" choose_course: "Wählen Sie ihren Kurs:"
# enter_code: "Enter an unlock code to join an existing class" enter_code: "Geben Sie einen Einschreibecode ein um einer existierenden Klasse beizutreten"
# enter_code1: "Enter unlock code" enter_code1: "Einschreibecode hier eingeben"
# enroll: "Enroll" enroll: "Einschreiben"
# pick_from_classes: "Pick from your current classes" pick_from_classes: "Wählen Sie von ihrer derzeitigen Klasse"
# enter: "Enter" enter: "Eingabe"
or: "oder" or: "oder"
topics: "Inhalte" topics: "Inhalte"
# hours_content: "Hours of content:" hours_content: "Stundenanzahl:"
# get_free: "Get FREE course" get_free: "Bekommen Sie einen kostenlosen Kurs"
# enroll_paid: "Enroll Students in Paid Courses" enroll_paid: "Schreiben Sie Schüler in Bezahlkurse ein"
you_have1: "Sie haben" you_have1: "Sie haben"
you_have2: "ungenutze bezahlte Einschreibungen" you_have2: "ungenutze bezahlte Einschreibungen"
# use_one: "Use 1 paid enrollment for" use_one: "Benutzen Sie eine bezahlte Einschreibung für"
# use_multiple: "Use paid enrollments for the following students:" use_multiple: "Benutzen Sie bezahlte Einschreibungen für folgende Schüler:"
# already_enrolled: "already enrolled" already_enrolled: "bereits eingeschrieben"
# licenses_remaining: "licenses remaining:" licenses_remaining: "verbleibende Lizenzen:"
# insufficient_enrollments: "insufficient paid enrollments" insufficient_enrollments: "unzureichende bezahlte Einschreibungen"
# enroll_students: "Enroll Students" enroll_students: "Schüler einschreiben"
# get_enrollments: "Get More Enrollments" get_enrollments: "Mehr Einschreibungen erhalten"
# change_language: "Change Course Language" change_language: "Kurssprache wechseln"
# keep_using: "Keep Using" keep_using: "Beibehalten"
# switch_to: "Switch To" switch_to: "Wechseln zu"
greetings: "Grüße!" greetings: "Grüße!"
learn_p: "Erlerne Python" learn_p: "Erlerne Python"
learn_j: "Erlerne JavaScript" learn_j: "Erlerne JavaScript"
language_cannot_change: "Die Sprache kann nicht geändert werden sobald ein Schüler der Klasse beigetreten ist." language_cannot_change: "Die Sprache kann nicht geändert werden sobald ein Schüler der Klasse beigetreten ist."
back_classrooms: "Zurück zu meinem Klassenraum" back_classrooms: "Zurück zu meinem Klassenraum"
back_courses: "Zurück zu meinen Kursen" back_courses: "Zurück zu meinen Kursen"
# edit_details: "Edit class details" edit_details: "Klassendetails bearbeiten"
# enrolled_courses: "enrolled in paid courses:" enrolled_courses: "eingeschrieben in bezahlte Kurse:"
# purchase_enrollments: "Purchase Enrollments" purchase_enrollments: "Einschreibungen kaufen"
remove_student: "Schüler entfernen" remove_student: "Schüler entfernen"
# assign: "Assign" assign: "Zuordnen"
# to_assign: "to assign paid courses." to_assign: "um bezahlte Kurse zuzuordnen."
teacher: "Lehrer" teacher: "Lehrer"
# complete: "Complete" complete: "Abgeschlossen"
# none: "None" none: "Keine"
save: "Speichern" save: "Speichern"
play_campaign_title: "Spiele die Kampagnen Version" play_campaign_title: "Spiele die Kampagnen Version"
# play_campaign_description: "Youre ready to take the next step! Explore hundreds of challenging levels, learn advanced programming skills, and compete in multiplayer arenas!" play_campaign_description: "Du bist bereit für den nächsten Schritt! Entdecke hunderte von herausfordernden Leveln, lerne weiterführende Programmierfähigkeiten, und trete in Multiplayer Arenen an!"
# create_account_title: "Create an Account" create_account_title: "Einen Account erstellen"
# create_account_description: "Sign up for a FREE CodeCombat account and gain access to more levels, more programming skills, and more fun!" create_account_description: "Registriere dich für einen kostenlosen CodeCombat-Account und bekomme Zugriff zu mehr Leveln, mehr Programmierfähigkeiten, und mehr Spaß!"
# preview_campaign_title: "Preview Campaign" preview_campaign_title: "Kampagnenvorschau"
# preview_campaign_description: "Take a sneak peek at all that CodeCombat has to offer before signing up for your FREE account." preview_campaign_description: "Nimm eine kurze Vorschau auf all das was CodeCombat zu bietne hat bevor du dich für einen kostenlosen Account registrierst."
arena: "Arena" arena: "Arena"
arena_soon_title: "Die Arena kommt bald" arena_soon_title: "Die Arena kommt bald"
# arena_soon_description: "We are working on a multiplayer arena for classrooms at the end of" arena_soon_description: "Wir arbeiten an einer Multiplayerarena für Klassenräume bis zum Ende von"
# not_enrolled1: "Not enrolled" not_enrolled1: "Nicht eingschrieben"
# not_enrolled2: "Ask your teacher to enroll you in the next course." not_enrolled2: "Frage deine Lehrkraft ob sie dich in den nächsten Kurs einschreibt."
next_course: "Nächster Kurs" next_course: "Nächster Kurs"
coming_soon1: "Coming soon" coming_soon1: "Coming soon"
# coming_soon2: "We are hard at work making more courses for you!" coming_soon2: "Wir sind hart am Arbeiten um mehr Kurse für Sie zu erstellen!"
# available_levels: "Available Levels" available_levels: "Verfügbare Level"
# welcome_to_courses: "Adventurers, welcome to Courses!" welcome_to_courses: "Abenteurer, willkomen zu den Kursen!"
ready_to_play: "Bereit zum Spielen?" ready_to_play: "Bereit zum Spielen?"
start_new_game: "Starten Sie ein neues Spiel" start_new_game: "Starten Sie ein neues Spiel"
play_now_learn_header: "Jetzt spielen um folgendes zu lernen" play_now_learn_header: "Jetzt spielen um folgendes zu lernen"
# play_now_learn_1: "basic syntax to control your character" play_now_learn_1: "grundlegende Syntax um deinen Character zu kontrollieren"
# play_now_learn_2: "while loops to solve pesky puzzles" play_now_learn_2: "while-Schleifen um nervtötende Rätsel zu lösen"
# play_now_learn_3: "strings & variables to customize actions" play_now_learn_3: "Strings & Variablen um Aktionen anzupassen"
# play_now_learn_4: "how to defeat an ogre (important life skills!)" play_now_learn_4: "Wie man einen Oger besiegt (wichtige Lebensfähigkeit!)"
# welcome_to_page: "Welcome to your Courses page!" welcome_to_page: "Willkomen auf deine Kurseseite!"
# completed_hoc: "Amazing! You've completed the Hour of Code course!" completed_hoc: "Beeindruckend! Du hast den Hour of Code Kurs abgeschlossen!"
# ready_for_more_header: "Ready for more? Play the campaign mode!" ready_for_more_header: "Bereit für mehr? Spiele den Kampagnenmodus!"
# ready_for_more_1: "Use gems to unlock new items!" ready_for_more_1: "Benutze Edelsteine um neue Items freizuschalten!"
# ready_for_more_2: "Play through brand new worlds and challenges" ready_for_more_2: "Spiele brandneue Welten und Herausforderungen"
# ready_for_more_3: "Learn even more programming!" ready_for_more_3: "Lerne noch mehr zur Programmierung!"
# saved_games: "Saved Games" saved_games: "Gespeicherte Spiele"
# hoc: "Hour of Code" hoc: "Hour of Code"
my_classes: "Meine Klassen" my_classes: "Meine Klassen"
# class_added: "Class successfully added!" class_added: "Klasse erfolgreich hinzugefügt!"
# view_class: "view class" view_class: "Klasse betrachten"
# view_levels: "view levels" view_levels: "Level betrachten"
# join_class: "Join A Class" join_class: "Einer Klasse beitreten"
# ask_teacher_for_code: "Ask your teacher if you have a CodeCombat class code! If so, enter it below:" ask_teacher_for_code: "Frag deine Lehrkraft ob ihr einen CodeCombat Klassencode habt! Wenn dem so ist, gib ihn hier ein:"
# enter_c_code: "<Enter Class Code>" enter_c_code: "<Klassencode hier eingeben>"
join: "Beitreten" join: "Beitreten"
joining: "Der Klasse beitreten" joining: "Der Klasse beitreten"
# course_complete: "Course Complete" course_complete: "Kurs Abgeschlossen"
# play_arena: "Play Arena" play_arena: "Arena spielen"
start: "Start" start: "Start"
last_level: "Letzter Level" last_level: "Letzter Level"
# welcome_to_hoc: "Adventurers, welcome to our Hour of Code!" welcome_to_hoc: "Abenteurer, willkommen zur Hour of Code!"
# logged_in_as: "Logged in as:" logged_in_as: "Angemeldet als:"
# not_you: "Not you?" not_you: "Nicht du?"
# welcome_back: "Hi adventurer, welcome back!" welcome_back: "Hallo Abenteurer, willkommen zurück!"
# continue_playing: "Continue Playing" continue_playing: "Weiterspielen"
# more_options: "More options:" more_options: "Mehr Optionen:"
# option1_header: "Option 1: Invite students via email" option1_header: "Option 1: Lade Schüler via Email ein"
# option1_body: "Students will automatically be sent an invitation to join this class, and will need to create an account with a username and password." option1_body: "Schülern wird automatisch eine Einladung gesendet, der Klasse beizutreten, dazu müssen sie einen Account mit Benutzernamer und Passwort erstellen."
# option2_header: "Option 2: Send URL to your students" option2_header: "Option 2: Senden Sie diese URL zu ihrern Schülern"
# option2_body: "Students will be asked to enter an email address, username and password to create an account." option2_body: "Die Schüler werden darum gebeten ihre Emailadresse, einen BNenutzernamen und ein Passwirt einzugeben um einen Account zu erstellen."
# option3_header: "Option 3: Direct students to codecombat.com/courses" option3_header: "Option 3: Führen Sie ihre Schüler zu codecombat.com/courses"
# option3_body: "Give students the following passcode to enter along with an email address, username and password when they create an account." option3_body: "Geben Sie ihren Schülern den folgenden Klassenschlüssel den Sie mit ihrer Emailadresse, Benutzername und Passwort beim Erstellen eines Accounts angeben."
# thank_you_pref: "Thank you for your purchase! You can now assign" thank_you_pref: "Wir Danken Ihnen für Ihren Kauf! Sie können nun"
# thank_you_suff: "more students to paid courses." thank_you_suff: "weitere Schüler zu Bezahlkursen einschreiben."
# return_to_class: "Return to classroom" return_to_class: "Zurück zum Klassenraum"
# return_to_course_man: "Return to course management." return_to_course_man: "Zurück zum Kursmanagement."
# students_not_enrolled: "students not enrolled" students_not_enrolled: "Nicht eingeschriebene Schüler"
# total_all_classes: "Total Across All Classes" total_all_classes: "Gesamtzahl über alle Klassen"
# how_many_enrollments: "How many additional paid enrollments do you need?" how_many_enrollments: "Wie viele zusätzliche bezahlte Einschreibungen benötigen Sie?"
# each_student_access: "Each student in a class will get access to Courses 2-4 once they are enrolled in paid courses. You may assign each course to each student individually." each_student_access: "Jeder Schüler in der Klasse wird Zugang zu den Kursen 2-4 erhalten sobald sie in den Bezahlkursen eingeschrieben sind. Sie können jeden Kurs zu jedem Schüler individuell zuweisen."
# purchase_now: "Purchase Now" purchase_now: "Kaufen Sie jetzt"
# enrollments: "enrollments" enrollments: "Einschreibungen"
# remove_student1: "Remove Student" remove_student1: "Schüler entfernen"
# are_you_sure: "Are you sure you want to remove this student from this class?" are_you_sure: "Sind Sie sicher, dass sie diesen Schüler von ihrer Klasse entfernen wollen?"
# remove_description1: "Student will lose access to this classroom and assigned classes. Progress and gameplay is NOT lost, and the student can be added back to the classroom at any time." remove_description1: "Der Schüler wird den Zugang zu dem Klassenraum und zu den zugewiesenen Klassen verlieren. Der Spielfortschritt geht NICHT verloren, und der Schüler kann zu jeder Zeit wieder in die Klasse eingschrieben werden."
# remove_description2: "The activated paid license will not be returned." remove_description2: "Die acitvierte bezahlte Lizenz wird nicht zurückgenommen."
# keep_student: "Keep Student" keep_student: "Schüler behalten"
# removing_user: "Removing user" removing_user: "Benutzer entfernen"
# to_join_ask: "To join a class, ask your teacher for an unlock code." to_join_ask: "Um einer Klasse beizutreten, frage deinen Lehrer nach einem Freischaltcode."
join_this_class: "Der Klasse beitreten" join_this_class: "Der Klasse beitreten"
# enter_here: "<enter unlock code here>" enter_here: "<Freischaltcode hier eingeben>"
# successfully_joined: "Successfully joined" successfully_joined: "Erfolgreich beigetreten"
# click_to_start: "Click here to start taking" click_to_start: "Klicke hier um folgenden Kurs zu beginnen"
my_courses: "Meine Kurse" my_courses: "Meine Kurse"
classroom: "Klassenraum" classroom: "Klassenraum"
# use_school_email: "use your school email if you have one" use_school_email: "benutze deine Schulemail wenn du eine hast"
# unique_name: "a unique name no one has chosen" unique_name: "Ein einzigartiger Name, den noch keiner gewählt hat"
# pick_something: "pick something you can remember" pick_something: "Wähle etwas aus an das du dich erinnern kannst"
class_code: "Klassencode" class_code: "Klassencode"
# optional_ask: "optional - ask your teacher to give you one!" optional_ask: "optional - Frage deine Lehrkraft ob sie dir einen gibt!"
# optional_school: "optional - what school do you go to?" optional_school: "optional - Auf welche Schule gehst du?"
# start_playing: "Start Playing" start_playing: "Spiel starten"
# skip_this: "Skip this, I'll create an account later!" skip_this: "Überspringen, Ich werde später einen Account erstellen!"
welcome: "Willkommen" welcome: "Willkommen"
# getting_started: "Getting Started with Courses" getting_started: "Eine Einleitung zu Kursen"
# download_getting_started: "Download Getting Started Guide [PDF]" download_getting_started: "Downloaden Sie den Getting Started Guide [PDF]"
# getting_started_1: "Create a new class by clicking the green 'Create New Class' button below." getting_started_1: "Erstellen Sie eine neue Klasse indem sie den grünen 'Eine neue Klasse erstellen' Knopf unten drücken."
# getting_started_2: "Once you've created a class, click the blue 'Add Students' button." getting_started_2: "Sobald Sie eine Klasse erstellt haben, klicken Sie auf den blauen 'Schüler hinzufügen' Knopf."
# getting_started_3: "You'll see student's progress below as they sign up and join your class." getting_started_3: "Sie werden den Fortschritt der Schüler unten sehen, wenn Sie sich registrieren und der Klasse beitreten."
# additional_resources: "Additional Resources" additional_resources: "Weitere Resourcen"
# additional_resources_1_pref: "Download/print our" additional_resources_1_pref: "Downloaden/Drucken Sie unseren"
# additional_resources_1_mid: "Course 1" additional_resources_1_mid: "Kurs 1"
# additional_resources_1_mid2: "and" additional_resources_1_mid2: "und"
# additional_resources_1_mid3: "Course 2" additional_resources_1_mid3: "Kurs 2"
# additional_resources_1_suff: "teacher's guides with solutions for each level." additional_resources_1_suff: "Lehrkraftguide mit Lösungen für jeden Level."
# additional_resources_2_pref: "Complete our" additional_resources_2_pref: "Füllen Sie unser"
# additional_resources_2_suff: "to get two free enrollments for the rest of our paid courses." additional_resources_2_suff: "aus um Zugang zu zwei kostenlosen Einschreibungen für die restlichen Bezahlkurse zu erhalten."
# additional_resources_3_pref: "Visit our" additional_resources_3_pref: "Besuchen Sie unser"
# additional_resources_3_mid: "Teacher Forums" additional_resources_3_mid: "Lehrerforum"
# additional_resources_3_suff: "to connect to fellow educators who are using CodeCombat." additional_resources_3_suff: "um sich mit anderen Lehrkräften auszutauschen die CodeCombat benutzen."
# additional_resources_4_pref: "Check out our" additional_resources_4_pref: "Schauen Sie auf unserer"
# additional_resources_4_mid: "Schools Page" additional_resources_4_mid: "Schulseite"
# additional_resources_4_suff: "to learn more about CodeCombat's classroom offerings." additional_resources_4_suff: "vorbei um mehr über CodeCombat's Klassenraum Angebote zu erfahren."
# educator_wiki_pref: "Or check out our new" educator_wiki_pref: "Oder schauen Sie sich unser neues"
# educator_wiki_mid: "educator wiki" educator_wiki_mid: "Lehrkraftwiki"
# educator_wiki_suff: "to browse the guide online." educator_wiki_suff: "an um den Guide online anzuschauen."
# your_classes: "Your Classes" your_classes: "Deine Klassen"
# no_classes: "No classes yet!" no_classes: "Bisher keine Klassen!"
# create_new_class1: "create new class" create_new_class1: "neue Klassen erstellen"
# available_courses: "Available Courses" available_courses: "Verfügbare Kurse"
# unused_enrollments: "Unused enrollments available:" unused_enrollments: "Unbenutzte bezahlte Einschreibungen verfügbar:"
# students_access: "All students get access to Introduction to Computer Science for free. One enrollment per student is required to assign them to paid CodeCombat courses. A single student does not need multiple enrollments to access all paid courses." students_access: "Alle Schüler erhalten kostenlosen Zugang zu der Informatikeinführung. Eine Einschreibung pro Schüler wird benötigt um ihn in Bezahl-CodeCombat-Kurse einzuschreiben. Ein einzelner Schüler benötigt nicht mehrere Einschreibungen um Zugang zu alle Bezahlkursen zu erhalten."
# active_courses: "active courses" active_courses: "Aktive Kurse"
# no_students: "No students yet!" no_students: "Keine Schüler bisher!"
# add_students1: "add students" add_students1: "Schüler hinzufügen"
# view_edit: "view/edit" view_edit: "anschauen/bearbeiten"
# students_enrolled: "students enrolled" students_enrolled: "Schüler eingeschrieben"
# length: "Length:" students_assigned: "Schüler zugewiesen"
length: "Länge:"
classes: classes:
archmage_title: "Erzmagier" archmage_title: "Erzmagier"
@ -1442,39 +1460,39 @@ module.exports = nativeDescription: "Deutsch (Deutschland)", englishDescription:
retrying: "Serverfehler, versuche es erneut." retrying: "Serverfehler, versuche es erneut."
success: "Erfolgreich bezahlt. Danke!" success: "Erfolgreich bezahlt. Danke!"
# account_prepaid: account_prepaid:
# purchase_code: "Purchase a Subscription Code" purchase_code: "Einen Abocode kaufen"
# purchase_code1: "Subscription Codes can be redeemed to add premium subscription time to one or more CodeCombat accounts." purchase_code1: "Abocodes können eingelöst werden um Premiumabozeit zu einem oder mehreren CodeCombataccounts hinzuzufügen."
# purchase_code2: "Each CodeCombat account can only redeem a particular Subscription Code once." purchase_code2: "Jeder CodeCombataccount kann nur einen einzigen Abocode auf einmal einlösen."
# purchase_code3: "Subscription Code months will be added to the end of any existing subscription on the account." purchase_code3: "Abocodes-Monate werden an das Ende der existierenden Abozeit des Accounts hinzugefügt."
# users: "Users" users: "Benutzer"
# months: "Months" months: "Monate"
# purchase_total: "Total" purchase_total: "Gesamt"
# purchase_button: "Submit Purchase" purchase_button: "Kauf abschließen"
# your_codes: "Your Codes" your_codes: "Ihre Codes"
# redeem_codes: "Redeem a Subscription Code" redeem_codes: "Einen Abocode einlösen"
# prepaid_code: "Prepaid Code" prepaid_code: "Prepaidcode"
# lookup_code: "Lookup prepaid code" lookup_code: "Prepaidcode freischalten"
# apply_account: "Apply to your account" apply_account: "Ihrem Account hinzufügen"
# copy_link: "You can copy the code's link and send it to someone." copy_link: "Sie können den Codelink kopieren und an jemanden senden."
# quantity: "Quantity" quantity: "Quantität"
# redeemed: "Redeemed" redeemed: "Eingelöst"
# no_codes: "No codes yet!" no_codes: "Keine Codes bisher!"
# you_can1: "You can" you_can1: "Sie können"
# you_can2: "purchase a prepaid code" you_can2: "einen Prepaidcode kaufen"
# you_can3: "that can be applied to your own account or given to others." you_can3: "der ihrem Account hinzugefügt werden kann oder den Sie verschenken können."
loading_error: loading_error:
could_not_load: "Fehler beim Laden vom Server" could_not_load: "Fehler beim Laden vom Server"
connection_failure: "Verbindung fehlgeschlagen." # {change} connection_failure: "Verbindung fehlgeschlagen." # {change}
# connection_failure_desc: "It doesnt look like youre connected to the internet! Check your network connection and then reload this page." connection_failure_desc: "Es sieht so aus, als wärest du nicht mit dem Internet verbunden! Überprüfe deine Netzwerkverbindung und lade die Seite neu."
login_required: "Login benötigt" login_required: "Login benötigt"
login_required_desc: "Du musst eingeloggt sein um auf diese Seite zuzugreifen." login_required_desc: "Du musst eingeloggt sein um auf diese Seite zuzugreifen."
unauthorized: "Du musst angemeldet sein. Hast du Cookies ausgeschaltet?" unauthorized: "Du musst angemeldet sein. Hast du Cookies ausgeschaltet?"
forbidden: "Sie haben nicht die nötigen Berechtigungen." # {change} forbidden: "Sie haben nicht die nötigen Berechtigungen." # {change}
# forbidden_desc: "Oh no, theres nothing we can show you here! Make sure youre logged into the correct account, or visit one of the links below to get back to programming!" forbidden_desc: "Oh nein, hier ist nichts was wir dir zeigen können! Stelle sicher, dass du mit dem korrekten Account angemeldet bist oder besuche einen der folgenden Links um zurück zum Programmieren zu kommen!"
not_found: "Nicht gefunden." # {change} not_found: "Nicht gefunden." # {change}
# not_found_desc: "Hm, theres nothing here. Visit one of the following links to get back to programming!" not_found_desc: "Hm, hier ist nichts. Schaue dir einige der folgenden Links an um zurück zum Programmieren zu kommen!"
not_allowed: "Methode nicht erlaubt." not_allowed: "Methode nicht erlaubt."
timeout: "Server timeout." # {change} timeout: "Server timeout." # {change}
conflict: "Ressourcen Konflikt." conflict: "Ressourcen Konflikt."

View file

@ -93,7 +93,6 @@
profile: "Profile" profile: "Profile"
stats: "Stats" stats: "Stats"
code: "Code" code: "Code"
admin: "Admin" # Only shows up when you are an admin
home: "Home" home: "Home"
contribute: "Contribute" contribute: "Contribute"
legal: "Legal" legal: "Legal"
@ -107,6 +106,17 @@
create_a_class: "Create a Class" create_a_class: "Create a Class"
other: "Other" other: "Other"
learn_to_code: "Learn to Code!" learn_to_code: "Learn to Code!"
toggle_nav: "Toggle navigation"
jobs: "Jobs"
schools: "Schools"
educator_wiki: "Educator Wiki"
request_quote: "Request a Quote"
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!"
modal: modal:
close: "Close" close: "Close"
@ -485,13 +495,14 @@
subscribe: subscribe:
comparison_blurb: "Sharpen your skills with a CodeCombat subscription!" comparison_blurb: "Sharpen your skills with a CodeCombat subscription!"
feature1: "110+ basic levels across 4 worlds" feature1: "125+ basic levels across 4 worlds" # {change}
feature2: "10 powerful <strong>new heroes</strong> with unique skills!" feature2: "10 powerful <strong>new heroes</strong> with unique skills!"
feature3: "80+ bonus levels" feature3: "85+ bonus levels" # {change}
feature4: "<strong>{{gems}} bonus gems</strong> every month!" feature4: "<strong>{{gems}} bonus gems</strong> every month!"
feature5: "Video tutorials" feature5: "Video tutorials"
feature6: "Premium email support" feature6: "Premium email support"
feature7: "Private <strong>Clans</strong>" feature7: "Private <strong>Clans</strong>"
feature8: "<strong>No ads!</strong>"
free: "Free" free: "Free"
month: "month" month: "month"
must_be_logged: "You must be logged in first. Please create an account or log in from the menu above." must_be_logged: "You must be logged in first. Please create an account or log in from the menu above."

View file

@ -28,7 +28,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
codecombat_is: "CodeCombat is een platform waarmee leerlingen leren programmeren door het spelen van een spel." codecombat_is: "CodeCombat is een platform waarmee leerlingen leren programmeren door het spelen van een spel."
our_courses: "Onze lessen zijn specifiek ontwikkeld voor een klasomgeving, zelfs voor leraren zonder programmeerervaring." our_courses: "Onze lessen zijn specifiek ontwikkeld voor een klasomgeving, zelfs voor leraren zonder programmeerervaring."
designed_with: "Gemaakt voor leraren" designed_with: "Gemaakt voor leraren"
real_code: "Echte, getypde code" real_code: "Echte, getypte code"
from_the_first_level: "vanaf het eerste level" from_the_first_level: "vanaf het eerste level"
getting_students: "Leerlingen zo snel mogelijk echte code laten schrijven is noodzakelijk voor het leren van programmeer syntax en correcte structuur." getting_students: "Leerlingen zo snel mogelijk echte code laten schrijven is noodzakelijk voor het leren van programmeer syntax en correcte structuur."
educator_resources: "Lesbrieven voor docenten" educator_resources: "Lesbrieven voor docenten"
@ -352,8 +352,8 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
time_goto: "Ga naar:" time_goto: "Ga naar:"
non_user_code_problem_title: "Kan level niet laden" non_user_code_problem_title: "Kan level niet laden"
infinite_loop_title: "Oneindige Loop gedetecteerd" infinite_loop_title: "Oneindige Loop gedetecteerd"
# infinite_loop_description: "The initial code to build the world never finished running. It's probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn't fix it, please let us know." infinite_loop_description: "De initiele code om de wereld te bouwen is nooit gestopt. De code is waarschijnlijk heel langzaam of er is sprake van een oneindige loop. Of misschien wel een bug. Je kunt proberen je code nogmaals te laten afspelen, of de oorspronkelijke code herladen. Als het dan nog steeds niet is opgelost, neem dan contact met ons op."
# check_dev_console: "You can also open the developer console to see what might be going wrong." check_dev_console: "Je kunt ook de ontwikkelaarsconsole openen om te zien wat er mogelijk is misgegaan."
check_dev_console_link: "(instructies)" check_dev_console_link: "(instructies)"
infinite_loop_try_again: "Probeer opnieuw" infinite_loop_try_again: "Probeer opnieuw"
infinite_loop_reset_level: "Level resetten" infinite_loop_reset_level: "Level resetten"
@ -465,7 +465,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
prompt_body: "Wil je meer krijgen?" prompt_body: "Wil je meer krijgen?"
prompt_button: "Naar de winkel" prompt_button: "Naar de winkel"
recovered: "Edelstenen aankoop hersteld. Ververs de pagina alstublieft." recovered: "Edelstenen aankoop hersteld. Ververs de pagina alstublieft."
# price: "x{{gems}} / mo" price: "x{{gems}} / maand"
subscribe: subscribe:
comparison_blurb: "Verbeter je vaardigheden met een abonement op CodeCombat!" comparison_blurb: "Verbeter je vaardigheden met een abonement op CodeCombat!"
@ -500,7 +500,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
parents_title: "Uw kind leert programmeren." # {change} parents_title: "Uw kind leert programmeren." # {change}
parents_blurb1: "Met CodeCombat leert uw kind door echte code te schrijven. Ze beginnen met simpele instructies en naarmate ze verder komen, komen er moeilijkere onderwerpen aan bod." parents_blurb1: "Met CodeCombat leert uw kind door echte code te schrijven. Ze beginnen met simpele instructies en naarmate ze verder komen, komen er moeilijkere onderwerpen aan bod."
parents_blurb1a: "Programmeren is een essentiële vaardigheid die uw kind als volwassene ongetwijfeld gaat gebruiken. In 2020 is de basis van programmeren nodig bij 77% van de banen en zijn softwareontwikkelaars dringend nodig in de wereld. Wist u dat informatica de hoogstbetaalde universitaire graad is?" parents_blurb1a: "Programmeren is een essentiële vaardigheid die uw kind als volwassene ongetwijfeld gaat gebruiken. In 2020 is de basis van programmeren nodig bij 77% van de banen en zijn softwareontwikkelaars dringend nodig in de wereld. Wist u dat informatica de hoogstbetaalde universitaire graad is?"
# parents_blurb2: "For ${{price}} USD/mo, your child will get new challenges every week and personal email support from professional programmers." parents_blurb2: "Voor ${{price}} USD/maand, ontvangt uw kind wekelijks nieuwe uitdagingen en kan uw kind vragen stellen aan professionele programmeurs."
parents_blurb3: "Geen risico's: 100% geld terug garantie, 1-klik uitschrijving." parents_blurb3: "Geen risico's: 100% geld terug garantie, 1-klik uitschrijving."
payment_methods: "Betaalmethoden" payment_methods: "Betaalmethoden"
payment_methods_title: "Geaccepteerde betaalmethoden" payment_methods_title: "Geaccepteerde betaalmethoden"
@ -552,7 +552,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
blocks: "Blokkeert" # As in "this shield blocks this much damage" blocks: "Blokkeert" # As in "this shield blocks this much damage"
# backstab: "Backstab" # As in "this dagger does this much backstab damage" # backstab: "Backstab" # As in "this dagger does this much backstab damage"
skills: "Vaardigheden" skills: "Vaardigheden"
# attack_1: "Deals" attack_1: "Veroorzaakt"
# attack_2: "of listed" # attack_2: "of listed"
attack_3: "Wapen schade." attack_3: "Wapen schade."
# health_1: "Gains" # health_1: "Gains"
@ -581,7 +581,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
current_value: "Huidige waarde" current_value: "Huidige waarde"
default_value: "Standaard waarde" default_value: "Standaard waarde"
parameters: "Parameters" parameters: "Parameters"
# returns: "Returns" returns: "Geeft terug" #there's no Dutch word for return, we only have "give back".
granted_by: "Verleend door" granted_by: "Verleend door"
save_load: save_load:
@ -625,7 +625,7 @@ module.exports = nativeDescription: "Nederlands (Nederland)", englishDescription
matt_title: "Programmeur" # {change} matt_title: "Programmeur" # {change}
matt_blurb: "Fietser" matt_blurb: "Fietser"
cat_title: "Hoofd Ambachtsman" # {change} cat_title: "Hoofd Ambachtsman" # {change}
# cat_blurb: "Airbender" cat_blurb: "Airbender" #No good Dutch translation, but children know the word airbender from the Avatar series.
scott_title: "Programmeur" # {change} scott_title: "Programmeur" # {change}
scott_blurb: "de Redelijke" scott_blurb: "de Redelijke"
maka_title: "Klanten Ombudsman" maka_title: "Klanten Ombudsman"

View file

@ -77,7 +77,7 @@ module.exports = class User extends CocoModel
# y = a * ln(1/b * (x + c)) + 1 # y = a * ln(1/b * (x + c)) + 1
@levelFromExp: (xp) -> @levelFromExp: (xp) ->
if xp > 0 then Math.floor(a * Math.log((1/b) * (xp + c))) + 1 else 1 if xp > 0 then Math.floor(a * Math.log((1 / b) * (xp + c))) + 1 else 1
# x = b * e^((y-1)/a) - c # x = b * e^((y-1)/a) - c
@expForLevel: (level) -> @expForLevel: (level) ->
@ -137,6 +137,16 @@ module.exports = class User extends CocoModel
application.tracker.identify announcesActionAudioGroup: @announcesActionAudioGroup unless me.isAdmin() application.tracker.identify announcesActionAudioGroup: @announcesActionAudioGroup unless me.isAdmin()
@announcesActionAudioGroup @announcesActionAudioGroup
getCampaignAdsGroup: ->
return @campaignAdsGroup if @campaignAdsGroup
group = me.get('testGroupNumber') % 2
@campaignAdsGroup = switch group
when 0 then 'no-ads'
when 1 then 'leaderboard-ads'
@campaignAdsGroup = 'no-ads' if me.isAdmin()
application.tracker.identify campaignAdsGroup: @campaignAdsGroup unless me.isAdmin()
@campaignAdsGroup
getHomepageGroup: -> getHomepageGroup: ->
# Only testing on en-US so localization issues are not a factor # Only testing on en-US so localization issues are not a factor
return 'new-home-student' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en') return 'new-home-student' unless _.string.startsWith(me.get('preferredLanguage', true) or 'en-US', 'en')

View file

@ -111,7 +111,7 @@
text-align: center text-align: center
tr tr
td td
padding: 3px padding: 2px
border-width: 0px border-width: 0px
border-top-width: 1px border-top-width: 1px
border-color: rgba(85, 85, 85, 0.1) border-color: rgba(85, 85, 85, 0.1)

View file

@ -628,6 +628,14 @@ $gameControlMargin: 30px
img img
height: 30px height: 30px
.ad-container
width: 100%
height: 90px
text-align: center
.gameplay-container
position: absolute
body.ipad #campaign-view body.ipad #campaign-view
// iPad only supports up to Kithgard Gates for now. // iPad only supports up to Kithgard Gates for now.
.campaign-switch .campaign-switch

View file

@ -66,6 +66,7 @@ $level-resize-transition-time: 0.5s
.level-content .level-content
position: relative position: relative
background-color: black
#canvas-wrapper #canvas-wrapper
top: 50px top: 50px
@ -83,14 +84,14 @@ $level-resize-transition-time: 0.5s
canvas#webgl-surface canvas#webgl-surface
background-color: #333 background-color: #333
z-index: 1 z-index: 1
canvas#normal-surface canvas#normal-surface
z-index: 1 z-index: 1
position: absolute position: absolute
top: 0 top: 0
left: 0 left: 0
pointer-events: none pointer-events: none
canvas#webgl-surface, canvas#normal-surface canvas#webgl-surface, canvas#normal-surface
display: block display: block
z-index: 2 z-index: 2
@ -259,6 +260,10 @@ $level-resize-transition-time: 0.5s
right: 15px right: 15px
font-size: 30px font-size: 30px
.ad-container
width: 100%
height: 90px
text-align: center
html.fullscreen-editor html.fullscreen-editor
#level-view #level-view

View file

@ -2,16 +2,16 @@
block header block header
.container-fluid.text-center .container-fluid.text-center
.alert.alert-danger.lt-ie9 .alert.alert-danger.lt-ie9
strong(data-i18n="home.no_ie") The CodeCombat game does not run in Internet Explorer 8 or older. Sorry! strong(data-i18n="home.no_ie")
if view.isIPadBrowser() || view.isMobile() if view.isIPadBrowser() || view.isMobile()
.alert.alert-danger.mobile .alert.alert-danger.mobile
strong(data-i18n="home.no_mobile") CodeCombat gameplay was not designed for mobile devices and may not work! strong(data-i18n="home.no_mobile")
else if view.isOldBrowser() else if view.isOldBrowser()
.alert.alert-danger.old-browser .alert.alert-danger.old-browser
strong(data-i18n="home.old_browser") Uh oh, your browser is too old to play CodeCombat. Sorry! strong(data-i18n="home.old_browser")
br br
span(data-i18n="home.old_browser_suffix") You can try anyway, but it probably won't work. span(data-i18n="home.old_browser_suffix")
nav.navbar.navbar-default nav.navbar.navbar-default
.container .container
@ -19,14 +19,14 @@
.col-md-3.col-sm-4 .col-md-3.col-sm-4
.navbar-header .navbar-header
button.navbar-toggle.collapsed(data-toggle='collapse', data-target='#navbar-collapse' aria-expanded='false') button.navbar-toggle.collapsed(data-toggle='collapse', data-target='#navbar-collapse' aria-expanded='false')
span.sr-only Toggle navigation span.sr-only(data-i18n="home.toggle_nav")
span.icon-bar span.icon-bar
span.icon-bar span.icon-bar
span.icon-bar span.icon-bar
a.navbar-brand(href="/") a.navbar-brand(href="/")
img#logo-img(src="/images/pages/base/logo.png") img#logo-img(src="/images/pages/base/logo.png")
span.glyphicon.glyphicon-home span.glyphicon.glyphicon-home
.col-md-9.col-sm-8 .col-md-9.col-sm-8
#navbar-collapse.collapse.navbar-collapse #navbar-collapse.collapse.navbar-collapse
ul.nav.navbar-nav.pull-left ul.nav.navbar-nav.pull-left
@ -65,11 +65,11 @@
a(href="/account/prepaid", data-i18n="account.prepaid_codes") a(href="/account/prepaid", data-i18n="account.prepaid_codes")
li li
a#logout-button(data-i18n="login.log_out") a#logout-button(data-i18n="login.log_out")
li li
#language-dropdown-wrapper #language-dropdown-wrapper
select.language-dropdown.form-control select.language-dropdown.form-control
block outer_content block outer_content
#site-content-area #site-content-area
@ -88,57 +88,57 @@
li li
strong CodeCombat strong CodeCombat
li li
a(href="/about") About a(href="/about", data-i18n="nav.about")
li li
a(href="/Careers") Jobs a(href="/Careers", data-i18n="nav.jobs")
li li
a(href="http://blog.codecombat.com/", data-i18n="nav.blog") a(href="http://blog.codecombat.com/", data-i18n="nav.blog")
li li
a(href="/legal") Legal a(href="/legal", data-i18n="nav.legal")
.col-sm-3 .col-sm-3
ul.list-unstyled ul.list-unstyled
li li
strong Schools strong(data-i18n="nav.schools")
li li
a(href="/courses/teachers") Teachers a(href="/courses/teachers", data-i18n="nav.teachers")
li li
a(href="https://sites.google.com/a/codecombat.com/teacher-guides/") Educator Wiki a(href="https://sites.google.com/a/codecombat.com/teacher-guides/", data-i18n="nav.educator_wiki")
li li
a(href="/teachers/quote") Request a Quote a(href="/teachers/quote", data-i18n="nav.request_quote")
.col-sm-3 .col-sm-3
ul.list-unstyled ul.list-unstyled
li li
strong Get Involved strong(data-i18n="nav.get_involved")
li li
a(href='/community', data-i18n="nav.community") a(href='/community', data-i18n="nav.community")
li li
a(href="/contribute") Contribute a(href="/contribute", data-i18n="nav.contribute")
li li
a(href=view.forumLink(), data-i18n="nav.forum") a(href=view.forumLink(), data-i18n="nav.forum")
li li
a(href="/play/ladder") Multiplayer a(href="/play/ladder", data-i18n="home.multiplayer")
li li
a(href="https://github.com/codecombat/codecombat") Open source (GitHub) a(href="https://github.com/codecombat/codecombat", data-i18n="nav.open_source")
.col-sm-3 .col-sm-3
ul.list-unstyled ul.list-unstyled
li li
strong Support strong(data-i18n="nav.support")
li li
a(href="https://discourse.codecombat.com/t/faq-check-before-posting/1027") FAQs a(href="https://discourse.codecombat.com/t/faq-check-before-posting/1027", data-i18n="nav.faqs")
li li
a(tabindex=-1, data-toggle="coco-modal", data-target="core/ContactModal", data-i18n="nav.contact") a(tabindex=-1, data-toggle="coco-modal", data-target="core/ContactModal", data-i18n="nav.contact")
li li
a(href="https://www.facebook.com/codecombat", data-i18n="nav.facebook") a(href="https://www.facebook.com/codecombat", data-i18n="nav.facebook")
li li
a(href="https://twitter.com/codecombat", data-i18n="nav.twitter") a(href="https://twitter.com/codecombat", data-i18n="nav.twitter")
#final-footer.small.text-center #final-footer.small.text-center
| Copyright ©2016 CodeCombat. All Rights Reserved. | Copyright ©2016 CodeCombat. All Rights Reserved.
br.hidden-lg.hidden-md br.hidden-lg.hidden-md
img(src="/images/pages/base/logo.png" alt="CodeCombat") img(src="/images/pages/base/logo.png" alt="CodeCombat")
br.hidden-lg.hidden-md br.hidden-lg.hidden-md
span.spr Need help? Email span.spr(data-i18n="nav.help_pref")
a(href="mailto:team@codecombat.com") team@codecombat.com a(href="mailto:team@codecombat.com") team@codecombat.com
span.spl and we'll get in touch! span.spl(data-i18n="nav.help_suff")

View file

@ -8,7 +8,7 @@ block header
img#small-nav-logo(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat") img#small-nav-logo(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
a(href="/") a(href="/")
span.glyphicon.glyphicon-home span.glyphicon.glyphicon-home
a(href='/teachers', data-i18n="nav.teachers") Teachers a(href='/teachers', data-i18n="nav.teachers")
a(href='/courses', data-i18n="nav.courses") a(href='/courses', data-i18n="nav.courses")
a(href=view.forumLink(), data-i18n="nav.forum") a(href=view.forumLink(), data-i18n="nav.forum")
a(href='/community', data-i18n="nav.community") a(href='/community', data-i18n="nav.community")
@ -37,7 +37,7 @@ block header
li li
a(href="/account/subscription", data-i18n="account.subscription") a(href="/account/subscription", data-i18n="account.subscription")
li li
a(href="/account/prepaid", data-i18n="account.prepaid_codes") Prepaid Codes a(href="/account/prepaid", data-i18n="account.prepaid_codes")
li li
a#logout-button(data-i18n="login.log_out") a#logout-button(data-i18n="login.log_out")
@ -60,15 +60,15 @@ block footer
#footer-links #footer-links
a(href="/about", data-i18n="nav.about") a(href="/about", data-i18n="nav.about")
a(tabindex=-1, data-toggle="coco-modal", data-target="core/ContactModal", data-i18n="nav.contact") Contact a(tabindex=-1, data-toggle="coco-modal", data-target="core/ContactModal", data-i18n="nav.contact")
a(href='http://blog.codecombat.com/', data-i18n="nav.blog") a(href='http://blog.codecombat.com/', data-i18n="nav.blog")
a(href='https://jobs.lever.co/codecombat', tabindex=-1, data-i18n="nav.careers") Careers a(href='https://jobs.lever.co/codecombat', tabindex=-1, data-i18n="nav.careers")
a(href='/legal', tabindex=-1, data-i18n="nav.legal") Legal a(href='/legal', tabindex=-1, data-i18n="nav.legal")
a(href='/privacy', tabindex=-1, data-i18n="legal.privacy_title") Privacy a(href='/privacy', tabindex=-1, data-i18n="legal.privacy_title")
a(href='/contribute', tabindex=-1, data-i18n="nav.contribute") Contribute a(href='/contribute', tabindex=-1, data-i18n="nav.contribute")
a(href='/play/ladder', tabindex=-1, data-i18n="home.multiplayer") a(href='/play/ladder', tabindex=-1, data-i18n="home.multiplayer")
if me.isAdmin() if me.isAdmin()
a(href='/admin', data-i18n="nav.admin") Admin a(href='/admin') Admin
if usesSocialMedia if usesSocialMedia
.share-buttons .share-buttons
@ -76,7 +76,7 @@ block footer
.g-plusone(data-href="http://codecombat.com", data-size="medium") .g-plusone(data-href="http://codecombat.com", data-size="medium")
.fb-like(data-href="https://www.facebook.com/codecombat", data-send="false", data-layout="button_count", data-width="350", data-show-faces="true", data-ref="coco_footer_#{fbRef}") .fb-like(data-href="https://www.facebook.com/codecombat", data-send="false", data-layout="button_count", data-width="350", data-show-faces="true", data-ref="coco_footer_#{fbRef}")
if !isIE if !isIE
a.twitter-follow-button(href="https://twitter.com/CodeCombat", data-show-count="true", data-show-screen-name="false", data-dnt="true", data-align="right", data-i18n="nav.twitter_follow") Follow a.twitter-follow-button(href="https://twitter.com/CodeCombat", data-show-count="true", data-show-screen-name="false", data-dnt="true", data-align="right", data-i18n="nav.twitter_follow")
iframe.github-star-button(src="https://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20") iframe.github-star-button(src="https://ghbtns.com/github-btn.html?user=codecombat&repo=codecombat&type=watch&count=true", allowtransparency="true", frameborder="0", scrolling="0", width="110", height="20")
#footer-credits #footer-credits

View file

@ -2,21 +2,21 @@ extends /templates/base
block content block content
h1(data-i18n="community.main_title") Community h1(data-i18n="community.main_title")
p(data-i18n="community.introduction") Check out the ways you can get involved below and decide what sounds the most fun. We look forward to working with you! p(data-i18n="community.introduction")
div div
.community-columns .community-columns
a(href="/editor/level") a(href="/editor/level")
img(src="/images/pages/community/level.png") img(src="/images/pages/community/level.png")
h2 h2
a(href="/editor/level", data-i18n="editor.level_title") a(href="/editor/level", data-i18n="editor.level_title")
p p
span.spr(data-i18n="community.level_editor_prefix") Use the CodeCombat span.spr(data-i18n="community.level_editor_prefix")
a(href="/editor/level", data-i18n="editor.level_title") a(href="/editor/level", data-i18n="editor.level_title")
span.spl(data-i18n="community.level_editor_suffix") to create and edit levels. Users have created levels for their classes, friends, hackathons, students, and siblings. If create a new level sounds intimidating you can start by forking one of ours! span.spl(data-i18n="community.level_editor_suffix")
.community-columns .community-columns
a(href="/editor/thang") a(href="/editor/thang")
@ -24,9 +24,9 @@ block content
h2 h2
a(href="/editor/thang", data-i18n="editor.thang_title") a(href="/editor/thang", data-i18n="editor.thang_title")
p p
span.spr(data-i18n="community.thang_editor_prefix") We call units within the game 'thangs'. Use the span.spr(data-i18n="community.thang_editor_prefix")
a(href="/editor/thang", data-i18n="editor.thang_title") a(href="/editor/thang", data-i18n="editor.thang_title")
span.spl(data-i18n="community.thang_editor_suffix") to modify the CodeCombat source artwork. Allow units to throw projectiles, alter the direction of an animation, change a unit's hit points, or upload your own vector sprites. span.spl(data-i18n="community.thang_editor_suffix")
.community-columns .community-columns
a(href="/editor/article") a(href="/editor/article")
@ -34,16 +34,16 @@ block content
h2 h2
a(href="/editor/article", data-i18n="editor.article_title") a(href="/editor/article", data-i18n="editor.article_title")
p p
span.spr(data-i18n="community.article_editor_prefix") See a mistake in some of our docs? Want to make some instructions for your own creations? Check out the span.spr(data-i18n="community.article_editor_prefix")
a(href="/editor/article", data-i18n="editor.article_title") a(href="/editor/article", data-i18n="editor.article_title")
span.spl(data-i18n="community.article_editor_suffix") and help CodeCombat players get the most out of their playtime. span.spl(data-i18n="community.article_editor_suffix")
div div
.half-width .half-width
h2.lower-titles h2.lower-titles
a(href="https://www.facebook.com/codecombat", data-i18n="community.find_us") Find us on these sites a(href="https://www.facebook.com/codecombat", data-i18n="community.find_us")
.logo-row .logo-row
@ -71,7 +71,7 @@ block content
.half-width .half-width
h2.lower-titles h2.lower-titles
a(href="/contribute", data-i18n="community.contribute_to_the_project") Contribute to the project a(href="/contribute", data-i18n="community.contribute_to_the_project")
.logo-row.contribute-classes .logo-row.contribute-classes

View file

@ -68,18 +68,26 @@
span.glyphicon.glyphicon-ok span.glyphicon.glyphicon-ok
tr tr
td.feature-description td.feature-description
span(data-i18n="subscribe.feature6") span(data-i18n="[html]subscribe.feature7")
if !me.isOnPremiumServer() if !me.isOnPremiumServer()
td.free-cell td.free-cell
td.center-ok td.center-ok
span.glyphicon.glyphicon-ok span.glyphicon.glyphicon-ok
tr tr
td.feature-description td.feature-description
span(data-i18n="[html]subscribe.feature7") span(data-i18n="subscribe.feature6")
if !me.isOnPremiumServer() if !me.isOnPremiumServer()
td.free-cell td.free-cell
td.center-ok td.center-ok
span.glyphicon.glyphicon-ok span.glyphicon.glyphicon-ok
if me.getCampaignAdsGroup() === 'leaderboard-ads'
tr
td.feature-description
span(data-i18n="[html]subscribe.feature8")
if !me.isOnPremiumServer()
td.free-cell
td.center-ok
span.glyphicon.glyphicon-ok
#parents-info(data-i18n="subscribe.parents") #parents-info(data-i18n="subscribe.parents")
#payment-methods-info(data-i18n="subscribe.payment_methods") #payment-methods-info(data-i18n="subscribe.payment_methods")

View file

@ -1,165 +1,182 @@
a(href="/").picoctf-hide if view.showAds()
img.small-nav-logo(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat") // TODO: loading this multiple times yields script error:
// Uncaught TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them.
.picoctf-show .ad-container
a(href="http://staging.picoctf.com").picoctf-logo if campaign
img.small-nav-logo(src="http://picoctf.com/img/2014_logo_blue2.svg", title="picoCTF home", alt="picoCTF home") script(async, src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
a(href="http://codecombat.com").picoctf-powered-by ins.adsbygoogle(style="display:inline-block;width:728px;height:90px", data-ad-client="ca-pub-6640930638193614", data-ad-slot="4924994487")
em.spr powered by script.
img(src="/images/pages/base/logo.png", title="Powered by CodeCombat - Learn how to code by playing a game ", alt="Powered by CodeCombat") (adsbygoogle = window.adsbygoogle || []).push({});
if campaign
.map
.gradient.horizontal-gradient.top-gradient
.gradient.vertical-gradient.right-gradient
.gradient.horizontal-gradient.bottom-gradient
.gradient.vertical-gradient.left-gradient
.map-background(alt="", draggable="false")
each level in levels
if !level.hidden
div(style="left: #{level.position.x}%; bottom: #{level.position.y}%; background-color: #{level.color}", class="level" + (level.next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + (levelStatusMap[level.slug] || ""), data-level-slug=level.slug, data-level-original=level.original, title=i18n(level, 'name') + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
if level.unlocksHero && (!level.purchasedHero || editorMode)
img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png")
a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.slug}", disabled=level.disabled, data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
if level.slug == 'lost-viking'
img.star(src="/file/db/thang.type/5441c3144e9aeb727cc97111/portrait.png")
else if level.requiresSubscription
img.star(src="/images/pages/play/star.png")
if levelStatusMap[level.slug] === 'complete'
img.banner(src="/images/pages/play/level-banner-complete.png")
if levelStatusMap[level.slug] === 'started'
img.banner(src="/images/pages/play/level-banner-started.png")
if levelDifficultyMap[level.slug]
.level-difficulty-banner-text= levelDifficultyMap[level.slug]
div(style="left: #{level.position.x}%; bottom: #{level.position.y}%", class="level-shadow" + (level.next ? " next" : "") + " " + (levelStatusMap[level.slug] || ""))
.level-info-container(data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
- var playCount = levelPlayCountMap[level.slug]
.progress.progress-striped.active.hide
.progress-bar(style="width: 100%")
- var showsLeaderboard = levelStatusMap[level.slug] === 'complete' && ((level.scoreTypes && level.scoreTypes.length) || ['hero-ladder', 'course-ladder'].indexOf(level.type) !== -1);
div(class="level-info " + (levelStatusMap[level.slug] || "") + (level.requiresSubscription ? " premium" : "") + (showsLeaderboard ? " shows-leaderboard" : ""))
.level-status
h3= i18n(level, 'name') + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
- var description = i18n(level, 'description') || level.description || ""
.level-description!= marked(description, {sanitize: !picoCTF})
if level.disabled
p
span.spr(data-i18n="play.awaiting_levels_adventurer_prefix") We release five levels per week.
a.spr(href="/contribute/adventurer")
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
if level.displayConcepts && level.displayConcepts.length
p
for concept in level.displayConcepts
kbd(data-i18n="concepts." + concept)
if !level.disabled && !level.locked
if playCount && playCount.sessions
.play-counts.hidden
span.spl.spr= playCount.sessions
span(data-i18n="play.players") players
span.spr , #{Math.round(playCount.playtime / 3600)}
span(data-i18n="play.hours_played") hours played
if showsLeaderboard
button.btn.btn-warning.btn.btn-lg.btn-illustrated.view-solutions(data-level-slug=level.slug)
span(data-i18n="leaderboard.scores")
button.btn.btn-success.btn.btn-lg.btn-illustrated.start-level(data-i18n="common.play") Play
if me.get('courseInstances') && me.get('courseInstances').length
.course-version.hidden(data-level-original=level.original)
em(data-i18n="general.or")
| ...
br
button.btn.btn-primary.btn.btn-lg.btn-illustrated
span(data-i18n="play.play_classroom_version") Play Classroom Version
else if level.unlocksHero && !level.purchasedHero
img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png", style="left: #{level.position.x}%; bottom: #{level.position.y}%;")
for adjacentCampaign in adjacentCampaigns
a(href=(editorMode ? "/editor/campaign/" : "/play/") + adjacentCampaign.slug)
span.glyphicon.glyphicon-share-alt.campaign-switch(style=adjacentCampaign.style, title=adjacentCampaign.name, data-campaign-id=adjacentCampaign.id)
else
.portal
.portals
for campaignSlug in ['dungeon', 'forest', 'desert', 'mountain', 'glacier', 'volcano']
- var campaign = campaigns[campaignSlug];
- var godmode = me.get('permissions', true).indexOf('godmode') != -1;
div(class="campaign #{campaignSlug}" + (campaign ? "" : " silhouette") + (campaign && campaign.locked && !godmode ? " locked" : ""), data-campaign-slug=campaignSlug)
.campaign-label
h2.campaign-name
if campaign
span= i18n(campaign.attributes, 'fullName')
else
span ???
if campaign && campaign.levelsTotal
h3.levels-completed
span= campaign.levelsCompleted
| /
span= campaign.levelsTotal
if campaign && campaign.locked && !godmode
h3.campaign-locked(data-i18n="play.locked") Locked
else if campaign
btn(data-i18n="common.play").btn.btn-illustrated.btn-lg.btn-success.play-button
if campaign && campaign.get('description')
p.campaign-description
span= i18n(campaign.attributes, 'description')
.game-controls.header-font.picoctf-hide
button.btn.poll.hidden(data-i18n="[title]play.poll")
a.btn.clans(href="/clans", data-i18n="[title]clans.clans")
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
button.btn.heroes(data-toggle='coco-modal', data-target='play/modal/PlayHeroesModal', data-i18n="[title]play.heroes")
button.btn.achievements(data-toggle='coco-modal', data-target='play/modal/PlayAchievementsModal', data-i18n="[title]play.achievements")
if me.get('anonymous') === false || me.get('iosIdentifierForVendor') || isIPadApp
button.btn.gems(data-toggle='coco-modal', data-target='play/modal/BuyGemsModal', data-i18n="[title]play.buy_gems")
if !me.get('anonymous', true)
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")
//if me.isAdmin()
// button.btn.settings(data-toggle='coco-modal', data-target='play/modal/PlaySettingsModal', data-i18n="[title]play.settings")
if me.get('anonymous', true)
button.btn.settings(data-toggle='coco-modal', data-target='core/CreateAccountModal', data-i18n="[title]play.settings")
.user-status.header-font.picoctf-hide
.user-status-line
span.gem.gem-30
span#gems-count.spr= me.gems()
span.level-indicator(data-i18n="general.player_level")
span.player-level.spr= me.level()
span.player-hero-icon
if me.get('anonymous')
span.player-name.spr(data-i18n="play.anonymous") Anonymous Player
button.btn.btn-illustrated.login-button.btn-warning(data-i18n="login.log_in")
button.btn.btn-illustrated.signup-button.btn-danger(data-i18n="signup.sign_up")
else else
a(data-toggle="coco-modal", data-target="play/modal/PlayAccountModal").player-name.spr= me.get('name') script(async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
button#logout-button.btn.btn-illustrated.btn-warning(data-i18n="login.log_out") Log Out ins.adsbygoogle(style="display:inline-block;width:728px;height:90px", data-ad-client="ca-pub-6640930638193614", data-ad-slot="4469166082")
if me.isPremium() script.
button.btn.btn-illustrated.btn-primary(data-i18n="nav.contact", data-toggle="coco-modal", data-target="core/ContactModal") Contact (adsbygoogle = window.adsbygoogle || []).push({});
button.btn.btn-lg.btn-inverse.campaign-control-button.picoctf-hide#volume-button(data-i18n="[title]play.adjust_volume", title="Adjust volume") // TODO: .gameplay-container causes world map buttons to briefly appear in top left of screen
.glyphicon.glyphicon-volume-off .gameplay-container
.glyphicon.glyphicon-volume-down a(href="/").picoctf-hide
.glyphicon.glyphicon-volume-up img.small-nav-logo(src="/images/pages/base/logo.png", title="CodeCombat - Learn how to code by playing a game", alt="CodeCombat")
if campaign && !editorMode .picoctf-show
button.btn.btn-lg.btn-inverse.campaign-control-button.picoctf-hide#back-button(data-i18n="[title]resources.campaigns", title="Campaigns") a(href="http://staging.picoctf.com").picoctf-logo
.glyphicon.glyphicon-globe img.small-nav-logo(src="http://picoctf.com/img/2014_logo_blue2.svg", title="picoCTF home", alt="picoCTF home")
a(href="http://codecombat.com").picoctf-powered-by
em.spr powered by
img(src="/images/pages/base/logo.png", title="Powered by CodeCombat - Learn how to code by playing a game ", alt="Powered by CodeCombat")
if editorMode if campaign
button.btn.btn-lg.btn-inverse.campaign-control-button#clear-storage-button(data-i18n="[title]editor.clear_storage", title="Clear your local changes") .map
.glyphicon.glyphicon-refresh .gradient.horizontal-gradient.top-gradient
.gradient.vertical-gradient.right-gradient
.gradient.horizontal-gradient.bottom-gradient
.gradient.vertical-gradient.left-gradient
.map-background(alt="", draggable="false")
if campaign && campaign.loaded each level in levels
h1#campaign-status.picoctf-hide if !level.hidden
.campaign-status-background div(style="left: #{level.position.x}%; bottom: #{level.position.y}%; background-color: #{level.color}", class="level" + (level.next ? " next" : "") + (level.disabled ? " disabled" : "") + (level.locked ? " locked" : "") + " " + (levelStatusMap[level.slug] || ""), data-level-slug=level.slug, data-level-original=level.original, title=i18n(level, 'name') + (level.disabled ? ' (Coming Soon to Adventurers)' : ''))
.campaign-name if level.unlocksHero && (!level.purchasedHero || editorMode)
- var fullName = i18n(campaign.attributes, 'fullName') img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png")
if (me.get('preferredLanguage', true) || 'en-US').split('-')[0] == 'en' || fullName != campaign.get('fullName') a(href=level.type == 'hero' ? '#' : level.disabled ? "/play" : "/play/#{level.levelPath || 'level'}/#{level.slug}", disabled=level.disabled, data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
// We have a translation. if level.slug == 'lost-viking'
span= fullName img.star(src="/file/db/thang.type/5441c3144e9aeb727cc97111/portrait.png")
.levels-completed else if level.requiresSubscription
span= levelsCompleted img.star(src="/images/pages/play/star.png")
| / if levelStatusMap[level.slug] === 'complete'
span= levelsTotal img.banner(src="/images/pages/play/level-banner-complete.png")
if levelStatusMap[level.slug] === 'started'
img.banner(src="/images/pages/play/level-banner-started.png")
if levelDifficultyMap[level.slug]
.level-difficulty-banner-text= levelDifficultyMap[level.slug]
div(style="left: #{level.position.x}%; bottom: #{level.position.y}%", class="level-shadow" + (level.next ? " next" : "") + " " + (levelStatusMap[level.slug] || ""))
.level-info-container(data-level-slug=level.slug, data-level-path=level.levelPath || 'level', data-level-name=level.name)
- var playCount = levelPlayCountMap[level.slug]
.progress.progress-striped.active.hide
.progress-bar(style="width: 100%")
- var showsLeaderboard = levelStatusMap[level.slug] === 'complete' && ((level.scoreTypes && level.scoreTypes.length) || ['hero-ladder', 'course-ladder'].indexOf(level.type) !== -1);
div(class="level-info " + (levelStatusMap[level.slug] || "") + (level.requiresSubscription ? " premium" : "") + (showsLeaderboard ? " shows-leaderboard" : ""))
.level-status
h3= i18n(level, 'name') + (level.disabled ? " (Coming soon!)" : (level.locked ? " (Locked)" : ""))
- var description = i18n(level, 'description') || level.description || ""
.level-description!= marked(description, {sanitize: !picoCTF})
if level.disabled
p
span.spr(data-i18n="play.awaiting_levels_adventurer_prefix") We release five levels per week.
a.spr(href="/contribute/adventurer")
strong(data-i18n="play.awaiting_levels_adventurer") Sign up as an Adventurer
span.spl(data-i18n="play.awaiting_levels_adventurer_suffix") to be the first to play new levels.
if level.displayConcepts && level.displayConcepts.length
p
for concept in level.displayConcepts
kbd(data-i18n="concepts." + concept)
if !level.disabled && !level.locked
if playCount && playCount.sessions
.play-counts.hidden
span.spl.spr= playCount.sessions
span(data-i18n="play.players") players
span.spr , #{Math.round(playCount.playtime / 3600)}
span(data-i18n="play.hours_played") hours played
if showsLeaderboard
button.btn.btn-warning.btn.btn-lg.btn-illustrated.view-solutions(data-level-slug=level.slug)
span(data-i18n="leaderboard.scores")
button.btn.btn-success.btn.btn-lg.btn-illustrated.start-level(data-i18n="common.play") Play
if me.get('courseInstances') && me.get('courseInstances').length
.course-version.hidden(data-level-original=level.original)
em(data-i18n="general.or")
| ...
br
button.btn.btn-primary.btn.btn-lg.btn-illustrated
span(data-i18n="play.play_classroom_version") Play Classroom Version
else if level.unlocksHero && !level.purchasedHero
img.hero-portrait(src="/file/db/thang.type/#{level.unlocksHero}/portrait.png", style="left: #{level.position.x}%; bottom: #{level.position.y}%;")
for adjacentCampaign in adjacentCampaigns
a(href=(editorMode ? "/editor/campaign/" : "/play/") + adjacentCampaign.slug)
span.glyphicon.glyphicon-share-alt.campaign-switch(style=adjacentCampaign.style, title=adjacentCampaign.name, data-campaign-id=adjacentCampaign.id)
else
.portal
.portals
for campaignSlug in ['dungeon', 'forest', 'desert', 'mountain', 'glacier', 'volcano']
- var campaign = campaigns[campaignSlug];
- var godmode = me.get('permissions', true).indexOf('godmode') != -1;
div(class="campaign #{campaignSlug}" + (campaign ? "" : " silhouette") + (campaign && campaign.locked && !godmode ? " locked" : ""), data-campaign-slug=campaignSlug)
.campaign-label
h2.campaign-name
if campaign
span= i18n(campaign.attributes, 'fullName')
else
span ???
if campaign && campaign.levelsTotal
h3.levels-completed
span= campaign.levelsCompleted
| /
span= campaign.levelsTotal
if campaign && campaign.locked && !godmode
h3.campaign-locked(data-i18n="play.locked") Locked
else if campaign
btn(data-i18n="common.play").btn.btn-illustrated.btn-lg.btn-success.play-button
if campaign && campaign.get('description')
p.campaign-description
span= i18n(campaign.attributes, 'description')
.game-controls.header-font.picoctf-hide
button.btn.poll.hidden(data-i18n="[title]play.poll")
a.btn.clans(href="/clans", data-i18n="[title]clans.clans")
button.btn.items(data-toggle='coco-modal', data-target='play/modal/PlayItemsModal', data-i18n="[title]play.items")
button.btn.heroes(data-toggle='coco-modal', data-target='play/modal/PlayHeroesModal', data-i18n="[title]play.heroes")
button.btn.achievements(data-toggle='coco-modal', data-target='play/modal/PlayAchievementsModal', data-i18n="[title]play.achievements")
if me.get('anonymous') === false || me.get('iosIdentifierForVendor') || isIPadApp
button.btn.gems(data-toggle='coco-modal', data-target='play/modal/BuyGemsModal', data-i18n="[title]play.buy_gems")
if !me.get('anonymous', true)
button.btn.account(data-toggle='coco-modal', data-target='play/modal/PlayAccountModal', data-i18n="[title]play.account")
//if me.isAdmin()
// button.btn.settings(data-toggle='coco-modal', data-target='play/modal/PlaySettingsModal', data-i18n="[title]play.settings")
if me.get('anonymous', true)
button.btn.settings(data-toggle='coco-modal', data-target='core/CreateAccountModal', data-i18n="[title]play.settings")
.user-status.header-font.picoctf-hide
.user-status-line
span.gem.gem-30
span#gems-count.spr= me.gems()
span.level-indicator(data-i18n="general.player_level")
span.player-level.spr= me.level()
span.player-hero-icon
if me.get('anonymous')
span.player-name.spr(data-i18n="play.anonymous") Anonymous Player
button.btn.btn-illustrated.login-button.btn-warning(data-i18n="login.log_in")
button.btn.btn-illustrated.signup-button.btn-danger(data-i18n="signup.sign_up")
else
a(data-toggle="coco-modal", data-target="play/modal/PlayAccountModal").player-name.spr= me.get('name')
button#logout-button.btn.btn-illustrated.btn-warning(data-i18n="login.log_out") Log Out
if me.isPremium()
button.btn.btn-illustrated.btn-primary(data-i18n="nav.contact", data-toggle="coco-modal", data-target="core/ContactModal") Contact
button.btn.btn-lg.btn-inverse.campaign-control-button.picoctf-hide#volume-button(data-i18n="[title]play.adjust_volume", title="Adjust volume")
.glyphicon.glyphicon-volume-off
.glyphicon.glyphicon-volume-down
.glyphicon.glyphicon-volume-up
if campaign && !editorMode
button.btn.btn-lg.btn-inverse.campaign-control-button.picoctf-hide#back-button(data-i18n="[title]resources.campaigns", title="Campaigns")
.glyphicon.glyphicon-globe
if editorMode
button.btn.btn-lg.btn-inverse.campaign-control-button#clear-storage-button(data-i18n="[title]editor.clear_storage", title="Clear your local changes")
.glyphicon.glyphicon-refresh
if campaign && campaign.loaded
h1#campaign-status.picoctf-hide
.campaign-status-background
.campaign-name
- var fullName = i18n(campaign.attributes, 'fullName')
if (me.get('preferredLanguage', true) || 'en-US').split('-')[0] == 'en' || fullName != campaign.get('fullName')
// We have a translation.
span= fullName
.levels-completed
span= levelsCompleted
| /
span= levelsTotal

View file

@ -1,49 +1,59 @@
#level-loading-view if view.showAds()
// TODO: loading this multiple times yields script error:
// Uncaught TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them.
.ad-container
script(async, src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js")
ins.adsbygoogle(style="display:inline-block;width:728px;height:90px", data-ad-client="ca-pub-6640930638193614", data-ad-slot="5527096883")
script.
(adsbygoogle = window.adsbygoogle || []).push({});
.level-content .game-container
#control-bar-view #level-loading-view
#fullscreen-editor-background-screen(title="Click to minimize the code editor") .level-content
#control-bar-view
#code-area #fullscreen-editor-background-screen(title="Click to minimize the code editor")
#code-area-gradient.gradient
#tome-view
#game-area #code-area
#code-area-gradient.gradient
#tome-view
#canvas-wrapper #game-area
canvas(width=924, height=589)#webgl-surface
canvas(width=924, height=589)#normal-surface
#ascii-surface
#canvas-left-gradient.gradient
#canvas-top-gradient.gradient
#goals-view
#level-flags-view #canvas-wrapper
canvas(width=924, height=589)#webgl-surface
canvas(width=924, height=589)#normal-surface
#ascii-surface
#canvas-left-gradient.gradient
#canvas-top-gradient.gradient
#goals-view
#gold-view #level-flags-view
#problem-alert-view #gold-view
#level-chat-view #problem-alert-view
#multiplayer-status-view #level-chat-view
#duel-stats-view #multiplayer-status-view
#playback-view #duel-stats-view
#thang-hud #playback-view
#level-dialogue-view #thang-hud
button.btn.btn-lg.btn-warning.banner.header-font#stop-real-time-playback-button(title="Stop real-time playback", data-i18n="play_level.skip") Skip #level-dialogue-view
#level-footer-shadow button.btn.btn-lg.btn-warning.banner.header-font#stop-real-time-playback-button(title="Stop real-time playback", data-i18n="play_level.skip") Skip
#level-footer-background
if !me.get('anonymous') #level-footer-shadow
#play-footer(class=me.isPremium() ? "premium" : "") #level-footer-background
p(class='footer-link-text').picoctf-hide
a.contact-link(title='Send CodeCombat a message', tabindex=-1, data-i18n="nav.contact") Contact if !me.get('anonymous')
#play-footer(class=me.isPremium() ? "premium" : "")
p(class='footer-link-text').picoctf-hide
a.contact-link(title='Send CodeCombat a message', tabindex=-1, data-i18n="nav.contact") Contact

View file

@ -22,7 +22,7 @@
.product .product
h4.subscription-gem-amount x{{gems}} / mo h4.subscription-gem-amount x{{gems}} / mo
h3(data-i18n="account.subscription") h3(data-i18n="account.subscription")
if me.isPremium() if me.hasSubscription()
button.disabled.start-subscription-button.btn.btn-lg.btn-illustrated.btn-success button.disabled.start-subscription-button.btn.btn-lg.btn-illustrated.btn-success
| ✓ | ✓
span(data-i18n="account.subscribed") span(data-i18n="account.subscribed")

View file

@ -266,6 +266,11 @@ module.exports = class CampaignView extends RootView
authModal.mode = 'signup' authModal.mode = 'signup'
@openModalView authModal @openModalView authModal
showAds: ->
if application.isProduction() && !me.isPremium() && !me.isTeacher() && !window.serverConfig.picoCTF
return me.getCampaignAdsGroup() is 'leaderboard-ads'
false
annotateLevel: (level) -> annotateLevel: (level) ->
level.position ?= { x: 10, y: 10 } level.position ?= { x: 10, y: 10 }
level.locked = not me.ownsLevel level.original level.locked = not me.ownsLevel level.original
@ -554,6 +559,7 @@ module.exports = class CampaignView extends RootView
aspectRatio = mapWidth / mapHeight aspectRatio = mapWidth / mapHeight
pageWidth = @$el.width() pageWidth = @$el.width()
pageHeight = @$el.height() pageHeight = @$el.height()
pageHeight -= adContainerHeight if adContainerHeight = $('.ad-container').outerHeight()
widthRatio = pageWidth / mapWidth widthRatio = pageWidth / mapWidth
heightRatio = pageHeight / mapHeight heightRatio = pageHeight / mapHeight
# Make sure we can see the whole map, fading to background in one dimension. # Make sure we can see the whole map, fading to background in one dimension.

View file

@ -148,6 +148,13 @@ module.exports = class PlayLevelView extends RootView
application.tracker?.trackEvent 'Finished Level Load', category: 'Play Level', label: @levelID, level: @levelID, loadDuration: @loadDuration application.tracker?.trackEvent 'Finished Level Load', category: 'Play Level', label: @levelID, level: @levelID, loadDuration: @loadDuration
application.tracker?.trackTiming @loadDuration, 'Level Load Time', @levelID, @levelID application.tracker?.trackTiming @loadDuration, 'Level Load Time', @levelID, @levelID
isCourseMode: -> @courseID and @courseInstanceID
showAds: ->
if application.isProduction() && !me.isPremium() && !me.isTeacher() && !window.serverConfig.picoCTF && !@isCourseMode()
return me.getCampaignAdsGroup() is 'leaderboard-ads'
false
# CocoView overridden methods ############################################### # CocoView overridden methods ###############################################
getRenderData: -> getRenderData: ->
@ -326,7 +333,13 @@ module.exports = class PlayLevelView extends RootView
initSurface: -> initSurface: ->
webGLSurface = $('canvas#webgl-surface', @$el) webGLSurface = $('canvas#webgl-surface', @$el)
normalSurface = $('canvas#normal-surface', @$el) normalSurface = $('canvas#normal-surface', @$el)
@surface = new Surface(@world, normalSurface, webGLSurface, thangTypes: @supermodel.getModels(ThangType), observing: @observing, playerNames: @findPlayerNames(), levelType: @level.get('type', true)) surfaceOptions =
thangTypes: @supermodel.getModels(ThangType)
observing: @observing
playerNames: @findPlayerNames()
levelType: @level.get('type', true)
stayVisible: @showAds()
@surface = new Surface(@world, normalSurface, webGLSurface, surfaceOptions)
worldBounds = @world.getBounds() worldBounds = @world.getBounds()
bounds = [{x: worldBounds.left, y: worldBounds.top}, {x: worldBounds.right, y: worldBounds.bottom}] bounds = [{x: worldBounds.left, y: worldBounds.top}, {x: worldBounds.right, y: worldBounds.bottom}]
@surface.camera.setBounds(bounds) @surface.camera.setBounds(bounds)
@ -499,7 +512,8 @@ module.exports = class PlayLevelView extends RootView
break break
Backbone.Mediator.publish 'tome:cast-spell', {} Backbone.Mediator.publish 'tome:cast-spell', {}
onWindowResize: (e) => @endHighlight() onWindowResize: (e) =>
@endHighlight()
onDisableControls: (e) -> onDisableControls: (e) ->
return if e.controls and not ('level' in e.controls) return if e.controls and not ('level' in e.controls)
@ -535,7 +549,7 @@ module.exports = class PlayLevelView extends RootView
@endHighlight() @endHighlight()
options = {level: @level, supermodel: @supermodel, session: @session, hasReceivedMemoryWarning: @hasReceivedMemoryWarning, courseID: @courseID, courseInstanceID: @courseInstanceID, world: @world} options = {level: @level, supermodel: @supermodel, session: @session, hasReceivedMemoryWarning: @hasReceivedMemoryWarning, courseID: @courseID, courseInstanceID: @courseInstanceID, world: @world}
ModalClass = if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop', 'course', 'course-ladder'] then HeroVictoryModal else VictoryModal ModalClass = if @level.get('type', true) in ['hero', 'hero-ladder', 'hero-coop', 'course', 'course-ladder'] then HeroVictoryModal else VictoryModal
ModalClass = CourseVictoryModal if @courseID and @courseInstanceID ModalClass = CourseVictoryModal if @isCourseMode()
ModalClass = PicoCTFVictoryModal if window.serverConfig.picoCTF ModalClass = PicoCTFVictoryModal if window.serverConfig.picoCTF
victoryModal = new ModalClass(options) victoryModal = new ModalClass(options)
@openModalView(victoryModal) @openModalView(victoryModal)

View file

@ -1,3 +1,11 @@
var majorVersion = parseInt(process.versions.node.split('.')[0]);
if (majorVersion < 4) {
console.error('Server requires Node v4 or higher. Your version:', process.version);
process.exit(1);
}
if (majorVersion === 4) {
console.warn('WARNING: You are using Node v4. Please upgrade to Node v5. Your version:', process.versions.node);
}
require('coffee-script'); require('coffee-script');
require('coffee-script/register'); require('coffee-script/register');
var server = require('./server'); var server = require('./server');

View file

@ -0,0 +1,38 @@
// Find classroom data for a specific school
// Usage:
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
// Change school name regex HERE
var schoolRegex = /schooldomain\.edu/ig;
var cursor = db.users.find({emailLower: {$regex: schoolRegex}}, {name: 1, emailLower: 1, schoolName: 1});
var userIDs = [];
var users = {};
while (cursor.hasNext()) {
var doc = cursor.next();
userIDs.push(doc._id);
users[doc._id.valueOf()] = {
email: doc.emailLower,
name: doc.name,
schoolName: doc.schoolName || '',
classrooms: []
};
}
var cursor = db.classrooms.find({ownerID: {$in: userIDs}});
while (cursor.hasNext()) {
var doc = cursor.next();
users[doc.ownerID.valueOf()].classrooms.push({id: doc._id.valueOf(), name: doc.name, students: doc.members.length});
}
for (var userID in users) {
var user = users[userID];
var studentCount = 0;
for (var i = 0; i < user.classrooms.length; i++) {
studentCount += user.classrooms[i].students;
}
if (user.classrooms.length > 0 || studentCount > 0 || user.schoolName) {
print(userID, '\t', user.email, '\t', user.name, '\t', user.classrooms.length, '\t', studentCount, '\t', user.schoolName);
}
}