Bug 127756 - Tip of the day: hyperlink to online help page ignores current localisation
Summary: Tip of the day: hyperlink to online help page ignores current localisation
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
6.3.0.4 release
Hardware: All Windows (All)
: medium normal
Assignee: Heiko Tietze
URL:
Whiteboard: target:6.4.0
Keywords:
: 128539 (view as bug list)
Depends on:
Blocks: Tip-Of-The-Day
  Show dependency treegraph
 
Reported: 2019-09-25 10:01 UTC by TeeLittle
Modified: 2019-11-02 08:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot with MouseOver display of linked documentation URL (13.16 KB, image/png)
2019-09-25 10:03 UTC, TeeLittle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description TeeLittle 2019-09-25 10:01:43 UTC
Description:
On startup of LibreOffice, you are presented with a "Tip of the Day" (TotD). Sometimes, there is an additional link below pointing to the online documentation. 

Today, I get aware of a TotD that links to an English help page, while my installation is German (and so is the TodT). 
I checked for existence of a German translation of the help page, and yes, there is one (same URL but the localisation path). 

Currently, I cannot state if this is a general issue with TotD or only affects certain single TotD's. 

The TotD I saw today (and that exposes the issue) is the following: 
"You can automatically mark alphabetical index entries using a concordance file."
(found this in https://gerrit.libreoffice.org/#/c/69498/37/cui/inc/tipoftheday.hrc )

Not completelty understanding the translation and URL data storage format, I assume there is a separate data set for each language of each TotD, including the documentation link for that language?? ((based on reading https://design.blog.documentfoundation.org/2019/06/26/how-to-create-a-new-dialog/ ) 


Would it be possible just define one (English) base documentation link per TotD, and then have the localisation part of the URL (".../en-US/...") automatically substituted according to the currently chosen UI language? 

Steps to Reproduce:
Preconditions: 
a) You have "Present Tip of the day on Startup" activated 
   (German: "Extras > Optionen > LibreOffice > Allgemein"; 
    English: "Tools > Options > LibreOffice > General") 
b) Your UI language is other than English 
   ("Tools > Options > Language Settings > Languages" 
    - Language of... User Interface)

1. Open LibreOffice for the first time on that day  
2. See the "Tip of the Day" (if there is no link at the end reading "more info", then try again tomorrow...) 
3. Hover over the "more info" link to see the linked URL 
4. that URL contains a localisation part ("de-DE" or "en-US" etc.) 
5. notice mismatch between UI language and TotD localisation 
6. have it confirmed by clicking the link and being presented the English help page 


Actual Results:
When you see the "Tip of the Day" and click on the "more info" link, you'll see the online documentation in English instead of your UI language. 

Expected Results:
the online documentation page's language should match the UI language of your LibreOffice installation. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.4 (x64)
Build-ID: 057fc023c990d676a43019934386b85b21a9ee99
CPU-Threads: 12; BS: Windows 6.1; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL
Comment 1 TeeLittle 2019-09-25 10:03:32 UTC
Created attachment 154475 [details]
Screenshot with MouseOver display of linked documentation URL
Comment 2 Roman Kuznetsov 2019-09-25 13:53:13 UTC
do not confirm for Russian in

Версия: 6.4.0.0.alpha0+ (x86)
ID сборки: 1485bcc796dd8bd53762368ec4a1345ddb7cda72
Потоков ЦП: 4; ОС:Windows 6.1; Отрисовка ИП: по умолчанию; VCL: win; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2019-09-02_10:30:21
Локаль: ru-RU (ru_RU); Язык интерфейса: ru-RU
Calc: threaded

but I see that many pages in the Help just didn't translate to Russian...
Comment 3 Xisco Faulí 2019-09-25 15:13:46 UTC
I suppose it defaults to english if no traslation is found
Comment 4 Heiko Tietze 2019-09-25 15:33:17 UTC
The links are all defined as /en-US/, my fault. The actual file is here [1] with some comments on top.

I prepared a patch [2] that replaces en-US by %LANGUAGENAME (like done at other places) but replacing this with "de" or "de-DE" is tricky since the help has no clear structure. For example, we have en-US and en-GB but pt-BR and pt. The only feasible solution is to hard code a mapping but first I'd like to check again how the internal help works.

[1] https://opengrok.libreoffice.org/xref/core/cui/inc/tipoftheday.hrc
[2] https://gerrit.libreoffice.org/#/c/79564/
Comment 5 Commit Notification 2019-10-01 08:57:58 UTC
Heiko Tietze committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/78c6b79f2a05eb92f41037fd20c6579a0a644c47

Resolves tdf#127756 - Tip of the day not localized

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Roman Kuznetsov 2019-11-02 08:26:52 UTC
*** Bug 128539 has been marked as a duplicate of this bug. ***