Skip to content

Commit

Permalink
v3.0.0 Restructure STATUS sentences (breaking change) and add documen…
Browse files Browse the repository at this point in the history
…tation for them (thank you @ironwallaby for doing this <3 )
  • Loading branch information
Antoniya Statelova committed Jan 8, 2020
1 parent b6f8329 commit 56559bd
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
8 changes: 6 additions & 2 deletions lib/lang/bg.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": "пропуски в покритието от близки станции",
};
6 changes: 5 additions & 1 deletion lib/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
6 changes: 4 additions & 2 deletions test_cases/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
}
6 changes: 5 additions & 1 deletion test_cases/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]
}

0 comments on commit 56559bd

Please sign in to comment.