|
| 1 | +# SOME DESCRIPTIVE TITLE. |
| 2 | +# Copyright (C) 2001-2025, Python Software Foundation |
| 3 | +# This file is distributed under the same license as the Python package. |
| 4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, 2025. |
| 5 | +# |
| 6 | +#, fuzzy |
| 7 | +msgid "" |
| 8 | +msgstr "" |
| 9 | +"Project-Id-Version: Python 3.13\n" |
| 10 | +"Report-Msgid-Bugs-To: \n" |
| 11 | +"POT-Creation-Date: 2025-03-04 13:08+0200\n" |
| 12 | +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
| 13 | +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
| 14 | +"Language: ro\n" |
| 15 | +"Language-Team: ro <LL@li.org>\n" |
| 16 | +"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : (n==0 || (n%100 > 0 && n%100" |
| 17 | +" < 20)) ? 1 : 2);\n" |
| 18 | +"MIME-Version: 1.0\n" |
| 19 | +"Content-Type: text/plain; charset=utf-8\n" |
| 20 | +"Content-Transfer-Encoding: 8bit\n" |
| 21 | +"Generated-By: Babel 2.17.0\n" |
| 22 | + |
| 23 | +#: ../../howto/argparse-optparse.rst:8 |
| 24 | +msgid "Migrating ``optparse`` code to ``argparse``" |
| 25 | +msgstr "" |
| 26 | + |
| 27 | +#: ../../howto/argparse-optparse.rst:10 |
| 28 | +msgid "" |
| 29 | +"The :mod:`argparse` module offers several higher level features not " |
| 30 | +"natively provided by the :mod:`optparse` module, including:" |
| 31 | +msgstr "" |
| 32 | + |
| 33 | +#: ../../howto/argparse-optparse.rst:13 |
| 34 | +msgid "Handling positional arguments." |
| 35 | +msgstr "" |
| 36 | + |
| 37 | +#: ../../howto/argparse-optparse.rst:14 |
| 38 | +msgid "Supporting subcommands." |
| 39 | +msgstr "" |
| 40 | + |
| 41 | +#: ../../howto/argparse-optparse.rst:15 |
| 42 | +msgid "Allowing alternative option prefixes like ``+`` and ``/``." |
| 43 | +msgstr "" |
| 44 | + |
| 45 | +#: ../../howto/argparse-optparse.rst:16 |
| 46 | +msgid "Handling zero-or-more and one-or-more style arguments." |
| 47 | +msgstr "" |
| 48 | + |
| 49 | +#: ../../howto/argparse-optparse.rst:17 |
| 50 | +msgid "Producing more informative usage messages." |
| 51 | +msgstr "" |
| 52 | + |
| 53 | +#: ../../howto/argparse-optparse.rst:18 |
| 54 | +msgid "Providing a much simpler interface for custom ``type`` and ``action``." |
| 55 | +msgstr "" |
| 56 | + |
| 57 | +#: ../../howto/argparse-optparse.rst:20 |
| 58 | +msgid "" |
| 59 | +"Originally, the :mod:`argparse` module attempted to maintain " |
| 60 | +"compatibility with :mod:`optparse`. However, the fundamental design " |
| 61 | +"differences between supporting declarative command line option processing" |
| 62 | +" (while leaving positional argument processing to application code), and " |
| 63 | +"supporting both named options and positional arguments in the declarative" |
| 64 | +" interface mean that the API has diverged from that of ``optparse`` over " |
| 65 | +"time." |
| 66 | +msgstr "" |
| 67 | + |
| 68 | +#: ../../howto/argparse-optparse.rst:27 |
| 69 | +msgid "" |
| 70 | +"As described in :ref:`choosing-an-argument-parser`, applications that are" |
| 71 | +" currently using :mod:`optparse` and are happy with the way it works can " |
| 72 | +"just continue to use ``optparse``." |
| 73 | +msgstr "" |
| 74 | + |
| 75 | +#: ../../howto/argparse-optparse.rst:31 |
| 76 | +msgid "" |
| 77 | +"Application developers that are considering migrating should also review " |
| 78 | +"the list of intrinsic behavioural differences described in that section " |
| 79 | +"before deciding whether or not migration is desirable." |
| 80 | +msgstr "" |
| 81 | + |
| 82 | +#: ../../howto/argparse-optparse.rst:35 |
| 83 | +msgid "" |
| 84 | +"For applications that do choose to migrate from :mod:`optparse` to " |
| 85 | +":mod:`argparse`, the following suggestions should be helpful:" |
| 86 | +msgstr "" |
| 87 | + |
| 88 | +#: ../../howto/argparse-optparse.rst:38 |
| 89 | +msgid "" |
| 90 | +"Replace all :meth:`optparse.OptionParser.add_option` calls with " |
| 91 | +":meth:`ArgumentParser.add_argument` calls." |
| 92 | +msgstr "" |
| 93 | + |
| 94 | +#: ../../howto/argparse-optparse.rst:41 |
| 95 | +msgid "" |
| 96 | +"Replace ``(options, args) = parser.parse_args()`` with ``args = " |
| 97 | +"parser.parse_args()`` and add additional " |
| 98 | +":meth:`ArgumentParser.add_argument` calls for the positional arguments. " |
| 99 | +"Keep in mind that what was previously called ``options``, now in the " |
| 100 | +":mod:`argparse` context is called ``args``." |
| 101 | +msgstr "" |
| 102 | + |
| 103 | +#: ../../howto/argparse-optparse.rst:46 |
| 104 | +msgid "" |
| 105 | +"Replace :meth:`optparse.OptionParser.disable_interspersed_args` by using " |
| 106 | +":meth:`~ArgumentParser.parse_intermixed_args` instead of " |
| 107 | +":meth:`~ArgumentParser.parse_args`." |
| 108 | +msgstr "" |
| 109 | + |
| 110 | +#: ../../howto/argparse-optparse.rst:50 |
| 111 | +msgid "" |
| 112 | +"Replace callback actions and the ``callback_*`` keyword arguments with " |
| 113 | +"``type`` or ``action`` arguments." |
| 114 | +msgstr "" |
| 115 | + |
| 116 | +#: ../../howto/argparse-optparse.rst:53 |
| 117 | +msgid "" |
| 118 | +"Replace string names for ``type`` keyword arguments with the " |
| 119 | +"corresponding type objects (e.g. int, float, complex, etc)." |
| 120 | +msgstr "" |
| 121 | + |
| 122 | +#: ../../howto/argparse-optparse.rst:56 |
| 123 | +msgid "" |
| 124 | +"Replace :class:`optparse.Values` with :class:`Namespace` and " |
| 125 | +":exc:`optparse.OptionError` and :exc:`optparse.OptionValueError` with " |
| 126 | +":exc:`ArgumentError`." |
| 127 | +msgstr "" |
| 128 | + |
| 129 | +#: ../../howto/argparse-optparse.rst:60 |
| 130 | +#, python-format |
| 131 | +msgid "" |
| 132 | +"Replace strings with implicit arguments such as ``%default`` or ``%prog``" |
| 133 | +" with the standard Python syntax to use dictionaries to format strings, " |
| 134 | +"that is, ``%(default)s`` and ``%(prog)s``." |
| 135 | +msgstr "" |
| 136 | + |
| 137 | +#: ../../howto/argparse-optparse.rst:64 |
| 138 | +msgid "" |
| 139 | +"Replace the OptionParser constructor ``version`` argument with a call to " |
| 140 | +"``parser.add_argument('--version', action='version', version='<the " |
| 141 | +"version>')``." |
| 142 | +msgstr "" |
| 143 | + |
0 commit comments