Skip to content

Commit 034c79b

Browse files
Update translations
1 parent 717423f commit 034c79b

17 files changed

+583
-120
lines changed

howto/free-threading-extensions.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ msgstr ""
5353
"A API C do CPython expõe a macro ``Py_GIL_DISABLED``: na construção com "
5454
"threads livres ela está definida como ``1``, e na construção regular ela não "
5555
"está definida. Você pode usá-la para ativar o código que é executado apenas "
56-
"na construção de threads livres::"
56+
"na construção com threads livres::"
5757

5858
#: ../../howto/free-threading-extensions.rst:22
5959
msgid ""
@@ -62,7 +62,7 @@ msgid ""
6262
"#endif"
6363
msgstr ""
6464
"#ifdef Py_GIL_DISABLED\n"
65-
"/* código que só vai ser executado na construção de threads livres */\n"
65+
"/* código que só vai ser executado na construção com threads livres */\n"
6666
"#endif"
6767

6868
#: ../../howto/free-threading-extensions.rst:28
@@ -439,7 +439,7 @@ msgid ""
439439
msgstr ""
440440
"A API C de gerenciamento de memória do Python fornece funções em três :ref:"
441441
"`domínios de alocação <allocator-domains>` diferentes: \"raw\", \"mem\" e "
442-
"\"object\". Para segurança de thread, a construção de threads livres requer "
442+
"\"object\". Para segurança de thread, a construção com threads livres requer "
443443
"que apenas objetos Python sejam alocados usando o domínio do objeto e que "
444444
"todos os objetos Python sejam alocados usando esse domínio. Isso difere das "
445445
"versões anteriores do Python, onde era apenas uma melhor prática e não um "
@@ -569,7 +569,7 @@ msgid ""
569569
"<https://cibuildwheel.pypa.io/en/stable/options/#enable>`_."
570570
msgstr ""
571571
"`pypa/cibuildwheel <https://github.com/pypa/cibuildwheel>`_ oferece suporte "
572-
"a construção de threads livres se você definir `CIBW_ENABLE com cpython-"
572+
"a construção com threads livres se você definir `CIBW_ENABLE com cpython-"
573573
"freethreading <https://cibuildwheel.pypa.io/en/stable/options/#enable>`_."
574574

575575
#: ../../howto/free-threading-extensions.rst:263

library/os.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2513,7 +2513,7 @@ msgid ""
25132513
"sense to block because there are no writers connected to the write end of "
25142514
"the pipe."
25152515
msgstr ""
2516-
"Após a conclusão bem-sucedida, retorna o número de bytes unidos ao "
2516+
"Após a conclusão bem-sucedida, retorna o número de bytes unidos ao "
25172517
"encadeamento ou a partir dele. Um valor de retorno de 0 significa o fim da "
25182518
"entrada. Se *src* se refere a um encadeamento, isso significa que não havia "
25192519
"dados para transferir, e não faria sentido bloquear porque não há escritores "

library/pickle.po

Lines changed: 126 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.13\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-01-03 14:16+0000\n"
14+
"POT-Creation-Date: 2025-05-23 14:55+0000\n"
1515
"PO-Revision-Date: 2025-05-08 05:09+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -1896,6 +1896,44 @@ msgid ""
18961896
" # Finally, save the file.\n"
18971897
" self.file = file"
18981898
msgstr ""
1899+
"class TextReader:\n"
1900+
" \"\"\"Exibe e numera linhas em um arquivo texto.\"\"\"\n"
1901+
"\n"
1902+
" def __init__(self, filename):\n"
1903+
" self.filename = filename\n"
1904+
" self.file = open(filename)\n"
1905+
" self.lineno = 0\n"
1906+
"\n"
1907+
" def readline(self):\n"
1908+
" self.lineno += 1\n"
1909+
" line = self.file.readline()\n"
1910+
" if not line:\n"
1911+
" return None\n"
1912+
" if line.endswith('\\n'):\n"
1913+
" line = line[:-1]\n"
1914+
" return \"%i: %s\" % (self.lineno, line)\n"
1915+
"\n"
1916+
" def __getstate__(self):\n"
1917+
" # Copia o estado do objeto de self.__dict__, que \n"
1918+
" # contém todos os nossos atributos de instância.\n"
1919+
" # Sempre use o método dict.copy() para evitar\n"
1920+
" # modificar o estado original.\n"
1921+
" state = self.__dict__.copy()\n"
1922+
" # Remove as entradas não serializáveis com pickle.\n"
1923+
" del state['file']\n"
1924+
" return state\n"
1925+
"\n"
1926+
" def __setstate__(self, state):\n"
1927+
" # Restaura os atributos da instância (isto é, filename e lineno).\n"
1928+
" self.__dict__.update(state)\n"
1929+
" # Restaura o estado do arquivo aberto anteriormente.\n"
1930+
" # Para fazer isso, precisamos reabri-lo e ler dele até\n"
1931+
" # a contagem de linha ser restaurada.\n"
1932+
" file = open(self.filename)\n"
1933+
" for _ in range(self.lineno):\n"
1934+
" file.readline()\n"
1935+
" # Ao final, salva o arquivo.\n"
1936+
" self.file = file"
18991937

19001938
#: ../../library/pickle.rst:882
19011939
msgid "A sample usage might be something like this::"
@@ -2195,6 +2233,26 @@ msgid ""
21952233
" else:\n"
21962234
" return cls(obj)"
21972235
msgstr ""
2236+
"class ZeroCopyByteArray(bytearray):\n"
2237+
"\n"
2238+
" def __reduce_ex__(self, protocol):\n"
2239+
" if protocol >= 5:\n"
2240+
" return type(self)._reconstruct, (PickleBuffer(self),), None\n"
2241+
" else:\n"
2242+
" # PickleBuffer é proibido no pickle nos protocolos <= 4.\n"
2243+
" return type(self)._reconstruct, (bytearray(self),)\n"
2244+
"\n"
2245+
" @classmethod\n"
2246+
" def _reconstruct(cls, obj):\n"
2247+
" with memoryview(obj) as m:\n"
2248+
" # Obtém um controle sobre o objeto buffer original\n"
2249+
" obj = m.obj\n"
2250+
" if type(obj) is cls:\n"
2251+
" # O objeto do buffer original é um ZeroCopyByteArray,\n"
2252+
" # retorna-o como está.\n"
2253+
" return obj\n"
2254+
" else:\n"
2255+
" return cls(obj)"
21982256

21992257
#: ../../library/pickle.rst:1039
22002258
msgid ""
@@ -2222,6 +2280,11 @@ msgid ""
22222280
"print(b == new_b) # True\n"
22232281
"print(b is new_b) # False: a copy was made"
22242282
msgstr ""
2283+
"b = ZeroCopyByteArray(b\"abc\")\n"
2284+
"data = pickle.dumps(b, protocol=5)\n"
2285+
"new_b = pickle.loads(data)\n"
2286+
"print(b == new_b) # True\n"
2287+
"print(b is new_b) # False: uma cópia foi feita"
22252288

22262289
#: ../../library/pickle.rst:1052
22272290
msgid ""
@@ -2240,6 +2303,12 @@ msgid ""
22402303
"print(b == new_b) # True\n"
22412304
"print(b is new_b) # True: no copy was made"
22422305
msgstr ""
2306+
"b = ZeroCopyByteArray(b\"abc\")\n"
2307+
"buffers = []\n"
2308+
"data = pickle.dumps(b, protocol=5, buffer_callback=buffers.append)\n"
2309+
"new_b = pickle.loads(data, buffers=buffers)\n"
2310+
"print(b == new_b) # True\n"
2311+
"print(b is new_b) # True: nenhuma cópia foi feita"
22432312

22442313
#: ../../library/pickle.rst:1062
22452314
msgid ""
@@ -2351,6 +2420,31 @@ msgid ""
23512420
" \"\"\"Helper function analogous to pickle.loads().\"\"\"\n"
23522421
" return RestrictedUnpickler(io.BytesIO(s)).load()"
23532422
msgstr ""
2423+
"import builtins\n"
2424+
"import io\n"
2425+
"import pickle\n"
2426+
"\n"
2427+
"safe_builtins = {\n"
2428+
" 'range',\n"
2429+
" 'complex',\n"
2430+
" 'set',\n"
2431+
" 'frozenset',\n"
2432+
" 'slice',\n"
2433+
"}\n"
2434+
"\n"
2435+
"class RestrictedUnpickler(pickle.Unpickler):\n"
2436+
"\n"
2437+
" def find_class(self, module, name):\n"
2438+
" # Só permite classes seguras de bultins.\n"
2439+
" if module == \"builtins\" and name in safe_builtins:\n"
2440+
" return getattr(builtins, name)\n"
2441+
" # Proíbe todo o resto.\n"
2442+
" raise pickle.UnpicklingError(\"global '%s.%s' is forbidden\" %\n"
2443+
" (module, name))\n"
2444+
"\n"
2445+
"def restricted_loads(s):\n"
2446+
" \"\"\"Função auxiliar análoga a pickle.loads().\"\"\"\n"
2447+
" return RestrictedUnpickler(io.BytesIO(s)).load()"
23542448

23552449
#: ../../library/pickle.rst:1129
23562450
msgid "A sample usage of our unpickler working as intended::"
@@ -2371,6 +2465,18 @@ msgid ""
23712465
" ...\n"
23722466
"pickle.UnpicklingError: global 'builtins.eval' is forbidden"
23732467
msgstr ""
2468+
">>> restricted_loads(pickle.dumps([1, 2, range(15)]))\n"
2469+
"[1, 2, range(0, 15)]\n"
2470+
">>> restricted_loads(b\"cos\\nsystem\\n(S'echo hello world'\\ntR.\")\n"
2471+
"Traceback (most recent call last):\n"
2472+
" ...\n"
2473+
"pickle.UnpicklingError: global 'os.system' is forbidden\n"
2474+
">>> restricted_loads(b'cbuiltins\\neval\\n'\n"
2475+
"... b'(S\\'getattr(__import__(\"os\"), \"system\")'\n"
2476+
"... b'(\"echo hello world\")\\'\\ntR.')\n"
2477+
"Traceback (most recent call last):\n"
2478+
" ...\n"
2479+
"pickle.UnpicklingError: global 'builtins.eval' is forbidden"
23742480

23752481
#: ../../library/pickle.rst:1148
23762482
msgid ""
@@ -2424,6 +2530,19 @@ msgid ""
24242530
" # Pickle the 'data' dictionary using the highest protocol available.\n"
24252531
" pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)"
24262532
msgstr ""
2533+
"import pickle\n"
2534+
"\n"
2535+
"# Uma coleção arbitrária de objetos aceitos por pickle.\n"
2536+
"data = {\n"
2537+
" 'a': [1, 2.0, 3+4j],\n"
2538+
" 'b': (\"character string\", b\"byte string\"),\n"
2539+
" 'c': {None, True, False}\n"
2540+
"}\n"
2541+
"\n"
2542+
"with open('data.pickle', 'wb') as f:\n"
2543+
" # Serializa com pickle o dicionário 'data' usando\n"
2544+
" # o protocolo mais alto disponível.\n"
2545+
" pickle.dump(data, f, pickle.HIGHEST_PROTOCOL)"
24272546

24282547
#: ../../library/pickle.rst:1183
24292548
msgid "The following example reads the resulting pickled data. ::"
@@ -2439,6 +2558,12 @@ msgid ""
24392558
" # have to specify it.\n"
24402559
" data = pickle.load(f)"
24412560
msgstr ""
2561+
"import pickle\n"
2562+
"\n"
2563+
"with open('data.pickle', 'rb') as f:\n"
2564+
" # A versão do protocolo utilizada é detectada automaticamente,\n"
2565+
" # portanto não precisamos especificá-la.\n"
2566+
" data = pickle.load(f)"
24422567

24432568
#: ../../library/pickle.rst:1199
24442569
msgid "Module :mod:`copyreg`"

library/platform.po

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.13\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-05-08 03:57+0000\n"
14+
"POT-Creation-Date: 2025-05-23 14:55+0000\n"
1515
"PO-Revision-Date: 2025-05-08 05:10+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -43,7 +43,7 @@ msgstr ""
4343

4444
#: ../../library/platform.rst:21
4545
msgid "Cross platform"
46-
msgstr ""
46+
msgstr "Multiplataforma"
4747

4848
#: ../../library/platform.rst:26
4949
msgid ""
@@ -332,7 +332,7 @@ msgstr ":attr:`processor` é resolvido tarde em vez de imediatamente."
332332

333333
#: ../../library/platform.rst:192
334334
msgid "Java platform"
335-
msgstr ""
335+
msgstr "Plataforma Java"
336336

337337
#: ../../library/platform.rst:197
338338
msgid "Version interface for Jython."
@@ -361,7 +361,7 @@ msgstr ""
361361

362362
#: ../../library/platform.rst:210
363363
msgid "Windows platform"
364-
msgstr ""
364+
msgstr "Plataforma Windows"
365365

366366
#: ../../library/platform.rst:215
367367
msgid ""
@@ -415,7 +415,7 @@ msgstr ""
415415

416416
#: ../../library/platform.rst:244
417417
msgid "macOS platform"
418-
msgstr ""
418+
msgstr "Plataforma macOS"
419419

420420
#: ../../library/platform.rst:248
421421
msgid ""
@@ -437,7 +437,7 @@ msgstr ""
437437

438438
#: ../../library/platform.rst:256
439439
msgid "iOS platform"
440-
msgstr ""
440+
msgstr "Plataforma iOS"
441441

442442
#: ../../library/platform.rst:260
443443
msgid ""
@@ -483,7 +483,7 @@ msgstr ""
483483

484484
#: ../../library/platform.rst:275
485485
msgid "Unix platforms"
486-
msgstr ""
486+
msgstr "Plataformas Unix"
487487

488488
#: ../../library/platform.rst:279
489489
msgid ""
@@ -513,7 +513,7 @@ msgstr "O arquivo é lido e escaneado em blocos de *chunksize* bytes."
513513

