Bug 146778 - Function wizard for DATAD.SE in pt-PT translates arguments incorrectly
Summary: Function wizard for DATAD.SE in pt-PT translates arguments incorrectly
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2022-01-15 10:17 UTC by David Leal
Modified: 2022-04-06 13:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
"a" (67.43 KB, image/png)
2022-01-15 10:19 UTC, David Leal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Leal 2022-01-15 10:17:30 UTC
Description:
=DATAD.SE("05/09/1988";"13/01/2022";"a")

Steps to Reproduce:
=DATAD.SE("05/09/1988";"13/01/2022";"a")



Actual Results:
#VALOR!

Expected Results:
33


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I tested the English function using the "y" to get the years and it worked. In my language (Portuguese from Portugal) to obtain the years in the difference of two dates is the "a" according to the manual. Please confirm all date related functions for my language to confirm that there are no other bugs.
Comment 1 David Leal 2022-01-15 10:19:11 UTC
Created attachment 177561 [details]
"a"
Comment 2 Roman Kuznetsov 2022-01-15 16:12:41 UTC
I'm not sure the function's argument knows about other locales except EN

Eike, what will you say?
Comment 3 Winfried Donkers 2022-01-16 12:12:12 UTC
(In reply to Roman Kuznetsov from comment #2)
> I'm not sure the function's argument knows about other locales except EN
> 
> Eike, what will you say?

The labels for the unit of date difference (y, m, d, ym, yd, md) are hard coded, so will have to be used with other formula languages than English, too.

The hint appearing when entering the formula and the explanatory text in the function wizard also state that on of the above 6 options must be used.
Comment 4 Eike Rathke 2022-01-17 11:27:15 UTC
If the manual says "a" then the manual is wrong. The interval arguments are not and will not be translated.

Help also doesn't say so.
https://help.libreoffice.org/latest/pt/text/scalc/01/func_datedif.html
https://help.libreoffice.org/7.3/pt/text/scalc/01/func_datedif.html
https://help.libreoffice.org/7.2/pt/text/scalc/01/func_datedif.html
https://help.libreoffice.org/7.1/pt/text/scalc/01/func_datedif.html

Btw, it's better to use date values (i.e. the DATE() (or in Portuguese DATA()) function) instead of strings that may or may not work depending on the then current locale.
Comment 5 Rafael Lima 2022-01-21 14:31:19 UTC
As pointed out by Eike, the Help is correct in Portuguese.

The problem is with the UI translation, which can be fixed in Weblate. The string ID is SC_OPCODE_GET_DATEDIF.

Actually Olivier has already detected this issue in Weblate and the translation should be fixed for LO 7.4.

I will add a <note> to the help page stating that the possible values for the "Interval" argument are "d", "m", "y", "ym", "md" or "yd" regardless of the current language settings.
Comment 6 Commit Notification 2022-01-22 14:44:40 UTC
Rafael Lima committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/e3bcf0ef395578e011a76943a15f3467ea128b35

tdf#146778 Clarify the use of the "Interval" argument