Bug 114622 - add static list of available Native Numbering entries, for example Persian / Arabic-Indic / Hindi numbers
Summary: add static list of available Native Numbering entries, for example Persian / ...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Suhail Alkowaileet
URL:
Whiteboard: target:6.1.0
Keywords: easyHack, skillCpp
Depends on:
Blocks: Numbering-Formats
  Show dependency treegraph
 
Reported: 2017-12-21 07:26 UTC by Fahad Al-Saidi
Modified: 2020-11-24 19:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
no Hindi number format even CTL is enabled (193.60 KB, image/png)
2017-12-21 08:05 UTC, Fahad Al-Saidi
Details
My screenshot with CTL-enabled numbering types shown (51.20 KB, image/png)
2017-12-21 09:01 UTC, Mike Kaganski
Details
the setting, CTL enabled (194.54 KB, image/png)
2017-12-21 09:17 UTC, Fahad Al-Saidi
Details
Native Numbering not working (216.63 KB, image/png)
2017-12-21 10:06 UTC, Fahad Al-Saidi
Details
Add Numbering entries in Arabic, Presian & Hindi patch (4.87 KB, patch)
2017-12-24 03:50 UTC, Suhail Alkowaileet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fahad Al-Saidi 2017-12-21 07:26:43 UTC
Please add Persian / Arabic-Indic / Hindi numbers in Number formats so that if you want to change the page number function to Hindi number you don't need to change every number to Hindi.

here is a request for this:
https://askubuntu.com/questions/282981/how-to-set-libreoffice-to-use-persian-arabic-indic-hindi-page-numbers


Thanks
Comment 1 Mike Kaganski 2017-12-21 07:54:27 UTC
I suppose that the problem is that the page number insertion feature in Impress (Insert->Page Number...->Slide Number checkbox) does not honor the setting in Slide->Slide Properties...->Page tab->Layout Settings group->Page numbers. There one can choose the required number format (including Persian / Arabic-Indic / Hindi, if CTL is enabled in Options->Language Settings->Languages), but the Header and Footer dialog (that opens for Insert->Page Number...) unconditionally uses Arabic numerals.
Comment 2 Fahad Al-Saidi 2017-12-21 08:05:12 UTC
Created attachment 138561 [details]
no Hindi number format even CTL is enabled
Comment 3 Fahad Al-Saidi 2017-12-21 08:05:25 UTC
(In reply to Mike Kaganski from comment #1)
There one can choose the required number format (including Persian
> / Arabic-Indic / Hindi, if CTL is enabled in Options->Language
> Settings->Languages)

The Persian / Arabic-Indic / Hind doesn't show in number format list although I CTL is enabled !!
Comment 4 Mike Kaganski 2017-12-21 09:01:08 UTC
Created attachment 138562 [details]
My screenshot with CTL-enabled numbering types shown

Hmm... you mentioned Writer in Component; I have ignored it accidentally (judged on the link mentioned in comment 0).

The screenshot you've provided doesn't show your settings. Only the result. No traces of other relevant information, like OS, Window Manager, installed components etc. Btw, version should be mentioned in text, too, not only in the metadata field, because version in metadata may change later to a different value based on triage.
Comment 5 Fahad Al-Saidi 2017-12-21 09:17:11 UTC
Created attachment 138563 [details]
the setting, CTL enabled

@ Mike Kaganski sorry for not attached the screen shot for the setting, here we go.

It doesn't matter for if it is for writer or impress or even calc. It is common between libreoffice components.

OS: kde neon based on ubuntu 16.04. version 5.4.3.

One thing Arabic numbers such as 1,2,3...10 is different from Arabic-Indic / Hindi numbers such as ١,٢,٣,٤ 

Even in your system, it is shown Arabic number format.
Comment 6 Mike Kaganski 2017-12-21 09:35:14 UTC
OK: when I select "Native numbering" on page settings, and my locale is "Arabic (Oman)", it works for me...
Comment 7 Fahad Al-Saidi 2017-12-21 10:06:05 UTC
Created attachment 138564 [details]
Native Numbering not working

>OK: when I select "Native numbering" on page settings, and my locale is "Arabic
>(Oman)", it works for me...

It dosen't work for me, I have to go to tools-> options -> languages settings -> complex text layout
general options set it to Eastman Arabic.

However,the Persian / Arabic-Indic / Hindi numbers formats should be included the same as Roman, Russian, Abjad.
Comment 8 Mike Kaganski 2017-12-21 10:21:42 UTC
(In reply to Fahad Al-Saidi from comment #7)
> Created attachment 138564 [details]
> Native Numbering not working
> 
> >OK: when I select "Native numbering" on page settings, and my locale is "Arabic
> >(Oman)", it works for me...
> 
> It dosen't work for me, I have to go to tools-> options -> languages
> settings -> complex text layout
> general options set it to Eastman Arabic.

You don't read. I said: *and my locale is "Arabic (Oman)"*

> However,the Persian / Arabic-Indic / Hindi numbers formats should be
> included the same as Roman, Russian, Abjad.

Maybe (I suppose you are right); that needs the correct definition of the numbering schemes for them here (not everyone knows what "Persian / Arabic-Indic / Hindi numbers" is).
Comment 9 Fahad Al-Saidi 2017-12-21 10:39:19 UTC
>You don't read. I said: *and my locale is "Arabic (Oman)"*

so you suggest to change my system locale to Arabic (Oman) to fix this? 

>that needs the correct definition of the numbering schemes for them here (not everyone knows what "Persian / Arabic-Indic / Hindi numbers" is).

As a start, Wikipeida can help here, see
https://en.wikipedia.org/wiki/Eastern_Arabic_numerals

for more official doc see this unicode pdf:

http://www.unicode.org/charts/PDF/U0600.pdf
Comment 10 Mike Kaganski 2017-12-21 10:44:11 UTC
(In reply to Fahad Al-Saidi from comment #9)
> so you suggest to change my system locale to Arabic (Oman) to fix this? 

No. I just help you to create a more useful report, and reply to your "It doesn't work for me" in response to specific steps I posted. If it truly doesn't work for you, that's another issue, which needs different solution ("Native numbering" doesn't respect locale setting). If it works, then it's an enhancement request to add numbering schemes to list.
Comment 11 Fahad Al-Saidi 2017-12-21 10:48:26 UTC
As I said before, it doesn't work for me, I mean here your specific steps  you posted. See my last screen shot which its name "Native Numbering not working".
Comment 12 Mike Kaganski 2017-12-21 10:52:20 UTC
Personally I feel it a valid enhancement, I believe that any "Native numbering" schemes must also be present and selectable as static list entries, so that one could choose one and have no worries that a document looks differently on a different system.

Eike, could you please provide your input on this?
Comment 13 Mike Kaganski 2017-12-21 10:54:15 UTC
(In reply to Fahad Al-Saidi from comment #11)
> As I said before, it doesn't work for me, I mean here your specific steps 
> you posted. See my last screen shot which its name "Native Numbering not
> working".

So, you say that literally following the "when I select "Native numbering" on page settings, and my locale is "Arabic (Oman)"" doesn't make your "Native numbering" like ١,٢,٣,٤ ?
Comment 14 Mike Kaganski 2017-12-21 10:57:26 UTC
Because on your previous screenshot, you shown that your locale was English; and later you asked "so you suggest to change my system locale to Arabic (Oman) to fix this?", which makes me believe that you didn't check that.
Comment 15 Fahad Al-Saidi 2017-12-21 11:00:35 UTC
(In reply to Mike Kaganski from comment #14)
> Because on your previous screenshot, you shown that your locale was English;
> and later you asked "so you suggest to change my system locale to Arabic
> (Oman) to fix this?", which makes me believe that you didn't check that.

Not problem. I confirm it doesn't affect the numbers as it shown in my last screen shot.
Comment 16 Eike Rathke 2017-12-21 13:35:28 UTC
(In reply to Mike Kaganski from comment #12)
> Personally I feel it a valid enhancement, I believe that any "Native
> numbering" schemes must also be present and selectable as static list
> entries, so that one could choose one and have no worries that a document
> looks differently on a different system.
Well, yes, but.. that would mean for the "Native Numbering" to iterate over all available locales, somehow determine if it offers a NatNum1 numbering, if so generate a UI visible string and generate a fixed (! unambiguous and never to be changed) string for document storage as defined in ODF. Doesn't sound very appealing to me, though might be doable with quite some effort.

Adding a few selected numberings is more straight forward and easier doable (might even be a skilled EasyHack), that would be similar to what was done in https://cgit.freedesktop.org/libreoffice/core/commit/?id=08fb6d73f8c22d98ab806dd93f4afe3f78b4ff83 for bug 66212. (note that different to the changes in that commit an entry in svx/inc/numberingtype.hrc is needed instead of cui/uiconfig/ui/numberingoptionspage.ui)
Comment 17 Eike Rathke 2017-12-21 13:36:59 UTC
Add as EasyHack.
Comment 18 Mike Kaganski 2017-12-21 13:51:43 UTC
(In reply to Eike Rathke from comment #16)

Agree... but isn't it possible to do on build phase, when localizations are parsed, and list of NatNum1s could be built? or do I misunderstand?

Don't take it as an argument; I'm fine with your chosen solution, thanks! Just thinking aloud.
Comment 19 Suhail Alkowaileet 2017-12-24 03:50:41 UTC
Created attachment 138620 [details]
Add Numbering entries in Arabic, Presian & Hindi patch

Hi,
I made this patch that fixes the issue. Hope it is correct
Comment 20 Mike Kaganski 2017-12-24 08:51:17 UTC
(In reply to Suhail Alkowaileet from comment #19)

Thank you!

It is unfortunate that bug tracker offers "patch" attachment type, which misguides. Please use gerrit for patches [1], and provide license statement [2], as described at [3], so that your patch could be reviewed and accepted.

Also, please don't introduce unnecessary changes to lines that don't relate to your change (like lines 55-56 in svx/inc/numberingtype.hrc), to keep git blame useful.

[1] https://wiki.documentfoundation.org/Development/gerrit
[2] https://wiki.documentfoundation.org/Development/Developers
[3] https://wiki.documentfoundation.org/Development
Comment 21 Fahad Al-Saidi 2017-12-28 04:24:19 UTC
@Suhail Thanks for the patch. What is missing to be merge into the master?
Comment 22 Mike Kaganski 2017-12-28 07:48:19 UTC
(In reply to Fahad Al-Saidi from comment #21)

Suhail has provided all the necessary stuff, including patch in gerrit (https://gerrit.libreoffice.org/47058); and he addressed my nitpicks (the only one left is that the commit message was unnecessarily amended with information "Fix all comments", which doesn't relate to the change itself, but should go to gerrit comments: when the patch will merge, these words would mean nothing).

Now we are waiting for review by experts.
Comment 23 Fahad Al-Saidi 2018-01-10 07:21:16 UTC
@(In reply to Mike Kaganski from comment #22)
> (In reply to Fahad Al-Saidi from comment #21)
> 
> Suhail has provided all the necessary stuff, including patch in gerrit
> (https://gerrit.libreoffice.org/47058); and he addressed my nitpicks (the
> only one left is that the commit message was unnecessarily amended with
> information "Fix all comments", which doesn't relate to the change itself,
> but should go to gerrit comments: when the patch will merge, these words
> would mean nothing).
> 
> Now we are waiting for review by experts.

It seems nobody review it yet !!
Comment 24 Xisco Faulí 2018-02-10 03:31:38 UTC Comment hidden (obsolete)
Comment 25 Commit Notification 2018-03-12 23:32:19 UTC
Suhail Alkowaileet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9aa70e2d0b72b37f6c090237b661d02c560aa79a

tdf#114622 Add Numbering in Arabic-Indic numerals

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.