Bug 146472 - Missing page count in Go to Page dialog for some locales
Summary: Missing page count in Go to Page dialog for some locales
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.3.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.4.0 target:7.2.6 target:7.3.0.2
Keywords: bibisectRequest, regression
Depends on:
Blocks:
 
Reported: 2021-12-29 13:24 UTC by Stanislav Horacek
Modified: 2022-01-01 19:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
go_to_page_dialog_in_bg_locale (6.80 KB, image/png)
2021-12-29 13:24 UTC, Stanislav Horacek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislav Horacek 2021-12-29 13:24:23 UTC
Created attachment 177190 [details]
go_to_page_dialog_in_bg_locale

In a new Writer document, choose Edit - Go to Page.

If UI language is set to Czech (cs), Slovak (sk) or Bulgarian (bg), the dialog shows e.g. "Stránka 1 z $1" instead of "Stránka 1 z 1" - placeholder "$1" is not replaced by page count.

For other tested locales (en, de, eo, ru, sl, hr), it works as expected.

Tested in 7.2.3.2 and in current 7.4.0.0.alpha0+, Build ID: 22dd44f479fe9b3c34b03ae55177c7b66170e41b
Comment 1 Julien Nabet 2021-12-30 18:10:09 UTC
On pc Debian with master sources updated today, I could reproduce this (at least with Czech language).
Comment 2 Julien Nabet 2021-12-30 18:26:58 UTC
I put some debug in SwGotoPageDlg ctr sw/source/uibase/utlui/gotodlg.cxx and noticed this:
a) In Czech I got:
"z $_1" before and after replacement
b) In French I got:
"_de $1" before replacement
"_de 1" after replacement

see https://opengrok.libreoffice.org/xref/core/sw/source/uibase/utlui/gotodlg.cxx?r=29489b33#42

More weirdly, if I change translation and put "u $1"
I got:
"_u $1" before replacement
"_u 1" after replacement

Just wonder where the "_" does come from and why its location change.

Caolán: thought you might be interested in this one.
Comment 3 Julien Nabet 2021-12-30 18:33:08 UTC
Ok I think it's the automatic process of shortcut addings.

"z" is already used for shortcut _Cancel/zruší.
Comment 4 Julien Nabet 2021-12-30 18:35:56 UTC
The simplest way to fix this is to prevent the generation of a shortcut for "z %1" since it's useless. I suppose there must a way to do it.
Comment 5 Julien Nabet 2021-12-30 18:49:22 UTC
BTW, I don't reproduce this with gen rendering but can reproduce this with gtk3 or kf5 ones.
Comment 6 Julien Nabet 2021-12-30 20:33:15 UTC
I gave a try with this:
https://gerrit.libreoffice.org/c/core/+/127790
Comment 7 Commit Notification 2021-12-31 11:09:04 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22a9faa36057b96b8478f7a1f990762fa78f3d26

tdf#146472: Missing page count in Go to Page dialog for some locales

It will be available in 7.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 8 Commit Notification 2021-12-31 12:22:48 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/ff68d7d5f5a29c7bd2016914d43628d11015eb5e

tdf#146472: Missing page count in Go to Page dialog for some locales

It will be available in 7.2.6.

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 9 Julien Nabet 2021-12-31 13:44:02 UTC
Patch for 7.3 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/127768
Comment 10 Commit Notification 2021-12-31 15:16:42 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/df00367b8fe5d6b495c8e568f1ec732992e86d07

tdf#146472: Missing page count in Go to Page dialog for some locales

It will be available in 7.3.0.2.

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 11 Stanislav Horacek 2022-01-01 19:05:21 UTC
I can confirm that the page count is now shown correctly in the latest master (Build ID: 102a29d59a0a195ee42a52d5563adf99fa32a541).

Thanks a lot for investigating this and for the quick fix!