diff --git a/README.md b/README.md index b923f3e0..11e2e419 100644 --- a/README.md +++ b/README.md @@ -501,10 +501,10 @@ expected. These take the form of "N inches", "under N inches", or "M-N inches" in English, respectively. * `["inches", NUMBER]` -* `["inches", ["less-than", 1]]` +* `["less-than", ["inches", 1]]` * `["inches", ["range", NUMBER, NUMBER]]` * `["centimeters", NUMBER]` -* `["centimeters", ["less-than", 1]]` +* `["less-than", ["centimeters", 1]]` * `["centimeters", ["range", NUMBER, NUMBER]]` #### Other Weather Conditions diff --git a/lib/lang/tet.js b/lib/lang/tet.js index 626e8c8d..206be014 100644 --- a/lib/lang/tet.js +++ b/lib/lang/tet.js @@ -120,12 +120,9 @@ module.exports = require("../template")({ "temperatures-rising": "temperatur sai to $1 $2", "temperatures-valleying": "temperatur la tun liu $1 $2", "temperatures-falling": "temperatur tun to $1 $2", - /* Capitalize the first letter of every word, except if that word is - * "and". (This is a very crude bastardization of proper English titling - * rules, but it is adequate for the purposes of this module.) */ "title": function(str) { return str.replace( - /\b(?:a(?!nd\b)|[^\Wa])/g, + /(^|[\s\-])\w/g, function(letter) { return letter.toUpperCase(); } diff --git a/package.json b/package.json index 1229145c..a4608d07 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "forecast-api-translations", - "version": "1.2.0", + "version": "1.3.0", "description": "translate the Forecast API into any language", "author": { "name": "The Dark Sky Company", @@ -10,6 +10,10 @@ { "name": "Jay LaPorte", "email": "jay@forecast.io" + }, + { + "name": "Anders Hofstee", + "email": "info@catalpainternational.org" } ], "repository": { diff --git a/test-cases/en.json b/test-cases/en.json index 9768133b..8b623e63 100644 --- a/test-cases/en.json +++ b/test-cases/en.json @@ -195,7 +195,7 @@ "Snow (under 1 cm.) in the afternoon.": ["sentence", ["during", - ["parenthetical", "medium-snow", ["centimeters", ["less-than", 1]]], + ["parenthetical", "medium-snow", ["less-than", ["centimeters", 1]]], "afternoon"]], diff --git a/test-cases/tet.json b/test-cases/tet.json index ba329300..a19f81df 100644 --- a/test-cases/tet.json +++ b/test-cases/tet.json @@ -195,7 +195,7 @@ "Salju (1 cm. mai kraik) lokraik.": ["sentence", ["during", - ["parenthetical", "medium-snow", ["centimeters", ["less-than", 1]]], + ["parenthetical", "medium-snow", ["less-than", ["centimeters", 1]]], "afternoon"]], "Udan la iha durante semana ida, ho temperatur la sai liu 85\u00B0F aban.":