Doc #71022 [Asn->Csd]: the translation of usage of Spaceship operator is wrong.

From: Date: Mon, 28 Dec 2015 03:44:09 +0000
Subject: Doc #71022 [Asn->Csd]: the translation of usage of Spaceship operator is wrong.
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-13045@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71022&edit=1

 ID:                 71022
 Updated by:         jhdxr@php.net
 Reported by:        seekerliu at vip dot qq dot com
 Summary:            the translation of usage of Spaceship operator is
                     wrong.
-Status:             Assigned
+Status:             Closed
 Type:               Documentation Problem
 Package:            Translation problem
 Operating System:   windows10
 PHP Version:        7.0.0
 Assigned To:        jhdxr
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2015-12-23 08:04:20] jhdxr@php.net

Yep. It's my fault. Someone else had corrected the sentence to
"当$a大于、等于或小于$b时它分别返回1、0或-1",
however, he/she did not commit to svn. And after my commit (r338339), I found this problem and fix
it immediately, and now the doc online is correct. Thanks for your report.

------------------------------------------------------------------------
[2015-12-23 01:19:26] seekerliu at vip dot qq dot com

in the new documentation's XML sources also have a mistake:
"太空船操作符用于比较两个表达式。当<varname>$a</varname>小于、等于或大于<varname>$b</varname>时它分别返回1、0或-1。"

the right version is:
"太空船操作符用于比较两个表达式。当<varname>$a</varname>小于、等于或大于<varname>$b</varname>时它分别返回-1、0或1。"

对应关系:
当$a 小于 $b, 返回 -1
当$a 等于 $b, 返回 0
当$a 大于 $b, 返回 1

------------------------------------------------------------------------
[2015-12-22 08:02:47] jhdxr@php.net

This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.



------------------------------------------------------------------------
[2015-12-22 08:00:04] jhdxr@php.net

Automatic comment from SVN on behalf of jhdxr
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=338339
Log: Fixed bug #71022 	the translation of usage of Spaceship operator is wrong.

------------------------------------------------------------------------
[2015-12-04 01:52:35] seekerliu at vip dot qq dot com

Description:
------------
---
From manual page: http://www.php.net/migration70.new-features
---
此句中对“太空船操作符”的作用翻译为:
当$a大于、等于或小于$b时它分别返回-1、0或1。(incorrect)
实际应为:
当$a小于、等于或大于$b时它分别返回-1、0或1。(correct)

另附英文原版:
It returns -1, 0 or 1 when $a is respectively less than, equal to, or greater than $b。

Test script:
---------------
<?php
// Integers
echo 1 <=> 1; // 0
echo 1 <=> 2; // -1
echo 2 <=> 1; // 1

// Floats
echo 1.5 <=> 1.5; // 0
echo 1.5 <=> 2.5; // -1
echo 2.5 <=> 1.5; // 1
 
// Strings
echo "a" <=> "a"; // 0
echo "a" <=> "b"; // -1
echo "b" <=> "a"; // 1
?>



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=71022&edit=1


Thread (5 messages)

« previous php.doc.bugs (#13045) next »