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

[i18n] 'Search results' page fallbacks to English one #2087

Closed
jihoon-seo opened this issue May 24, 2023 · 4 comments
Closed

[i18n] 'Search results' page fallbacks to English one #2087

jihoon-seo opened this issue May 24, 2023 · 4 comments
Assignees

Comments

@jihoon-seo
Copy link
Collaborator

jihoon-seo commented May 24, 2023

For example, in https://glossary.cncf.io/es/ (Spanish page),
when I search for 'Kubernetes',
it goes to https://glossary.cncf.io/search/?q=kubernetes ,
not https://glossary.cncf.io/es/search/?q=kubernetes .

(And this phenomenon persists even if we add the file content/es/search.md ;
please try at https://deploy-preview-2086--cncfglossary.netlify.app/es/ , the preview of the PR #2086,
which adds content/es/search.md.
In precise, it fallbacks from https://deploy-preview-2086--cncfglossary.netlify.app/es/ to https://glossary.cncf.io/search/?q=kubernetes ,
not https://deploy-preview-2086--cncfglossary.netlify.app/es/search/?q=kubernetes or https://glossary.cncf.io/es/search/?q=kubernetes .)

Would it be possible to make the language selection persistent across page transitions between search result page and others?
@cjyabraham could you please take a look? Thank you!

@cjyabraham cjyabraham self-assigned this May 24, 2023
@cjyabraham
Copy link
Contributor

Hmm. This appears to be a bug in the docsy theme. The example site behaves the same way. Looks like this theme js file is what needs fixing.

@cjyabraham cjyabraham assigned thetwopct and unassigned cjyabraham May 24, 2023
@cjyabraham
Copy link
Contributor

@thetwopct assigning you since it's some weird context issue within the js file. I can think of a few workarounds but not sure if they're too hacky. One idea is to just include the js function inline in the footer so we can grab the correct context and search url, but maybe there is a more elegant solution.

@chalin
Copy link
Contributor

chalin commented Jun 9, 2023

Upstreamed the issue:

@cjyabraham
Copy link
Contributor

This is fixed in the new PageFind search

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants