Bug 166251 - SUMIF examples need to be improved
Summary: SUMIF examples need to be improved
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium normal
Assignee: Olivier Hallot
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-19 10:29 UTC by gmarco
Modified: 2025-05-25 18:37 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
scrshot for Guide (166.13 KB, image/jpeg)
2025-04-19 21:04 UTC, gmarco
Details
scrshot (98.81 KB, image/jpeg)
2025-04-19 21:09 UTC, gmarco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gmarco 2025-04-19 10:29:59 UTC
All examples are incorrect: arguments are separated by "," instead of ";".
The example =SOMMA.SE(A2:A6,"penna*",C2:C6) has a nonsensical description: "Adds the values ​​in area C2:C6 only if the values ​​in the corresponding area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do not meet the criterion.", in fact it returns 85.
Comment 1 Buovjaga 2025-04-19 15:52:00 UTC
If I understand correctly, you are talking about an Italian guide book for Calc 25.2? Can you give a link to the book as I can't find it?
Comment 2 gmarco 2025-04-19 21:04:47 UTC
Created attachment 200409 [details]
scrshot for Guide
Comment 3 gmarco 2025-04-19 21:09:10 UTC
Created attachment 200410 [details]
scrshot

Both samples are meaningless because the string "penna" exists and the result is 85.
Comment 4 m_a_riosv 2025-04-19 21:22:35 UTC
Reproducible
https://help.libreoffice.org/latest/fr/text/scalc/01/func_sumif.html?DbPAR=CALC#bm_id3151957

It has ';' as separator in function definition, but has ',' as separator in examples.

If I am not mistaken, all languages accept ';' as separator, it would be better to use it everywhere.
Comment 5 Buovjaga 2025-04-20 06:05:29 UTC
(In reply to gmarco from comment #2)
> Created attachment 200409 [details]
> scrshot for Guide

This is not from a guide book, but from the translation of Help.

While reports can be made about translations, Weblate does accept suggestions even from unregistered users, so making those directly would skip a step: https://translations.documentfoundation.org/projects/libo_help-master/-/it/

For example, I can search with "=SOMMA.SE(A2:A6,"penna*",C2:C6)" and find the relevant string.

https://translations.documentfoundation.org/translate/libo_help-master/textscalc01/it/?checksum=adc691b541dcf043&sort_by=-priority%2Cposition
Comment 6 gmarco 2025-04-20 07:16:08 UTC
(In reply to Buovjaga from comment #5)
> (In reply to gmarco from comment #2)
> > Created attachment 200409 [details]
> > scrshot for Guide
> 
> This is not from a guide book, but from the translation of Help.
> 
.....

That is what I can get by going to Help -> LibreOffice Help or pressing F1.
Comment 7 gmarco 2025-04-20 07:24:47 UTC
(In reply to m_a_riosv from comment #4)
> Reproducible
> https://help.libreoffice.org/latest/fr/text/scalc/01/func_sumif.
> html?DbPAR=CALC#bm_id3151957
> 
> It has ';' as separator in function definition, but has ',' as separator in
> examples.
> 
> If I am not mistaken, all languages accept ';' as separator, it would be
> better to use it everywhere.

I would say more precisely: ';' is the universal rule, the ',' or whatever gives "Err:501"
Comment 8 gmarco 2025-04-20 08:01:20 UTC
It seems to me that it is not a problem of translation into a specific language, the reported malfunctions are just in the original English text.
Comment 9 Buovjaga 2025-04-20 15:05:02 UTC
(In reply to gmarco from comment #8)
> It seems to me that it is not a problem of translation into a specific
> language, the reported malfunctions are just in the original English text.

Indeed, they are in the original source: https://help.libreoffice.org/latest/en-US/text/scalc/01/func_sumif.html
Comment 10 Julien Nabet 2025-04-20 15:07:00 UTC
Olivier: I've submitted https://gerrit.libreoffice.org/c/help/+/184388 on gerrit to change "," into ";" for sumif function.
Comment 11 Commit Notification 2025-04-20 16:30:45 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/2487e71ba257e1115eda0cab2d86186845b07239

Related tdf#166251 Use ";" for separator in SUMIF function
Comment 12 gmarco 2025-04-20 17:15:40 UTC
Please, don't forget the 2° and 3° examples too (look at my attachment).
Comment 13 Julien Nabet 2025-04-20 18:59:36 UTC
(In reply to gmarco from comment #12)
> Please, don't forget the 2° and 3° examples too (look at my attachment).

I changed 6 examples in the patch, I don't think I missed some but perhaps I'm wrong?
Comment 14 Buovjaga 2025-04-20 19:04:14 UTC
(In reply to gmarco from comment #0)
> The example =SOMMA.SE(A2:A6,"penna*",C2:C6) has a nonsensical description:
> "Adds the values ​​in area C2:C6 only if the values ​​in the corresponding
> area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do
> not meet the criterion.", in fact it returns 85.

What about these problems?
Comment 15 gmarco 2025-04-20 19:40:47 UTC
(In reply to Buovjaga from comment #14)
> (In reply to gmarco from comment #0)
> > The example =SOMMA.SE(A2:A6,"penna*",C2:C6) has a nonsensical description:
> > "Adds the values ​​in area C2:C6 only if the values ​​in the corresponding
> > area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do
> > not meet the criterion.", in fact it returns 85.
> 
> What about these problems?

"only if the values ​​in the corresponding area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do not meet the criterion."
As I said, some nonsense:
- area A2:A6 ... rows A4:A5
- Returns 150 because rows A4:A5 do not meet the criterion: if the criterion is not met why does it return 150? Was it so, it should be 0 !
But the criterion is just satisfied, "penna" is in A3 and corresponds to the value 85 in C3 !
Comment 16 Julien Nabet 2025-04-20 20:57:48 UTC
(In reply to gmarco from comment #15)
> (In reply to Buovjaga from comment #14)
> > (In reply to gmarco from comment #0)
> > > The example =SOMMA.SE(A2:A6,"penna*",C2:C6) has a nonsensical description:
> > > "Adds the values ​​in area C2:C6 only if the values ​​in the corresponding
> > > area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do
> > > not meet the criterion.", in fact it returns 85.
> > 
> > What about these problems?
> 
> "only if the values ​​in the corresponding area A2:A6 contain the letters
> "penna". Returns 150 because rows A4:A5 do not meet the criterion."
> As I said, some nonsense:
> - area A2:A6 ... rows A4:A5
> - Returns 150 because rows A4:A5 do not meet the criterion: if the criterion
> is not met why does it return 150? Was it so, it should be 0 !
> But the criterion is just satisfied, "penna" is in A3 and corresponds to the
> value 85 in C3 !

gmarco is right, product names should have been adapted and not only translated.
Indeed, in English,
=SUMIF(A2:A6,"pen*",C2:C6) gives 150 since, we have:
- C2 (65) which is in the same row as "pencil" A2
- C3 (85) which is in the same row as "pen" A3

but in Italian, only A3 "penna" corresponds to the criteria "pen*", so we should have only 85 and not 150.

There's exactly the same problem in French and certainly in other languages.
Comment 17 gmarco 2025-04-21 07:13:43 UTC
(In reply to Julien Nabet from comment #16)
> (In reply to gmarco from comment #15)
> > (In reply to Buovjaga from comment #14)
> > > (In reply to gmarco from comment #0)
> > > > The example =SOMMA.SE(A2:A6,"penna*",C2:C6) has a nonsensical description:
> > > > "Adds the values ​​in area C2:C6 only if the values ​​in the corresponding
> > > > area A2:A6 contain the letters "penna". Returns 150 because rows A4:A5 do
> > > > not meet the criterion.", in fact it returns 85.
> > > 
> > > What about these problems?
> > 
> > "only if the values ​​in the corresponding area A2:A6 contain the letters
> > "penna". Returns 150 because rows A4:A5 do not meet the criterion."
> > As I said, some nonsense:
> > - area A2:A6 ... rows A4:A5
> > - Returns 150 because rows A4:A5 do not meet the criterion: if the criterion
> > is not met why does it return 150? Was it so, it should be 0 !
> > But the criterion is just satisfied, "penna" is in A3 and corresponds to the
> > value 85 in C3 !
> 
> gmarco is right, product names should have been adapted and not only
> translated.
> Indeed, in English,
> =SUMIF(A2:A6,"pen*",C2:C6) gives 150 since, we have:
> - C2 (65) which is in the same row as "pencil" A2
> - C3 (85) which is in the same row as "pen" A3
> 
> but in Italian, only A3 "penna" corresponds to the criteria "pen*", so we
> should have only 85 and not 150.
> 
> There's exactly the same problem in French and certainly in other languages.

VERY GOOD, thanks!!!
Comment 18 Julien Nabet 2025-04-21 10:45:17 UTC
Now that "," have been replaced with ";" there are several steps:
1) helpcontent fixed strings must be present in Weblate
2) translations + adaptation must be done on languages (but no need to wait for all languages to be fixed).
3) synchro from Weblate to translation repository
4) wait for a new LO release including the fix.
I may be wrong but the fixes will be done only from next release 25.8

Sophie/Christian: could you just remind the time needed for step 1?
Comment 19 Olivier Hallot 2025-05-22 12:13:04 UTC
The issue is in the data table that has translations enabled and the translated examples becomes inconsistent.

I'll disable the data table translation and warn translators in weblate or l10n list.
Comment 20 Stanislav Horacek 2025-05-22 21:31:29 UTC
I would suggest to keep the data table translatable. In my opinion, this is what localization should be about: not only to translate the strings, but also to adapt the examples to be meaningful in a target language. While keeping English items in cells is certainly an option, I think that is less natural for the reader than their translated variants.
Comment 21 Mihail Balabanov 2025-05-25 18:37:37 UTC
I support leaving the examples translatable but maybe with some comments that warn the translators to adapt, rather than translate, the example product names.
I have adapted them when they first appeared in Help and readapted them after the changes, and I would prefer to leave them in Bulgarian because almost all other examples are translated/adapted.