Skip to content

Commit

Permalink
Fix wording for 'during tomorrow' and 'during today' in DE
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoniya Statelova committed Dec 19, 2019
1 parent 8470886 commit 1941778
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
13 changes: 10 additions & 3 deletions lib/lang/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,21 @@ module.exports = {
return condition + " von " + a + " " + until_time(b);
},
"during": function(condition, time) {
if(this[1] === "and")
if(this[1] === "and") {
return time + " " + condition;
}

if(this[1] === "with")
if(this[1] === "with") {
return condition + " " + time;
}

if(time === "Nacht")
if(time === "Nacht") {
return condition + " in der " + time;
}

if(time === "heute" || time === "morgen") {
return condition + " " + time;
}

return condition + " am " + time;
},
Expand Down
8 changes: 7 additions & 1 deletion test_cases/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,5 +226,11 @@
["sentence", ["until-starting-again", "very-light-rain", "afternoon", "night"]],

"Gewitter möglich bis am nächsten Mittwoch.":
["sentence", ["until", "possible-thunderstorm", "next-wednesday"]]
["sentence", ["until", "possible-thunderstorm", "next-wednesday"]],

"Leichter Regen heute.":
["sentence", ["during", "light-rain", "today"]],

"Leichter Regen morgen.":
["sentence", ["during", "light-rain", "tomorrow"]]
}

0 comments on commit 1941778

Please sign in to comment.