Browse Source

Merge pull request #46 from shian48263/master

Added zh-CN & zh-TW localisations
JeongHoon Byun (aka Outsider) 9 years ago
parent
commit
79a5093eb1
4 changed files with 14 additions and 1 deletions
  1. 1 1
      README.md
  2. 6 0
      locales/zh-CN.json
  3. 6 0
      locales/zh-TW.json
  4. 1 0
      routes/index.js

+ 1 - 1
README.md

@@ -20,7 +20,7 @@ fill out `config.js` as your infomation.
   **You should generate the token in admin user, not owner.**
   If you generate the token in owner user, `missing_scope` error will be occurred.
 * `inviteToken`: an optional security measure - if it is set, then that token will be required to get invited.
-* `locale`: application language (currently `en`, `de`, `es`, `fr` and `pt` available).
+* `locale`: application language (currently `en`, `de`, `es`, `fr`, `pt`, `zh-CN` and `zh-TW` available).
 
   You can test your token via curl:
 

+ 6 - 0
locales/zh-CN.json

@@ -0,0 +1,6 @@
+{
+  "HEADER": "以下请输入您的电子邮箱加入 %s 的 Slack!",
+  "ENTER_EMAIL": "输入您的电子邮箱地址",
+  "ENTER_TOKEN": "输入提供予您的邀请令牌",
+  "TITLE": "加入 %s 的 Slack 社群!"
+}

+ 6 - 0
locales/zh-TW.json

@@ -0,0 +1,6 @@
+{
+  "HEADER": "以下請輸入您的電子郵箱加入 %s 的 Slack!",
+  "ENTER_EMAIL": "輸入您的電子郵箱地址",
+  "ENTER_TOKEN": "輸入提供予您的邀請令牌",
+  "TITLE": "加入 %s 的 Slack 社群!"
+}

+ 1 - 0
routes/index.js

@@ -4,6 +4,7 @@ var request = require('request');
 var config = require('../config');
 
 router.get('/', function(req, res) {
+  res.setLocale(config.locale);
   res.render('index', { community: config.community,
                         tokenRequired: !!config.inviteToken });
 });