Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 14ed598

Browse files
Update translations
1 parent d755fdf commit 14ed598

File tree

3 files changed

+101
-5
lines changed

3 files changed

+101
-5
lines changed

library/pathlib.po

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,17 @@ msgid ""
12911291
" raise ValueError(\"%r has an empty name\" % (self,))\n"
12921292
"ValueError: PureWindowsPath('c:/') has an empty name"
12931293
msgstr ""
1294+
">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n"
1295+
">>> p.with_name('setup.py')\n"
1296+
"PureWindowsPath('c:/Downloads/setup.py')\n"
1297+
">>> p = PureWindowsPath('c:/')\n"
1298+
">>> p.with_name('setup.py')\n"
1299+
"Traceback (most recent call last):\n"
1300+
" File \"<stdin>\", line 1, in <module>\n"
1301+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 751, in "
1302+
"with_name\n"
1303+
" raise ValueError(\"%r has an empty name\" % (self,))\n"
1304+
"ValueError: PureWindowsPath('c:/') has an empty name"
12941305

12951306
#: ../../library/pathlib.rst:676
12961307
msgid ""
@@ -1320,6 +1331,23 @@ msgid ""
13201331
" raise ValueError(\"%r has an empty name\" % (self,))\n"
13211332
"ValueError: PureWindowsPath('c:/') has an empty name"
13221333
msgstr ""
1334+
">>> p = PureWindowsPath('c:/Downloads/draft.txt')\n"
1335+
">>> p.with_stem('final')\n"
1336+
"PureWindowsPath('c:/Downloads/final.txt')\n"
1337+
">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n"
1338+
">>> p.with_stem('lib')\n"
1339+
"PureWindowsPath('c:/Downloads/lib.gz')\n"
1340+
">>> p = PureWindowsPath('c:/')\n"
1341+
">>> p.with_stem('')\n"
1342+
"Traceback (most recent call last):\n"
1343+
" File \"<stdin>\", line 1, in <module>\n"
1344+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 861, in "
1345+
"with_stem\n"
1346+
" return self.with_name(stem + self.suffix)\n"
1347+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 851, in "
1348+
"with_name\n"
1349+
" raise ValueError(\"%r has an empty name\" % (self,))\n"
1350+
"ValueError: PureWindowsPath('c:/') has an empty name"
13231351

13241352
#: ../../library/pathlib.rst:700
13251353
msgid ""
@@ -1981,7 +2009,7 @@ msgid ""
19812009
"Open the file pointed to in bytes mode, write *data* to it, and close the "
19822010
"file::"
19832011
msgstr ""
1984-
"Abre o arquivo apontado no modo bytes, escreve *dados* e fecha o arquivo::"
2012+
"Abre o arquivo apontado no modo bytes, escreve *data* e fecha o arquivo::"
19852013

19862014
#: ../../library/pathlib.rst:1140
19872015
msgid "An existing file of the same name is overwritten."
@@ -2246,13 +2274,21 @@ msgid ""
22462274
"their targets, and consequently visit directories pointed to by symlinks "
22472275
"(where supported)."
22482276
msgstr ""
2277+
"Por padrão, :meth:`Path.walk` não segue links simbólicos e, em vez disso, os "
2278+
"adiciona à lista *filenames*. Defina *follow_symlinks* como true para "
2279+
"resolver links simbólicos e colocá-los em *dirnames* e *filenames* conforme "
2280+
"apropriado para seus alvos e, consequentemente, visitar diretórios apontados "
2281+
"por links simbólicos (quando suportado)."
22492282

22502283
#: ../../library/pathlib.rst:1292
22512284
msgid ""
22522285
"Be aware that setting *follow_symlinks* to true can lead to infinite "
22532286
"recursion if a link points to a parent directory of itself. :meth:`Path."
22542287
"walk` does not keep track of the directories it has already visited."
22552288
msgstr ""
2289+
"Esteja ciente de que definir *follow_symlinks* como true pode levar a uma "
2290+
"recursão infinita se um link apontar para um diretório pai dele mesmo. :meth:"
2291+
"`Path.walk` não rastreia os diretórios que já visitou."
22562292

