#44606 [Opn]: Error in description of second paramter for trim in german documentation
| From: | julian dot hartmann at gmail dot com | Date: | Wed, 02 Apr 2008 14:57:41 +0000 |
| Subject: | #44606 [Opn]: Error in description of second paramter for trim in german documentation | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-660@lists.php.net to get a copy of this message | ||
ID: 44606
User updated by: julian dot hartmann at gmail dot com
Reported By: julian dot hartmann at gmail dot com
Status: Open
Bug Type: Translation problem
PHP Version: Irrelevant
New Comment:
With "explicit" i am referring to a sentence like "This parameter will
replace the default list of characters."
Previous Comments:
------------------------------------------------------------------------
[2008-04-02 14:55:52] julian dot hartmann at gmail dot com
The german wording states "Optional kann eine Liste weiterer Zeichen
angefügt werden" which translates pretty much to "optionally, a list of
additional characters can be attached" ("weiterer" = additional;
"angefügt" = attached).
"Er enthält eine Liste aller zu entfernenden Zeichen." could be read as
stating it correctly, but then it would still contradict the first
sentence.
I would recommend to alter the first sentence to a wording like
"Optional kann die Liste der Zeichen angegeben werden, die an
Anfang und Ende der Zeichenkette entfernt werden sollen."
(= "Optionally, the list of characters can be specified which will be
removed from the beginning and the end of the string.").
This would at least implicitly state that the default list will be
replaced.
This would pretty much resemble the english wording, despite none of
them explicitly states that the default list will be replaced by the
second parameter.
------------------------------------------------------------------------
[2008-04-02 14:41:56] danbrown@php.net
My native language isn't German, but I do speak it. To me, the
combination of this:
"Die Funktion entfernt Whitespaces an Anfang und Ende von str und gibt
den String dann zurück. Ohne Verwendung des zweiten Parameters entfernt
trim() folgende Zeichen"
And this:
"Optional kann eine Liste weiterer Zeichen angefügt werden, die an
Anfang und Ende der Zeichenkette entfernt werden sollen. Um diese
Zeichen anzugeben, wird der charlist Parameter verwendet. Er enthält
eine Liste aller zu entfernenden Zeichen. Mit .. können darüber hinaus
auch ganze Bereiche von Zeichen angegeben werden."
Explains that the second parameter replaces the default charlist.
In addition, the English documentation does, in fact, state the same.
------------------------------------------------------------------------
[2008-04-02 10:03:36] julian dot hartmann at gmail dot com
Description:
------------
Error in description of second paramter for trim in german
documentation.
http://www.php.net/manual/de/function.trim.php
The second parameter (charlist) is explained as being a list of
ADDITIONAL characters to remove, but trim() seems to replace its default
list with this one instead of extending it.
English documentation does state not whether the second param "adds to"
or "replaces" the default.
Reproduce code:
---------------
$foo = " \xa0 bar";
$trimmed = trim($foo, "\xa0");
var_dump($trimmed);
$trimmed = trim($foo, "\xa0\x20");
var_dump($trimmed);
Expected result:
----------------
string(3) "bar"
string(3) "bar"
Actual result:
--------------
string(6) " bar"
string(3) "bar"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44606&edit=1