From af3949dedd545c066aeb1e22bef5e015fc68373a Mon Sep 17 00:00:00 2001 From: jysperm Date: Tue, 7 Oct 2014 04:03:27 +0800 Subject: [PATCH] rpvhost i18n --- core/router/panel.coffee | 1 - plugin/bitcoin/view/payment_method.jade | 6 +++--- plugin/rpvhost/index.coffee | 6 ++++++ plugin/rpvhost/locale/zh_CN.json | 8 +++++++- plugin/rpvhost/view/payment_method.jade | 6 +++--- plugin/wiki/locale/zh_CN.json | 2 +- plugin/wiki/view/index.jade | 2 +- 7 files changed, 21 insertions(+), 10 deletions(-) diff --git a/core/router/panel.coffee b/core/router/panel.coffee index 83cbacb..f9b150e 100644 --- a/core/router/panel.coffee +++ b/core/router/panel.coffee @@ -40,7 +40,6 @@ exports.get '/pay', requireAuthenticate, renderAccount, (req, res) -> callback() , -> - console.log deposit_logs callback null, deposit_logs billing_log: (callback) -> diff --git a/plugin/bitcoin/view/payment_method.jade b/plugin/bitcoin/view/payment_method.jade index 8ba6d93..3a30860 100644 --- a/plugin/bitcoin/view/payment_method.jade +++ b/plugin/bitcoin/view/payment_method.jade @@ -1,5 +1,5 @@ div - h2= t('plugins.bitcoin.') - p= t('plugins.bitcoin.view.payment_tips') - p= t('plugins.bitcoin.view.exchange_rate_tips', {rate10: (exchange_rate * 10).toFixed(4)}) + h2= account.t('plugins.bitcoin.') + p= account.t('plugins.bitcoin.view.payment_tips') + p= account.t('plugins.bitcoin.view.exchange_rate_tips', {rate10: (exchange_rate * 10).toFixed(4)}) pre= account.pluggable.bitcoin.bitcoin_deposit_address diff --git a/plugin/rpvhost/index.coffee b/plugin/rpvhost/index.coffee index 8143ce3..ce96fb2 100644 --- a/plugin/rpvhost/index.coffee +++ b/plugin/rpvhost/index.coffee @@ -21,5 +21,11 @@ exports.registerHook 'billing.payment_methods', , (err, html) -> callback html +exports.registerHook 'view.pay.display_payment_details', + type: 'taobao' + filter: (account, deposit_log, callback) -> + callback account.t 'plugins.rpvhost.view.payment_details', + order_id: deposit_log.payload.order_id + app.get '/', renderAccount, (req, res) -> res.render path.join(__dirname, './view/index') diff --git a/plugin/rpvhost/locale/zh_CN.json b/plugin/rpvhost/locale/zh_CN.json index ea354b1..56fdbc5 100644 --- a/plugin/rpvhost/locale/zh_CN.json +++ b/plugin/rpvhost/locale/zh_CN.json @@ -1,3 +1,9 @@ { - "site_name": "RP 主机" + "site_name": "RP 主机", + "taobao": "淘宝", + "view": { + "payment_tips": "拍下对应宝贝后付款即可,购买时注意选择服务器节点选项,备注填写你的用户名。", + "go_pay": "淘宝购买", + "payment_details": "淘宝支付,订单号 __order_id__" + } } diff --git a/plugin/rpvhost/view/payment_method.jade b/plugin/rpvhost/view/payment_method.jade index 995b64a..cb32b75 100644 --- a/plugin/rpvhost/view/payment_method.jade +++ b/plugin/rpvhost/view/payment_method.jade @@ -1,4 +1,4 @@ div - h2 淘宝 - p 拍下对应宝贝后付款即可,购买时注意选择服务器节点选项,备注填写你的用户名。 - a.btn.btn-success(href='http://item.taobao.com/item.htm?id=#{config.plugins.rpvhost.taobao_item_id}') 淘宝购买 + h2= account.t('plugins.rpvhost.taobao') + p= account.t('plugins.rpvhost.view.payment_tips') + a.btn.btn-success(href='http://item.taobao.com/item.htm?id=#{config.plugins.rpvhost.taobao_item_id}')= account.t('plugins.rpvhost.view.go_pay') diff --git a/plugin/wiki/locale/zh_CN.json b/plugin/wiki/locale/zh_CN.json index 0db3279..43020c0 100644 --- a/plugin/wiki/locale/zh_CN.json +++ b/plugin/wiki/locale/zh_CN.json @@ -1,3 +1,3 @@ { - + "": "用户手册" } diff --git a/plugin/wiki/view/index.jade b/plugin/wiki/view/index.jade index c23965d..6590d4b 100644 --- a/plugin/wiki/view/index.jade +++ b/plugin/wiki/view/index.jade @@ -1,7 +1,7 @@ extends ../../../core/view/layout prepend header - title 用户手册 | #{config.web.name} + title account.t('plugins.wiki.') | #{config.web.name} block main for category in category_list