-
Notifications
You must be signed in to change notification settings - Fork 6
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
Comments
@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 |
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 |
AFAIR the response is pure HTML, no structured data. This is not a job in JavaScript afterwards. |
This seems to be the sorting part: |
ISO-Code DB: https://github.com/sokil/php-isocodes-db-i18n TYPO3 Core implementation (Data is generated from "Build/Scripts/updateIsoDatabase.php") https://github.com/TYPO3/typo3/blob/f5e53a75c39f85a49490af99bec73b6032f9bebc/typo3/sysext/core/Classes/Localization/OfficialLanguages.php#L23 Old variant of this: https://github.com/TYPO3-Documentation/typo3-docs-typo3-org-resources/blob/master/webroot/services/ajaxversions.php URL example: https://docs.typo3.org/services/ajaxversions.php?url=https://docs.typo3.org/m/typo3/tutorial-getting-started/12.4/en-us/Concepts/Index.html References TYPO3-Documentation/render-guides#358
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! :-) |
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 ;) |
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
.The text was updated successfully, but these errors were encountered: