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

Skip to content

Commit c755add

Browse files
Update translations
1 parent 659d910 commit c755add

File tree

3 files changed

+105
-5
lines changed

3 files changed

+105
-5
lines changed

library/pathlib.po

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,17 @@ msgid ""
13351335
" raise ValueError(\"%r has an empty name\" % (self,))\n"
13361336
"ValueError: PureWindowsPath('c:/') has an empty name"
13371337
msgstr ""
1338+
">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n"
1339+
">>> p.with_name('setup.py')\n"
1340+
"PureWindowsPath('c:/Downloads/setup.py')\n"
1341+
">>> p = PureWindowsPath('c:/')\n"
1342+
">>> p.with_name('setup.py')\n"
1343+
"Traceback (most recent call last):\n"
1344+
" File \"<stdin>\", line 1, in <module>\n"
1345+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 751, in "
1346+
"with_name\n"
1347+
" raise ValueError(\"%r has an empty name\" % (self,))\n"
1348+
"ValueError: PureWindowsPath('c:/') has an empty name"
13381349

13391350
#: ../../library/pathlib.rst:684
13401351
msgid ""
@@ -1364,6 +1375,23 @@ msgid ""
13641375
" raise ValueError(\"%r has an empty name\" % (self,))\n"
13651376
"ValueError: PureWindowsPath('c:/') has an empty name"
13661377
msgstr ""
1378+
">>> p = PureWindowsPath('c:/Downloads/draft.txt')\n"
1379+
">>> p.with_stem('final')\n"
1380+
"PureWindowsPath('c:/Downloads/final.txt')\n"
1381+
">>> p = PureWindowsPath('c:/Downloads/pathlib.tar.gz')\n"
1382+
">>> p.with_stem('lib')\n"
1383+
"PureWindowsPath('c:/Downloads/lib.gz')\n"
1384+
">>> p = PureWindowsPath('c:/')\n"
1385+
">>> p.with_stem('')\n"
1386+
"Traceback (most recent call last):\n"
1387+
" File \"<stdin>\", line 1, in <module>\n"
1388+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 861, in "
1389+
"with_stem\n"
1390+
" return self.with_name(stem + self.suffix)\n"
1391+
" File \"/home/antoine/cpython/default/Lib/pathlib.py\", line 851, in "
1392+
"with_name\n"
1393+
" raise ValueError(\"%r has an empty name\" % (self,))\n"
1394+
"ValueError: PureWindowsPath('c:/') has an empty name"
13671395

13681396
#: ../../library/pathlib.rst:708
13691397
msgid ""
@@ -2215,7 +2243,7 @@ msgid ""
22152243
"Open the file pointed to in bytes mode, write *data* to it, and close the "
22162244
"file::"
22172245
msgstr ""
2218-
"Abre o arquivo apontado no modo bytes, escreve *dados* e fecha o arquivo::"
2246+
"Abre o arquivo apontado no modo bytes, escreve *data* e fecha o arquivo::"
22192247

22202248
#: ../../library/pathlib.rst:1242
22212249
msgid "An existing file of the same name is overwritten."
@@ -2479,13 +2507,21 @@ msgid ""
24792507
"their targets, and consequently visit directories pointed to by symlinks "
24802508
"(where supported)."
24812509
msgstr ""
2510+
"Por padrão, :meth:`Path.walk` não segue links simbólicos e, em vez disso, os "
2511+
"adiciona à lista *filenames*. Defina *follow_symlinks* como true para "
2512+
"resolver links simbólicos e colocá-los em *dirnames* e *filenames* conforme "
2513+
"apropriado para seus alvos e, consequentemente, visitar diretórios apontados "
2514+
"por links simbólicos (quando suportado)."
24822515

24832516
#: ../../library/pathlib.rst:1387
24842517
msgid ""
24852518
"Be aware that setting *follow_symlinks* to true can lead to infinite "
24862519
"recursion if a link points to a parent directory of itself. :meth:`Path."
24872520
"walk` does not keep track of the directories it has already visited."
24882521
msgstr ""
2522+
"Esteja ciente de que definir *follow_symlinks* como true pode levar a uma "
2523+
"recursão infinita se um link apontar para um diretório pai dele mesmo. :meth:"
2524+
"`Path.walk` não rastreia os diretórios que já visitou."
24892525

24902526
#: ../../library/pathlib.rst:1392
24912527
msgid ""
@@ -2495,12 +2531,19 @@ msgid ""
24952531
"try to descend into it. To prevent such behavior, remove directories from "
24962532
"*dirnames* as appropriate."
24972533
msgstr ""
2534+
":meth:`Path.walk` presume que os diretórios que percorre não sejam "
2535+
"modificados durante a execução. Por exemplo, se um diretório de *dirnames* "
2536+
"tiver sido substituído por um link simbólico e *follow_symlinks* for falso, :"
2537+
"meth:`Path.walk` ainda tentará descer até ele. Para evitar esse "
2538+
"comportamento, remova os diretórios de *dirnames* conforme apropriado."
24982539

24992540
#: ../../library/pathlib.rst:1400
25002541
msgid ""
25012542
"Unlike :func:`os.walk`, :meth:`Path.walk` lists symlinks to directories in "
25022543
"*filenames* if *follow_symlinks* is false."
25032544
msgstr ""
2545+
"Diferentemente de :func:`os.walk`, :meth:`Path.walk` lista links simbólicos "
2546+
"para diretórios em *filenames* se *follow_symlinks* for falso."
25042547

25052548
#: ../../library/pathlib.rst:1403
25062549
msgid ""
@@ -2526,13 +2569,29 @@ msgid ""
25262569
" if '__pycache__' in dirs:\n"
25272570
" dirs.remove('__pycache__')"
25282571
msgstr ""
2572+
"from pathlib import Path\n"
2573+
"for root, dirs, files in Path(\"cpython/Lib/concurrent\")."
2574+
"walk(on_error=print):\n"
2575+
" print(\n"
2576+
" root,\n"
2577+
" \"consumes\",\n"
2578+
" sum((root / file).stat().st_size for file in files),\n"
2579+
" \"bytes in\",\n"
2580+
" len(files),\n"
2581+
" \"non-directory files\"\n"
2582+
" )\n"
2583+
" if '__pycache__' in dirs:\n"
2584+
" dirs.remove('__pycache__')"
25292585

25302586
#: ../../library/pathlib.rst:1419
25312587
msgid ""
25322588
"This next example is a simple implementation of :func:`shutil.rmtree`. "
25332589
"Walking the tree bottom-up is essential as :func:`rmdir` doesn't allow "
25342590
"deleting a directory before it is empty::"
25352591
msgstr ""
2592+
"O próximo exemplo é uma implementação simples de :func:`shutil.rmtree`. "
2593+
"Percorrer a árvore de baixo para cima é essencial, pois :func:`rmdir` não "
2594+
"permite excluir um diretório antes que ele esteja vazio."
25362595

25372596
#: ../../library/pathlib.rst:1423
25382597
msgid ""
@@ -2545,6 +2604,14 @@ msgid ""
25452604
" for name in dirs:\n"
25462605
" (root / name).rmdir()"
25472606
msgstr ""
2607+
"# Exclui tudo o que estiver acessível no diretório \"top\".\n"
2608+
"# CUIDADO: Isso é perigoso! Por exemplo, se top == Path('/'),\n"
2609+
"# todos os seus arquivos poderão ser excluídos.\n"
2610+
"for root, dirs, files in top.walk(top_down=False):\n"
2611+
" for name in files:\n"
2612+
" (root / name).unlink()\n"
2613+
" for name in dirs:\n"
2614+
" (root / name).rmdir()"
25482615

25492616
#: ../../library/pathlib.rst:1436
25502617
msgid "Creating files and directories"
@@ -2558,19 +2625,31 @@ msgid ""
25582625
"(and its modification time is updated to the current time), otherwise :exc:"
25592626
"`FileExistsError` is raised."
25602627
msgstr ""
2628+
"Cria um arquivo neste caminho especifico. Caso o *modo* for dado, ele será "
2629+
"combinado com o valor do processo ``umask`` para determinar o modo de "
2630+
"arquivo e as flags de acesso. Se o arquivo já existir, a função será bem-"
2631+
"sucedida quando *exist_ok* for verdadeiro (e o tempo de modificação for "
2632+
"atualizado para a hora atual), caso contrário a exceção :exc:"
2633+
"`FileExistsError` será levantada."
25612634

25622635
#: ../../library/pathlib.rst:1447
25632636
msgid ""
25642637
"The :meth:`~Path.open`, :meth:`~Path.write_text` and :meth:`~Path."
25652638
"write_bytes` methods are often used to create files."
25662639
msgstr ""
2640+
"Os métodos :meth:`~Path.open`, :meth:`~Path.write_text` e :meth:`~Path."
2641+
"write_bytes` são frequentemente usados ​​para criar arquivos."
25672642

25682643
#: ../../library/pathlib.rst:1453
25692644
msgid ""
25702645
"Create a new directory at this given path. If *mode* is given, it is "
25712646
"combined with the process's ``umask`` value to determine the file mode and "
25722647
"access flags. If the path already exists, :exc:`FileExistsError` is raised."
25732648
msgstr ""
2649+
"Cria um novo diretório neste caminho fornecido. Se *mode* for fornecido, ele "
2650+
"é combinado com o valor ``umask`` do processo para determinar o modo do "
2651+
"arquivo e os sinalizadores de acesso. Se o caminho já existe, :exc:"
2652+
"`FileExistsError` é levantada."
25742653

25752654
#: ../../library/pathlib.rst:1458
25762655
msgid ""
@@ -2604,6 +2683,9 @@ msgid ""
26042683
"given path already exists in the file system and is not a directory (same "
26052684
"behavior as the POSIX ``mkdir -p`` command)."
26062685
msgstr ""
2686+
"Se *exist_ok* for verdadeiro, a exceção :exc:`FileExistsError` não será "
2687+
"levantada, a menos que o caminho fornecido já exista no sistema de arquivos "
2688+
"e não seja um diretório (mesmo comportamento do comando POSIX ``mkdir -p``)."
26072689

26082690
#: ../../library/pathlib.rst:1472
26092691
msgid "The *exist_ok* parameter was added."
@@ -2621,6 +2703,12 @@ msgid ""
26212703
"a directory if *target_is_directory* is true or a file symlink (the default) "
26222704
"otherwise. On non-Windows platforms, *target_is_directory* is ignored."
26232705
msgstr ""
2706+
"No Windows, um link simbólico representa um arquivo ou um diretório e não se "
2707+
"transforma no destino dinamicamente. Se o alvo estiver presente, será criado "
2708+
"um link simbólico de mesmo tipo. Caso contrário, o link simbólico será "
2709+
"criado como um diretório se *target_is_directory* for verdadeiro ou um link "
2710+
"simbólico de arquivo (o padrão) caso contrário. Em plataformas não Windows, "
2711+
"*target_is_directory* é ignorado."
26242712

26252713
#: ../../library/pathlib.rst:1488
26262714
msgid ""
@@ -2633,6 +2721,14 @@ msgid ""
26332721
">>> p.lstat().st_size\n"
26342722
"8"
26352723
msgstr ""
2724+
">>> p = Path('meulink')\n"
2725+
">>> p.symlink_to('setup.py')\n"
2726+
">>> p.resolve()\n"
2727+
"PosixPath('/home/antoine/pathlib/setup.py')\n"
2728+
">>> p.stat().st_size\n"
2729+
"956\n"
2730+
">>> p.lstat().st_size\n"
2731+
"8"
26362732

26372733
#: ../../library/pathlib.rst:1498
26382734
msgid ""
@@ -2646,6 +2742,8 @@ msgid ""
26462742
"Raises :exc:`UnsupportedOperation` if :func:`os.symlink` is not available. "
26472743
"In previous versions, :exc:`NotImplementedError` was raised."
26482744
msgstr ""
2745+
"Levanta :exc:`UnsupportedOperation` se :func:`os.symlink` não estiver "
2746+
"disponível. Em versões anteriores, :exc:`NotImplementedError` era levantada."
26492747

26502748
#: ../../library/pathlib.rst:1508
26512749
msgid "Make this path a hard link to the same file as *target*."
@@ -2663,6 +2761,8 @@ msgid ""
26632761
"Raises :exc:`UnsupportedOperation` if :func:`os.link` is not available. In "
26642762
"previous versions, :exc:`NotImplementedError` was raised."
26652763
msgstr ""
2764+
"Levanta :exc:`UnsupportedOperation` se :func:`os.link` não estiver "
2765+
"disponível. Em versões anteriores, :exc:`NotImplementedError` era levantada."
26662766

26672767
#: ../../library/pathlib.rst:1522
26682768
msgid "Renaming and deleting"

potodo.md

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

6565

6666

67-
# library (65.95% done)
67+
# library (66.00% done)
6868

6969
- asyncio-dev.po 16 / 54 ( 29.0% translated).
7070
- asyncio-eventloop.po 308 / 409 ( 75.0% translated).
@@ -122,7 +122,7 @@
122122
- mmap.po 12 / 65 ( 18.0% translated).
123123
- msvcrt.po 22 / 46 ( 47.0% translated).
124124
- multiprocessing.po 326 / 596 ( 54.0% translated).
125-
- pathlib.po 324 / 418 ( 77.0% translated).
125+
- pathlib.po 341 / 418 ( 81.0% translated).
126126
- pkgutil.po 44 / 50 ( 88.0% translated).
127127
- poplib.po 10 / 53 ( 18.0% translated).
128128
- profile.po 34 / 181 ( 18.0% translated).
@@ -196,5 +196,5 @@
196196
- changelog.po 2544 / 12410 ( 20.0% translated).
197197

198198

199-
# TOTAL (62.42% done)
199+
# TOTAL (62.44% done)
200200

stats.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"completion": "62.42%", "translated": 47517, "entries": 76130, "updated_at": "2025-06-29T23:30:59+00:00Z"}
1+
{"completion": "62.44%", "translated": 47534, "entries": 76130, "updated_at": "2025-06-30T23:30:51+00:00Z"}

0 commit comments

Comments
 (0)