Merge branch 'master' into production

This commit is contained in:
Matt Lott 2016-01-21 16:23:06 -08:00
commit f4db44ed3c
7 changed files with 324 additions and 271 deletions

View file

@ -47,6 +47,10 @@
(window,document,"script","51a79585ee207206390002a2");
</script>
<!-- start Mixpanel --><script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable time_event track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"file:"===e.location.protocol&&"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js".match(/^\/\//)?"https://cdn.mxpnl.com/libs/mixpanel-2-latest.min.js":"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f)}})(document,window.mixpanel||[]);
mixpanel.init("e71a4e60db7e1dc5e685be96776280f9");</script><!-- end Mixpanel -->
<script src="https://checkout.stripe.com/checkout.js"></script>
<!-- IE9 doesn't support defer attribute: https://github.com/h5bp/lazyweb-requests/issues/42 -->

View file

@ -64,7 +64,7 @@ module.exports = class Tracker
for userTrait in ['email', 'anonymous', 'dateCreated', 'name', 'testGroupNumber', 'gender', 'lastLevel', 'siteref', 'ageRange']
traits[userTrait] ?= me.get(userTrait)
console.log 'Would identify', traits if debugAnalytics
console.log 'Would identify', me.id, traits if debugAnalytics
return unless @isProduction and not me.isAdmin()
# Errorception
@ -76,19 +76,29 @@ module.exports = class Tracker
__insp?.push ['identify', me.id]
__insp?.push ['tagSession', traits]
# Mixpanel
# https://mixpanel.com/help/reference/javascript
mixpanel.identify(me.id)
mixpanel.register(traits)
trackPageView: ->
name = Backbone.history.getFragment()
console.log "Would track analytics pageview: '/#{name}'" if debugAnalytics
url = "/#{name}"
console.log "Would track analytics pageview: #{url}" if debugAnalytics
@trackEventInternal 'Pageview', url: name unless me?.isAdmin() and @isProduction
return unless @isProduction and not me.isAdmin()
# Google Analytics
# https://developers.google.com/analytics/devguides/collection/analyticsjs/pages
ga? 'send', 'pageview', "/#{name}"
ga? 'send', 'pageview', url
trackEvent: (action, properties={}) =>
# Mixpanel
mixpanelIncludes = ['courses', 'courses/purchase', 'courses/teachers', 'courses/students', 'schools', 'teachers', 'teachers/freetrial']
mixpanel.track('page viewed', 'page name' : name, url : url) if name in mixpanelIncludes
trackEvent: (action, properties={}, includeIntegrations=[]) =>
@trackEventInternal action, _.cloneDeep properties unless me?.isAdmin() and @isProduction
console.log 'Tracking external analytics event:', action, properties if debugAnalytics
console.log 'Tracking external analytics event:', action, properties, includeIntegrations if debugAnalytics
return unless me and @isProduction and not me.isAdmin()
# Google Analytics
@ -105,6 +115,10 @@ module.exports = class Tracker
# http://www.inspectlet.com/docs#tagging
__insp?.push ['tagSession', action: action, properies: properties]
# Mixpanel
# Only log explicit events for now
mixpanel.track(action, properties) if 'Mixpanel' in includeIntegrations
trackEventInternal: (event, properties) =>
# Skipping heavily logged actions we don't use internally
unless event in ['Simulator Result', 'Started Level Load', 'Finished Level Load']

View file

@ -4,7 +4,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
no_ie: "המשחק לא עובד באקפלורר 8 וישן יותר. סליחה!" # Warning that only shows up in IE8 and older
no_mobile: "המשחק לא עוצב לטלפונים ואולי לא יעבוד" # Warning that shows up on mobile devices
play: "שחק" # The big play button that opens up the campaign view.
# play_campaign_version: "Play Campaign Version" # Shows up under big play button if you only play /courses
play_campaign_version: "שחק בגרסת המסע" # Shows up under big play button if you only play /courses
old_browser: "או או, נראה כי הדפדפן שלך יותר מידי ישן כדי להריץ את המשחק. סליחה!" # Warning that shows up on really old Firefox/Chrome/Safari
old_browser_suffix: "אתה יכול לנסות בכול מקרה אבל זה כנראה לא יעבוד."
ipad_browser: "חדשות רעות: CodeCombat לא עובד בדפדפן של הiPad-. חדשות טובות: גרסת הiPad של המשחק ממתינה לאישור מחברת Apple."
@ -17,7 +17,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
nav:
play: "שלבים" # The top nav bar entry where players choose which levels to play
community: "קהילה"
# courses: "Courses"
courses: "מסלולים"
editor: "עורך"
blog: "בלוג"
forum: "פורום"
@ -33,7 +33,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
contact: "צור קשר"
twitter_follow: "עקוב אחרינו בטוויטר"
teachers: "מורים"
# careers: "Careers"
careers: "קריירות"
modal:
close: "סגור"
@ -52,7 +52,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
play:
play_as: "שחק בתור " # Ladder page
# compete: "Compete!" # Course details page
compete: "הושלם!" # Course details page
spectate: "צופה" # Ladder page
players: "שחקנים" # Hover over a level on /play
hours_played: "שעות משחק" # Hover over a level on /play
@ -75,7 +75,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
subscription_required: "יש צורך במנוי"
anonymous: "משתמש אנונימי"
level_difficulty: "רמת קושי: "
# play_classroom_version: "Play Classroom Version" # Choose a level in campaign version that you also can play in one of your courses
play_classroom_version: "שיק בגרסה הכיתתית" # Choose a level in campaign version that you also can play in one of your courses
campaign_beginner: "מסע המתחילים"
awaiting_levels_adventurer_prefix: ".אנחנו מוסיפים חמישה שלבים בכל שבוע" # {change}
awaiting_levels_adventurer: "הירשם כהרפתקן"
@ -83,7 +83,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
adjust_volume: "שנה ווליום"
campaign_multiplayer: "זירות רב-המשתתפים"
campaign_multiplayer_description: "..."
# campaign_old_multiplayer: "(Deprecated) Old Multiplayer Arenas"
campaign_old_multiplayer: "(לא מומלץ) זירות מרובי משתתפים ישנות"
# campaign_old_multiplayer_description: "Relics of a more civilized age. No simulations are run for these older, hero-less multiplayer arenas."
share_progress_modal:
@ -114,9 +114,9 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
log_in: "כנס עם סיסמה"
required: ".יש להתחבר על מנת לגשת לשלב זה"
login_switch: "? כבר יש לך משתמש"
# school_name: "School Name and City"
# optional: "optional"
# school_name_placeholder: "Example High School, Springfield, IL"
school_name: "שם בית ספר ועיר"
optional: "רשות"
school_name_placeholder: "לדוגמה: תיכון עירוני X, תל אביב."
recover:
recover_account_title: "שחזר סיסמה"
@ -157,15 +157,15 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
general:
and: "וגם"
name: "שם"
date: "Date"
date: "תאריך"
body: "גוף"
version: "גרסה"
pending: "ממתין"
accepted: "התקבל"
rejected: "נדחה"
withdrawn: "האוייב נסוג"
# accept: "Accept"
# reject: "Reject"
accept: "מסכים"
reject: "דחה"
# withdraw: "Withdraw"
submitter: "מוסר"
submitted: "נמסר"
@ -221,12 +221,12 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
years: "שנים"
play_level:
# completed_level: "Completed Level:"
# course: "Course:"
completed_level: "שלב שהושלם:"
course: "מסלול:"
done: "סיים"
# next_level: "Next Level:"
# next_game: "Next game"
# show_menu: "Show game menu"
next_level: "השלב הבא:"
next_game: "המשחק הבא"
show_menu: "הצג תפריט משחק"
home: "בית" # Not used any more, will be removed soon.
level: "שלב" # Like "Level: Dungeons of Kithgard"
skip: "דלג"
@ -256,13 +256,13 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
victory_saving_progress: "שומר התקדמות"
victory_go_home: "חזור הביתה"
victory_review: "!ספר לנו עוד"
# victory_review_placeholder: "How was the level?"
victory_review_placeholder: "איך היה השלב?"
victory_hour_of_code_done: "?סיימת"
victory_hour_of_code_done_yes: "שלי Hour of Code™! כן, סיימתי עם ה"
victory_experience_gained: "שנצבר XP"
victory_gems_gained: "אבני חן שנצברו"
victory_new_item: "חפץ חדש"
# victory_viking_code_school: "Holy smokes, that was a hard level you just beat! If you aren't already a software developer, you should be. You just got fast-tracked for acceptance with Viking Code School, where you can take your skills to the next level and become a professional web developer in 14 weeks."
victory_viking_code_school: "אבוקדו קדוש, זה היה שלב קשה שסיימת! אם אתה עדיין לא מפתח תוכנה, אתה צריך להיות אחד. בדיוק עלית על הכביש המהיר בכדי להתקבל ל Viking Code School, שם תוכל לשאת את כישוריך לרמה הבאה ותוכל להפוך למפתח רשת מקצועי תוך 14 שבועות בלבד."
victory_become_a_viking: "הפוך לוויקינג"
guide_title: "מדריך"
tome_cast_button_run: "הפעל"
@ -297,7 +297,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
tip_scrub_shortcut: "Ctrl+[ ו Ctrl+] האץ אחורה וקדימה באמצעות" # {change}
tip_guide_exists: ".לחץ על המדריך, בתוך תפריט המשחק (למעלה בקצה העמוד), למידע שימושי"
tip_open_source: "!הוא 100% קוד פתוח CodeCombat"
# tip_tell_friends: "Enjoying CodeCombat? Tell your friends about us!"
tip_tell_friends: "נהנה מCodeCombat? ספר לחבריךעלינו!"
tip_beta_launch: ".הפיץ את גרסת הבטא באוקטובר, 2013 CodeCombat"
tip_think_solution: ".תחשוב על הפתרון, לא על הבעיה"
tip_theory_practice: "תיאורטית, אין הבדל בין התאוריה לאימון. אבל באימון, יש. - יוגי ברה"
@ -307,7 +307,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
tip_baby_coders: ".בעתיד, אפילו תינוקות יהיו כשפי על"
tip_morale_improves: ".הטעינה תמשיך עד שהמורל ישתפר"
tip_all_species: ".אנחנו מאמינים בשוויון הזדמנויות לכל היצורים בלמידת תכנות"
# tip_reticulating: "Reticulating spines."
tip_reticulating: "Reticulating spines."
tip_harry: " ,תה' מכשף"
tip_great_responsibility: "עם כישרון גדול בתכנות באה גם אחריות דיבאגינג גדולה."
tip_munchkin: "אם לא תאכל את הירקות, מאצ'קין יבוא אליך בלילה כשאתה ישן."
@ -410,7 +410,7 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
feature7: "פרטיים <strong>שבטים</strong>"
free: "חינם"
month: "חודש"
# must_be_logged: "You must be logged in first. Please create an account or log in from the menu above."
must_be_logged: "עליך להיות מחובר תחילה. אנא צור חשבון חדש או היכנס לחשבונך באמצעות התפריט למעלה."
subscribe_title: "רכוש מנוי"
unsubscribe: "הסר מנוי"
confirm_unsubscribe: "אשר הסרת מנוי"
@ -484,10 +484,10 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
blocks: "הגנה" # As in "this shield blocks this much damage"
backstab: "פגיעה בגב" # As in "this dagger does this much backstab damage"
skills: "מיומנויות"
# attack_1: "Deals"
attack_1: "מבצעים"
# attack_2: "of listed"
# attack_3: "weapon damage."
# health_1: "Gains"
health_1: "רווחים"
# health_2: "of listed"
# health_3: "armor health."
speed_1: "זז במהירות של"
@ -499,8 +499,8 @@ module.exports = nativeDescription: "עברית", englishDescription: "Hebrew",
skill_docs:
writable: "ניתן לכתיבה" # Hover over "attack" in Your Skills while playing a level to see most of this
read_only: "לקריאה בלבד"
# action: "Action"
# spell: "Spell"
action: "פעולה"
spell: "כישוף"
action_name: "שם"
action_cooldown: "לוקח"
action_specific_cooldown: ":זמן להתקררות"

View file

@ -151,7 +151,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
watch: "Žiūrėti"
unwatch: "Nebežiūrėti"
submit_patch: "Pateikti pataisymą"
submit_changes: "Pateikti pakeitimus"
submit_changes: "Išsaugoti pakeitimus"
save_changes: "Saugoti pakeitimus"
general:
@ -284,12 +284,12 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
problem_alert_title: "Taisyti kodą"
time_current: "Dabar:"
time_total: "Max:"
# time_goto: "Go to:"
time_goto: "Eiti į:"
non_user_code_problem_title: "Nepavyko pakrauti lygio"
infinite_loop_title: "Pastebėtas begalinis ciklas!"
# infinite_loop_description: "The initial code to build the world never finished running. It's probably either really slow or has an infinite loop. Or there might be a bug. You can either try running this code again or reset the code to the default state. If that doesn't fix it, please let us know."
# check_dev_console: "You can also open the developer console to see what might be going wrong."
# check_dev_console_link: "(instructions)"
check_dev_console_link: "(instrukcijos)"
infinite_loop_try_again: "Bandyk dar kartą"
infinite_loop_reset_level: "Pradėti lygi išnaujo"
infinite_loop_comment_out: "Užkomentuoti mano kodą"
@ -308,7 +308,7 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# tip_morale_improves: "Loading will continue until morale improves."
# tip_all_species: "We believe in equal opportunities to learn programming for all species."
# tip_reticulating: "Reticulating spines."
# tip_harry: "Yer a Wizard, "
tip_harry: "Tu esi Burtininkas, "
# tip_great_responsibility: "With great coding skill comes great debug responsibility."
# tip_munchkin: "If you don't eat your vegetables, a munchkin will come after you while you're asleep."
# tip_binary: "There are only 10 types of people in the world: those who understand binary, and those who don't."
@ -577,115 +577,115 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# carlos_title: "Region Manager, Brazil"
# carlos_blurb: "Celery Man"
# teachers:
# who_for_title: "Who is CodeCombat for?"
# who_for_1: "We recommend CodeCombat for students aged 9 and up. No prior programming experience is needed. We've designed CodeCombat to appeal to both boys and girls."
# who_for_2: "Our Courses system allows teachers to set up classrooms, track progress and assign additional content to students through a dedicated interface."
# more_info_title: "Where can I find more information?"
# more_info_1: "Our"
# more_info_2: "teachers forum"
# more_info_3: "is a good place to connect with fellow educators who are using CodeCombat."
teachers:
who_for_title: "Kam skirtas CodeCombat?"
who_for_1: "Mes rekomenduojame CodeCombat mokiniams nuo 9-erių metų. Nereikia turėti jokios programavimo patirties. Mes sukūrėme CodeCombat taip, kad patiktų ir berniukams ir mergaitėms."
who_for_2: "Mūsų Kursų sistema, suteikia galimybę pasiruošti pamokų užduotims, stebėti mokinių pasiekimus ir priskirti papildomą turinį mokiniams, per patogią sąsają."
more_info_title: "Kur galėčiau rasti daugiau informacijos?"
more_info_1: "Mūsų"
more_info_2: "mokytojų forumas"
more_info_3: "patogi vieta susisiekti su kolegomis mokytojais kurie naudoja CodeCombat."
# teachers_survey:
# title: "Teacher Survey"
# must_be_logged: "You must be logged in first. Please create an account or log in from the menu above."
# retrieving: "Retrieving information..."
# being_reviewed_1: "Your application for a free trial is being"
# being_reviewed_2: "reviewed."
# approved_1: "Your application for a free trial was"
# approved_2: "approved!"
# approved_4: "You can now enroll your students on the"
# approved_5: "courses"
# approved_6: "page."
# denied_1: "Your application for a free trial has been"
# denied_2: "denied."
# contact_1: "Please contact"
# contact_2: "if you have further questions."
# description_1: "We offer free trials to teachers. You will be given 2 free enrollments which can be used to enroll students in paid courses."
# description_1b: "You can find more information on our"
# description_2: "teachers"
# description_3: "page."
# description_4: "Please fill out this quick survey and well email you setup instructions."
# email: "Email Address"
# school: "Name of School"
# location: "Name of City"
# age_students: "How old are your students?"
# under: "Under"
# other: "Other:"
# amount_students: "How many students do you teach?"
# hear_about: "How did you hear about CodeCombat?"
# fill_fields: "Please fill out all fields."
# thanks: "Thanks! We'll send you setup instructions shortly."
teachers_survey:
title: "Mokytojo Apklausa"
must_be_logged: "Turite būti prisijungę. Prašom susikurti paskyrą arba prisijungti viršutinėje meniu juostoje."
retrieving: "Renkama informacija..."
being_reviewed_1: "Jūsų prašymas nemokamai bandomajai versijai gauti"
being_reviewed_2: "peržiūrimas."
approved_1: "Jūsų prašymas nemokamai bandomajai versijai gauti"
approved_2: "patvirtintas!"
approved_4: "Dabar galite nukreipti savo mokinius į"
approved_5: "kursų"
approved_6: "puslapį."
denied_1: "Jūsų prašymas nemokamai bandomajai versijai gauti"
denied_2: "atmestas."
contact_1: "Prašome susisiekti"
contact_2: "jei turite daugiau klausimų."
description_1: "Mokytojams mes siūlome, nemokamai išbandyti bandomają versiją. Jūs gausite 2 nemokamus pakvietimus, kuriuos galite panaudoti savo mokiniams mokamuose kursuose."
description_1b: "Daugiau informacijos rasite mūsų"
description_2: "mokytojų"
description_3: "puslapyje."
description_4: "Prašome užpildyti šią trumpą apklausos formą ir mes atsiųsime paruošimo instrukcijas el. paštu."
email: "El. pašto adresas"
school: "Mokyklos pavadinimas"
location: "Miestas"
age_students: "Kokio amžiaus jūsų mokiniai?"
under: "Mažiau nei"
other: "Kita:"
amount_students: "Kiek mokinių mokote?"
hear_about: "Iš kur sužinojote apie CodeCombat?"
fill_fields: "Prašome užpildyti visus laukus."
thanks: "Dėkojame! Netrukus atsiųsime paruošimo instrukcijas."
# versions:
# save_version_title: "Save New Version"
# new_major_version: "New Major Version"
# submitting_patch: "Submitting Patch..."
# cla_prefix: "To save changes, first you must agree to our"
# cla_url: "CLA"
# cla_suffix: "."
# cla_agree: "I AGREE"
# owner_approve: "An owner will need to approve it before your changes will become visible."
versions:
save_version_title: "Išsaugoti Naują Versiją"
new_major_version: "Nauja Pagrindinė Versija"
submitting_patch: "Pateikiamas Pataisymas..."
cla_prefix: "Kad išsaugoti pakeitimus, turite sutikti su mūsų"
cla_url: "PLS" # In Lithuanian language full translation (Pagalbininko Licensinė Sutartis - PLS). If no translation needed here, just remove changes :)
cla_suffix: "."
cla_agree: "AŠ SUTINKU"
owner_approve: "Sąvininkas pirmiausiai turi patvirtinti, kad jūsų pakeitimai būtų matomi."
# contact:
# contact_us: "Contact CodeCombat"
# welcome: "Good to hear from you! Use this form to send us email. "
# forum_prefix: "For anything public, please try "
# forum_page: "our forum"
# forum_suffix: " instead."
# faq_prefix: "There's also a"
# faq: "FAQ"
# subscribe_prefix: "If you need help figuring out a level, please"
# subscribe: "buy a CodeCombat subscription"
# subscribe_suffix: "and we'll be happy to help you with your code."
# subscriber_support: "Since you're a CodeCombat subscriber, your email will get our priority support."
# screenshot_included: "Screenshot included."
# where_reply: "Where should we reply?"
# send: "Send Feedback"
contact:
contact_us: "Susisiekti su CodeCombat"
welcome: "Maloniai jus išklausysime! Naudokitės šia forma, kad išsiųstumėte mus elektroninį laišką."
forum_prefix: "Norint pasisakyti viešai, naudokitės "
forum_page: "mūsų forumu."
forum_suffix: ""
faq_prefix: "Taip pat turime vietą"
faq: "DUK"
subscribe_prefix: "Jei reikalinga pagalbos įveikiant lygį, prašome"
subscribe: "įsigyti CodeCombat abonementą"
subscribe_suffix: "ir męs mielai jums padėsime."
subscriber_support: "Kadangi turite CodeCombat abonementą, jūsų elektroniniai laiškai mums tampa įpatingai svarbūs."
screenshot_included: "Ekrano kopija pridėta."
where_reply: "Kur mums atsakyti?"
send: "Siųsti užklausą"
# account_settings:
# title: "Account Settings"
# not_logged_in: "Log in or create an account to change your settings."
# autosave: "Changes Save Automatically"
# me_tab: "Me"
# picture_tab: "Picture"
# delete_account_tab: "Delete Your Account"
# wrong_email: "Wrong Email"
# wrong_password: "Wrong Password"
# upload_picture: "Upload a picture"
# delete_this_account: "Delete this account permanently"
# reset_progress_tab: "Reset All Progress"
# reset_your_progress: "Clear all your progress and start over"
# god_mode: "God Mode"
# password_tab: "Password"
# emails_tab: "Emails"
# admin: "Admin"
# manage_subscription: "Click here to manage your subscription."
# new_password: "New Password"
# new_password_verify: "Verify"
# type_in_email: "Type in your email to confirm account deletion."
# type_in_email_progress: "Type in your email to confirm deleting your progress."
# type_in_password: "Also, type in your password."
# email_subscriptions: "Email Subscriptions"
# email_subscriptions_none: "No Email Subscriptions."
# email_announcements: "Announcements"
# email_announcements_description: "Get emails on the latest news and developments at CodeCombat."
# email_notifications: "Notifications"
# email_notifications_summary: "Controls for personalized, automatic email notifications related to your CodeCombat activity."
# email_any_notes: "Any Notifications"
# email_any_notes_description: "Disable to stop all activity notification emails."
# email_news: "News"
# email_recruit_notes: "Job Opportunities"
# email_recruit_notes_description: "If you play really well, we may contact you about getting you a (better) job."
# contributor_emails: "Contributor Class Emails"
# contribute_prefix: "We're looking for people to join our party! Check out the "
# contribute_page: "contribute page"
# contribute_suffix: " to find out more."
# email_toggle: "Toggle All"
# error_saving: "Error Saving"
# saved: "Changes Saved"
# password_mismatch: "Password does not match."
# password_repeat: "Please repeat your password."
account_settings:
title: "Paskyros Nustatymai"
not_logged_in: "Norint pakeisti paskyros nustatymus turite prisijungti arba susikurti paskyrą."
autosave: "Pakeitimai Išsaugomi Automatiškai"
me_tab: ""
picture_tab: "Nuotrauka"
delete_account_tab: "Pašalinti Mano Paskyrą"
wrong_email: "Neteisingas el. pašto adresas"
wrong_password: "Neteisingas slaptažodis"
upload_picture: "Įkelti nuotrauką"
delete_this_account: "Tuoj pat pašalinti šią paskyrą"
reset_progress_tab: "Atstatyti Viską Išnaujo"
reset_your_progress: "Viską išvalyti ir pradėti išnaujo"
god_mode: "God Mode(Dievo Režimas)"
password_tab: "Slaptažodis"
emails_tab: "Pranešimai"
admin: "Administratorius"
manage_subscription: "Abonemento valdymas, spauskite čia."
new_password: "Naujas slaptažodis"
new_password_verify: "Patvirtinimas"
type_in_email: "Paskyros pašalinimo patvirtinimui, įveskite el. pašto adresą."
type_in_email_progress: "Norint pradėti išnaujo įveskite el. pašto adresą."
type_in_password: "Taip pat, įveskite slaptažodį."
email_subscriptions: "El. pašto abonementai"
email_subscriptions_none: "Nėra el. pašto abonementų."
email_announcements: "Skelbimai"
email_announcements_description: "Gauk svarbiausią informaciją apie naujienas ir projekto vystymo eigą tiesiai iš CodeCombat."
email_notifications: "Pranešimai"
email_notifications_summary: "Automatinių pranešimų, susijusių su CodeCombat veikla, valdymas."
email_any_notes: "Visi pranešimai"
email_any_notes_description: "Nuimkite varnelę, kad nebegautumėte jokių pranešimų."
email_news: "Naujienos"
email_recruit_notes: "Darbo Pasiūlymai"
email_recruit_notes_description: "Jei viską atliksite tikrai gerai, mes galime pasiūlyti (geresnį) darbą."
contributor_emails: "Pranešimai Pagalbininkų Kategorijai"
contribute_prefix: "Mes ieškome norinčių prisijungti prie mūsų grupės! Ieškantiems daugiau informacijos siūlome apsilankykti "
contribute_page: "pagalbininkų puslapyje."
contribute_suffix: ""
email_toggle: "Perjungti visus"
error_saving: "Klaida Išsaugant"
saved: "Pakeitimai Išsaugoti"
password_mismatch: "Slaptažodžiai nesutampa."
password_repeat: "Pakartokite slaptažodį."
keyboard_shortcuts:
keyboard_shortcuts: "Mygtukai"
@ -727,65 +727,65 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# social_hipchat: "Chat with us in the public CodeCombat Slack channel"
# contribute_to_the_project: "Contribute to the project"
# clans:
# clan: "Clan"
# clans: "Clans"
# new_name: "New clan name"
# new_description: "New clan description"
# make_private: "Make clan private"
# subs_only: "subscribers only"
# create_clan: "Create New Clan"
# private_preview: "Preview"
# private_clans: "Private Clans"
# public_clans: "Public Clans"
# my_clans: "My Clans"
# clan_name: "Clan Name"
# name: "Name"
# chieftain: "Chieftain"
# type: "Type"
# edit_clan_name: "Edit Clan Name"
# edit_clan_description: "Edit Clan Description"
# edit_name: "edit name"
# edit_description: "edit description"
# private: "(private)"
# summary: "Summary"
# average_level: "Average Level"
# average_achievements: "Average Achievements"
# delete_clan: "Delete Clan"
# leave_clan: "Leave Clan"
# join_clan: "Join Clan"
# invite_1: "Invite:"
# invite_2: "*Invite players to this Clan by sending them this link."
# members: "Members"
# progress: "Progress"
# not_started_1: "not started"
# started_1: "started"
# complete_1: "complete"
# exp_levels: "Expand levels"
# rem_hero: "Remove Hero"
# status: "Status"
# complete_2: "Complete"
# started_2: "Started"
# not_started_2: "Not Started"
# view_solution: "Click to view solution."
# view_attempt: "Click to view attempt."
# latest_achievement: "Latest Achievement"
# playtime: "Playtime"
# last_played: "Last played"
# leagues_explanation: "Play in a league against other clan members in these multiplayer arena instances."
# track_concepts1: "Track concepts"
# track_concepts2a: "learned by each student"
# track_concepts2b: "learned by each member"
# track_concepts3a: "Track levels completed for each student"
# track_concepts3b: "Track levels completed for each member"
# track_concepts4a: "See your students'"
# track_concepts4b: "See your members'"
# track_concepts5: "solutions"
# track_concepts6a: "Sort students by name or progress"
# track_concepts6b: "Sort members by name or progress"
# track_concepts7: "Requires invitation"
# track_concepts8: "to join"
# private_require_sub: "Private clans require a subscription to create or join."
clans:
clan: "Klanas"
clans: "Klanai"
new_name: "Klano pavadinimas"
new_description: "Klano aprašymas"
make_private: "Privatus klanas"
subs_only: "tik abonentams"
create_clan: "Sukurti Klaną"
private_preview: "Peržiūra"
private_clans: "Privatūs Klanai"
public_clans: "Vieši Klanai"
my_clans: "Mano Klanai"
clan_name: "Klano Pavadinimas"
name: "Vardas"
chieftain: "Vadas"
type: "Tipas"
edit_clan_name: "Keisti Klano Pavadinimą"
edit_clan_description: "Keisti Klano Aprašymą"
edit_name: "keisti pavadinimą"
edit_description: "keisti aprašymą"
private: "(privatus)"
summary: "Suvestinė"
average_level: "Lygių vidurkis"
average_achievements: "Pasiekimų vidurkis"
delete_clan: "Pašalinti klaną"
leave_clan: "Išeiti iš klano"
join_clan: "Prisijungti prie klano"
invite_1: "Pakvietimas:"
invite_2: "*Kvieskite žaidėjus į klaną nusiųsdami šią nuorodą."
members: "Nariai"
progress: "Pažanga"
not_started_1: "nepradėta"
started_1: "pradėta"
complete_1: "pabaigta"
exp_levels: "Išplėsti lygius"
rem_hero: "Pašalinti Herojų"
status: "Būsena"
complete_2: "Pabaigta"
started_2: "Pradėta"
not_started_2: "Nepradėta"
view_solution: "Peržiūrėti sprendimą."
view_attempt: "Peržiūrėti bandymą."
latest_achievement: "Naujausias Pasiekimas"
playtime: "Viso žaista"
last_played: "Paskutinį kartą žaista"
leagues_explanation: "Pasirink lygą ir varžykis su kitų klanų nariais."
track_concepts1: "Sekite "
track_concepts2a: "kitų mokinių idėjas"
track_concepts2b: "kitų narių idėjas"
track_concepts3a: "Stebėkite kitų mokinių įveiktus lygius"
track_concepts3b: "Stebėkite kitų narių įveiktus lygius"
track_concepts4a: "Peržiūrėkite mokinių"
track_concepts4b: "Peržiūrėkite narių"
track_concepts5: "sprendimus"
track_concepts6a: "Išrikiuokite mokinius pagal vardą arba pažangą"
track_concepts6b: "Išrikiuokite narius pagal vardą arba pažangą"
track_concepts7: "Norint tapti nariu"
track_concepts8: "reikalingas kvietimas"
private_require_sub: "Norint sukurti privatų ar prisijungti prie privataus klano, reikalingas abonementas."
# courses:
# course: "Course"
@ -1120,9 +1120,9 @@ module.exports = nativeDescription: "lietuvių kalba", englishDescription: "Lith
# add_system_title: "Add Systems to Level"
# done_adding: "Done Adding"
# article:
# edit_btn_preview: "Preview"
# edit_article_title: "Edit Article"
article:
edit_btn_preview: "Peržiūra"
edit_article_title: "Redaguoti straipsnį"
polls:
priority: "Prioritetas"

View file

@ -21,11 +21,11 @@ module.exports = class SalesView extends RootView
onClickLogin: (e) ->
@openModalView new AuthModal(mode: 'login') if me.get('anonymous')
window.tracker?.trackEvent 'Started Login', category: 'Sales', label: 'Sales Login'
window.tracker?.trackEvent 'Started Login', category: 'Sales', label: 'Sales Login', ['Mixpanel']
onClickSignup: (e) ->
@openModalView new AuthModal() if me.get('anonymous')
window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create'
window.tracker?.trackEvent 'Started Signup', category: 'Sales', label: 'Sales Create', ['Mixpanel']
logoutRedirectURL: false

View file

@ -82,3 +82,4 @@ module.exports = class TeachersFreeTrialView extends RootView
console.error 'Error saving trial request', response
success: (model, response, options) =>
@refreshData()
window.tracker?.trackEvent 'Submit Trial Request', category: 'Teachers', label: 'Trial Request', ['Mixpanel']

View file

@ -1,17 +1,108 @@
// Latest teacher trial requests
/* global ISODate */
// Latest approved teacher trial requests
// Usage:
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
var startDay = '2015-10-01';
var endDay = '2016-10-01';
print('Date range:', startDay, endDay);
var userIDs = getTrialRequestApplicants(startDay, endDay);
print('Trial request applicants found:', userIDs.length);
var userEmails = getUserEmails(userIDs);
print('User emails found:', userEmails.length);
for (var i = 0; i < userEmails.length; i++) {
print(userEmails[i]);
var startDay = '2015-11-01';
var endDay = '2016-01-01';
print('Date range:', startDay, 'up to', endDay);
var users = getUsers(startDay, endDay);
print('Teachers found:', users.length);
print("User Id\tStudent Count\tTrial Type\tEmail\tName\tSchool");
for (var i = 0; i < users.length; i++) {
if (users[i].schoolName) {
print(users[i].id, '\t', users[i].studentCount, '\t', users[i].type, '\t', users[i].email, '\t', users[i].name, '\t', users[i].schoolName);
}
}
function getUsers(startDay, endDay) {
var cursor, doc, userID;
// Find approved trial requests
var startObj = objectIdWithTimestamp(ISODate(startDay + "T00:00:00.000Z"));
var endObj = objectIdWithTimestamp(ISODate(endDay + "T00:00:00.000Z"))
cursor = db['trial.requests'].find(
{$and:
[
{_id: {$gte: startObj}},
{_id: {$lt: endObj}},
{status: 'approved'}
]
},
{applicant: 1, type: 1}
);
var userIDs = [];
var userTrialTypeMap = {};
var orphanedTrialRequests = [];
while (cursor.hasNext()) {
doc = cursor.next();
if (doc.applicant) {
userIDs.push(doc.applicant);
userID = doc.applicant.valueOf();
if (!userTrialTypeMap[userID] || userTrialTypeMap[userID] !== 'course') userTrialTypeMap[userID] = doc.type;
}
else {
orphanedTrialRequests.push(doc._id);
}
}
// May have orphaned trial requests due to previous external import of requests from Google form
if (orphanedTrialRequests.length > 0) {
cursor = db.prepaids.find({'properties.trialRequestID': {$in: orphanedTrialRequests}}, {creator: 1});
while (cursor.hasNext()) {
doc = cursor.next();
if (doc.creator) {
userIDs.push(doc.creator);
userID = doc.creator.valueOf();
if (!userTrialTypeMap[userID] || userTrialTypeMap[userID] !== 'course') userTrialTypeMap[userID] = doc.type;
}
else {
print('No creator!');
printjson(doc);
break;
}
}
}
// Find user class sizes
var userClassroomStudentsMap = {};
cursor = db.classrooms.find({ownerID: {$in: userIDs}}, {members: 1, ownerID: 1});
while (cursor.hasNext()) {
doc = cursor.next();
if (doc.members) {
userID = doc.ownerID.valueOf();
if (!userClassroomStudentsMap[userID]) userClassroomStudentsMap[userID] = 0;
userClassroomStudentsMap[userID] = doc.members.length;
}
}
// Build user data
var users = [];
cursor = db['users'].find({$and: [{_id: {$in: userIDs}}, {deleted: {$exists: false}}, {anonymous: false}]}, {emailLower: 1, name: 1, schoolName: 1});
while (cursor.hasNext()) {
doc = cursor.next();
userID = doc._id.valueOf();
var userData = {
id: userID,
email: doc.emailLower,
name: doc.name || "",
schoolName: doc.schoolName || "",
studentCount: userClassroomStudentsMap[userID] || 0,
type: userTrialTypeMap[userID]
};
users.push(userData);
}
users.sort(function(a, b) {
if (a.studentCount > b.studentCount) return -1;
else if (a.studentCount === b.studentCount) return a.email.localeCompare(b.email);
return 1;
});
return users;
}
function objectIdWithTimestamp(timestamp) {
@ -24,60 +115,3 @@ function objectIdWithTimestamp(timestamp) {
return constructedObjectId
}
function getTrialRequestApplicants(startDay, endDay) {
var startObj = objectIdWithTimestamp(ISODate(startDay + "T00:00:00.000Z"));
var endObj = objectIdWithTimestamp(ISODate(endDay + "T00:00:00.000Z"))
var cursor = db['trial.requests'].find(
{$and:
[
{_id: {$gte: startObj}},
{_id: {$lt: endObj}}
]
},
{applicant: 1}
);
var applicantIDs = [];
var orphanedTrialRequests = [];
while (cursor.hasNext()) {
var myDoc = cursor.next();
if (myDoc.applicant) {
applicantIDs.push(myDoc.applicant);
}
else {
orphanedTrialRequests.push(myDoc._id);
}
}
// May have orphaned trial requests due to previous external import of requests from Google form
if (orphanedTrialRequests.length > 0) {
cursor = db.prepaids.find({'properties.trialRequestID': {$in: orphanedTrialRequests}}, {creator: 1});
while (cursor.hasNext()) {
var myDoc = cursor.next();
if (myDoc.creator) {
applicantIDs.push(myDoc.creator);
}
else {
print('No creator!');
printjson(myDoc);
break;
}
}
}
return applicantIDs;
}
function getUserEmails(userIDs) {
var cursor = db['users'].find({_id: {$in: userIDs}}, {emailLower: 1});
var userEmails = [];
while (cursor.hasNext()) {
var myDoc = cursor.next();
if (myDoc.emailLower) {
userEmails.push(myDoc.emailLower);
}
}
userEmails.sort()
return userEmails;
}