22572293
#: ../../library/pathlib.rst:1297
22582294
msgid ""
@@ -2262,12 +2298,19 @@ msgid ""
22622298
"try to descend into it. To prevent such behavior, remove directories from "
22632299
"*dirnames* as appropriate."
22642300
msgstr ""
2301+
":meth:`Path.walk` presume que os diretórios que percorre não sejam "
2302+
"modificados durante a execução. Por exemplo, se um diretório de *dirnames* "
2303+
"tiver sido substituído por um link simbólico e *follow_symlinks* for falso, :"
2304+
"meth:`Path.walk` ainda tentará descer até ele. Para evitar esse "
2305+
"comportamento, remova os diretórios de *dirnames* conforme apropriado."
22652306

22662307
#: ../../library/pathlib.rst:1305
22672308
msgid ""
22682309
"Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in "
22692310
"*filenames* if *follow_symlinks* is false."
22702311
msgstr ""
2312+
"Diferentemente de :func:`os.walk`, :meth:`Path.walk` lista links simbólicos "
2313+
"para diretórios em *filenames* se *follow_symlinks* for falso."
22712314

22722315
#: ../../library/pathlib.rst:1308
22732316
msgid ""
@@ -2293,13 +2336,29 @@ msgid ""
22932336
" if '__pycache__' in dirs:\n"
22942337
" dirs.remove('__pycache__')"
22952338
msgstr ""
2339+
"from pathlib import Path\n"
2340+
"for root, dirs, files in Path(\"cpython/Lib/concurrent\")."
2341+
"walk(on_error=print):\n"
2342+
" print(\n"
2343+
" root,\n"
2344+
" \"consumes\",\n"
2345+
" sum((root / file).stat().st_size for file in files),\n"
2346+
" \"bytes in\",\n"
2347+
" len(files),\n"
2348+
" \"non-directory files\"\n"
2349+
" )\n"
2350+
" if '__pycache__' in dirs:\n"
2351+
" dirs.remove('__pycache__')"
22962352

22972353
#: ../../library/pathlib.rst:1324
22982354
msgid ""
22992355
"This next example is a simple implementation of :func:`shutil.rmtree`. "
23002356
"Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow "
23012357
"deleting a directory before it is empty::"
23022358
msgstr ""
2359+
"O próximo exemplo é uma implementação simples de :func:`shutil.rmtree`. "
2360+
"Percorrer a árvore de baixo para cima é essencial, pois :func:`rmdir` não "
2361+
"permite excluir um diretório antes que ele esteja vazio."
23032362

23042363
#: ../../library/pathlib.rst:1328
23052364
msgid ""
@@ -2312,6 +2371,14 @@ msgid ""
23122371
" for name in dirs:\n"
23132372
" (root / name).rmdir()"
23142373
msgstr ""
2374+
"# Exclui tudo o que estiver acessível no diretório \"top\".\n"
2375+
"# CUIDADO: Isso é perigoso! Por exemplo, se top == Path('/'),\n"
2376+
"# todos os seus arquivos poderão ser excluídos.\n"
2377+
"for root, dirs, files in top.walk(top_down=False):\n"
2378+
" for name in files:\n"
2379+
" (root / name).unlink()\n"
2380+
" for name in dirs:\n"
2381+
" (root / name).rmdir()"
23152382

23162383
#: ../../library/pathlib.rst:1341
23172384
msgid "Creating files and directories"
@@ -2325,19 +2392,31 @@ msgid ""
23252392
"(and its modification time is updated to the current time), otherwise :exc:"
23262393
"`FileExistsError` is raised."
23272394
msgstr ""
2395+
"Cria um arquivo neste caminho especifico. Caso o *modo* for dado, ele será "
2396+
"combinado com o valor do processo ``umask`` para determinar o modo de "
2397+
"arquivo e as flags de acesso. Se o arquivo já existir, a função será bem-"
2398+
"sucedida quando *exist_ok* for verdadeiro (e o tempo de modificação for "
2399+
"atualizado para a hora atual), caso contrário a exceção :exc:"
2400+
"`FileExistsError` será levantada."
23282401

23292402
#: ../../library/pathlib.rst:1352
23302403
msgid ""
23312404
"The :meth:`~Path.open`, :meth:`~Path.write_text` and :meth:`~Path."
23322405
"write_bytes` methods are often used to create files."
23332406
msgstr ""
2407+
"Os métodos :meth:`~Path.open`, :meth:`~Path.write_text` e :meth:`~Path."
2408+
"write_bytes` são frequentemente usados ​​para criar arquivos."
23342409

