Skip to content

Commit

Permalink
small translation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardolara committed Dec 3, 2024
1 parent bf10e80 commit e2a4e06
Show file tree
Hide file tree
Showing 30 changed files with 98 additions and 98 deletions.
22 changes: 11 additions & 11 deletions appendices/userlandnaming.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<itemizedlist>
<listitem>
<para>
PHP detém o escopo de alto nível, mas tenta achar nomes descritivos
PHP detém o escopo de alto nível, mas tenta encontrar nomes descritivos
decentes e evita qualquer conflito óbvio.
</para>
</listitem>
Expand All @@ -53,7 +53,7 @@
<listitem>
<para>
O PHP prefixará quaisquer símbolos globais de uma extensão com o nome da
extensão (No passado, existiam várias exceções
extensão (no passado, existiam várias exceções
à essa regra). Exemplos:
</para>

Expand All @@ -72,8 +72,8 @@
</listitem>
<listitem>
<para>
Iterators e Exceptions são, no entanto, simplesmente sufixados com
"<literal>Iterator</literal>" e "<literal>Exception</literal>."
Iteradores e Exceções são, no entanto, simplesmente sufixados com
"<literal>Iterator</literal>" e "<literal>Exception</literal>".
Exemplos:
</para>
<itemizedlist>
Expand All @@ -99,8 +99,8 @@
<section xml:id="userlandnaming.tips">
<title>Dicas</title>
<para>
Para escrever código que não sofrerá problemas no futuro, é recomendado que você não
coloque variáveis, funções ou classes no espaço global. Isto
Para escrever código que não sofrerá problemas no futuro, é recomendado que não
sejam incluídas variáveis, funções ou classes no espaço global. Isto
evitará colisões de nome com código de terceiros assim como
futuros acréscimos à linguagem.
</para>
Expand All @@ -125,19 +125,19 @@ function my_function() {
</programlisting>
</informalexample>
<para>
This still needs you to keep track of already used namespaces, but once you
have decided on a namespace you will be using you can add all functions and
classes to it without having to think about conflicts again.
Os namespaces já usados ainda precisam ser rastreados, mas uma vez
decidido o uso de um namespace, podem ser adicionadas funções e
classes a ele sem novas preocupações com conflitos.
</para>
<para>
Também é considerada uma boa prática limitar o número de variáveis alocadas
no escopo global de forma a evitar colisões de nome com código
de terceiros.
</para>
<note>
<title>Variable scoping</title>
<title>Escopo de variáveis</title>
<para>
Por causa das <link linkend="language.variables.scope">regras de escopo</link> do PHP
Por causa das <link linkend="language.variables.scope">regras de escopo</link> do PHP,
as variáveis definidas dentro de funções e métodos não estão no escopo global
e não podem conflitar com variáveis definidas nesse escopo.
</para>
Expand Down
2 changes: 1 addition & 1 deletion language/oop5/interfaces.xml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ interface B extends A
public function baz(Baz $baz);
}
// This will work
// Isto funciona
class C implements B
{
public function foo()
Expand Down
4 changes: 2 additions & 2 deletions language/predefined/errorexception/getseverity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
try {
throw new ErrorException("Exception message", 0, E_USER_ERROR);
} catch(ErrorException $e) {
echo "This exception severity is: " . $e->getSeverity();
echo "A severidade desta exceção é: " . $e->getSeverity();
var_dump($e->getSeverity() === E_USER_ERROR);
}
?>
Expand All @@ -49,7 +49,7 @@ try {
&example.outputs.similar;
<screen>
<![CDATA[
This exception severity is: 256
A severidade desta exceção é: 256
bool(true)
]]>
</screen>
Expand Down
6 changes: 3 additions & 3 deletions language/types/string.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,9 @@ PHP Parse error: syntax error, unexpected identifier "ING", expecting "]" in ex
</simpara>

<example>
<title>Exemplo inválido, anteriormente ao PHP 7.3.0</title>
<title>Exemplo inválido, antes do PHP 7.3.0</title>
<programlisting role="php">
<!-- This is an INVALID example -->
<!-- Este é um exemplo INVÁLIDO -->
<![CDATA[
<?php
class foo {
Expand All @@ -442,7 +442,7 @@ bar
<example>
<title>Exemplo válido, mesmo antes do PHP 7.3.0</title>
<programlisting role="php">
<!-- This is a VALID example -->
<!-- Este é um exemplo VÁLIDO -->
<![CDATA[
<?php
class foo {
Expand Down
2 changes: 1 addition & 1 deletion reference/bzip2/examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<?php
$filename = "/tmp/testfile.bz2";
$str = "This is a test string.\n";
$str = "Este é um texto de teste.\n";
// abre o arquivo para escrita
$bz = bzopen($filename, "w");
Expand Down
2 changes: 1 addition & 1 deletion reference/bzip2/functions/bzdecompress.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<programlisting role="php">
<![CDATA[
<?php
$start_str = "This is not an honest face?";
$start_str = "O rato roeu a roupa do rei de Roma.";
$bzstr = bzcompress($start_str);
echo "String Comprimida: ";
Expand Down
4 changes: 2 additions & 2 deletions reference/dom/domdocument/createelement.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
$dom = new DOMDocument('1.0', 'utf-8');
$element = $dom->createElement('test', 'This is the root element!');
$element = $dom->createElement('test', 'Este é o elemento raiz!');
// Inserimos o novo elemento como raiz (filho do documento)
$dom->appendChild($element);
Expand All @@ -94,7 +94,7 @@ echo $dom->saveXML();
<screen role="xml">
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<test>This is the root element!</test>
<test>Este é o elemento raiz!</test>
]]>
</screen>
</example>
Expand Down
4 changes: 2 additions & 2 deletions reference/dom/domdocument/createelementns.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
$dom = new DOMDocument('1.0', 'utf-8');
$element = $dom->createElementNS('http://www.example.com/XFoo', 'xfoo:test', 'This is the root element!');
$element = $dom->createElementNS('http://www.example.com/XFoo', 'xfoo:test', 'Este é o elemento raiz!');
// Inserimos o novo elemento como raiz (filho do documento)
$dom->appendChild($element);
Expand All @@ -106,7 +106,7 @@ echo $dom->saveXML();
<screen role="xml">
<![CDATA[
<?xml version="1.0" encoding="utf-8"?>
<xfoo:test xmlns:xfoo="http://www.example.com/XFoo">This is the root element!</xfoo:test>
<xfoo:test xmlns:xfoo="http://www.example.com/XFoo">Este é o elemento raiz!</xfoo:test>
]]>
</screen>
</example>
Expand Down
16 changes: 8 additions & 8 deletions reference/dom/domdocument/getelementsbytagnamens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,43 +79,43 @@
&reftitle.examples;
<para>
<example>
<title>Obter todos os elementos XInclude</title>
<title>Obtendo todos os elementos XInclude</title>
<programlisting role="php">
<![CDATA[
<?php
$xml = <<<EOD
<?xml version="1.0" ?>
<chapter xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Books of the other guy..</title>
<title>Livros de outra pessoa...</title>
<para>
<xi:include href="book.xml">
<xi:fallback>
<error>xinclude: book.xml not found</error>
<error>xinclude: book.xml não encontrado</error>
</xi:fallback>
</xi:include>
<include>
This is another namespace
Este é outro namespace
</include>
</para>
</chapter>
EOD;
$dom = new DOMDocument;
// carregue a string XML definida acima
// carrega a string XML definida acima
$dom->loadXML($xml);
foreach ($dom->getElementsByTagNameNS('http://www.w3.org/2001/XInclude', '*') as $element) {
echo 'local name: ', $element->localName, ', prefix: ', $element->prefix, "\n";
echo 'nome local: ', $element->localName, ', prefixo: ', $element->prefix, "\n";
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
local name: include, prefix: xi
local name: fallback, prefix: xi
nome local: include, prefixo: xi
nome local: fallback, prefixo: xi
]]>
</screen>
</example>
Expand Down
6 changes: 3 additions & 3 deletions reference/dom/domdocument/save.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<?php
$doc = new DOMDocument('1.0');
// we want a nice output
// uma saída apresentável
$doc->formatOutput = true;
$root = $doc->createElement('book');
Expand All @@ -70,10 +70,10 @@ $root = $doc->appendChild($root);
$title = $doc->createElement('title');
$title = $root->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $doc->createTextNode('Isto é um título.');
$text = $title->appendChild($text);
echo 'Wrote: ' . $doc->save("/tmp/test.xml") . ' bytes'; // Wrote: 72 bytes
echo 'Escritos: ' . $doc->save("/tmp/test.xml") . ' bytes'; // Escritos: 72 bytes
?>
]]>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/domdocument/savehtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $head = $root->appendChild($head);
$title = $doc->createElement('title');
$title = $head->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $doc->createTextNode('Isto é um título.');
$text = $title->appendChild($text);
echo $doc->saveHTML();
Expand Down
6 changes: 3 additions & 3 deletions reference/dom/domdocument/savehtmlfile.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<?php
$doc = new DOMDocument('1.0');
// we want a nice output
// uma saída apresentável
$doc->formatOutput = true;
$root = $doc->createElement('html');
Expand All @@ -61,10 +61,10 @@ $head = $root->appendChild($head);
$title = $doc->createElement('title');
$title = $head->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $doc->createTextNode('Isto é um título.');
$text = $title->appendChild($text);
echo 'Wrote: ' . $doc->saveHTMLFile("/tmp/test.html") . ' bytes'; // Wrote: 129 bytes
echo 'Escritos: ' . $doc->saveHTMLFile("/tmp/test.html") . ' bytes'; // Escritos: 129 bytes
?>
]]>
Expand Down
14 changes: 7 additions & 7 deletions reference/dom/domdocument/savexml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ $root = $doc->appendChild($root);
$title = $doc->createElement('title');
$title = $root->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $doc->createTextNode('Isto é um título.');
$text = $title->appendChild($text);
echo "Saving all the document:\n";
echo "Gravando todo o documento:\n";
echo $doc->saveXML() . "\n";
echo "Saving only the title part:\n";
echo "Gravando apenas a parte do título:\n";
echo $doc->saveXML($title);
?>
Expand All @@ -127,14 +127,14 @@ echo $doc->saveXML($title);
&example.outputs;
<screen>
<![CDATA[
Saving all the document:
Gravando todo o documento:
<?xml version="1.0"?>
<book>
<title>This is the title</title>
<title>Isto é um título.</title>
</book>
Saving only the title part:
<title>This is the title</title>
Gravando apenas a parte do título:
<title>Isto é um título.</title>
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion reference/dom/domdocument/validate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
$dom = new DOMDocument;
$dom->load('book.xml');
if ($dom->validate()) {
echo "This document is valid!\n";
echo "Este documento é válido!\n";
}
?>
]]>
Expand Down
12 changes: 6 additions & 6 deletions reference/ds/ds/hashable/hash.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
<!-- EN-Revision: dd07341fae2c414adc1f700be0890ff32e8daab4 Maintainer: leonardolara Status: ready --><!-- CREDITS: fernandowobeto -->

<refentry xml:id="ds-hashable.hash" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -77,18 +77,18 @@ class HashableObject implements \Ds\Hashable
}
/**
* Should return the same value for all equal objects, but doesn't have to
* be unique. This value will not be used to determine equality.
* Deve retornar o mesmo valor para todos os objetos iguais, mas não precisa
* ser exclusivo. Este valor não será usado para determinar igualdade.
*/
public function hash()
{
return $this->email;
}
/**
* This determines equality, usually during a hash table lookup to determine
* if the bucket's key matches the lookup key. The hash has to be equal if
* the objects are equal, otherwise this determination wouldn't be reached.
* Isto determina a igualdade, normalmente durante uma pesquisa de tabela de hash para determinar
* se a chave corresponde à chave sendo pesquisada. O hash precisa ser igual se
* os objetos são iaguais, caso contrário esta determinação não seria alcançada.
*/
public function equals($obj): bool
{
Expand Down
2 changes: 1 addition & 1 deletion reference/iconv/functions/iconv-mime-decode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
<programlisting role="php">
<![CDATA[
<?php
// This yields "Subject: Prüfung Prüfung"
// Isto resulta em "Subject: Prüfung Prüfung"
echo iconv_mime_decode("Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?=",
0, "ISO-8859-1");
?>
Expand Down
4 changes: 2 additions & 2 deletions reference/iconv/functions/iconv-mime-encode.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@ $preferences = array(
"line-break-chars" => "\n"
);
$preferences["scheme"] = "Q";
// This yields "Subject: =?UTF-8?Q?Pr=C3=BCfung=20Pr=C3=BCfung?="
// Isto resulta em "Subject: =?UTF-8?Q?Pr=C3=BCfung=20Pr=C3=BCfung?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
$preferences["scheme"] = "B";
// This yields "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
// Isto resulta em "Subject: =?UTF-8?B?UHLDvGZ1bmcgUHLDvGZ1bmc=?="
echo iconv_mime_encode("Subject", "Prüfung Prüfung", $preferences);
?>
]]>
Expand Down
8 changes: 4 additions & 4 deletions reference/iconv/functions/iconv.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
<programlisting role="php">
<![CDATA[
<?php
$text = "This is the Euro symbol '€'.";
$text = "Este é o símbolo do Euro '€'.";
echo 'Original : ', $text, PHP_EOL;
echo 'TRANSLIT : ', iconv("UTF-8", "ISO-8859-1//TRANSLIT", $text), PHP_EOL;
Expand All @@ -99,9 +99,9 @@ echo 'Plain : ', iconv("UTF-8", "ISO-8859-1", $text), PHP_EOL;
&example.outputs.similar;
<screen>
<![CDATA[
Original : This is the Euro symbol '€'.
TRANSLIT : This is the Euro symbol 'EUR'.
IGNORE : This is the Euro symbol ''.
Original : Este é o símbolo do Euro '€'.
TRANSLIT : Este é o símbolo do Euro 'EUR'.
IGNORE : Este é o símbolo do Euro ''.
Plain :
Notice: iconv(): Detected an illegal character in input string in .\iconv-example.php on line 7
]]>
Expand Down
Loading

0 comments on commit e2a4e06

Please sign in to comment.