davsclaus opened a new pull request, #30433:
URL: https://github.com/apache/camel/pull/30433

   ## Description
   
   [CAMEL-27200](https://issues.apache.org/jira/browse/CAMEL-27200): the 
`language` option of `geocoder` (default `en`) had no caller, so the answers 
came in the server default language.
   
   - **Nominatim**: `accept-language=<language>` is added to the `search` and 
`reverse` requests.
   - **Google**: `.language(<language>)` is set on the geocode and reverse 
geocode requests (also for `address:current`).
   - An empty `language` sends nothing, as before.
   - **Nominatim reverse lookup**: the latitude and longitude are trimmed after 
splitting `latlng`. The producer sets the `CamelGeoCoderLatlng` header as 
`"lat, lng"`, so feeding one answer into a reverse lookup sent `lon=+-5.99...`.
   - The option has a description now.
   
   Upgrade guide: answers from Nominatim used to be in the local language of 
the place. They are now in English unless `language` is set, and `language=` 
(empty) gives the old answers.
   
   Needed for the `language` option of the `nominatim-geocode-action` Kamelet 
(apache/camel-kamelets#3280).
   
   ## Tests
   
   - `GeoCoderNominatimLanguageTest`: checks the request query on the local 
Nominatim server (`language=fr`, the default `en`, an empty language, and a 
reverse lookup with `"lat, lng"`).
   - `GeoCoderGoogleLanguageTest`: runs the Google producer against a local 
server with `GeoApiContext.Builder.baseUrlOverride`, for geocode and reverse 
geocode.
   - Without the fix, 5 of the 6 new tests fail. All the geocoder tests pass 
with it.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to