You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#23 muddies up the format even further: now the [optional] syntax can be replaced outright with a destination "template". For localization purposes, that PR should've created a separate set of messages for each towards case instead of that "template".
When I implemented #23 my natural way to go would have actually been named [] variables. That seems complex though and ripe for weird string manipulation cases (e.g. setting and retaining spaces correctly). Instead, we could also remove the [] variables completely, by splitting every turn/modifier combination into a new object with several cases.
Now:
"off ramp": {
"defaultInstruction": "Take the ramp[ onto {way_name}]",
}
New:
"off ramp": {
"defaultInstruction": {
"default": "Take the ramp",
"name": "Take the ramp onto {way_name}",
"destination": "Take the ramp towards {destination_name}",
}
}
The smaller this logic is, the more extensible this library will be. We should try to see if we can reduce this logic even further.
/cc @freenerd
The text was updated successfully, but these errors were encountered: