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

Skip to content

Commit ace9f98

Browse files
Update translations
1 parent ab6b462 commit ace9f98

File tree

4 files changed

+202
-5
lines changed

4 files changed

+202
-5
lines changed

library/datetime.po

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,6 +1591,46 @@ msgid ""
15911591
">>> d.replace(year=2005)\n"
15921592
"datetime.date(2005, 3, 11)"
15931593
msgstr ""
1594+
">>> from datetime import date\n"
1595+
">>> d = date.fromordinal(730920) # 730920th day after 1. 1. 0001\n"
1596+
">>> d\n"
1597+
"datetime.date(2002, 3, 11)\n"
1598+
"\n"
1599+
">>> # Methods related to formatting string output\n"
1600+
">>> d.isoformat()\n"
1601+
"'2002-03-11'\n"
1602+
">>> d.strftime(\"%d/%m/%y\")\n"
1603+
"'11/03/02'\n"
1604+
">>> d.strftime(\"%A %d. %B %Y\")\n"
1605+
"'Monday 11. March 2002'\n"
1606+
">>> d.ctime()\n"
1607+
"'Mon Mar 11 00:00:00 2002'\n"
1608+
">>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, \"day\", \"month\")\n"
1609+
"'The day is 11, the month is March.'\n"
1610+
"\n"
1611+
">>> # Methods for to extracting 'components' under different calendars\n"
1612+
">>> t = d.timetuple()\n"
1613+
">>> for i in t:\n"
1614+
"... print(i)\n"
1615+
"2002 # year\n"
1616+
"3 # month\n"
1617+
"11 # day\n"
1618+
"0\n"
1619+
"0\n"
1620+
"0\n"
1621+
"0 # weekday (0 = Monday)\n"
1622+
"70 # 70th day in the year\n"
1623+
"-1\n"
1624+
">>> ic = d.isocalendar()\n"
1625+
">>> for i in ic:\n"
1626+
"... print(i)\n"
1627+
"2002 # ISO year\n"
1628+
"11 # ISO week number\n"
1629+
"1 # ISO day number ( 1 = Monday )\n"
1630+
"\n"
1631+
">>> # A date object is immutable; all operations produce a new object\n"
1632+
">>> d.replace(year=2005)\n"
1633+
"datetime.date(2005, 3, 11)"
15941634

15951635
#: ../../library/datetime.rst:838
15961636
msgid ":class:`.datetime` Objects"
@@ -1997,6 +2037,27 @@ msgid ""
19972037
"datetime.datetime(2011, 11, 4, 0, 5, 23,\n"
19982038
" tzinfo=datetime.timezone(datetime.timedelta(seconds=14400)))"
19992039
msgstr ""
2040+
">>> from datetime import datetime\n"
2041+
">>> datetime.fromisoformat('2011-11-04')\n"
2042+
"datetime.datetime(2011, 11, 4, 0, 0)\n"
2043+
">>> datetime.fromisoformat('20111104')\n"
2044+
"datetime.datetime(2011, 11, 4, 0, 0)\n"
2045+
">>> datetime.fromisoformat('2011-11-04T00:05:23')\n"
2046+
"datetime.datetime(2011, 11, 4, 0, 5, 23)\n"
2047+
">>> datetime.fromisoformat('2011-11-04T00:05:23Z')\n"
2048+
"datetime.datetime(2011, 11, 4, 0, 5, 23, tzinfo=datetime.timezone.utc)\n"
2049+
">>> datetime.fromisoformat('20111104T000523')\n"
2050+
"datetime.datetime(2011, 11, 4, 0, 5, 23)\n"
2051+
">>> datetime.fromisoformat('2011-W01-2T00:05:23.283')\n"
2052+
"datetime.datetime(2011, 1, 4, 0, 5, 23, 283000)\n"
2053+
">>> datetime.fromisoformat('2011-11-04 00:05:23.283')\n"
2054+
"datetime.datetime(2011, 11, 4, 0, 5, 23, 283000)\n"
2055+
">>> datetime.fromisoformat('2011-11-04 00:05:23.283+00:00')\n"
2056+
"datetime.datetime(2011, 11, 4, 0, 5, 23, 283000, tzinfo=datetime.timezone."
2057+
"utc)\n"
2058+
">>> datetime.fromisoformat('2011-11-04T00:05:23+04:00')\n"
2059+
"datetime.datetime(2011, 11, 4, 0, 5, 23,\n"
2060+
" tzinfo=datetime.timezone(datetime.timedelta(seconds=14400)))"
20002061

20012062
#: ../../library/datetime.rst:1059
20022063
msgid ""
@@ -2812,6 +2873,12 @@ msgid ""
28122873
">>> dt.isoformat(timespec='microseconds')\n"
28132874
"'2015-01-01T12:30:59.000000'"
28142875
msgstr ""
2876+
">>> from datetime import datetime\n"
2877+
">>> datetime.now().isoformat(timespec='minutes')\n"
2878+
"'2002-12-25T00:00'\n"
2879+
">>> dt = datetime(2015, 1, 1, 12, 30, 59, 0)\n"
2880+
">>> dt.isoformat(timespec='microseconds')\n"
2881+
"'2015-01-01T12:30:59.000000'"
28152882

28162883
#: ../../library/datetime.rst:1526 ../../library/datetime.rst:1901
28172884
msgid "Added the *timespec* parameter."
@@ -2940,6 +3007,57 @@ msgid ""
29403007
"format(dt, \"day\", \"month\", \"time\")\n"
29413008
"'The day is 21, the month is November, the time is 04:30PM.'"
29423009
msgstr ""
3010+
">>> from datetime import datetime, date, time, timezone\n"
3011+
"\n"
3012+
">>> # Usando datetime.combine()\n"
3013+
">>> d = date(2005, 7, 14)\n"
3014+
">>> t = time(12, 30)\n"
3015+
">>> datetime.combine(d, t)\n"
3016+
"datetime.datetime(2005, 7, 14, 12, 30)\n"
3017+
"\n"
3018+
">>> # Usando datetime.now()\n"
3019+
">>> datetime.now() \n"
3020+
"datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) # GMT +1\n"
3021+
">>> datetime.now(timezone.utc) \n"
3022+
"datetime.datetime(2007, 12, 6, 15, 29, 43, 79060, tzinfo=datetime.timezone."
3023+
"utc)\n"
3024+
"\n"
3025+
">>> # Usando datetime.strptime()\n"
3026+
">>> dt = datetime.strptime(\"21/11/06 16:30\", \"%d/%m/%y %H:%M\")\n"
3027+
">>> dt\n"
3028+
"datetime.datetime(2006, 11, 21, 16, 30)\n"
3029+
"\n"
3030+
">>> # Usando datetime.timetuple() para obter uma tupla de todos os "
3031+
"atributos\n"
3032+
">>> tt = dt.timetuple()\n"
3033+
">>> for it in tt: \n"
3034+
"... print(it)\n"
3035+
"...\n"
3036+
"2006 # ano\n"
3037+
"11 # mês\n"
3038+
"21 # dia\n"
3039+
"16 # hora\n"
3040+
"30 # minuto\n"
3041+
"0 # segundo\n"
3042+
"1 # dia da semana (0 = Segunda-feira)\n"
3043+
"325 # número de dias desde 1º de janeiro\n"
3044+
"-1 # dst - método tzinfo.dst() retornou None\n"
3045+
"\n"
3046+
">>> # Data em formato ISO\n"
3047+
">>> ic = dt.isocalendar()\n"
3048+
">>> for it in ic: \n"
3049+
"... print(it)\n"
3050+
"...\n"
3051+
"2006 # ano ISO\n"
3052+
"47 # semana ISO\n"
3053+
"2 # dia da semana ISO\n"
3054+
"\n"
3055+
">>> # Formatando um datetime\n"
3056+
">>> dt.strftime(\"%A, %d. %B %Y %I:%M%p\")\n"
3057+
"'Tuesday, 21. November 2006 04:30PM'\n"
3058+
">>> 'O {1} é {0:%d}, o {2} é {0:%B}, a {3} é {0:%I:%M%p}.'.format(dt, "
3059+
"\"dia\", \"mês\", \"hora\")\n"
3060+
"'O dia é 21, o mês é November, a hora é 04:30PM.'"
29433061

29443062
#: ../../library/datetime.rst:1627
29453063
msgid ""

library/readline.po

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,18 @@ msgid ""
128128
"Execute the init line provided in the *string* argument. This calls :c:func:"
129129
"`!rl_parse_and_bind` in the underlying library."
130130
msgstr ""
131+
"Executa a linha de init fornecida no argumento *string*. Isso chama :c:func:"
132+
"`!rl_parse_and_bind` na biblioteca subjacente."
131133

132134
#: ../../library/readline.rst:66
133135
msgid ""
134136
"Execute a readline initialization file. The default filename is the last "
135137
"filename used. This calls :c:func:`!rl_read_init_file` in the underlying "
136138
"library."
137139
msgstr ""
140+
"Executa um arquivo de inicialização do readline. O nome de arquivo padrão é "
141+
"o último nome de arquivo usado. Isso chama :c:func:`!rl_read_init_file` na "
142+
"biblioteca subjacente."
138143

139144
#: ../../library/readline.rst:71
140145
msgid "Line buffer"
@@ -149,18 +154,24 @@ msgid ""
149154
"Return the current contents of the line buffer (:c:data:`!rl_line_buffer` in "
150155
"the underlying library)."
151156
msgstr ""
157+
"Retorna o conteúdo atual do buffer de linha (:c:data:`!rl_line_buffer` na "
158+
"biblioteca subjacente)."
152159

153160
#: ../../library/readline.rst:84
154161
msgid ""
155162
"Insert text into the line buffer at the cursor position. This calls :c:func:"
156163
"`!rl_insert_text` in the underlying library, but ignores the return value."
157164
msgstr ""
165+
"Insere texto no buffer de linha na posição do cursor. Isso chama :c:func:`!"
166+
"rl_insert_text` na biblioteca subjacente, mas ignora o valor de retorno."
158167

159168
#: ../../library/readline.rst:91
160169
msgid ""
161170
"Change what's displayed on the screen to reflect the current contents of the "
162171
"line buffer. This calls :c:func:`!rl_redisplay` in the underlying library."
163172
msgstr ""
173+
"Altera o que é exibido na tela para refletir o conteúdo atual do buffer de "
174+
"linha. Isso chama :c:func:`!rl_redisplay` na biblioteca subjacente."
164175

165176
#: ../../library/readline.rst:96
166177
msgid "History file"
@@ -176,13 +187,19 @@ msgid ""
176187
"filename is :file:`~/.history`. This calls :c:func:`!read_history` in the "
177188
"underlying library."
178189
msgstr ""
190+
"Carrega um arquivo de histórico do readline e anexa-o à lista de histórico. "
191+
"O nome do arquivo padrão é :file:`~/.history`. Isso chama :c:func:`!"
192+
"read_history` na biblioteca subjacente."
179193

180194
#: ../../library/readline.rst:110
181195
msgid ""
182196
"Save the history list to a readline history file, overwriting any existing "
183197
"file. The default filename is :file:`~/.history`. This calls :c:func:`!"
184198
"write_history` in the underlying library."
185199
msgstr ""
200+
"Salva a lista de histórico em um arquivo de histórico readline, substituindo "
201+
"qualquer arquivo existente. O nome do arquivo padrão é :file:`~/.history`. "
202+
"Isso chama :c:func:`!write_history` na biblioteca subjacente."
186203

187204
#: ../../library/readline.rst:117
188205
msgid ""
@@ -191,6 +208,10 @@ msgid ""
191208
"func:`!append_history` in the underlying library. This function only exists "
192209
"if Python was compiled for a version of the library that supports it."
193210
msgstr ""
211+
"Anexa os últimos *nelements* itens do histórico a um arquivo. O nome do "
212+
"arquivo padrão é :file:`~/.history`. O arquivo já deve existir. Isso chama :"
213+
"c:func:`!append_history` na biblioteca subjacente. Esta função só existe se "
214+
"o Python foi compilado para uma versão da biblioteca que a suporta."
194215

195216
#: ../../library/readline.rst:129
196217
msgid ""
@@ -199,6 +220,11 @@ msgid ""
199220
"file, by calling :c:func:`!history_truncate_file` in the underlying "
200221
"library. Negative values imply unlimited history file size."
201222
msgstr ""
223+
"Define ou retorna o número desejado de linhas para salvar no arquivo de "
224+
"histórico. A função :func:`write_history_file` usa este valor para truncar o "
225+
"arquivo de histórico, chamando :c:func:`!history_truncate_file` na "
226+
"biblioteca subjacente. Valores negativos implicam tamanho ilimitado do "
227+
"arquivo de histórico."
202228

203229
#: ../../library/readline.rst:137
204230
msgid "History list"
@@ -214,6 +240,9 @@ msgid ""
214240
"underlying library. The Python function only exists if Python was compiled "
215241
"for a version of the library that supports it."
216242
msgstr ""
243+
"Limpa o histórico atual. Isso chama :c:func:`!clear_history` na biblioteca "
244+
"subjacente. A função Python só existe se o Python foi compilado para uma "
245+
"versão da biblioteca que a suporta."
217246

218247
#: ../../library/readline.rst:151
219248
msgid ""
@@ -230,33 +259,47 @@ msgid ""
230259
"Return the current contents of history item at *index*. The item index is "
231260
"one-based. This calls :c:func:`!history_get` in the underlying library."
232261
msgstr ""
262+
"Retorna o conteúdo atual do item do histórico em *index*. O índice do item é "
263+
"baseado em um. Isso chama :c:func:`!history_get` na biblioteca subjacente."
233264

234265
#: ../../library/readline.rst:164
235266
msgid ""
236267
"Remove history item specified by its position from the history. The position "
237268
"is zero-based. This calls :c:func:`!remove_history` in the underlying "
238269
"library."
239270
msgstr ""
271+
"Remove o item de histórico especificado por sua posição do histórico. A "
272+
"posição conta a partir de zero. Isso chama :c:func:`!remove_history` na "
273+
"biblioteca subjacente."
240274

241275
#: ../../library/readline.rst:171
242276
msgid ""
243277
"Replace history item specified by its position with *line*. The position is "
244278
"zero-based. This calls :c:func:`!replace_history_entry` in the underlying "
245279
"library."
246280
msgstr ""
281+
"Substitui o item de histórico especificado pela sua posição por *linha*. A "
282+
"posição conta a partir do zero. Isso chama :c:func:`!replace_history_entry` "
283+
"na biblioteca subjacente."
247284

248285
#: ../../library/readline.rst:178
249286
msgid ""
250287
"Append *line* to the history buffer, as if it was the last line typed. This "
251288
"calls :c:func:`!add_history` in the underlying library."
252289
msgstr ""
290+
"Acrescenta *line* ao buffer do histórico, como se fosse a última linha "
291+
"digitada. Isso chama :c:func:`!add_history` na biblioteca subjacente."
253292

254293
#: ../../library/readline.rst:184
255294
msgid ""
256295
"Enable or disable automatic calls to :c:func:`!add_history` when reading "
257296
"input via readline. The *enabled* argument should be a Boolean value that "
258297
"when true, enables auto history, and that when false, disables auto history."
259298
msgstr ""
299+
"Habilita ou desabilita chamadas automáticas para :c:func:`!add_history` ao "
300+
"ler a entrada via readline. O argumento *enabled* deve ser um valor booleano "
301+
"que, quando verdadeiro, ativa o histórico automático e, quando falso, "
302+
"desativa o histórico automático."
260303

261304
#: ../../library/readline.rst:192
262305
msgid ""
@@ -278,6 +321,11 @@ msgid ""
278321
"installed is removed. The hook is called with no arguments just before "
279322
"readline prints the first prompt."
280323
msgstr ""
324+
"Define ou remove a função invocada pelo retorno de chamada :c:data:`!"
325+
"rl_startup_hook` da biblioteca subjacente. Se *function* for especificada, "
326+
"ela será usada como a nova função de gancho; se omitido ou ``None``, "
327+
"qualquer função já instalada será removida. O gancho é chamado sem "
328+
"argumentos antes de readline imprimir o primeiro prompt."
281329

