Merge remote-tracking branch 'origin/master'

This commit is contained in:
Scott Erickson 2016-02-11 12:33:11 -08:00
commit 7355c9614e
9 changed files with 24 additions and 16 deletions

View file

@ -75,7 +75,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
subscription_required: "Kräver prenumeration"
anonymous: "Anonym Spelare"
level_difficulty: "Svårighetsgrad: "
# 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: "Spela klassrumsversion" # Choose a level in campaign version that you also can play in one of your courses
campaign_beginner: "Nybörjarkampanj"
awaiting_levels_adventurer_prefix: "Vi släpper nya nivåer varje vecka." # {change}
awaiting_levels_adventurer: "Registrera dig som äventyrare"
@ -114,9 +114,9 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
log_in: "logga in med lösenord"
required: "Du måste logga in innan du kan gå dit"
login_switch: "Har du redan ett konto?"
# school_name: "School Name and City"
school_name: "Namn på skolan och stad"
# optional: "optional"
# school_name_placeholder: "Example High School, Springfield, IL"
school_name_placeholder: "Exempel Högstadiet Stenhamre, Ljusdal"
recover:
recover_account_title: "Återskapa ditt konto"
@ -553,15 +553,15 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
press_paragraph_1_suffix: ". Alla loggor och bilder kan användas utan att kontakta oss direkt."
team: "Team"
nick_title: "Medgrundare" # {change}
# nick_blurb: "Motivation Guru"
nick_blurb: "Moitivationsguru"
matt_title: "Medgrundare" # {change}
matt_blurb: "Cyklist"
cat_title: "Chefshantverkare" # {change}
# cat_blurb: "Airbender"
cat_blurb: "Luftbändare"
scott_title: "Medgrundare" # {change}
# scott_blurb: "Reasonable One"
# maka_title: "Customer Advocate"
# maka_blurb: "Storyteller"
maka_blurb: "Sagoberättare"
rob_title: "Kompileringsingenjör" # {change}
rob_blurb: "Kodar saker"
josh_c_title: "Speldesigner"
@ -699,11 +699,11 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
continue_script: "Fortsätt förbi nuvarande kod."
skip_scripts: "Hoppa över all kod som kan hoppas över."
toggle_playback: "Spela/Pausa."
# scrub_playback: "Scrub back and forward through time."
# single_scrub_playback: "Scrub back and forward through time by a single frame."
# scrub_execution: "Scrub through current spell execution."
# toggle_debug: "Toggle debug display."
# toggle_grid: "Toggle grid overlay."
scrub_playback: "Spela bakåt och framåt genom tiden."
single_scrub_playback: "Spela bakåt och framåt genom tiden, en frame i taget."
scrub_execution: "Spela genom nuvarande magiska trollformel."
toggle_debug: "Toggla debug display."
toggle_grid: "Toggla grid overlay."
# toggle_pathfinding: "Toggle pathfinding overlay."
# beautify: "Beautify your code by standardizing its formatting."
maximize_editor: "Maximera/minimera kodredigeraren."
@ -736,7 +736,7 @@ module.exports = nativeDescription: "Svenska", englishDescription: "Swedish", tr
subs_only: "endast följare"
create_clan: "Skapa ny klan"
private_preview: "Förhandsgranska"
# private_clans: "Private Clans"
private_clans: "Privata klaner"
public_clans: "Publik klan"
my_clans: "Mina klaner"
clan_name: "Klanens namn"

View file

@ -123,6 +123,7 @@ _.extend CampaignSchema.properties, {
tasks: c.array {title: 'Tasks', description: 'Tasks to be completed for this level.'}, c.task
concepts: c.array {title: 'Programming Concepts', description: 'Which programming concepts this level covers.'}, c.concept
picoCTFProblem: { type: 'string', description: 'Associated picoCTF problem ID, if this is a picoCTF level' }
#- normal properties
position: c.point2d()

View file

@ -354,6 +354,7 @@ _.extend LevelSchema.properties,
scoreTypes: c.array {title: 'Score Types', description: 'What metric to show leaderboards for.', uniqueItems: true},
c.shortString(title: 'Score Type', 'enum': ['time', 'damage-taken', 'damage-dealt', 'gold-collected', 'difficulty']) # TODO: good version of LoC; total gear value.
concepts: c.array {title: 'Programming Concepts', description: 'Which programming concepts this level covers.', uniqueItems: true}, c.concept
picoCTFProblem: { type: 'string', description: 'Associated picoCTF problem ID, if this is a picoCTF level' }
c.extendBasicProperties LevelSchema, 'level'

View file

@ -15,7 +15,7 @@ module.exports = class SettingsTabView extends CocoView
editableSettings: [
'name', 'description', 'documentation', 'nextLevel', 'background', 'victory', 'i18n', 'icon', 'goals',
'type', 'terrain', 'showsGuide', 'banner', 'employerDescription', 'loadingTip', 'requiresSubscription',
'helpVideos', 'replayable', 'scoreTypes', 'concepts'
'helpVideos', 'replayable', 'scoreTypes', 'concepts', 'picoCTFProblem'
]
subscriptions:

View file

@ -482,7 +482,8 @@ module.exports = class CampaignView extends RootView
canPlayAnyway = not @requiresSubscription or level.adventurer or @levelStatusMap[level.slug]
if requiresSubscription and not canPlayAnyway
@openModalView new SubscribeModal()
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelSlug
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'map level clicked', level: levelSlug, levelID: levelSlug
else
@startLevel levelElement
window.tracker?.trackEvent 'Clicked Start Level', category: 'World Map', levelID: levelSlug

View file

@ -193,7 +193,9 @@ module.exports = class LevelLoadingView extends CocoView
onClickStartSubscription: (e) ->
@openModalView new SubscribeModal()
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: @level?.get('slug') or @options.level?.get('slug')
levelSlug = @level?.get('slug') or @options.level?.get('slug')
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'level loading', level: levelSlug, levelID: levelSlug
onSubscribed: ->
document.location.reload()

View file

@ -89,7 +89,8 @@ module.exports = class LevelGuideView extends CocoView
clickSubscribe: (e) ->
level = @levelSlug # Save ref to level slug
@openModalView new SubscribeModal()
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'help video clicked', level: level
# TODO: Added levelID on 2/9/16. Remove level property and associated AnalyticsLogEvent 'properties.level' index later.
window.tracker?.trackEvent 'Show subscription modal', category: 'Subscription', label: 'help video clicked', level: level, levelID: level
clickTab: (e) =>
@$el.find('li.active').removeClass('active')

View file

@ -18,6 +18,7 @@ AnalyticsLogEventSchema = new mongoose.Schema({
AnalyticsLogEventSchema.index({event: 1, _id: -1})
AnalyticsLogEventSchema.index({event: 1, 'properties.level': 1})
AnalyticsLogEventSchema.index({event: 1, 'properties.levelID': 1})
AnalyticsLogEventSchema.index({user: 1, event: 1})
AnalyticsLogEventSchema.statics.logEvent = (user, event, properties={}) ->

View file

@ -66,6 +66,7 @@ LevelHandler = class LevelHandler extends Handler
'buildTime'
'scoreTypes'
'concepts'
'picoCTFProblem'
]
postEditableProperties: ['name']