Doc #77526 [Opn->Csd]: [FR]incorrect definition of %g, %G format in sprintf function

From: Date: Sun, 27 Jan 2019 16:56:43 +0000
Subject: Doc #77526 [Opn->Csd]: [FR]incorrect definition of %g, %G format in sprintf function
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16372@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77526&edit=1

 ID:                 77526
 Updated by:         girgias@php.net
 Reported by:        mh+php dot net at dsi972 dot fr
 Summary:            [FR]incorrect definition of %g, %G format in sprintf
                     function
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Translation problem
-Operating System:   any
+Operating System:   
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        girgias
 Block user comment: N
 Private report:     N

 New Comment:

Fixed with svn.php.net/viewvc?view=revision&revision=346657


Previous Comments:
------------------------------------------------------------------------
[2019-01-26 11:12:57] mh+php dot net at dsi972 dot fr

Description:
------------
---
From manual page: https://php.net/fr/function.sprintf
---
In the French version of the documentation of the sprintf function, there is a factual error which
stems from an incorrect translation. 
That page gives an incorrect definition of the %g, %G format specifiers.
It says %g and %G are a "raccourci", meaning: shortcut, for %e and %f (resp. %E and %F)
format. This is (obviously) wrong: %g is NOT a shortcut for %e or %f -- all of them are of the same
length, one '%' plus one more character!

Expected result:
----------------
---
(On manual page: https://php.net/fr/function.sprintf)
---
A correct translation and specification of the %g (resp. %G) format would be:

"Le plus court entre %e et %f."

(resp.: "... %E et %F" for %G),

meaning that it will choose either %e or %f format depending on which one yields the shorter
representation / output.



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=77526&edit=1


Thread (2 messages)

« previous php.doc.bugs (#16372) next »