Open mbrodala opened 7 months ago
@mbrodala if we sort them alphabetically, de-DE would come before en-us. or should we always put english first I wonder?
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.
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.
We should be able to interpret the data provided by the Ajax in different ways though?
We could also adjust the Ajax response here: https://github.com/TYPO3GmbH/site-intercept/tree/develop/legacy_hook
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.
We could also adjust the Ajax response here: https://github.com/TYPO3GmbH/site-intercept/tree/develop/legacy_hook
This seems to be the sorting part: https://github.com/TYPO3GmbH/site-intercept/blob/develop/legacy_hook/src/DocumentationVersions.php#L166
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! :-)
Not sure why we need another issue given that this one is not fixed yet:
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/
@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 ;)
The draft indeed looks great:
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.
Micro nitpick: The words "French" and "Russian" should be translated to the according target language.
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.
The version selector includes language variants of the docs. These are currently not sorted by any apparent order:
These should at least be sorted alphabetically, so that e.g.
12.4 en-us
comes before12.4 ru-ru
.