Add i18n for Resource Hub

This commit is contained in:
Robin Yang 2016-08-19 15:47:15 -07:00 committed by Rob
parent 611368f742
commit 2b586420f3
4 changed files with 35 additions and 29 deletions

View file

@ -888,6 +888,7 @@
more_info_3: "is a good place to connect with fellow educators who are using CodeCombat." more_info_3: "is a good place to connect with fellow educators who are using CodeCombat."
licenses_needed: "Licenses needed" licenses_needed: "Licenses needed"
teachers_quote: teachers_quote:
name: "Demo Form" name: "Demo Form"
title: "Request a Demo" title: "Request a Demo"
@ -1508,6 +1509,18 @@
project: "Project" project: "Project"
view_student_project: "View Student Project" view_student_project: "View Student Project"
view_arena_ladder: "View Arena Ladder" view_arena_ladder: "View Arena Ladder"
resource_hub: "Resource Hub"
getting_started: "Getting Started"
teacher_getting_started: "Teacher Getting Started Guide"
teacher_getting_started_desc: "New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course."
student_getting_started: "Student Quick Start Guide"
student_getting_started_desc: "You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms."
cs1: "Introduction to Computer Science"
cs1_syntax_python: "Course 1 Python Syntax Guide"
cs1_syntax_python_desc: "Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science."
cs1_syntax_javascript: "Course 1 JavaScript Syntax Guide"
cs1_syntax_javascript_desc: "Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science."
coming_soon: "Additional guides coming soon!"
sharing: sharing:
game: "Game" game: "Game"

View file

@ -23,7 +23,7 @@
small.label(data-i18n='teacher.enrollments') small.label(data-i18n='teacher.enrollments')
li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '') li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '')
a(href='/teachers/resources') a(href='/teachers/resources')
small.label Resource Hub small.label(data-i18n='teacher.resource_hub')
//- li(class= path.indexOf('TODO') === 0 ? 'active' : '') //- li(class= path.indexOf('TODO') === 0 ? 'active' : '')
//- a(href='TODO') //- a(href='TODO')
//- small.label(data-i18n='teacher.resources') //- small.label(data-i18n='teacher.resources')

View file

@ -8,42 +8,36 @@ block content
.container .container
.content .content
h1 Resource Hub h1(data-i18n="teacher.resource_hub")
h4 Getting Started h4(data-i18n="teacher.getting_started")
ul ul
li li
a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Teacher Getting Started Guide [PDF] a(href="http://files.codecombat.com/docs/resources/TeacherGettingStartedGuide.pdf" target="blank")
p New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course. span(data-i18n="teacher.teacher_getting_started")
span.spl [PDF]
p(data-i18n="teacher.teacher_getting_started_desc")
li li
a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Student Quick Start Guide [PDF] a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank")
p You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms. span(data-i18n="teacher.student_getting_started")
span.spl [PDF]
p(data-i18n="teacher.student_getting_started_desc")
// h4(data-i18n="teacher.cs1")
li
a(href="http://example.com") Teacher Debugging Guide (3 types of problems)
h4 Introduction to Computer Science
ul ul
li li
a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank") Course 1 Python Syntax Guide [PDF] a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank")
p Cheatsheet with references to common <strong>Python</strong> syntax that students will learn in Introduction to Computer Science. span(data-i18n="teacher.cs1_syntax_python")
span.spl [PDF]
p(data-i18n="teacher.cs1_syntax_python_desc")
li li
a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank") Course 1 JavaScript Syntax Guide [PDF] a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank")
p Cheatsheet with references to common <strong>JavaScript</strong> syntax that students will learn in Introduction to Computer Science. span(data-i18n="teacher.cs1_syntax_javascript")
span.spl [PDF]
p(data-i18n="teacher.cs1_syntax_javascript_desc")
// h4
h4 Computer Science 2
ul
li
a(href="http://example.com") Course 2 Lesson Plans
li
a(href="http://example.com") Course 2 Python Syntax Guide [PDF]
li
a(href="http://example.com") Course 2 JavaScript Syntax Guide [PDF]
h4
.comingsoon .comingsoon
i Additional guides coming soon! i(data-i18n="teacher.coming_soon")

View file

@ -7,7 +7,6 @@ module.exports = class MarkdownResourceView extends RootView
super(options) super(options)
@content = '' @content = ''
$.get '/markdown/' + @name + '.md', (data) => $.get '/markdown/' + @name + '.md', (data) =>
console.log typeof data, data
if data.indexOf('<!doctype html>') is -1 if data.indexOf('<!doctype html>') is -1
@content = marked(data, sanitize: false) @content = marked(data, sanitize: false)
else else