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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
17 + 42 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 10:01:30 2024 UTC