Bug 441984 - Re implement KPluralHandlingSpinBox
Summary: Re implement KPluralHandlingSpinBox
Status: REPORTED
Alias: None
Product: frameworks-ktextwidgets
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-04 09:09 UTC by Safa Alfulaij
Modified: 2021-09-08 21:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Spinbox showing different Arabic forms, properly localized (66.62 KB, image/png)
2021-09-04 09:09 UTC, Safa Alfulaij
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Safa Alfulaij 2021-09-04 09:09:29 UTC
Created attachment 141285 [details]
Spinbox showing different Arabic forms, properly localized

SUMMARY
KPluralHandlingSpinBox currently supports having different plural suffix. This is good, but is not perfect.
Some languages need also to change the prefix, and some forms in languages should hide the placeholder.
Please check this: https://marc.info/?t=142079213200001&r=1&w=4

WHAT WE NEED
We need a way for translators to translate the prefix, number and suffix of the spinbox as any other localizable text.
Attached how the spinbox should show, with the PyQt snippet I used.

(finally reported after 6 years...)
Comment 1 Laurent Montel 2021-09-05 07:10:09 UTC
Hi,

"void KPluralHandlingSpinBox::setSuffix(const KLocalizedString &suffix)"
each translators can translate it.
Ok for the moment it's only suffix, I think it's the problem here no ?

Some language removes prefix ?
Comment 2 Safa Alfulaij 2021-09-05 18:27:23 UTC
Yes. As you see in the snapshot, Arabic shouldn't use the placeholder in the first three forms.
(We write "No books", "One book", "Two books")
I also think that some languages change the prefix (if exists)
For example:
- There is 1 book
- There are 5 books