Bug 438232 - Krita's F1 link (Menu>Help>Krita Handbook) always points to English documentation URL under any locale
Summary: Krita's F1 link (Menu>Help>Krita Handbook) always points to English documenta...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 4.4.5
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-08 02:47 UTC by Tyson Tan
Modified: 2021-07-11 07:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tyson Tan 2021-06-08 02:47:49 UTC
Currently in Krita, by pressing F1 or via Menu -> Help -> Krita Handbook, Krita will open a link to https://docs.krita.org/ . But the website doesn't auto-detect browser language, it will always display an English landing page. As a result, many people don't even know Krita's document has translated versions.

I suggest we either make the URL of that link translatable, so the localization teams can set it to something like: https://docs.krita.org/zh_CN/ , or we somehow make the website auto-detect browser language.

The string of "Krita Handbook" is at
#: krita/kritamenu.action:1756
Comment 1 Tyson Tan 2021-06-24 09:42:58 UTC
Or, we can make Krita open a link corresponding to the current locale it's using.
Comment 2 Alvin Wong 2021-06-24 15:01:44 UTC
@wolthera Do you know how the docs site is redirecting to the per-language pages? If I try to load https://docs.krita.org/user_manual/getting_started.html, it seems to always redirect to https://docs.krita.org/en/user_manual/getting_started.html, ignoring the `accept-language` header from the web browser.
Comment 3 Alvin Wong 2021-07-08 15:45:55 UTC
Let's consider this first: Do we want to change it from Krita or on the server side?

I feel that it is worth changing it on the server side. If users visit docs.krita.org directly the best UX would be to have it respect the Accept-Language header and automatically redirect to the user's preferred language. If we can implement proper redirection for the root path, then surely it makes sense to apply the same redirection for the other paths. Then we can proceed to remove the `en/` part from all the untranslated docs.krita.org paths from within Krita.

However, I have no idea where to even start looking to implement this. Does this need a sysadmin ticket first?
Comment 4 wolthera 2021-07-09 11:15:14 UTC
This needs a sysadmin ticket... because it proly relates to the htaccess file, and we have several issues with that file...

https://forums.mobirise.com/discussion/12237/automatic-language-redirect-with-htaccess
Comment 5 Alvin Wong 2021-07-09 13:22:03 UTC
Mind that parsing the Accept-Language header properly and selecting the best language match is a tricky business, especially when it comes to languages with regional and script variants, specifically for Chinese. (We only have zh_CN docs for now, but a zh_TW version is on my list, and that will need to handle more exotic codes like zh-HK, zh-Hant-TW, etc.)

I don't think .htaccess has enough power to do that. We might need to forward it to be handled by a PHP script...
Comment 6 Tyson Tan 2021-07-11 07:33:19 UTC
With the help from Ben Cooksley, the redirection issue has been fixed:
https://phabricator.kde.org/T14693