-
Notifications
You must be signed in to change notification settings - Fork 660
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
Remove large number formatting for non-US countries #3015
Conversation
Added tests to verify no number splitting for non-US countries Updated tests to felect new logic
…move_large_number_formatting
@@ -135,13 +135,13 @@ TEST_F(InstructionsObviousManeuver, NotObviousBecauseSameNameIntersectingEdgeRam | |||
// Verify start maneuver prior to the continune maneuver | |||
gurka::assert::raw::expect_instructions_at_maneuver_index(result, maneuver_index, | |||
"Drive east on US 322.", "", | |||
"Drive east on US 3 22.", | |||
"Drive east on US 322.", |
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.
Are these tests updated because they're using netherlands admin?
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.
@danpaz yes, exactly
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.
🤔 I'm wondering if this formatting should really be based on the request language and not the country. In Canada and even in Europe I think it's desired to pronounce the digits separately, e.g. the example in one of the tests below A120
seems like it'd be a regression if the instruction language is in English rather than French. @st4141 as you wrote the original issue #2612 do you have any thoughts on this?
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.
@danpaz yes, I was thinking the same thing about the language in the future. However, right now I just wanted to fix the current issue.
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.
@danpaz I guess the formatting should be based on the language of the request, not on the country where the road is.
As a French, I expect to ear "route 123" (="road 1 23" in French) if I drive in the USA. Not "route....1....23"
I don't know what an US citizen is expecting if he drives in France using Valhalla request in "En-US". I guess he prefers to ear "road...1...23".
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.
@danpaz also, tested the A120
phrase and it sounded appropriate.
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.
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.
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.
Is there an issue for using request language instead of country for the text formatter? Rest lgtm.
…move_large_number_formatting
Issue
Fixes #2612
Tasklist