514514
#: ../../library/platform.rst:291
515515
msgid "Linux platforms"
516-
msgstr ""
516+
msgstr "Plataformas Linux"
517517

518518
#: ../../library/platform.rst:295
519519
msgid ""
@@ -587,7 +587,7 @@ msgstr ""
587587

588588
#: ../../library/platform.rst:329
589589
msgid "Android platform"
590-
msgstr ""
590+
msgstr "Plataforma Android"
591591

592592
#: ../../library/platform.rst:334
593593
msgid ""
@@ -663,10 +663,12 @@ msgid ""
663663
":mod:`platform` can also be invoked directly using the :option:`-m` switch "
664664
"of the interpreter::"
665665
msgstr ""
666+
":mod:`platform` também pode ser invocado diretamente usando a opção :option:"
667+
"`-m` do interpretador::"
666668

667669
#: ../../library/platform.rst:371
668670
msgid "python -m platform [--terse] [--nonaliased] [{nonaliased,terse} ...]"
669-
msgstr ""
671+
msgstr "python -m platform [--terse] [--nonaliased] [{nonaliased,terse} ...]"
670672

671673
#: ../../library/platform.rst:373
672674
msgid "The following options are accepted:"
@@ -677,17 +679,25 @@ msgid ""
677679
"Print terse information about the platform. This is equivalent to calling :"
678680
"func:`platform.platform` with the *terse* argument set to ``True``."
679681
msgstr ""
682+
"Exibe informações concisas sobre a plataforma. Isso equivale a chamar :func:"
683+
"`platform.platform` com o argumento *terse* definido como ``True``."
680684

681685
#: ../../library/platform.rst:384
682686
msgid ""
683687
"Print platform information without system/OS name aliasing. This is "
684688
"equivalent to calling :func:`platform.platform` with the *aliased* argument "
685689
"set to ``True``."
686690
msgstr ""
691+
"Exibe informações da plataforma sem alias de nome do sistema/SO. Isso "
692+
"equivale a chamar :func:`platform.platform` com o argumento *aliased* "
693+
"definido como ``True``."
687694

688695
#: ../../library/platform.rst:388
689696
msgid ""
690697
"You can also pass one or more positional arguments (``terse``, "
691698
"``nonaliased``) to explicitly control the output format. These behave "
692699
"similarly to their corresponding options."
693700
msgstr ""
701+
"Você também pode passar um ou mais argumentos posicionais (``terse``, "
702+
"``nonaliased``) para controlar explicitamente o formato de saída. Eles se "
703+
"comportam de forma semelhante às suas opções correspondentes."

library/site.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.13\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-07 14:17+0000\n"
14+
"POT-Creation-Date: 2025-05-23 14:55+0000\n"
1515
"PO-Revision-Date: 2025-05-08 05:10+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -85,7 +85,7 @@ msgstr ""
8585
"exec_prefix``; inícios vazios são ignorados. Para a parte no final, ele usa "
8686
"a string vazia e então :file:`lib/site-packages` (no Windows) ou :file:`lib/"
8787
"python{X.Y[t]}/site-packages` (no Unix e macOS). (O sufixo opcional \"t\" "
88-
"indica a construção de :term:`threads livres` e é anexado se ``\"t\"`` "
88+
"indica a construção com :term:`threads livres` e é anexado se ``\"t\"`` "
8989
"estiver presente na constante :data:`sys.abiflags`.) Para cada uma das "
9090
"combinações distintas início-fim, ele vê se se refere a um diretório "
9191
"existente e, se sim, adiciona-o a ``sys.path`` e também inspeciona o caminho "
@@ -380,8 +380,8 @@ msgstr ""
380380
"construções UNIX e macOS não-framework, :file:`~/Library/Python/{X.Y}/lib/"
381381
"python/site-packages` para construções macOS framework e :file:`{%APPDATA%}\\"
382382
"\\Python\\\\Python{XY}\\\\site-packages` no Windows. O \"t\" opcional indica "
383-
"a construção de threads livres. Este diretório é um diretório de site, o que "
384-
"significa que os arquivos :file:`.pth` nele serão processados."
383+
"a construção com threads livres. Este diretório é um diretório de site, o "
384+
"que significa que os arquivos :file:`.pth` nele serão processados."
385385

386386
#: ../../library/site.rst:210
387387
msgid ""

library/stdtypes.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3280,7 +3280,7 @@ msgstr ""
32803280

32813281
#: ../../library/stdtypes.rst:1742
32823282
msgid "See also :meth:`startswith` and :meth:`removesuffix`."
3283-
msgstr "veja também :meth:`startswith` e :meth:`removesuffix`."
3283+
msgstr "Veja também :meth:`startswith` e :meth:`removesuffix`."
32843284

32853285
#: ../../library/stdtypes.rst:1747
32863286
msgid ""

0 commit comments

Comments
 (0)