From e2a4e067e26233597985ca9ea89c3edf17502310 Mon Sep 17 00:00:00 2001 From: leonardolara Date: Tue, 3 Dec 2024 09:41:34 -0300 Subject: [PATCH] small translation fixes --- appendices/userlandnaming.xml | 22 ++++++------- language/oop5/interfaces.xml | 2 +- .../predefined/errorexception/getseverity.xml | 4 +-- language/types/string.xml | 6 ++-- reference/bzip2/examples.xml | 2 +- reference/bzip2/functions/bzdecompress.xml | 2 +- reference/dom/domdocument/createelement.xml | 4 +-- reference/dom/domdocument/createelementns.xml | 4 +-- .../domdocument/getelementsbytagnamens.xml | 16 +++++----- reference/dom/domdocument/save.xml | 6 ++-- reference/dom/domdocument/savehtml.xml | 2 +- reference/dom/domdocument/savehtmlfile.xml | 6 ++-- reference/dom/domdocument/savexml.xml | 14 ++++---- reference/dom/domdocument/validate.xml | 2 +- reference/ds/ds/hashable/hash.xml | 12 +++---- .../iconv/functions/iconv-mime-decode.xml | 2 +- .../iconv/functions/iconv-mime-encode.xml | 4 +-- reference/iconv/functions/iconv.xml | 8 ++--- reference/misc/functions/eval.xml | 10 +++--- .../mysql_xdevapi/table/isview.xml | 6 ++-- reference/pgsql/functions/pg-lo-write.xml | 2 +- reference/rar/rararchive/getcomment.xml | 2 +- reference/sqlite3/sqlite3/construct.xml | 2 +- reference/sqlite3/sqlite3/open.xml | 2 +- reference/sqlite3/sqlite3/prepare.xml | 2 +- reference/sqlite3/sqlite3stmt/bindvalue.xml | 4 +-- .../stream/functions/stream-filter-append.xml | 8 ++--- reference/url/functions/base64-decode.xml | 4 +-- reference/url/functions/base64-encode.xml | 4 +-- reference/zip/examples.xml | 32 +++++++++---------- 30 files changed, 98 insertions(+), 98 deletions(-) diff --git a/appendices/userlandnaming.xml b/appendices/userlandnaming.xml index 8c861559b..b3e88cc7d 100644 --- a/appendices/userlandnaming.xml +++ b/appendices/userlandnaming.xml @@ -39,7 +39,7 @@ - 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. @@ -53,7 +53,7 @@ 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: @@ -72,8 +72,8 @@ - Iterators e Exceptions são, no entanto, simplesmente sufixados com - "Iterator" e "Exception." + Iteradores e Exceções são, no entanto, simplesmente sufixados com + "Iterator" e "Exception". Exemplos: @@ -99,8 +99,8 @@
Dicas - 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. @@ -125,9 +125,9 @@ function my_function() { - 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. Também é considerada uma boa prática limitar o número de variáveis alocadas @@ -135,9 +135,9 @@ function my_function() { de terceiros. - Variable scoping + Escopo de variáveis - Por causa das regras de escopo do PHP + Por causa das regras de escopo 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. diff --git a/language/oop5/interfaces.xml b/language/oop5/interfaces.xml index fef296f72..a7b5486c3 100755 --- a/language/oop5/interfaces.xml +++ b/language/oop5/interfaces.xml @@ -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() diff --git a/language/predefined/errorexception/getseverity.xml b/language/predefined/errorexception/getseverity.xml index b4788b41d..a9ee508cb 100644 --- a/language/predefined/errorexception/getseverity.xml +++ b/language/predefined/errorexception/getseverity.xml @@ -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); } ?> @@ -49,7 +49,7 @@ try { &example.outputs.similar; diff --git a/language/types/string.xml b/language/types/string.xml index 24803aa44..ce967be61 100644 --- a/language/types/string.xml +++ b/language/types/string.xml @@ -424,9 +424,9 @@ PHP Parse error: syntax error, unexpected identifier "ING", expecting "]" in ex - Exemplo inválido, anteriormente ao PHP 7.3.0 + Exemplo inválido, antes do PHP 7.3.0 - + Exemplo válido, mesmo antes do PHP 7.3.0 - + 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); @@ -94,7 +94,7 @@ echo $dom->saveXML(); -This is the root element! +Este é o elemento raiz! ]]> diff --git a/reference/dom/domdocument/createelementns.xml b/reference/dom/domdocument/createelementns.xml index c574854d1..9c865f6ca 100644 --- a/reference/dom/domdocument/createelementns.xml +++ b/reference/dom/domdocument/createelementns.xml @@ -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); @@ -106,7 +106,7 @@ echo $dom->saveXML(); -This is the root element! +Este é o elemento raiz! ]]> diff --git a/reference/dom/domdocument/getelementsbytagnamens.xml b/reference/dom/domdocument/getelementsbytagnamens.xml index f1cd5b859..14cd59b2d 100644 --- a/reference/dom/domdocument/getelementsbytagnamens.xml +++ b/reference/dom/domdocument/getelementsbytagnamens.xml @@ -79,7 +79,7 @@ &reftitle.examples; - Obter todos os elementos XInclude + Obtendo todos os elementos XInclude -Books of the other guy.. +Livros de outra pessoa... - xinclude: book.xml not found + xinclude: book.xml não encontrado - This is another namespace + Este é outro namespace 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"; } ?> ]]> @@ -114,8 +114,8 @@ foreach ($dom->getElementsByTagNameNS('http://www.w3.org/2001/XInclude', '*') as &example.outputs; diff --git a/reference/dom/domdocument/save.xml b/reference/dom/domdocument/save.xml index 93c57a902..0b31b440f 100644 --- a/reference/dom/domdocument/save.xml +++ b/reference/dom/domdocument/save.xml @@ -61,7 +61,7 @@ formatOutput = true; $root = $doc->createElement('book'); @@ -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 ?> ]]> diff --git a/reference/dom/domdocument/savehtml.xml b/reference/dom/domdocument/savehtml.xml index 3a7383c0e..1e8a3c4ec 100644 --- a/reference/dom/domdocument/savehtml.xml +++ b/reference/dom/domdocument/savehtml.xml @@ -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(); diff --git a/reference/dom/domdocument/savehtmlfile.xml b/reference/dom/domdocument/savehtmlfile.xml index 10d67c92b..a652bb287 100644 --- a/reference/dom/domdocument/savehtmlfile.xml +++ b/reference/dom/domdocument/savehtmlfile.xml @@ -49,7 +49,7 @@ formatOutput = true; $root = $doc->createElement('html'); @@ -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 ?> ]]> diff --git a/reference/dom/domdocument/savexml.xml b/reference/dom/domdocument/savexml.xml index 5488c403f..4224ffdc3 100644 --- a/reference/dom/domdocument/savexml.xml +++ b/reference/dom/domdocument/savexml.xml @@ -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); ?> @@ -127,14 +127,14 @@ echo $doc->saveXML($title); &example.outputs; - This is the title + Isto é um título. -Saving only the title part: -This is the title +Gravando apenas a parte do título: +Isto é um título. ]]> diff --git a/reference/dom/domdocument/validate.xml b/reference/dom/domdocument/validate.xml index 610093680..81611f686 100644 --- a/reference/dom/domdocument/validate.xml +++ b/reference/dom/domdocument/validate.xml @@ -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"; } ?> ]]> diff --git a/reference/ds/ds/hashable/hash.xml b/reference/ds/ds/hashable/hash.xml index a2bb0f947..fa8e47eb9 100644 --- a/reference/ds/ds/hashable/hash.xml +++ b/reference/ds/ds/hashable/hash.xml @@ -1,5 +1,5 @@ - + @@ -77,8 +77,8 @@ 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() { @@ -86,9 +86,9 @@ class HashableObject implements \Ds\Hashable } /** - * 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 { diff --git a/reference/iconv/functions/iconv-mime-decode.xml b/reference/iconv/functions/iconv-mime-decode.xml index 6eb8ffdcb..cadd343d3 100644 --- a/reference/iconv/functions/iconv-mime-decode.xml +++ b/reference/iconv/functions/iconv-mime-decode.xml @@ -129,7 +129,7 @@ diff --git a/reference/iconv/functions/iconv-mime-encode.xml b/reference/iconv/functions/iconv-mime-encode.xml index f790bb3ae..ea1f1a864 100644 --- a/reference/iconv/functions/iconv-mime-encode.xml +++ b/reference/iconv/functions/iconv-mime-encode.xml @@ -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); ?> ]]> diff --git a/reference/iconv/functions/iconv.xml b/reference/iconv/functions/iconv.xml index d7f335462..65bc21ece 100644 --- a/reference/iconv/functions/iconv.xml +++ b/reference/iconv/functions/iconv.xml @@ -86,7 +86,7 @@ diff --git a/reference/misc/functions/eval.xml b/reference/misc/functions/eval.xml index 8af7da2ce..bd6be6b09 100644 --- a/reference/misc/functions/eval.xml +++ b/reference/misc/functions/eval.xml @@ -97,9 +97,9 @@ diff --git a/reference/mysql_xdevapi/mysql_xdevapi/table/isview.xml b/reference/mysql_xdevapi/mysql_xdevapi/table/isview.xml index 1b1d7285b..378226ee9 100644 --- a/reference/mysql_xdevapi/mysql_xdevapi/table/isview.xml +++ b/reference/mysql_xdevapi/mysql_xdevapi/table/isview.xml @@ -47,9 +47,9 @@ $schema = $session->getSchema("addressbook"); $table = $schema->getTable("names"); if ($table->isView()) { - echo "This is a view."; + echo "Isto é uma visualização."; } else { - echo "This is not a view."; + echo "Isto é uma visualização."; } ?> ]]> @@ -57,7 +57,7 @@ if ($table->isView()) { &example.outputs; diff --git a/reference/pgsql/functions/pg-lo-write.xml b/reference/pgsql/functions/pg-lo-write.xml index 43d976537..84325df85 100644 --- a/reference/pgsql/functions/pg-lo-write.xml +++ b/reference/pgsql/functions/pg-lo-write.xml @@ -103,7 +103,7 @@ getComment(); &example.outputs.similar; diff --git a/reference/sqlite3/sqlite3/construct.xml b/reference/sqlite3/sqlite3/construct.xml index 705d2e880..7be040a03 100644 --- a/reference/sqlite3/sqlite3/construct.xml +++ b/reference/sqlite3/sqlite3/construct.xml @@ -123,7 +123,7 @@ $db = new SQLite3('mysqlitedb.db'); $db->exec('CREATE TABLE foo (bar TEXT)'); -$db->exec("INSERT INTO foo (bar) VALUES ('This is a test')"); +$db->exec("INSERT INTO foo (bar) VALUES ('Isto é um teste')"); $result = $db->query('SELECT bar FROM foo'); var_dump($result->fetchArray()); diff --git a/reference/sqlite3/sqlite3/open.xml b/reference/sqlite3/sqlite3/open.xml index c4d54a536..a1e4cf654 100644 --- a/reference/sqlite3/sqlite3/open.xml +++ b/reference/sqlite3/sqlite3/open.xml @@ -106,7 +106,7 @@ class MyDB extends SQLite3 $db = new MyDB(); $db->exec('CREATE TABLE foo (bar STRING)'); -$db->exec("INSERT INTO foo (bar) VALUES ('This is a test')"); +$db->exec("INSERT INTO foo (bar) VALUES ('Isto é um teste')"); $result = $db->query('SELECT bar FROM foo'); var_dump($result->fetchArray()); diff --git a/reference/sqlite3/sqlite3/prepare.xml b/reference/sqlite3/sqlite3/prepare.xml index 221694e55..e19eaa876 100644 --- a/reference/sqlite3/sqlite3/prepare.xml +++ b/reference/sqlite3/sqlite3/prepare.xml @@ -53,7 +53,7 @@ unlink('mysqlitedb.db'); $db = new SQLite3('mysqlitedb.db'); $db->exec('CREATE TABLE foo (id INTEGER, bar STRING)'); -$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')"); +$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'Isto é um teste')"); $stmt = $db->prepare('SELECT bar FROM foo WHERE id=:id'); $stmt->bindValue(':id', 1, SQLITE3_INTEGER); diff --git a/reference/sqlite3/sqlite3stmt/bindvalue.xml b/reference/sqlite3/sqlite3stmt/bindvalue.xml index 70e1e3033..a5ddf1037 100644 --- a/reference/sqlite3/sqlite3stmt/bindvalue.xml +++ b/reference/sqlite3/sqlite3stmt/bindvalue.xml @@ -153,7 +153,7 @@ $db = new SQLite3(':memory:'); $db->exec('CREATE TABLE foo (id INTEGER, bar STRING)'); -$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'This is a test')"); +$db->exec("INSERT INTO foo (id, bar) VALUES (1, 'Isto é um teste')"); $stmt = $db->prepare('SELECT bar FROM foo WHERE id=:id'); $stmt->bindValue(':id', 1, SQLITE3_INTEGER); @@ -168,7 +168,7 @@ var_dump($result->fetchArray(SQLITE3_ASSOC)); - string(14) "This is a test" + string(14) "Isto é um teste" } ]]> diff --git a/reference/stream/functions/stream-filter-append.xml b/reference/stream/functions/stream-filter-append.xml index cb87d48a8..a8e7bde9a 100644 --- a/reference/stream/functions/stream-filter-append.xml +++ b/reference/stream/functions/stream-filter-append.xml @@ -97,7 +97,7 @@ diff --git a/reference/url/functions/base64-decode.xml b/reference/url/functions/base64-decode.xml index 5dc659f28..212691e02 100644 --- a/reference/url/functions/base64-decode.xml +++ b/reference/url/functions/base64-decode.xml @@ -61,7 +61,7 @@ ]]> @@ -69,7 +69,7 @@ echo base64_decode($str); &example.outputs; diff --git a/reference/url/functions/base64-encode.xml b/reference/url/functions/base64-encode.xml index ef053a2ea..a686f1c34 100644 --- a/reference/url/functions/base64-encode.xml +++ b/reference/url/functions/base64-encode.xml @@ -56,7 +56,7 @@ ]]> @@ -64,7 +64,7 @@ echo base64_encode($str); &example.outputs; diff --git a/reference/zip/examples.xml b/reference/zip/examples.xml index 0bd6d15f4..6ec4faf59 100644 --- a/reference/zip/examples.xml +++ b/reference/zip/examples.xml @@ -13,13 +13,13 @@ $zip = new ZipArchive(); $filename = "./test112.zip"; if ($zip->open($filename, ZipArchive::CREATE)!==TRUE) { - exit("cannot open <$filename>\n"); + exit("não foi possível abrir <$filename>\n"); } -$zip->addFromString("testfilephp.txt" . time(), "#1 This is a test string added as testfilephp.txt.\n"); -$zip->addFromString("testfilephp2.txt" . time(), "#2 This is a test string added as testfilephp2.txt.\n"); +$zip->addFromString("testfilephp.txt" . time(), "#1 Esta é uma string de teste adicionada como testfilephp.txt.\n"); +$zip->addFromString("testfilephp2.txt" . time(), "#2 Esta é uma string de teste adicionada como testfilephp2.txt.\n"); $zip->addFile($thisdir . "/too.php","/testfromfile.php"); -echo "numfiles: " . $zip->numFiles . "\n"; +echo "número de arquivos: " . $zip->numFiles . "\n"; echo "status:" . $zip->status . "\n"; $zip->close(); ?> @@ -36,23 +36,23 @@ $za = new ZipArchive(); $za->open('test_with_comment.zip'); print_r($za); var_dump($za); -echo "numFiles: " . $za->numFiles . "\n"; +echo "número de arquivos: " . $za->numFiles . "\n"; echo "status: " . $za->status . "\n"; -echo "statusSys: " . $za->statusSys . "\n"; -echo "filename: " . $za->filename . "\n"; -echo "comment: " . $za->comment . "\n"; +echo "status sistema: " . $za->statusSys . "\n"; +echo "arquivo: " . $za->filename . "\n"; +echo "comentário: " . $za->comment . "\n"; for ($i=0; $i<$za->numFiles;$i++) { - echo "index: $i\n"; + echo "índice: $i\n"; print_r($za->statIndex($i)); } -echo "numFile:" . $za->numFiles . "\n"; +echo "número de arquivos:" . $za->numFiles . "\n"; ?> ]]> - Zip stream wrapper, lendo um OpenOffice meta info + Empacotador de fluxo zip, lendo metainformações do OpenOffice