Bug 376438 - Several i18n and RTL-layout issues
Summary: Several i18n and RTL-layout issues
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Usability-i18n (show other bugs)
Version: 7.5.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords: rtl
Depends on:
Blocks:
 
Reported: 2017-02-13 11:03 UTC by Safa Alfulaij
Modified: 2022-01-13 04:31 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Safa Alfulaij 2017-02-13 11:03:05 UTC
I found out several i18n issues, I'm not sure what is the best way to solve them, that's why I didn't post a PR directly.
I'll keep adding issues if I found more.

1. https://cgit.kde.org/digikam.git/tree/utilities/assistants/firstrun/welcomepage.cpp#n55
This line breaks the i18n function, as it can't get the localized version for Linux (it does not exist!).
2. Plural: https://cgit.kde.org/digikam.git/tree/utilities/geolocation/editor/correlator/gpscorrelatorwidget.cpp#n601
3. Plural: https://cgit.kde.org/digikam.git/tree/utilities/geolocation/editor/reversegeocoding/rgwidget.cpp#n942
4. https://cgit.kde.org/digikam.git/tree/data/about/main.html#n55
The picture metadata are not translatable.
5. I think the order of placeholders are swapped here: https://cgit.kde.org/digikam.git/tree/app/main/digikamapp.cpp#n1580
and maybe here as well: https://cgit.kde.org/digikam.git/tree/utilities/importui/main/importui.cpp#n2362

Now there are several RTL layout issues:
1. The welcome page view doesn't support RTL layout. I think adding dir="%1" in html tag of digikam/about/main.html, and then replace it with "rtl" for RTL layouts and "ltr" for LTR layouts in https://cgit.kde.org/digikam.git/tree/app/views/welcomepageview.cpp#n179 will solve it.
CSS file is fine.
2. Tooltips that appears when hovering icons in views aren't in RTL layout. Screenshot: http://i.imgur.com/v3FWGGB.png
3. LTR text in panes are left-aligned, which is not good at all. Screenshot: http://i.imgur.com/RBZbkpS.png
The rating stars are left-aligned as well. Pure numbers are left-aligned. Same goes for the tooltips.
4. Last for now is the splash screen. The most important problem is the overlapping text (status and version). If the splash screen could be mirrored it will be really good (not important for now, but should be ignored).
Screenshot: http://i.imgur.com/fx0Mi7n.png
The slogan shouldn't be right-aligned unless the whole layout is RTL, as it will look very wired.
Comment 1 caulier.gilles 2017-02-13 19:56:33 UTC
Git commit 0b47db718258add4058584cbeb056bea3d0aadf6 by Gilles Caulier.
Committed on 13/02/2017 at 19:55.
Pushed by cgilles into branch 'master'.

point 1/ fixed

M  +34   -31   utilities/assistants/firstrun/welcomepage.cpp
M  +1    -1    utilities/assistants/firstrun/welcomepage.h

https://commits.kde.org/digikam/0b47db718258add4058584cbeb056bea3d0aadf6
Comment 3 caulier.gilles 2021-12-30 22:35:49 UTC
Safa,

Hi and happy new year

Please take attention to this bugzilla entry where we apply plenty of fixes to improve i18n in digiKam :

https://bugs.kde.org/show_bug.cgi?id=438701

And please, make a try of digiKam 7.5.0 pre-release installer for Windows available here:

https://files.kde.org/digikam/

A feedback to see if RTL support in digiKam 7.5.0 have been improved will be appreciate.

Thanks in advance

Gilles Caulier
Comment 4 caulier.gilles 2021-12-31 14:51:45 UTC
Point 2/ : comment from source code : "no need for i18np here, because the case of correlationTotalCount == 1 is covered in the other two cases." ==> No fix is required...
Comment 5 caulier.gilles 2021-12-31 15:03:48 UTC
Git commit d65063ef33134f90895fc0ddafd686f4b531551e by Gilles Caulier.
Committed on 31/12/2021 at 15:02.
Pushed by cgilles into branch 'master'.

Fix point 3/ about non plurial case

M  +15   -4    core/utilities/geolocation/geoiface/reversegeocoding/rgwidget.cpp

https://invent.kde.org/graphics/digikam/commit/d65063ef33134f90895fc0ddafd686f4b531551e
Comment 6 caulier.gilles 2021-12-31 15:08:19 UTC
Point 4: the Welcome page image properties strings are non translatable because it's hard coded in HTML code. Solution : port the welcome page view to pure Qt code, not using QtWebkit/QtWebEngine. Advantage : this will drop one part of digiKam code depending of QtWebKit or QtWebEngine ==> maintenance of code will be more easy.
Comment 7 caulier.gilles 2021-12-31 15:13:59 UTC
Maik,

If I'm not too wrong, point 5/ do not require plural handling in source code as a top level condition only call this code for more than one item. Right ?

Gilles
Comment 8 Maik Qualmann 2021-12-31 16:04:18 UTC
Hi Gilles, Yes, I agree with you, at least 2 must be selected for this text to be displayed, item(s) is correct here.

Maik
Comment 9 caulier.gilles 2021-12-31 16:10:50 UTC
Ok. So :

Point 5/ : INVALID.

Gilles
Comment 10 Safa Alfulaij 2021-12-31 18:16:38 UTC
Hi all.
Happy new year!

Thanks for checking this.
Regarding points 2 and 5, I'd reference this section of the tutorial here:
https://techbase.kde.org/Development/Tutorials/Localization/i18n#Plurals

Even if the string is displayed for 1+ numbers, and English and many European countries doesn't have more than 1 plural form for that case (that's the "many" form), many other languages have different forms to say 2 images or 14 images or 23 images, etc.
You can check the list of language plural forms here:
http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html
And check the languages that have more than 2 conditions.

