Merge pull request #8 from codecombat/master

Update from Original Fork
This commit is contained in:
Tran Anh Khoa 2016-02-12 09:30:41 -06:00
commit 2fbbf33455
4 changed files with 113 additions and 61 deletions

View file

@ -300,49 +300,49 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
tip_tell_friends: "코드 컴뱃을 즐기셨나요? 친구에게 알려주십시오"
tip_beta_launch: "코드 컴뱃은 2013년 10월에 베타 서비스를 출시했습니다."
tip_think_solution: "해결 방법을 고민해보세요, 문제를 고민하지 말구요"
# tip_theory_practice: "In theory, there is no difference between theory and practice. But in practice, there is. - Yogi Berra"
# tip_error_free: "There are two ways to write error-free programs; only the third one works. - Alan Perlis"
# tip_debugging_program: "If debugging is the process of removing bugs, then programming must be the process of putting them in. - Edsger W. Dijkstra"
# tip_forums: "Head over to the forums and tell us what you think!"
# tip_baby_coders: "In the future, even babies will be Archmages."
# tip_morale_improves: "Loading will continue until morale improves."
tip_theory_practice: "이론적으로, 이론과 실제 사이의 차이가 없습니다. 그러나 연습은, 실전입니다 - 요기 베라"
tip_error_free: "오류이거나-자유로운 프로그램을 작성하는 두가지 길이 있습니다만; 오직 세번째의 한 작업입니다. - 엘랜 펄리스"
tip_debugging_program: "만약 디버깅이 버그를 잡는 작업이라면, 프로그래밍은 반드시 바른 진행이여야 할것입니다. - Edsger W. Dijkstra"
tip_forums: "포럼을 통해서 우리를 어떻게 생각하는지 말해요!"
tip_baby_coders: "앞으로는, 아기도 얼음마법사가 될 것 입니다."
tip_morale_improves: "사기가 향상 될 때까지 로딩은 계속됩니다."
tip_all_species: "우리는 모든 생물이 동등하게 프로그래밍을 배울 기회가 있어야 한다고 생각합니다."
# tip_reticulating: "Reticulating spines."
# tip_harry: "Yer a Wizard, "
# 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."
# tip_commitment_yoda: "A programmer must have the deepest commitment, the most serious mind. ~ Yoda"
tip_reticulating: "그물모양의 돌기."
tip_harry: "한 마법사, "
tip_great_responsibility: "좋은 코딩 기술은 큰 디버그 책임을 몰고옵니다."
tip_munchkin: "만약 당신이 야채를 먹지않는다면, 난쟁이가 당신이 자고 있을때 찾아갑니다."
tip_binary: "오직 사람들이 있는 세계는 10가지이다: 이진을 이해하는 사람들과 그렇지 않은 사람들."
tip_commitment_yoda: "프로그래머가 깊은 헌신이 있어야한다는것은, 가장 심각한것이다. ~ 요다"
tip_no_try: "하든가 하지 말든가. 시도같은 건 없어. - 요다"
# tip_patience: "Patience you must have, young Padawan. - Yoda"
# tip_documented_bug: "A documented bug is not a bug; it is a feature."
tip_patience: "반드시 인내심을 가져야한단다, 어린 파다완. - 요다"
tip_documented_bug: "문서화 된 버그는 버그가 아닙니다 ; 그것은 기능입니다."
tip_impossible: "성공하기 전까진 불가능해 보이는 법이죠. - Nelson Mandela"
tip_talk_is_cheap: "떠드는 건 가치가 없어요. 코드를 보여줘봐요. - Linus Torvalds"
# tip_first_language: "The most disastrous thing that you can ever learn is your first programming language. - Alan Kay"
# tip_hardware_problem: "Q: How many programmers does it take to change a light bulb? A: None, it's a hardware problem."
# tip_hofstadters_law: "Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law."
# tip_premature_optimization: "Premature optimization is the root of all evil. - Donald Knuth"
# tip_brute_force: "When in doubt, use brute force. - Ken Thompson"
# tip_extrapolation: "There are only two kinds of people: those that can extrapolate from incomplete data..."
# tip_superpower: "Coding is the closest thing we have to a superpower."
# tip_control_destiny: "In real open source, you have the right to control your own destiny. - Linus Torvalds"
tip_first_language: "만약 당신이 배울 수있는 가장 최악의 일은 첫 번째 프로그래밍 언어을 배우는것입니다. - 엘랜 케이"
tip_hardware_problem: "Q: 많은 프로그래머는 전구를 가는데 얼마나 걸립니까? A: 아니오, 이것은 하드웨어 문제입니다."
tip_hofstadters_law: "호프스태터 의 법칙: 당신은 항상 예상보다 오래 걸립니다, 계정 호프스태터의 법칙을 고려하더라도 ."
tip_premature_optimization: "초기의 최적화는 모든 악의 뿌리입니다 . - 도날드 크누스"
tip_brute_force: "의심할때, 무력을 사용하게 됩니다. - 켄 톰프손"
tip_extrapolation: "사람은 두 가지 종류가 있습니다: 불완전한 데이터으로부터 유추할 수있는가..."
tip_superpower: "코딩은 우리가 강대국에 있는 가장 가까운 것입니다."
tip_control_destiny: "진짜 오픈 소스는, 당신이 우리의 운명을 올바로 조작할 수 있습니다. - 리눅스 토발츠"
tip_no_code: "코드가 없는것보다 빠른것은 없습니다."
tip_code_never_lies: "코드는 절대로 거짓말을 하지 않는다. 주석은 가끔 하지만. — Ron Jeffries"
# tip_reusable_software: "Before software can be reusable it first has to be usable."
# tip_optimization_operator: "Every language has an optimization operator. In most languages that operator is //"
# tip_lines_of_code: "Measuring programming progress by lines of code is like measuring aircraft building progress by weight. — Bill Gates"
# tip_source_code: "I want to change the world but they would not give me the source code."
# tip_javascript_java: "Java is to JavaScript what Car is to Carpet. - Chris Heilmann"
# tip_move_forward: "Whatever you do, keep moving forward. - Martin Luther King Jr."
tip_reusable_software: "소프트웨어를 재사용하기전에 먼저 사용할 수 있습니다."
tip_optimization_operator: "모든 언어는 최적화된 운영을 합니다. 대부분의 언어가 운영 //"
tip_lines_of_code: "코드 라인에 의해 프로그램의 진행 상황을 측정하는 것은 중량 항공기의 건축 진행 상황을 측정하는 것과 같다. — 빌 게이츠"
tip_source_code: "나는 세계를 바꾸고싶어도 그들은 나에게 소스코드를 주지 않습니다"
tip_javascript_java: "자바는 자바스크립트이고 차(카)는 카펫입니다. - 크리스 헤일만"
tip_move_forward: "당신이 무엇이든간에 , 계속 전진하십시오. - 마틴 러터킹 주니어."
tip_google: "문제가 너무 어렵다구요? 구글로 검색해보세요!"
# tip_adding_evil: "Adding a pinch of evil."
# tip_hate_computers: "That's the thing about people who think they hate computers. What they really hate is lousy programmers. - Larry Niven"
# tip_open_source_contribute: "You can help CodeCombat improve!"
# tip_recurse: "To iterate is human, to recurse divine. - L. Peter Deutsch"
# tip_free_your_mind: "You have to let it all go, Neo. Fear, doubt, and disbelief. Free your mind. - Morpheus"
# tip_strong_opponents: "Even the strongest of opponents always has a weakness. - Itachi Uchiha"
tip_adding_evil: "악마의 핀치를 추가하는중."
tip_hate_computers: "즉, 그들은 컴퓨터를 싫어한다고 생각하는 사람들이며. 그들이 정말로 싫어 하는 것은 형편없는 프로그래머 입니다 . - 래리 리븐"
tip_open_source_contribute: "코드컴뱃을 향상하는데 도와주십시오!"
tip_recurse: "인간은 반복하고,신은 다시 돌아온다 - L. 피터 대치"
tip_free_your_mind: "모두 가자고할때 생기는 새로움으로인한. 두려움, 의심과 불신. 자유로운 생각을 가져라. - 모페어스"
tip_strong_opponents: "심지어 강한 상대의 항상 약점을 가지고있다. - 이타치 우치하"
tip_paper_and_pen: "코딩을 하기전에, 당신은 항상 종이와 펜으로 계획을 지니고 있어야합니다."
tip_solve_then_write: "먼저, 문제를 해결하세요. 그러고, 코드를 쓰는겁니다. - John Johnson"
tip_solve_then_write: "먼저, 문제를 해결하세요. 그러고, 코드를 쓰는겁니다. - 존 즌슨"
game_menu:
inventory_tab: "인벤토리"
@ -404,13 +404,13 @@ module.exports = nativeDescription: "한국어", englishDescription: "Korean", t
# feature1: "110+ basic levels across 4 worlds"
# feature2: "10 powerful <strong>new heroes</strong> with unique skills!"
feature3: "80+ 보너스 레벨들"
# feature4: "<strong>{{gems}} bonus gems</strong> every month!"
feature4: "매 달마다<strong>{{gems}} 보너스 잼</strong>!"
feature5: "영상 튜토리얼"
feature6: "프리미엄 이메일 지원"
# feature7: "Private <strong>Clans</strong>"
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: "구독 해제 확인"

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

