Bug 166353 - Module navigation links point to English pages in some cases (with offline installations en-US might not exist)
Summary: Module navigation links point to English pages in some cases (with offline in...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium normal
Assignee: Buovjaga
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-26 10:51 UTC by Eyal Rozenberg
Modified: 2025-05-26 13:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Testing two documentation errors in two versions of LO (588.88 KB, application/vnd.oasis.opendocument.text)
2025-05-15 12:16 UTC, testerJ0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2025-04-26 10:51:05 UTC
(Filed on behalf of Guest48 on our QA IRC channel)

Reproduction instructions:
1. Downlond and install 

   LibreOffice_25.2.2_Win_x86-64.msi
   LibreOffice_25.2.2_Win_x86-64_helppack_nb.msi

   only!
2. Select Hjelp F1  in the Hjelp (Help) menu
3. Select the Writer module

Expected results:

Step (3.) gets you help on Writer in Norwegian

Actual results:

Step (2.) is fine, you get:

file:///C:/Program%20Files/LibreOffice/help/nb/text/shared/05/new_help.html?System=WIN&DbPAR=WRITER&HID=.uno:HelpIndex#bm_id3806162

which is Norwegian. But step (3.) gets you:

File not found
Firefox can’t find the file at 
/C:/Program Files/LibreOffice/help/en-US/text/swriter/main0000.html?DbPAR=WRITER.

This is correct, there is no en-US version of the helppack, only Norwegian = nb

correcting the search in Firefox gives correct result

file:///C:/Program%20Files/LibreOffice/help/nb/text/swriter/main0000.html?DbPAR=WRITER

The reporting user asked whether we properly test the validity of help packs,such as the Norwegian one before release?
Comment 1 Buovjaga 2025-04-26 11:08:49 UTC
Nothing to do with Norwegian as such.

See at the end of https://help.libreoffice.org/latest/help2.js
const lang = existingLang(getParameterByName("Language", href) || navigator.language);

So if we don't have Language set as an URL parameter or we don't use a localised web browser, we will fall back to en-US.

Maybe we should check the lang attribute of the html element as a fallback before defaulting to en-US?
Comment 2 Eyal Rozenberg 2025-04-26 14:08:03 UTC
(In reply to Buovjaga from comment #1)
> Maybe we should check the lang attribute of the html element as a fallback
> before defaulting to en-US?

That is not for me to say, but - if we entertain the possibility of an en-US fallback, that means that that fallback must _exist_. So either we ensure it exists (e.g. package dependencies?) or we avoid the fallback when it's not available. That's what my intuition says.
Comment 3 testerJ0 2025-05-15 12:16:26 UTC
Created attachment 200827 [details]
Testing two documentation errors in two versions of LO
Comment 4 testerJ0 2025-05-15 12:25:04 UTC
I have retested the access to the local Norwegian Help with two LO versions. First with a separate installation of 25.2.3.2 that now works OK. 

Surprisingly also the previously negative version 25.2.2.2 unchanged works now in looking up the correct Norwegian Help system. 

How is that possible? Two days ago it didn't work.

see pages 1 and 2 in prev. attachment.

===============================

The second reported error of the missing web version of the Norwegian Help system is still unfixed. (Hjelp menu -> Brukerveiledninger 
             “The page you look for does not exist.”
             https://documentation.libreoffice.org/nb/)
- There is a functioning html version for the local installation. Would it be difficult to install it on the documentation page?

I am learning the usage of Bugzilla, so the attachment and the report are two separate comments.
Comment 5 Buovjaga 2025-05-16 11:01:12 UTC
(In reply to testerJ0 from comment #4)
> I have retested the access to the local Norwegian Help with two LO versions.
> First with a separate installation of 25.2.3.2 that now works OK. 
> 
> Surprisingly also the previously negative version 25.2.2.2 unchanged works
> now in looking up the correct Norwegian Help system. 
> 
> How is that possible? Two days ago it didn't work.

The problem remains, no matter if it happens to somehow work for you in some circumstance.
Comment 6 testerJ0 2025-05-16 11:39:26 UTC
My two comments from 2025-05-15 are unfortunately invalid. The errors persist in the fresh version and the stable version.

How can I remove them my two previous comments?
-----------------------------------------------
Comment 7 Buovjaga 2025-05-16 12:22:14 UTC
(In reply to testerJ0 from comment #6)
> My two comments from 2025-05-15 are unfortunately invalid. The errors
> persist in the fresh version and the stable version.
> 
> How can I remove them my two previous comments?
> -----------------------------------------------

You can't remove them and there is no need to.
Comment 8 Commit Notification 2025-05-26 13:27:14 UTC
Ilmari Lauhakangas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/af2f7973d5fc5bbf5cd99cc02a450783d34096ea

tdf#166353 Simplify getting current language, don't use en-US fallback