From 0121c8709d0c301524be2b46223a765553a45344 Mon Sep 17 00:00:00 2001 From: Yury Lebedev Date: Wed, 27 Mar 2019 11:46:51 +0300 Subject: [PATCH 1/2] Improved article matching in French instructions --- languages/overrides/fr.js | 2 +- languages/translations/fr.json | 2 +- test/fixtures/v5/arrive_waypoint_name/right.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/overrides/fr.js b/languages/overrides/fr.js index c6d13a752..7730bbd63 100644 --- a/languages/overrides/fr.js +++ b/languages/overrides/fr.js @@ -5,7 +5,7 @@ var replaces = [ [' (le rond-point )?\{rotary_name\}', ' {rotary_name:rotary}'], // eslint-disable-line no-useless-escape [' fin (de )?(la route )?\{way_name\}', ' fin {way_name:preposition}'], // eslint-disable-line no-useless-escape [' \{way_name\}', ' {way_name:article}'], // eslint-disable-line no-useless-escape - [' (à )?\{waypoint_name\}', ' {waypoint_name:arrival}'] // eslint-disable-line no-useless-escape + [' (à +)?\{waypoint_name\}', ' {waypoint_name:arrival}'] // eslint-disable-line no-useless-escape ]; function optionize(phrase) { diff --git a/languages/translations/fr.json b/languages/translations/fr.json index 0d3e39e8c..69b2a056f 100644 --- a/languages/translations/fr.json +++ b/languages/translations/fr.json @@ -77,7 +77,7 @@ "upcoming": "Vous arriverez à votre {nth} destination, sur la droite", "short": "Vous êtes arrivé", "short-upcoming": "Vous arriverez", - "named": "Vous êtes arrivé à {waypoint_name:arrival}, sur la droite" + "named": "Vous êtes arrivé {waypoint_name:arrival}, sur la droite" }, "sharp left": { "default": "Vous êtes arrivé à votre {nth} destination, sur la gauche", diff --git a/test/fixtures/v5/arrive_waypoint_name/right.json b/test/fixtures/v5/arrive_waypoint_name/right.json index 303623ef6..d3a48b2e5 100644 --- a/test/fixtures/v5/arrive_waypoint_name/right.json +++ b/test/fixtures/v5/arrive_waypoint_name/right.json @@ -15,7 +15,7 @@ "es": "Has llegado a Somewhere, a la derecha", "es-ES": "Has llegado a Somewhere, a la derecha", "fi": "Olet saapunut määränpäähän Somewhere, joka on oikealla puolellasi", - "fr": "Vous êtes arrivé à à Somewhere, sur la droite", + "fr": "Vous êtes arrivé à Somewhere, sur la droite", "he": "הגעת אל Somewhere שלך מימינך", "hu": "Megérkezett a Somewhere célponthoz, a jobb oldalon", "id": "Anda telah tiba di Somewhere, di sebelah kanan", From dcdcddb3455d9f51648ff87cce03830c8030bbf9 Mon Sep 17 00:00:00 2001 From: Yury Lebedev Date: Wed, 27 Mar 2019 12:35:45 +0300 Subject: [PATCH 2/2] Change log update for French articles fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41a0a6c80..05e982196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ All notable changes to this project will be documented in this file. For change - Added a Japanese localization. [#277](https://github.com/Project-OSRM/osrm-text-instructions/pull/277) - Added an Arabic localization. [#267](https://github.com/Project-OSRM/osrm-text-instructions/pull/267) - Added a Slovenian localization. [#264](https://github.com/Project-OSRM/osrm-text-instructions/pull/264) -- Updated French grammar with 'chaussée' status street name. [#268](https://github.com/Project-OSRM/osrm-text-instructions/pull/268) +- Updated French grammar with 'chaussée' status street name and better articles matching. [#268](https://github.com/Project-OSRM/osrm-text-instructions/pull/268)[#279](https://github.com/Project-OSRM/osrm-text-instructions/pull/279) ## 0.13.2 2018-08-13