-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arrival instruction includes an optional named waypoint #235
Conversation
languages/translations/ru.json
Outdated
@@ -62,49 +62,57 @@ | |||
"default": "Вы прибыли в {nth} пункт назначения", | |||
"upcoming": "Вы прибудете в {nth} пункт назначения", | |||
"short": "Вы прибыли", | |||
"short-upcoming": "Вы скоро прибудете" | |||
"short-upcoming": "Вы скоро прибудете", | |||
"named": "Вы прибыли в {waypoint_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to change this text and below to "Вы прибыли в пункт назначения, {waypoint_name}". Otherwise currently used form requires prepositional case applying to {waypoint_name}
value.
And maybe it's better to publish new strings templates in Transifex first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yuryleb, does that mean the grammar rules applied on this line will not take care of it for us?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe it's better to publish new strings templates in Transifex first?
One of the unfortunate aspects of OSRMTI currently is that adding a new string requires immediately adding something in each of the languages, whether that’s a copy of the English string or something hacked together based on preexisting translations. Transifex can only pick up new strings once the initial PR lands.
We could just insert English everywhere as a placeholder, but that would result in a temporary regression in all other languages. Regressing translation coverage isn’t necessarily a big deal, but some languages have taken months to update, even if it’s just a matter of adapting an existing string as this PR does. #84 and #155 track figuring out a better process for adding new strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! A few comments about specific stopgap translations, but we can always address them in a separate PR once translators get a chance to see these new messages in Transifex.
languages/translations/ru.json
Outdated
@@ -62,49 +62,57 @@ | |||
"default": "Вы прибыли в {nth} пункт назначения", | |||
"upcoming": "Вы прибудете в {nth} пункт назначения", | |||
"short": "Вы прибыли", | |||
"short-upcoming": "Вы скоро прибудете" | |||
"short-upcoming": "Вы скоро прибудете", | |||
"named": "Вы прибыли в {waypoint_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The correct token to use here is probably either {waypoint_name:date}
or {waypoint_name:accusative}
, but I’d defer to @yuryleb. We can also fix this afterwards, once the strings are in Transifex.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually no, grammar rules work only with street names but waypoint_name
could be any name :sad: So it's much easy just to change source strings to force nominal case for names than to extend grammar rules to handle any names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I didn’t really consider how the open-endedness could break the grammar rules’ assumptions. Since the client knows more about the waypoint name’s semantics, it could conceivably call grammarize()
depending on whether it’s a street name or something else, but that wouldn’t happen by default. So I agree that putting the name in an appositive, as you suggested in #235 (comment), neatly sidesteps the problem. I think we’ll need to do the same thing for at least one other language anyways.
languages/translations/vi.json
Outdated
@@ -62,49 +62,57 @@ | |||
"default": "Đến nơi {nth}", | |||
"upcoming": "Đến nơi {nth}", | |||
"short": "Đến nơi", | |||
"short-upcoming": "Đến nơi" | |||
"short-upcoming": "Đến nơi", | |||
"named": "Đến nơi {waypoint_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“Đến {waypoint_name}
” would be better, but I can also fix this up in Transifex after the fact.
languages/translations/zh-Hans.json
Outdated
@@ -62,49 +62,57 @@ | |||
"default": "您已经到达您的{nth}个目的地", | |||
"upcoming": "您已经到达您的{nth}个目的地", | |||
"short": "已到达目的地", | |||
"short-upcoming": "您已经到达您的{nth}个目的地" | |||
"short-upcoming": "您已经到达您的{nth}个目的地", | |||
"named": "已到达目{waypoint_name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@1ec5 目 is not necessary, 目的地 is a single Chinese vocabulary. I think it should be |
9a6a980 updates the test scripts so that |
Thanks everyone! I updated the Russian translations per #235 (comment). Planning to merge and cut a release with this feature shortly. |
- Added a European Portuguese localization. [#229](#229) - The Spanish localization now uses the informal imperative form instead of the formal imperative form, for consistency with the Castillian Spanish localization. [#230](#230) - Added some abbreviations in German, Hebrew, Hungarian, Slovenian, and Ukrainian. [#226](#226) - Added support for named waypoints in arrival instructions. [#235](#235)
Issue
Updates
compile
to accept an optional parameteroptions.waypointName
to use in the arrive instruction. When the new parameter is provided, compile replaces the default arrival instructionYou have arrived at your {nth} destination
withYou have arrived at {waypoint_name}
.For example:
becomes
For the localizations, I copied the default arrival instruction and modified it manually to create the new
named
template. In most languages this was pretty straightforward to do, but for some languages I made an effort but am not 100% confident with the result. I'll highlight these in comments below for feedback from anyone with better knowledge of those languages.Tasklist
/cc @1ec5 @lyzidiamond @bsudekum @allierowan @mcwhittemore