-
Notifications
You must be signed in to change notification settings - Fork 137
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
Extension xhtml ignored by Google translate #153
Comments
The toolchain is Docbook 4 -> XHTML Transitional. Switching to Docbook 5 -> HTML would be a huge amount of work. I do not know what happens these days if we simply rename .xhtml -> .html as I have barely touched this in a decade. If you're confident that it would be benign on all the major browsers and platforms we could try that, although would also have to establish redirects. |
I'll setup a test folder with .html inside and see how that goes. |
This looks to work as expected: https://registry.khronos.org/OpenGL-Refpages/gl4/html_test/ Only significant change was to modify the <script src=/> tag to <script src=""></script>, otherwise seems to work well. |
https://registry.khronos.org/OpenGL-Refpages/gl4/html_test/ |
Отлично, спасибо, что помогли нам решить эту проблему. |
@oddhack Changing to .html fixed the issue. If we have any other areas that are only .xhtml, it might be worth setting up similar. In the meantime, what is the best way to make the new .html extension files the permanent go-to for the OpenGL 4 RefPages? |
All the various versions of GL refpages and the EGL refpages use the same toolchain. I will need to understand exactly what you did aside from file renaming and the script tag and replicate that in the Makefiles, then setup redirects for .xhtml -> .html and change the index generation scripts. |
No other changes were required apart from modifying the script tag, renaming .xhtml to .html and updating all the links in all the files to point to .html instead of .xhtml. AFAIK once the Makefiles are updated from xhtml to html, <script/> and other various tags should automatically be rendered as <script></script> and ?
|
"Automatically" in the sense of needing to run a script over the output .xhtml document. There is no way to generate HTML5 output from Docbook 4 source, which predates HTML5 and is obsolete, but maybe this will patch around it. Did you happen to run an HTML5 validator over the test directory? This might be good motivation to finally convert the refpage source to asciidoc markup. |
No, a little nervous of the output... but I will today. |
I have the impression that non-valid HTML is likely to downrank search results on that page. Right now generally the right thing happens when you put in a GL entry point, the top result is likely to be the XHTML refpage which in turn is probably valid XHTML because it comes from the Docbook toolchain. If we convert it to HTML5 by postprocessing but it's not valid HTML5, that might change. |
There are some issues with the current xhtml pages and some general issues from converting:
Test page with changes applied, and will validate Green: https://registry.khronos.org/OpenGL-Refpages/gl4/html_test/glBindFragDataLocationIndexed.html Randomly picking a different page and applying the same changes resulted also in properly validation. |
TBH I would rather work on an asciidoc conversion. Postprocessing XHTML to HTML 5 looks really fragile / heuristic and I think the time will be better spent on a more modern toolchain though it will not be an instant fix. I'm sorry for the person reporting the translation problem as this will not immediately solve their problem. BTW if you write comments with HTML tags in github (or gitlab), the tags are prone to disappearing in the web view - a lot of your comment above suffers this. Compare (self-closing 'col' tag, which does not render) with
Comments are treated as Github-Flavored Markdown and the brackets are specially treated. Extremely annoying. |
A Russian speaker has discovered that the .xhtml cannot be translated by Google Translate. For example, this .html page translated fine:
https://registry-khronos-org.translate.goog/OpenGL-Refpages/gl4/?_x_tr_sl=en&_x_tr_tl=ru
This page does not:
https://registry-khronos-org.translate.goog/OpenGL-Refpages/gl4/html/all.xhtml?_x_tr_sl=en&_x_tr_tl=ru
Instead, getting redirected to:
https://registry-khronos-org.translate.goog/OpenGL-Refpages/gl4/html/all.xhtml
Changing the extension to just .html and the page then translates without any issues. I could imagine there are others that are having translation issues on our ref pages.
Is there anything that can be done to fix this issue?
The text was updated successfully, but these errors were encountered: