From 56559bd5875752029ebaca66ba28fee74219939d Mon Sep 17 00:00:00 2001 From: Antoniya Statelova Date: Wed, 8 Jan 2020 16:37:47 -0500 Subject: [PATCH] v3.0.0 Restructure STATUS sentences (breaking change) and add documentation for them (thank you @ironwallaby for doing this <3 ) --- README.md | 7 ++++++- lib/lang/bg.js | 8 ++++++-- lib/lang/en.js | 6 +++++- package.json | 2 +- test_cases/bg.json | 6 ++++-- test_cases/en.json | 6 +++++- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ad57b4ba..fd3a26d4 100644 --- a/README.md +++ b/README.md @@ -250,13 +250,18 @@ capitalized, and the sentence is to end with a period). For text summaries for the next hour (that is, `minutely.summary`), summaries of the following formats are produced: +* `["sentence", ["next-hour-forecast-status", PERSISTENCE, STATION_STATUS]]` * `["sentence", ["for-hour", WEATHER_CONDITION]]` * `["sentence", ["starting-in", PRECIPITATION_TYPE, DURATION]]` * `["sentence", ["stopping-in", PRECIPITATION_TYPE, DURATION]]` * `["sentence", ["starting-then-stopping-later", PRECIPITATION_TYPE, DURATION, DURATION]]` * `["sentence", ["stopping-then-starting-later", PRECIPITATION_TYPE, DURATION, DURATION]]` -Except for the first case, each such summary only takes precipitation into +The first case is an error case when nearby radar stations are experiencing issues +and describe the persistence of the problem as well as some information on the +stations' status. + +Except for the first two case, each such summary only takes precipitation into account, and tells how the intensity of precipitation will vary over the next hour or so. diff --git a/lib/lang/bg.js b/lib/lang/bg.js index 3a270ebe..aac6382d 100644 --- a/lib/lang/bg.js +++ b/lib/lang/bg.js @@ -167,6 +167,10 @@ module.exports = { return str; }, - "unavailable-radar": "Прогнозата за идния час временно не е на разположение поради $1.", - "station-offline": "липса на информация от всички близки станции", + "next-hour-forecast-status": "Прогнозата за идния час $1 поради $2.", + "temporarily-unavailable": "временно не е на разположение", + "partially-unavailable": "е частична", + "unavailable": "не е налична", + "station-offline": "това че всички близки станции не са на линия", + "station-incomplete": "пропуски в покритието от близки станции", }; diff --git a/lib/lang/en.js b/lib/lang/en.js index 58c5c770..0f5d136c 100644 --- a/lib/lang/en.js +++ b/lib/lang/en.js @@ -163,6 +163,10 @@ module.exports = { return str; }, - "unavailable-radar": "Next hour forecasts are temporarily unavailable due to $1.", + "next-hour-forecast-status": "Next hour forecasts are $1 due to $2.", + "temporarily-unavailable": "temporarily unavailable", + "partially-unavailable": "partially unavailable", + "unavailable": "unavailable", "station-offline": "all nearby radar stations being offline", + "station-incomplete": "gaps in coverage from nearby radar stations", }; diff --git a/package.json b/package.json index 5937f467..60590c27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "translations", - "version": "2.16.0", + "version": "3.0.0", "description": "translate the Dark Sky API into any language", "author": { "name": "The Dark Sky Company", diff --git a/test_cases/bg.json b/test_cases/bg.json index 96a26f8d..ef66e31f 100644 --- a/test_cases/bg.json +++ b/test_cases/bg.json @@ -266,6 +266,8 @@ "Силен Дъжд и Гръмотевична Буря": ["title", ["and", "heavy-rain", "thunderstorm"]], - "Прогнозата за идния час временно не е на разположение поради липса на информация от всички близки станции.": - ["sentence",["unavailable-radar", "station-offline"]] + "Прогнозата за идния час временно не е на разположение поради това че всички близки станции не са на линия.": + ["sentence",["next-hour-forecast-status", "temporarily-unavailable", "station-offline"]], + "Прогнозата за идния час е частична поради пропуски в покритието от близки станции.": + ["sentence",["next-hour-forecast-status", "partially-unavailable", "station-incomplete"]] } diff --git a/test_cases/en.json b/test_cases/en.json index 7dfa2d94..725aabe7 100644 --- a/test_cases/en.json +++ b/test_cases/en.json @@ -260,5 +260,9 @@ ["starting-in", "very-light-rain", ["less-than", ["minutes", 1]]]], "Next hour forecasts are temporarily unavailable due to all nearby radar stations being offline.": - ["sentence",["unavailable-radar", "station-offline"]] + ["sentence",["next-hour-forecast-status", "temporarily-unavailable", "station-offline"]], + "Next hour forecasts are partially unavailable due to gaps in coverage from nearby radar stations.": + ["sentence",["next-hour-forecast-status", "partially-unavailable", "station-incomplete"]], + "Next hour forecasts are unavailable due to all nearby radar stations being offline.": + ["sentence",["next-hour-forecast-status", "unavailable", "station-offline"]] }