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

Languages in version selector not sorted alphabetically #358

Open
mbrodala opened this issue Feb 21, 2024 · 14 comments · Fixed by TYPO3GmbH/site-intercept#158
Open

Languages in version selector not sorted alphabetically #358

mbrodala opened this issue Feb 21, 2024 · 14 comments · Fixed by TYPO3GmbH/site-intercept#158

Comments

@mbrodala
Copy link
Member

The version selector includes language variants of the docs. These are currently not sorted by any apparent order:

image

These should at least be sorted alphabetically, so that e.g. 12.4 en-us comes before 12.4 ru-ru.

@linawolf
Copy link
Member

@mbrodala if we sort them alphabetically, de-DE would come before en-us. or should we always put english first I wonder?

@mbrodala
Copy link
Member Author

If there ever is de-de then that would be consistent indeed. But at this point the languages should be extracted from the version selector and put somewhere else.

@brotkrueml
Copy link
Contributor

For the records: It is not part of the render-guides, but of the PHP script output that is requested by JavaScript to display it on the docs server via Ajax. The Sphinx-based rendering uses the same script.

@linawolf
Copy link
Member

We should be able to interpret the data provided by the Ajax in different ways though?

@linawolf
Copy link
Member

We could also adjust the Ajax response here: https://github.com/TYPO3GmbH/site-intercept/tree/develop/legacy_hook

@brotkrueml
Copy link
Contributor

We should be able to interpret the data provided by the Ajax in different ways though?

AFAIR the response is pure HTML, no structured data. This is not a job in JavaScript afterwards.

@brotkrueml
Copy link
Contributor

@garvinhicking
Copy link
Contributor

Closing this; the PR #583 has implemented a better sorting and output for this. If there are any objections or improvements, please feel free to create a follow-up issue! :-)

@mbrodala
Copy link
Member Author

Not sure why we need another issue given that this one is not fixed yet:

image

@mbrodala mbrodala reopened this May 29, 2024
@linawolf
Copy link
Member

We already deployed a solution which is applied on the next rendering of a manual. You can see it tested out here: https://docs.typo3.org/m/typo3/tutorial-getting-started/draft/en-us/

@garvinhicking
Copy link
Contributor

@mbrodala It will only be fixed once a documentation is rendered anew. This does not happen automatically because docs are only rendered when they get new versions.

We'll probably re-render ALL "main" documentations at some point when the PHP-based rendering is stabilized thoroughly.

I'll let @linawolf decide when to close this issue then, because you're probably right that you want to see it before we actually close the issue ;)

@mbrodala
Copy link
Member Author

The draft indeed looks great:

image

If this will be live at some point, I'd be fine for closing this issue. But it's also useful to keep it open as reminder.

@mbrodala
Copy link
Member Author

Micro nitpick: The words "French" and "Russian" should be translated to the according target language.

@garvinhicking
Copy link
Contributor

Micro nitpick: The words "French" and "Russian" should be translated to the according target language.

Yeah the problem is we don't have the language available as metadata for the other versions. And we can only use client-side scripting, not server-side evaluation (thus, no php-isodb). Only what the versionsJson API endpoint gives us (version, singlehtml URL, normal URL, ISO language code like ru-ru). Currently, the resolved language is hardcoded in our javascript file.

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

Successfully merging a pull request may close this issue.

4 participants