From 9ae463ed24e6528fafcf5d9a847bf72719c5e292 Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Fri, 9 Oct 2015 16:03:22 -0700 Subject: [PATCH 1/7] Remove perf killing 'add' event handler from /account/prepaid --- app/views/account/PrepaidView.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/account/PrepaidView.coffee b/app/views/account/PrepaidView.coffee index b1c5917e6..6136ddfb6 100644 --- a/app/views/account/PrepaidView.coffee +++ b/app/views/account/PrepaidView.coffee @@ -37,10 +37,7 @@ module.exports = class PrepaidView extends RootView @updateTotal() @codes = new CocoCollection([], { url: '/db/user/'+me.id+'/prepaid_codes', model: Prepaid }) - @codes.on 'add', (code) => - @render?() - @codes.on 'sync', (code) => - @render?() + @codes.on 'sync', (code) => @render?() @supermodel.loadCollection(@codes, 'prepaid', {cache: false}) @ppc = utils.getQueryVariable('_ppc') ? '' From 124b61a70c3f58f02eaec227ea28e57002efdcb9 Mon Sep 17 00:00:00 2001 From: Tery Lim Date: Sat, 10 Oct 2015 21:42:02 +1300 Subject: [PATCH 2/7] Update harry's tips `Yer a Wizard,` --- app/locale/zh-HANS.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee index e14917d13..c95f99d52 100644 --- a/app/locale/zh-HANS.coffee +++ b/app/locale/zh-HANS.coffee @@ -304,7 +304,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese tip_morale_improves: "在士气提升之前会一直进行加载。" tip_all_species: "我们相信每一个人都有同等的机会学习编程" tip_reticulating: "网格状锯齿。(指Maxis开发的许多游戏,如《模拟城市》、《孢子》中,加载进程中跑动时出现的卡顿现象)" - tip_harry: "巫师, " + tip_harry: "你是一名巫师, " tip_great_responsibility: "更强的编程技巧也意味着有更高的责任来进行调试。" tip_munchkin: "如果您不吃掉您的蔬菜, 一个小矮人将在您睡着之后来找您。" tip_binary: "这个世界上只有10种人: 那些懂二进制的, 还有那些不懂二进制的。" From 0b9e78e2b88a9f1b4769ad42abc8120c2418f73e Mon Sep 17 00:00:00 2001 From: Tery Lim Date: Sat, 10 Oct 2015 22:38:21 +1300 Subject: [PATCH 3/7] Some zh-HANS translations - Translate `prepaid` - Change `codecombat` => `CodeCombat` --- app/locale/zh-HANS.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee index c95f99d52..43cde0212 100644 --- a/app/locale/zh-HANS.coffee +++ b/app/locale/zh-HANS.coffee @@ -464,7 +464,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese was_free_until: "您有过一个免费订阅,直到" managed_subs: "管理订阅" managed_subs_desc: "为其他玩家(学生、儿童等)添加订阅。" - managed_subs_desc_2: "收件人必须有一个与您提供的电子邮件地址相关联的codecombat帐户。" + managed_subs_desc_2: "收件人必须有一个与您提供的电子邮件地址相关联的CodeCombat帐户。" group_discounts: "团购价" group_discounts_1: "我们还为批量订阅提供团购价" group_discounts_1st: "1个订阅" @@ -1207,7 +1207,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese recently_played: "最近玩过的关卡" no_recent_games: "最近两个星期没有玩过游戏。" payments: "支付方式" -# prepaid: "Prepaid" + prepaid: "预付费" purchased: "已购买" sale: "促销" subscription: "订阅" From 727dce6f2cd98dd6781a602ccc40f32b06532d79 Mon Sep 17 00:00:00 2001 From: HelloSeaNation Date: Sun, 11 Oct 2015 00:54:59 +1300 Subject: [PATCH 4/7] Fix typo --- app/locale/zh-HANT.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/zh-HANT.coffee b/app/locale/zh-HANT.coffee index 1ec9d509d..de4836674 100644 --- a/app/locale/zh-HANT.coffee +++ b/app/locale/zh-HANT.coffee @@ -673,7 +673,7 @@ module.exports = nativeDescription: "繁體中文", englishDescription: "Chinese under: "低於" other: "其他:" amount_students: "請問您有多少學生需要教導?" - hear_about: "您是怎麼知道CodeComabat的?" + hear_about: "您是怎麼知道CodeCombat的?" fill_fields: "請填寫所有問題。" thanks: "非常感謝!我們會很快寄給您設置說明。" From e75413fbe27b576aaf1f2ed6074f9ab74400f8bb Mon Sep 17 00:00:00 2001 From: HelloSeaNation Date: Sun, 11 Oct 2015 00:56:37 +1300 Subject: [PATCH 5/7] Fix another typo --- app/locale/zh-HANS.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/locale/zh-HANS.coffee b/app/locale/zh-HANS.coffee index 43cde0212..bbfe6b9a6 100644 --- a/app/locale/zh-HANS.coffee +++ b/app/locale/zh-HANS.coffee @@ -673,7 +673,7 @@ module.exports = nativeDescription: "简体中文", englishDescription: "Chinese under: "低于" other: "其他:" amount_students: "请问您有多少学生需要教导?" - hear_about: "您是怎么知道CodeComabat的?" + hear_about: "您是怎么知道CodeCombat的?" fill_fields: "请填写所有问题。" thanks: "非常感谢!我们会很快寄给您设置说明。" From b046be44f36809e52677318c3cceed1f06d9ec21 Mon Sep 17 00:00:00 2001 From: Imperadeiro98 Date: Sat, 10 Oct 2015 21:52:31 +0100 Subject: [PATCH 6/7] Remove duplicated key --- server_config.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/server_config.coffee b/server_config.coffee index 261d65d3e..8eb255438 100644 --- a/server_config.coffee +++ b/server_config.coffee @@ -53,7 +53,6 @@ config.mail = username: process.env.COCO_MAIL_SERVICE_USERNAME or '' supportPrimary: process.env.COCO_MAIL_SUPPORT_PRIMARY or '' supportPremium: process.env.COCO_MAIL_SUPPORT_PREMIUM or '' - username: process.env.COCO_MAIL_SERVICE_USERNAME or '' mailchimpAPIKey: process.env.COCO_MAILCHIMP_API_KEY or '' mailchimpWebhook: process.env.COCO_MAILCHIMP_WEBHOOK or '/mail/webhook' sendwithusAPIKey: process.env.COCO_SENDWITHUS_API_KEY or '' From f723fcbd3998487eb54486066171e6b6fb19b581 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Mon, 12 Oct 2015 13:12:34 -0700 Subject: [PATCH 7/7] Fix geolocation code --- server_setup.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/server_setup.coffee b/server_setup.coffee index 0096001c0..fd2d52618 100644 --- a/server_setup.coffee +++ b/server_setup.coffee @@ -86,7 +86,6 @@ setupCountryRedirectMiddleware = (app, country="china", countryCode="CN", langua ip = req.headers['x-forwarded-for'] or req.connection.remoteAddress ip = ip?.split(/,? /)[0] # If there are two IP addresses, say because of CloudFlare, we just take the first. geo = geoip.lookup(ip) - geo = country: 'CN' #if speaksLanguage or geo?.country is countryCode # log.info("Should we redirect to #{serverID} server? speaksLanguage: #{speaksLanguage}, firstLanguage: #{firstLanguage}, ip: #{ip}, geo: #{geo} -- so redirecting? #{geo?.country is 'CN' and speaksLanguage}") return geo?.country is countryCode and speaksLanguage