@ -1,29 +1,42 @@
/* global ISODate */
/* global db */
// Average level playtimes in seconds by campaign, broken up by course and campaign levels
// If level sessions has heroConfig set, assuming it's a campaign player rather than a course player
// Usage:
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
// TODO: this is super slow! Can we utilize indexes on level.sessions collection better?
// NOTE: faster to use find() instead of aggregate()
// NOTE: faster to ask for one level at a time.
var courseCampaigns = ['intro', 'course-2', 'course-3', 'course-4'];
var individualCampaigns = ['dungeon', 'forest', 'desert', 'mountain'];
var scriptStartTime = new Date();
var startDay = '2015-12-06';
var endDay = '2015-12-13';
var startDay = '2016-01-01';
var endDay = '2016-02-11';
print("Dates: " + startDay + " to " + endDay);
// Print out playtimes for each campaign
var campaigns = getCampaigns(courseCampaigns);
var campaigns = getCampaigns();
print("Campaign data followed by course data:")
for (var i = 0; i < campaigns.length; i++) {
var campaign = campaigns[i];
// if (campaign.slug !== 'intro') {
// print('Skipping', campaign.slug);
// continue;
// }
print(campaign.slug);
print("Sessions\tAverage\tSessions\tAverage\tLevel");
for (var j = 0; j < campaign.levelSlugs.length; j++) {
var levelSlug = campaign.levelSlugs[j];
// if (['dungeons-of-kithgard', 'gems-in-the-deep', 'shadow-guard', 'enemy-mine', 'true-names', 'fire-dancing', 'loop-da-loop', 'haunted-kithmaze', 'the-second-kithmaze', 'dread-door', 'cupboards-of-kithgard'].indexOf(levelSlug) >= 0) {
// print('Skipping', levelSlug);
// continue;
// }
var levelPlaytimes = getPlaytimes([levelSlug]);
if (levelPlaytimes[levelSlug]) {
print(levelPlaytimes[levelSlug].campaign.count,
@ -55,15 +68,20 @@ function objectIdWithTimestamp(timestamp) {
return constructedObjectId
}
function getCampaigns(campaignSlugs) {
function getCampaigns() {
var campaignIDs = [];
var cursor = db.courses.find();
while (cursor.hasNext()) {
campaignIDs.push(cursor.next().campaignID);
}
// printjson(campaignIDs);
var campaigns = [];
var cursor = db.campaigns.find({slug: {$in: campaignSlugs}}, {slug: 1, levels: 1});
var allFree = 0;
var allpaid = 0;
cursor = db.campaigns.find({_id: {$in: campaignIDs}}, {slug: 1, levels: 1});
while (cursor.hasNext()) {
var doc = cursor.next();
if (doc.slug === 'auditions') continue;
var campaign = {slug: doc.slug, levelSlugs: []};
var campaign = {_id: doc._id.valueOf(), slug: doc.slug, levelSlugs: []};
for (var levelID in doc.levels) {
campaign.levelSlugs.push(doc.levels[levelID].slug);
}
@ -71,7 +89,7 @@ function getCampaigns(campaignSlugs) {
}
campaigns.sort(function (a, b) {
if (campaignSlugs.indexOf(a.slug) < campaignSlugs.indexOf(b.slug)){
if (campaignIDs.indexOf(a._id) < campaignIDs.indexOf(b._id)){
return -1;
}
return 1;

View file

@ -0,0 +1,34 @@
// Updates all sessions for a given level and classroom to match the classroom language setting.
// Usage:
// mongo <address>:<port>/<database> <script file> -u <username> -p <password>
// Set classroomID and levelSlug first before running!
var classroomID = ObjectId('568ac66d648b9e5100de0cca');
var levelSlug = 'wakka-maul';
var classroom = db.classrooms.findOne({_id: classroomID});
var level = db.levels.findOne({slug: levelSlug});
if(!classroom) { throw new Error('Classroom not found (should be an id)'); }
if(!level) { throw new Error('Level not found (should be a slug)'); }
print('Classroom:', classroom.name);
print('Members:', classroom.members.length);
print('Level:', level.name);
for (var i in classroom.members) {
var member = classroom.members[i];
var sessions = db.level.sessions.find({'level.original': level.original+'', 'creator': member+''}).toArray();
print(' user:', member);
for (var j in sessions) {
var session = sessions[j];
print(' session:', session._id, 'has language', session.codeLanguage);
if (session.codeLanguage === classroom.aceConfig.language) {
print(' all is well');
continue;
}
print(' updating language...');
print(' ', db.level.sessions.update({_id: session._id}, {$set: {codeLanguage: classroom.aceConfig.language}}));
}
}