23352410
#: ../../library/pathlib.rst:1358
23362411
msgid ""
23372412
"Create a new directory at this given path. If *mode* is given, it is "
23382413
"combined with the process's ``umask`` value to determine the file mode and "
23392414
"access flags. If the path already exists, :exc:`FileExistsError` is raised."
23402415
msgstr ""
2416+
"Cria um novo diretório neste caminho fornecido. Se *mode* for fornecido, ele "
2417+
"é combinado com o valor ``umask`` do processo para determinar o modo do "
2418+
"arquivo e os sinalizadores de acesso. Se o caminho já existe, :exc:"
2419+
"`FileExistsError` é levantada."
23412420

23422421
#: ../../library/pathlib.rst:1363
23432422
msgid ""
@@ -2371,6 +2450,9 @@ msgid ""
23712450
"given path already exists in the file system and is not a directory (same "
23722451
"behavior as the POSIX ``mkdir -p`` command)."
23732452
msgstr ""
2453+
"Se *exist_ok* for verdadeiro, a exceção :exc:`FileExistsError` não será "
2454+
"levantada, a menos que o caminho fornecido já exista no sistema de arquivos "
2455+
"e não seja um diretório (mesmo comportamento do comando POSIX ``mkdir -p``)."
23742456

23752457
#: ../../library/pathlib.rst:1377
23762458
msgid "The *exist_ok* parameter was added."
@@ -2388,6 +2470,12 @@ msgid ""
23882470
"a directory if *target_is_directory* is true or a file symlink (the default) "
23892471
"otherwise. On non-Windows platforms, *target_is_directory* is ignored."
23902472
msgstr ""
2473+
"No Windows, um link simbólico representa um arquivo ou um diretório e não se "
2474+
"transforma no destino dinamicamente. Se o alvo estiver presente, será criado "
2475+
"um link simbólico de mesmo tipo. Caso contrário, o link simbólico será "
2476+
"criado como um diretório se *target_is_directory* for verdadeiro ou um link "
2477+
"simbólico de arquivo (o padrão) caso contrário. Em plataformas não Windows, "
2478+
"*target_is_directory* é ignorado."
23912479

23922480
#: ../../library/pathlib.rst:1393
23932481
msgid ""
@@ -2400,6 +2488,14 @@ msgid ""
24002488
">>> p.lstat().st_size\n"
24012489
"8"
24022490
msgstr ""
2491+
">>> p = Path('meulink')\n"
2492+
">>> p.symlink_to('setup.py')\n"
2493+
">>> p.resolve()\n"
2494+
"PosixPath('/home/antoine/pathlib/setup.py')\n"
2495+
">>> p.stat().st_size\n"
2496+
"956\n"
2497+
">>> p.lstat().st_size\n"
2498+
"8"
24032499

24042500
#: ../../library/pathlib.rst:1403
24052501
msgid ""

potodo.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969

7070

7171

72-
# library (64.47% done)
72+
# library (64.52% done)
7373

7474
- 2to3.po 121 / 132 ( 91.0% translated).
7575
- array.po 78 / 84 ( 92.0% translated).
@@ -153,7 +153,7 @@
153153
- nntplib.po 10 / 92 ( 10.0% translated).
154154
- os.path.po 95 / 98 ( 96.0% translated).
155155
- ossaudiodev.po 18 / 102 ( 17.0% translated).
156-
- pathlib.po 273 / 346 ( 78.0% translated).
156+
- pathlib.po 288 / 346 ( 83.0% translated).
157157
- pdb.po 134 / 139 ( 96.0% translated).
158158
- pipes.po 5 / 21 ( 23.0% translated).
159159
- pkgutil.po 43 / 50 ( 86.0% translated).
@@ -247,5 +247,5 @@
247247
- 3.7.po 252 / 568 ( 44.0% translated).
248248

249249

250-
# TOTAL (69.03% done)
250+
# TOTAL (69.06% done)
251251

stats.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"completion": "69.03%", "translated": 42808, "entries": 62011, "updated_at": "2025-06-29T23:40:15+00:00Z"}
1+
{"completion": "69.06%", "translated": 42823, "entries": 62011, "updated_at": "2025-06-30T23:39:58+00:00Z"}

0 commit comments

Comments
 (0)