Skip to content
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

lang Query Parameter nor Content-Language Request Header Not Persisting in pygeoapi When Accessed from QGIS or HTML Interfaces #1855

Open
Youssef-Harby opened this issue Nov 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Youssef-Harby
Copy link
Contributor

Description

When connecting to a pygeoapi service from QGIS using the ?lang=ar-EG query parameter, the initial request respects the specified language and returns responses in Arabic. However, subsequent requests, such as navigating to specific collections or items (e.g., ?f=json requests), do not persist the lang parameter. This causes the responses to default back to the base language (en-US), leading to inconsistent behavior in language settings.

Steps to Reproduce

  1. Connect to a pygeoapi service using QGIS with the URL including the ?lang=ar-EG query parameter.
  2. Verify that the initial response is in Arabic (Content-Language: ar-EG).
  3. Navigate to a collection or item within QGIS (e.g., http://0.0.0.0:5001/collections, itemsand conformance endpoints).

Expected behavior

The lang query parameter should persist across all navigation requests. If ?lang=ar-EG and Content-Language: ar-EG are specified in the initial request, subsequent navigations should continue to respect this parameter until it is explicitly changed.

Screenshots/Tracebacks

  • Screenshots showing the initial request with ?lang=ar-EG returning an English collections not Arabic.
    Screenshot 2024-11-20 at 2 28 12 AM

  • Screenshots of expected (I made the only supported language in pygeoapi config yaml is ar-EG).
    Screenshot 2024-11-20 at 2 29 28 AM

  • Excerpts from QGIS debug logs demonstrating this behavior:

qgis-pygeoapi-ar.json

Environment

  • OS: macOS 15.1
  • Python version: 3.10
  • pygeoapi version: 0.19.dev0
@Youssef-Harby Youssef-Harby added the bug Something isn't working label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant