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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Tue Jun 03 01:01:26 2025 UTC