Bug 441984

Summary: Re implement KPluralHandlingSpinBox
Product: [Frameworks and Libraries] frameworks-ktextwidgets Reporter: Safa Alfulaij <safa1996alfulaij>
Component: generalAssignee: Laurent Montel <montel>
Status: REPORTED ---    
Severity: wishlist CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Spinbox showing different Arabic forms, properly localized

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