Thanks!
Comment 11 caulier.gilles 2021-12-31 18:58:19 UTC
Safa,

Do you mean that we needs for these cases to use plural forms in source code ?

Best

Gilles
Comment 12 Safa Alfulaij 2021-12-31 19:10:13 UTC
Yes, the points I raised needs to be plural, 2 and 5 included.
Comment 13 caulier.gilles 2022-01-09 10:03:43 UTC
Git commit 1ce54dec5db0612dbfe99f4f375e910a1d9ce49a by Gilles Caulier.
Committed on 09/01/2022 at 10:01.
Pushed by cgilles into branch 'master'.

add missing i18n from Welcome page view, Background image section

M  +7    -1    core/app/views/stack/welcomepageview.cpp
M  +5    -5    core/data/about/main.html

https://invent.kde.org/graphics/digikam/commit/1ce54dec5db0612dbfe99f4f375e910a1d9ce49a
Comment 14 caulier.gilles 2022-01-09 10:05:48 UTC
4. https://cgit.kde.org/digikam.git/tree/data/about/main.html#n55
The picture metadata are not translatable. 

==> fixed with my last commit.
Comment 15 caulier.gilles 2022-01-09 10:15:08 UTC
Git commit ed900e592e1582984cf8c39f87891176850627bc by Gilles Caulier.
Committed on 09/01/2022 at 10:13.
Pushed by cgilles into branch 'master'.

Fix i18np (point #2)

M  +12   -5    core/utilities/geolocation/geoiface/correlator/gpscorrelatorwidget.cpp

https://invent.kde.org/graphics/digikam/commit/ed900e592e1582984cf8c39f87891176850627bc
Comment 16 caulier.gilles 2022-01-09 10:26:59 UTC
Git commit 5ed1ca11742f357f411ec93a2ccacb7b7fbb44ed by Gilles Caulier.
Committed on 09/01/2022 at 10:26.
Pushed by cgilles into branch 'master'.

fix i18np (point #5)

M  +46   -34   core/app/main/digikamapp.cpp

https://invent.kde.org/graphics/digikam/commit/5ed1ca11742f357f411ec93a2ccacb7b7fbb44ed
Comment 17 caulier.gilles 2022-01-09 10:33:21 UTC
All i18n point are now fixed in source code.

Still RTL layout issues, point 1/ to 4/

Gilles Caulier
Comment 18 caulier.gilles 2022-01-09 10:52:48 UTC
Git commit cfe78b294de58667f70c6e0b8d10259d36be2ed7 by Gilles Caulier.
Committed on 09/01/2022 at 10:51.
Pushed by cgilles into branch 'master'.

Fix RTL support (point #1)

M  +3    -1    core/app/views/stack/welcomepageview.cpp
M  +14   -14   core/data/about/main.html

https://invent.kde.org/graphics/digikam/commit/cfe78b294de58667f70c6e0b8d10259d36be2ed7
Comment 19 caulier.gilles 2022-01-09 12:42:15 UTC
Git commit dcd896822efe8da630533e80f13f3bfb0340e177 by Gilles Caulier.
Committed on 09/01/2022 at 12:40.
Pushed by cgilles into branch 'master'.

fix LTR (point #4)

M  +6    -11   core/libs/dialogs/dsplashscreen.cpp
M  +0    -1    core/libs/dialogs/dsplashscreen.h

https://invent.kde.org/graphics/digikam/commit/dcd896822efe8da630533e80f13f3bfb0340e177
Comment 20 caulier.gilles 2022-01-10 09:25:46 UTC
Git commit ebc2a0b6acfdde98ab114839f6da5f58b363cb2c by Gilles Caulier.
Committed on 10/01/2022 at 09:21.
Pushed by cgilles into branch 'master'.

fix LTR (point #3)

M  +9    -1    core/libs/properties/itempropertiestab.cpp
M  +22   -3    core/libs/properties/itempropertiestxtlabel.cpp
M  +9    -1    core/utilities/searchwindow/choicesearchutilities.cpp
M  +20   -2    core/utilities/searchwindow/searchtabheader.cpp

https://invent.kde.org/graphics/digikam/commit/ebc2a0b6acfdde98ab114839f6da5f58b363cb2c
Comment 21 caulier.gilles 2022-01-10 10:06:27 UTC
Git commit 81da1575e1407698e5cd4d28b7c444627877fb6d by Gilles Caulier.
Committed on 10/01/2022 at 09:53.
Pushed by cgilles into branch 'master'.

fix LTR (point #2)
FIXED-IN: 7.5.0

M  +46   -10   core/libs/widgets/itemview/ditemtooltip.cpp

https://invent.kde.org/graphics/digikam/commit/81da1575e1407698e5cd4d28b7c444627877fb6d
Comment 22 caulier.gilles 2022-01-13 04:27:22 UTC
Git commit a2c94122536bc1636742cd2cedf2bc24fc1ee5b7 by Gilles Caulier.
Committed on 13/01/2022 at 04:26.
Pushed by cgilles into branch 'master'.

Fix i18np args verified with krazy

M  +1    -1    core/utilities/geolocation/geoiface/correlator/gpscorrelatorwidget.cpp

https://invent.kde.org/graphics/digikam/commit/a2c94122536bc1636742cd2cedf2bc24fc1ee5b7
Comment 23 caulier.gilles 2022-01-13 04:31:25 UTC
Git commit bf0e0a23212e182f8e8ab111398994977327fe01 by Gilles Caulier.
Committed on 13/01/2022 at 04:30.
Pushed by cgilles into branch 'master'.

Fix i18np args verified with krazy

M  +5    -5    core/app/main/digikamapp.cpp

https://invent.kde.org/graphics/digikam/commit/bf0e0a23212e182f8e8ab111398994977327fe01