php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #64861 [DE] Error in strripos() German translation
Submitted: 2013-05-16 14:33 UTC Modified: 2015-04-12 20:44 UTC
From: eproskawetz at t-online dot de Assigned:
Status: Open Package: Translation problem
PHP Version: 5.5.0RC1 OS: Windows
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: eproskawetz at t-online dot de
New email:
PHP Version: OS:

 

 [2013-05-16 14:33 UTC] eproskawetz at t-online dot de
Description:
------------
---
From manual page: http://www.php.net/function.strripos#refsect1-function.strripos-parameters
---


Test script:
---------------
 offset

    Wenn angegeben, wird die Suche diese Anzahl an Buchstaben vom Anfang des Strings gezählt stoppen. Wenn der Wert negativ ist, startet die Suche stattdessen diese Anzahl an Zeichen vom Ende des Strings aus.

This says, that the search stop at the position offset if the value is positiv and if the value is negativ it starts at strlen-offset. Correct would be:

Wenn angegeben, wird die Suche diese Anzahl an Buchstaben vom Ende des Strings gezählt stoppen. Wenn der Wert negativ ist, endet die Suche stattdessen diese Anzahl an Zeichen vom Anfang des Strings aus.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-05-16 19:53 UTC] aharvey@php.net
-Summary: Documentation bug +Summary: [DE] Error in strripos() German translation -Package: Documentation problem +Package: Translation problem
 [2015-03-02 19:35 UTC] cmbecker69 at gmx dot de
> This says, that the search stop at the position offset if the
> value is positiv and if the value is negativ it starts at
> strlen-offset.

Yes. And that is how the $offset parameter is supposed to work,
see the examples given for strrpos().

The German translation is correct, albeit somewhat clumsy.
 [2015-04-06 21:44 UTC] c dot jantz at vations dot de
The wording is super confusing here. 

What about this alternative: 
Wenn angegeben beginnt die Suche bei angegebener Position von Beginn des Strings an gezählt. 
Sollte der Wert negativ sein startet die Suche selbige Anzahl von Zeichen vor Ende des Strings und sucht rückwärts.
 [2015-04-06 21:59 UTC] cmb@php.net
> The wording is super confusing here.

After having reconsidered this issue in the meantime, I have to
agree. It appears to me that the original needs improvement, too.
Actually, the search always works backwards[1] (what might be
regarded as an implementation detail, but searching forwards for
the last occurance wouldn't make sense). Describing it this way,
might simplify the explanation. See also bug #50317.

Anyhow, related to bug #68010.

[1] <http://lxr.php.net/xref/PHP_5_6/ext/standard/string.c#1981>
 [2015-04-12 20:44 UTC] cmb@php.net
Related to bug #66563.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Sep 17 08:01:27 2019 UTC