282330
#: ../../library/readline.rst:211
283331
msgid ""
@@ -289,6 +337,13 @@ msgid ""
289337
"characters. This function only exists if Python was compiled for a version "
290338
"of the library that supports it."
291339
msgstr ""
340+
"Define ou remove a função invocada pelo retorno de chamada :c:data:`!"
341+
"rl_pre_input_hook` da biblioteca subjacente. Se *function* for especificada, "
342+
"ela será usada como a nova função de gancho; se omitida ou ``None``, "
343+
"qualquer função já instalada será removida. O gancho é chamado sem "
344+
"argumentos após a impressão do primeiro prompt e pouco antes de readline "
345+
"começar a ler os caracteres de entrada. Esta função só existe se o Python "
346+
"foi compilado para uma versão da biblioteca que a suporta."
292347

293348
#: ../../library/readline.rst:223
294349
msgid "Completion"
@@ -336,6 +391,10 @@ msgid ""
336391
"*text* string comes from the first parameter to the :c:data:`!"
337392
"rl_attempted_completion_function` callback of the underlying library."
338393
msgstr ""
394+
"A função de autocomplemento instalada é invocada pelo retorno de chamada "
395+
"*entry_func* passado para :c:func:`!rl_completion_matches` na biblioteca "
396+
"subjacente. A string *text* vem do primeiro parâmetro para o retorno de "
397+
"chamada :c:data:`!rl_attempted_completion_function` da biblioteca subjacente."
339398

340399
#: ../../library/readline.rst:251
341400
msgid ""
@@ -350,6 +409,9 @@ msgid ""
350409
"Get the type of completion being attempted. This returns the :c:data:`!"
351410
"rl_completion_type` variable in the underlying library as an integer."
352411
msgstr ""
412+
"Obtém o tipo de autocomplemento que está sendo tentado. Isso retorna a "
413+
"variável :c:data:`!rl_completion_type` na biblioteca subjacente como um "
414+
"número inteiro."
353415

354416
#: ../../library/readline.rst:264
355417
msgid ""
@@ -360,6 +422,12 @@ msgid ""
360422
"underlying C readline implementation. Ex: libedit is known to behave "
361423
"differently than libreadline."
362424
msgstr ""
425+
"Obtém o índice inicial ou final do escopo de autocomplemento. Esses índices "
426+
"são os argumentos *start* e *end* passados para o retorno de chamada :c:data:"
427+
"`!rl_attempted_completion_function` da biblioteca subjacente. Os valores "
428+
"podem ser diferentes no mesmo cenário de edição de entrada com base na "
429+
"implementação de C readline subjacente. Por exemplo, sabe-se que o libedit "
430+
"se comporta de maneira diferente do libreadline."
363431

364432
#: ../../library/readline.rst:275
365433
msgid ""
@@ -368,6 +436,10 @@ msgid ""
368436
"functions access the :c:data:`!rl_completer_word_break_characters` variable "
369437
"in the underlying library."
370438
msgstr ""
439+
"Define ou obtém os delimitadores de palavras para autocomplemento. Estes "
440+
"determinam o início da palavra a ser considerada para autocomplemento (o "
441+
"escopo de autocomplemento). Essas funções acessam a variável :c:data:`!"
442+
"rl_completer_word_break_characters` na biblioteca subjacente."
371443

372444
#: ../../library/readline.rst:283
373445
msgid ""
@@ -379,6 +451,14 @@ msgid ""
379451
"called as ``function(substitution, [matches], longest_match_length)`` once "
380452
"each time matches need to be displayed."
381453
msgstr ""
454+
"Define ou remove a função de exibição de autocomplemento. Se *function* for "
455+
"especificada, ela será usada como a nova função de exibição de "
456+
"autocomplemento; se omitida ou ``None``, qualquer função de exibição de "
457+
"autocomplemento já instalada será removida. Isso define ou limpa o retorno "
458+
"de chamada :c:data:`!rl_completion_display_matches_hook` na biblioteca "
459+
"subjacente. A função de exibição de autocomplemento é chamada como "
460+
"``function(substitution, [matches], longest_match_length)`` uma vez que cada "
461+
"correspondência precisa ser exibida."
382462

383463
#: ../../library/readline.rst:296
384464
msgid "Example"

0 commit comments

Comments
 (0)