php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77526 [FR]incorrect definition of %g, %G format in sprintf function
Submitted: 2019-01-26 11:12 UTC Modified: 2019-01-27 16:56 UTC
From: mh+php dot net at dsi972 dot fr Assigned: girgias (profile)
Status: Closed Package: Translation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mh+php dot net at dsi972 dot fr
New email:
PHP Version: OS:

 

 [2019-01-26 11:12 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-01-26 15:02 UTC] cmb@php.net
-Summary: incorrect definition of %g, %G format in sprintf function due to translation +Summary: [FR]incorrect definition of %g, %G format in sprintf function -Package: PHP Language Specification +Package: Translation problem
 [2019-01-27 16:56 UTC] girgias@php.net
-Status: Open +Status: Closed -Operating System: any +Operating System: -Assigned To: +Assigned To: girgias
 [2019-01-27 16:56 UTC] girgias@php.net
Fixed with svn.php.net/viewvc?view=revision&revision=346657
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Oct 22 19:01:23 2020 UTC