Skip to content

Commit d97ef69

Browse files
Update translations
1 parent e52edbc commit d97ef69

File tree

7 files changed

+485
-17
lines changed

7 files changed

+485
-17
lines changed

c-api/long.po

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-03-21 14:55+0000\n"
14+
"POT-Creation-Date: 2025-06-06 15:34+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -86,12 +86,17 @@ msgid ""
8686
"integers between ``-5`` and ``256``. When you create an int in that range "
8787
"you actually just get back a reference to the existing object."
8888
msgstr ""
89+
"A implementação atual mantém um vetor de objetos inteiros para todos os "
90+
"inteiros entre ``-5`` e ``256``. Quando você cria um int nesse intervalo, "
91+
"você na verdade apenas obtém uma referência ao objeto existente."
8992

9093
#: ../../c-api/long.rst:50
9194
msgid ""
9295
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long`, "
9396
"or ``NULL`` on failure."
9497
msgstr ""
98+
"Retorna um novo objeto :c:type:`PyLongObject` de um :c:exp:`unsigned long` C "
99+
"ou ``NULL`` em caso de falha."
95100

96101
#: ../../c-api/long.rst:56
97102
msgid ""
@@ -114,12 +119,16 @@ msgid ""
114119
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`long long`, or "
115120
"``NULL`` on failure."
116121
msgstr ""
122+
"Retorna um novo objeto :c:type:`PyLongObject` de um :c:expr:`long long` C ou "
123+
"``NULL`` em caso de falha."
117124

118125
#: ../../c-api/long.rst:74
119126
msgid ""
120127
"Return a new :c:type:`PyLongObject` object from a C :c:expr:`unsigned long "
121128
"long`, or ``NULL`` on failure."
122129
msgstr ""
130+
"Retorna um novo objeto :c:type:`PyLongObject` de um :c:expr:`unsigned long "
131+
"long` C ou ``NULL`` em caso de falha."
123132

124133
#: ../../c-api/long.rst:80
125134
msgid ""
@@ -143,6 +152,18 @@ msgid ""
143152
"digits or *str* is not NULL-terminated following the digits and trailing "
144153
"whitespace, :exc:`ValueError` will be raised."
145154
msgstr ""
155+
"Retorna um novo :c:type:`PyLongObject` com base no valor da string em *str*, "
156+
"que é interpretado de acordo com a raiz em *base* ou ``NULL`` em caso de "
157+
"falha. Se *pend* não for ``NULL``, *\\*pend* apontará para o fim do *str* em "
158+
"caso de sucesso ou para seu primeiro caractere que não pode ser processado "
159+
"em caso de erro. Se *base* for ``0``, *str* é interpretado usando a "
160+
"definição de :ref:`integers`; neste caso, zeros à esquerda em um número "
161+
"decimal diferente de zero aumenta um :exc:`ValueError`. Se *base* não for "
162+
"``0``, deve estar entre ``2`` e ``36``, inclusive. Espaços em branco no "
163+
"início ou no final e sublinhados simples após um especificador de base e "
164+
"entre dígitos são ignorados. Se não houver dígitos ou *str* não for "
165+
"terminado em NULL após os dígitos e espaços em branco à direita, :exc:"
166+
"`ValueError` será levantada."
146167

147168
#: ../../c-api/long.rst:97
148169
msgid ""

extending/newtypes_tutorial.po

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-01-03 14:53+0000\n"
14+
"POT-Creation-Date: 2025-06-20 15:39+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -56,6 +56,15 @@ msgid ""
5656
"an object, a method called, or it is multiplied by another object. These C "
5757
"functions are called \"type methods\"."
5858
msgstr ""
59+
"O tempo de execução do :term:`CPython` considera todos os objetos Python "
60+
"como variáveis ​​do tipo :c:expr:`PyObject*`, que serve como um \"tipo base\" "
61+
"para todos os objetos Python. A própria estrutura :c:type:`PyObject` contém "
62+
"apenas a :term:`contagem de referências` do objeto e um ponteiro para o "
63+
"\"objeto de tipo\" do objeto. É aqui que ocorre a ação; o objeto de tipo "
64+
"determina quais funções (C) são chamadas pelo interpretador quando, por "
65+
"exemplo, um atributo é consultado em um objeto, um método é chamado ou é "
66+
"multiplicado por outro objeto. Essas funções C são chamadas de \"métodos de "
67+
"tipo\"."
5968

6069
#: ../../extending/newtypes_tutorial.rst:35
6170
msgid ""
@@ -71,6 +80,9 @@ msgid ""
7180
"but complete, module that defines a new type named :class:`!Custom` inside a "
7281
"C extension module :mod:`!custom`:"
7382
msgstr ""
83+
"Esse tipo de coisa só pode ser explicado por exemplo, então aqui está um "
84+
"módulo mínimo, mas completo, que define um novo tipo chamado :class:`!"
85+
"Custom` dentro de um módulo de extensão C :mod:`!custom`:"
7486

7587
#: ../../extending/newtypes_tutorial.rst:43
7688
msgid ""
@@ -79,6 +91,10 @@ msgid ""
7991
"allows defining heap-allocated extension types using the :c:func:"
8092
"`PyType_FromSpec` function, which isn't covered in this tutorial."
8193
msgstr ""
94+
"O que estamos mostrando aqui é a maneira tradicional de definir tipos de "
95+
"extensão *estáticos*. Deve ser adequada para a maioria dos usos. A API C "
96+
"também permite definir tipos de extensão alocados em heap usando a função :c:"
97+
"func:`PyType_FromSpec`, que não é abordada neste tutorial."
8298

8399
#: ../../extending/newtypes_tutorial.rst:48
84100
msgid ""

library/ctypes.po

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-21 14:51+0000\n"
14+
"POT-Creation-Date: 2025-06-13 15:39+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -128,6 +128,13 @@ msgid ""
128128
">>> libc = cdll.msvcrt\n"
129129
">>>"
130130
msgstr ""
131+
">>> from ctypes import *\n"
132+
">>> print(windll.kernel32)\n"
133+
"<WinDLL 'kernel32', handle ... at ...>\n"
134+
">>> print(cdll.msvcrt)\n"
135+
"<CDLL 'msvcrt', handle ... at ...>\n"
136+
">>> libc = cdll.msvcrt\n"
137+
">>>"
131138

132139
#: ../../library/ctypes.rst:65
133140
msgid "Windows appends the usual ``.dll`` file suffix automatically."
@@ -169,6 +176,12 @@ msgid ""
169176
"<CDLL 'libc.so.6', handle ... at ...>\n"
170177
">>>"
171178
msgstr ""
179+
">>> cdll.LoadLibrary(\"libc.so.6\")\n"
180+
"<CDLL 'libc.so.6', handle ... at ...>\n"
181+
">>> libc = CDLL(\"libc.so.6\")\n"
182+
">>> libc\n"
183+
"<CDLL 'libc.so.6', handle ... at ...>\n"
184+
">>>"
172185

173186
#: ../../library/ctypes.rst:92
174187
msgid "Accessing functions from loaded dlls"
@@ -192,6 +205,17 @@ msgid ""
192205
"AttributeError: function 'MyOwnFunction' not found\n"
193206
">>>"
194207
msgstr ""
208+
">>> libc.printf\n"
209+
"<_FuncPtr object at 0x...>\n"
210+
">>> print(windll.kernel32.GetModuleHandleA)\n"
211+
"<_FuncPtr object at 0x...>\n"
212+
">>> print(windll.kernel32.MyOwnFunction)\n"
213+
"Traceback (most recent call last):\n"
214+
" File \"<stdin>\", line 1, in <module>\n"
215+
" File \"ctypes.py\", line 239, in __getattr__\n"
216+
" func = _StdcallFuncPtr(name, self)\n"
217+
"AttributeError: function 'MyOwnFunction' not found\n"
218+
">>>"
195219

196220
#: ../../library/ctypes.rst:108
197221
msgid ""
@@ -203,6 +227,13 @@ msgid ""
203227
"following C prototype, and a macro is used to expose one of them as "
204228
"``GetModuleHandle`` depending on whether UNICODE is defined or not::"
205229
msgstr ""
230+
"Observe que DLLs de sistema do Win32, como ``kernel32`` e ``user32``, "
231+
"frequentemente exportam versões ANSI e UNICODE de uma função. A versão "
232+
"UNICODE é exportada com um ``W`` anexado ao nome, enquanto a versão ANSI é "
233+
"exportada com um ``A`` anexado ao nome. A função ``GetModuleHandle`` do "
234+
"Win32, que retorna um *identificador de módulo* para um determinado nome de "
235+
"módulo, tem o seguinte protótipo em C, e uma macro é usada para expor um "
236+
"deles como ``GetModuleHandle``, dependendo se UNICODE está definido ou não:"
206237

207238
#: ../../library/ctypes.rst:116
208239
msgid ""
@@ -211,27 +242,40 @@ msgid ""
211242
"/* UNICODE version */\n"
212243
"HMODULE GetModuleHandleW(LPCWSTR lpModuleName);"
213244
msgstr ""
245+
"/* versão ANSI */\n"
246+
"HMODULE GetModuleHandleA(LPCSTR lpModuleName);\n"
247+
"/* versão UNICODE */\n"
248+
"HMODULE GetModuleHandleW(LPCWSTR lpModuleName);"
214249

215250
#: ../../library/ctypes.rst:121
216251
msgid ""
217252
"*windll* does not try to select one of them by magic, you must access the "
218253
"version you need by specifying ``GetModuleHandleA`` or ``GetModuleHandleW`` "
219254
"explicitly, and then call it with bytes or string objects respectively."
220255
msgstr ""
256+
"*windll* não tenta selecionar um deles magicamente, você deve acessar a "
257+
"versão necessária especificando ``GetModuleHandleA`` ou ``GetModuleHandleW`` "
258+
"explicitamente e então chamá-lo com objetos bytes ou string, respectivamente."
221259

222260
#: ../../library/ctypes.rst:125
223261
msgid ""
224262
"Sometimes, dlls export functions with names which aren't valid Python "
225263
"identifiers, like ``\"??2@YAPAXI@Z\"``. In this case you have to use :func:"
226264
"`getattr` to retrieve the function::"
227265
msgstr ""
266+
"Às vezes, DLLs exportam funções com nomes que não são identificadores Python "
267+
"válidos, como ``\"??2@YAPAXI@Z\"``. Nesse caso, você precisa usar :func:"
268+
"`getattr` para recuperar a função::"
228269

229270
#: ../../library/ctypes.rst:129
230271
msgid ""
231272
">>> getattr(cdll.msvcrt, \"??2@YAPAXI@Z\")\n"
232273
"<_FuncPtr object at 0x...>\n"
233274
">>>"
234275
msgstr ""
276+
">>> getattr(cdll.msvcrt, \"??2@YAPAXI@Z\")\n"
277+
"<_FuncPtr object at 0x...>\n"
278+
">>>"
235279

236280
#: ../../library/ctypes.rst:133
237281
msgid ""
@@ -255,43 +299,65 @@ msgid ""
255299
"AttributeError: function ordinal 0 not found\n"
256300
">>>"
257301
msgstr ""
302+
">>> cdll.kernel32[1]\n"
303+
"<_FuncPtr object at 0x...>\n"
304+
">>> cdll.kernel32[0]\n"
305+
"Traceback (most recent call last):\n"
306+
" File \"<stdin>\", line 1, in <module>\n"
307+
" File \"ctypes.py\", line 310, in __getitem__\n"
308+
" func = _StdcallFuncPtr(name, self)\n"
309+
"AttributeError: function ordinal 0 not found\n"
310+
">>>"
258311

259312
#: ../../library/ctypes.rst:150
260313
msgid "Calling functions"
261-
msgstr ""
314+
msgstr "Chamando funções"
262315

263316
#: ../../library/ctypes.rst:152
264317
msgid ""
265318
"You can call these functions like any other Python callable. This example "
266319
"uses the ``rand()`` function, which takes no arguments and returns a pseudo-"
267320
"random integer::"
268321
msgstr ""
322+
"Você pode chamar essas funções como qualquer outro chamável do Python. Este "
323+
"exemplo usa a função ``rand()``, que não aceita argumentos e retorna um "
324+
"inteiro pseudoaleatório:"
269325

270326
#: ../../library/ctypes.rst:155
271327
msgid ""
272328
">>> print(libc.rand())\n"
273329
"1804289383"
274330
msgstr ""
331+
">>> print(libc.rand())\n"
332+
"1804289383"
275333

276334
#: ../../library/ctypes.rst:158
277335
msgid ""
278336
"On Windows, you can call the ``GetModuleHandleA()`` function, which returns "
279337
"a win32 module handle (passing ``None`` as single argument to call it with a "
280338
"``NULL`` pointer)::"
281339
msgstr ""
340+
"No Windows, você pode chamar a função ``GetModuleHandleA()``, que retorna um "
341+
"identificador de módulo win32 (passando ``None`` como único argumento para "
342+
"chamá-lo com um ponteiro ``NULL``)::"
282343

283344
#: ../../library/ctypes.rst:161
284345
msgid ""
285346
">>> print(hex(windll.kernel32.GetModuleHandleA(None)))\n"
286347
"0x1d000000\n"
287348
">>>"
288349
msgstr ""
350+
">>> print(hex(windll.kernel32.GetModuleHandleA(None)))\n"
351+
"0x1d000000\n"
352+
">>>"
289353

290354
#: ../../library/ctypes.rst:165
291355
msgid ""
292356
":exc:`ValueError` is raised when you call an ``stdcall`` function with the "
293357
"``cdecl`` calling convention, or vice versa::"
294358
msgstr ""
359+
":exc:`ValueError` é gerado quando você chama uma função ``stdcall`` com a "
360+
"convenção de chamada ``cdecl``, ou vice-versa::"
295361

296362
#: ../../library/ctypes.rst:168
297363
msgid ""
@@ -309,19 +375,37 @@ msgid ""
309375
"excess)\n"
310376
">>>"
311377
msgstr ""
378+
">>> cdll.kernel32.GetModuleHandleA(None)\n"
379+
"Traceback (most recent call last):\n"
380+
" File \"<stdin>\", line 1, in <module>\n"
381+
"ValueError: Procedure probably called with not enough arguments (4 bytes "
382+
"missing)\n"
383+
">>>\n"
384+
"\n"
385+
">>> windll.msvcrt.printf(b\"spam\")\n"
386+
"Traceback (most recent call last):\n"
387+
" File \"<stdin>\", line 1, in <module>\n"
388+
"ValueError: Procedure probably called with too many arguments (4 bytes in "
389+
"excess)\n"
390+
">>>"
312391

313392
#: ../../library/ctypes.rst:180
314393
msgid ""
315394
"To find out the correct calling convention you have to look into the C "
316395
"header file or the documentation for the function you want to call."
317396
msgstr ""
397+
"Para descobrir a convenção de chamada correta, você precisa consultar o "
398+
"arquivo de cabeçalho C ou a documentação da função que deseja chamar."
318399

319400
#: ../../library/ctypes.rst:183
320401
msgid ""
321402
"On Windows, :mod:`ctypes` uses win32 structured exception handling to "
322403
"prevent crashes from general protection faults when functions are called "
323404
"with invalid argument values::"
324405
msgstr ""
406+
"No Windows, :mod:`ctypes` usa o tratamento de exceções estruturado do win32 "
407+
"para evitar travamentos devido a falhas gerais de proteção quando funções "
408+
"são chamadas com valores de argumentos inválidos::"
325409

326410
#: ../../library/ctypes.rst:187
327411
msgid ""
@@ -331,6 +415,11 @@ msgid ""
331415
"OSError: exception: access violation reading 0x00000020\n"
332416
">>>"
333417
msgstr ""
418+
">>> windll.kernel32.GetModuleHandleA(32)\n"
419+
"Traceback (most recent call last):\n"
420+
" File \"<stdin>\", line 1, in <module>\n"
421+
"OSError: exception: access violation reading 0x00000020\n"
422+
">>>"
334423

335424
#: ../../library/ctypes.rst:193
336425
msgid ""
@@ -339,6 +428,10 @@ msgid ""
339428
"debugging crashes (e.g. from segmentation faults produced by erroneous C "
340429
"library calls)."
341430
msgstr ""
431+
"No entanto, existem maneiras suficientes de travar o Python com :mod:"
432+
"`ctypes`, então você deve ter cuidado de qualquer maneira. O módulo :mod:"
433+
"`faulthandler` pode ser útil na depuração de travamentos (por exemplo, de "
434+
"falhas de segmentação produzidas por chamadas errôneas da biblioteca C)."
342435

343436
#: ../../library/ctypes.rst:198
344437
msgid ""

library/importlib.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-28 14:56+0000\n"
14+
"POT-Creation-Date: 2025-06-13 15:39+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
1616
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2025\n"
1717
"Language-Team: Portuguese (Brazil) (https://app.transifex.com/python-doc/"
@@ -217,7 +217,7 @@ msgstr ":pep:`3120`"
217217

218218
#: ../../library/importlib.rst:88
219219
msgid "Using UTF-8 as the Default Source Encoding"
220-
msgstr "Usando UFT-8 como fonte padrão de codificação"
220+
msgstr "Usando UTF-8 como fonte padrão de codificação"
221221

222222
#: ../../library/importlib.rst:90
223223
msgid ":pep:`3147`"

0 commit comments

Comments
 (0)