Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

Commit

Permalink
1.42.0: added next-* and thunderstorm properties in zh-tw. fixes #119
Browse files Browse the repository at this point in the history
  • Loading branch information
J. T. L committed Jun 16, 2017
1 parent fba4939 commit 10b2cd5
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"use strict";
const fs = require("fs"),
path = require("path");
const fs = require("fs");
const path = require("path");

fs.readdirSync(path.join(__dirname, "lib/lang")).forEach(pathname => {
for(const pathname of fs.readdirSync(path.join(__dirname, "lib/lang"))) {
const match = /^([^\.].*)\.js$/.exec(pathname);

if(match) {
exports[match[1]] = require("./lib/lang/" + pathname);
}
});
}
9 changes: 9 additions & 0 deletions lib/lang/zh-tw.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ module.exports = require("../template")({
"light-snow": "小雪",
"medium-snow": "降雪",
"heavy-snow": "鵝毛大雪",
"possible-thunderstorm": "可能有雷暴",
"thunderstorm": "雷暴",
"light-wind": "微風",
"medium-wind": "有風",
"heavy-wind": "推人大風",
Expand Down Expand Up @@ -61,6 +63,13 @@ module.exports = require("../template")({
"thursday": "周四",
"friday": "周五",
"saturday": "周六",
"next-sunday": "下周日",
"next-monday": "下周一",
"next-tuesday": "下周二",
"next-wednesday": "下周三",
"next-thursday": "下周四",
"next-friday": "下周五",
"next-saturday": "下周六",
"minutes": "$1分鐘",
"fahrenheit": "$1\u00B0F",
"celsius": "$1\u00B0C",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "forecast-io-translations",
"version": "1.41.5",
"version": "1.42.0",
"description": "translate the Dark Sky API into any language",
"author": {
"name": "The Dark Sky Company",
Expand Down
8 changes: 8 additions & 0 deletions test_cases/zh-tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@
"潮濕,局部多雲":
["title", ["and", "high-humidity", "light-clouds"]],

"多雲,可能有雷暴":
["title", ["and", "medium-clouds", "possible-thunderstorm"]],

"多雲,雷暴":
["title", ["and", "medium-clouds", "thunderstorm"]],

"在接下來一個小時內晴朗。":
["sentence", ["for-hour", "clear"]],
Expand Down Expand Up @@ -135,6 +140,9 @@
"大量降水將持續至下午。":
["sentence", ["until", "heavy-precipitation", "afternoon"]],

"雷暴將持續至下周一。":
["sentence", ["until", "thunderstorm", "next-monday"]],

"微風持續至下午。":
["sentence", ["during", "light-wind", "afternoon"]],

Expand Down

0 comments on commit 10b2cd5

Please sign in to comment.