Skip to content

Use locale param from plan queries for all translations in the GTFS API if accept-language header is not set #6546

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

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

optionsome
Copy link
Member

Summary

Updates data fetchers to use the GraphQL utils for determining the locale for translations so that the locale param in plan queries is respected if no accept-language header is used.

Issue

No issue

Unit tests

Not sure if needed

Documentation

No

Changelog

From title

@optionsome optionsome added the Improvement A functional improvement label Mar 17, 2025
@optionsome optionsome added this to the 2.8 (next release) milestone Mar 17, 2025
@optionsome optionsome requested a review from a team as a code owner March 17, 2025 15:07
@optionsome
Copy link
Member Author

Idk if we should prefer locale param if one is set over the accept-language header. I have a feeling this logic might have been changed at some point perhaps by myself.

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.25%. Comparing base (698df74) to head (89c5a3e).
Report is 71 commits behind head on dev-2.x.

Files with missing lines Patch % Lines
...anner/apis/gtfs/datafetchers/RoutingErrorImpl.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             dev-2.x    #6546   +/-   ##
==========================================
  Coverage      70.24%   70.25%           
- Complexity     18369    18387   +18     
==========================================
  Files           2087     2088    +1     
  Lines          77381    77425   +44     
  Branches        7839     7843    +4     
==========================================
+ Hits           54358    54395   +37     
- Misses         20249    20258    +9     
+ Partials        2774     2772    -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tkalvas tkalvas merged commit 9f6be97 into opentripplanner:dev-2.x Mar 20, 2025
6 checks passed
@tkalvas tkalvas deleted the fix-locale-param branch March 20, 2025 08:46
t2gran pushed a commit that referenced this pull request Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement A functional improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants