diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 654099358..d45923aad 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,12 @@ env: jobs: lint: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python: + - "3.7" + - "3.10" steps: - uses: actions/checkout@v2 - run: | @@ -19,7 +25,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v1 with: - python-version: 3.7 + python-version: ${{ matrix.python }} - name: Install python dependencies run: | pip install pygithub diff --git a/.gitignore b/.gitignore index 0b914f86a..ec1a08832 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ build/ tests/cli.toml /.ci/settings/certs site/ +dist/ +*.po~ diff --git a/CHANGES/328.feature b/CHANGES/328.feature new file mode 100644 index 000000000..7afe1d111 --- /dev/null +++ b/CHANGES/328.feature @@ -0,0 +1 @@ +Added facilities to create, load and distribute translations. diff --git a/CHANGES/328.translation b/CHANGES/328.translation new file mode 100644 index 000000000..bec2bf57c --- /dev/null +++ b/CHANGES/328.translation @@ -0,0 +1 @@ +Added some German translations. diff --git a/Makefile b/Makefile index c7e969281..d02bcef70 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,10 @@ +LANGUAGES=de +PLUGINS=$(notdir $(wildcard pulpcore/cli/*)) + +info: + @echo Pulp CLI + @echo plugins: $(PLUGINS) + black: isort . black . @@ -23,4 +30,21 @@ servedocs: site: mkdocs build -.PHONY: black lint servedocs +pulpcore/cli/%/locale/messages.pot: pulpcore/cli/%/*.py + xgettext -d $* -o $@ pulpcore/cli/$*/*.py + sed -i 's/charset=CHARSET/charset=UTF-8/g' $@ + +extract_messages: $(foreach PLUGIN,$(PLUGINS),pulpcore/cli/$(PLUGIN)/locale/messages.pot) + +$(foreach LANGUAGE,$(LANGUAGES),pulpcore/cli/%/locale/$(LANGUAGE)/LC_MESSAGES/messages.po): pulpcore/cli/%/locale/messages.pot + [ -e $(@D) ] || mkdir -p $(@D) + [ ! -e $@ ] || msgmerge --update $@ $< + [ -e $@ ] || cp $< $@ + +%.mo: %.po + msgfmt -o $@ $< + +compile_messages: $(foreach LANGUAGE,$(LANGUAGES),$(foreach PLUGIN,$(PLUGINS),pulpcore/cli/$(PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo)) + +.PHONY: info black lint test servedocs +.PRECIOUS: $(foreach LANGUAGE,$(LANGUAGES),$(foreach PLUGIN,$(PLUGINS),pulpcore/cli/$(PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po)) diff --git a/pulpcore/cli/ansible/__init__.py b/pulpcore/cli/ansible/__init__.py index 803ddc5f4..adb0a518e 100644 --- a/pulpcore/cli/ansible/__init__.py +++ b/pulpcore/cli/ansible/__init__.py @@ -1,13 +1,13 @@ -import gettext - from pulpcore.cli.ansible.content import content from pulpcore.cli.ansible.distribution import distribution from pulpcore.cli.ansible.remote import remote from pulpcore.cli.ansible.repository import repository from pulpcore.cli.common import main from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @main.group() diff --git a/pulpcore/cli/ansible/content.py b/pulpcore/cli/ansible/content.py index 73ace0595..85ab70b9b 100644 --- a/pulpcore/cli/ansible/content.py +++ b/pulpcore/cli/ansible/content.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Any, Union import click @@ -19,9 +18,11 @@ pulp_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpArtifactContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _content_callback(ctx: click.Context, param: click.Parameter, value: Any) -> Any: diff --git a/pulpcore/cli/ansible/context.py b/pulpcore/cli/ansible/context.py index 44c233b5d..5b375ea87 100644 --- a/pulpcore/cli/ansible/context.py +++ b/pulpcore/cli/ansible/context.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Any, ClassVar from pulpcore.cli.common.context import ( @@ -11,8 +10,10 @@ PulpRepositoryVersionContext, registered_repository_contexts, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpAnsibleCollectionVersionContext(PulpContentContext): diff --git a/pulpcore/cli/ansible/distribution.py b/pulpcore/cli/ansible/distribution.py index fd3934b37..a7ba419e8 100644 --- a/pulpcore/cli/ansible/distribution.py +++ b/pulpcore/cli/ansible/distribution.py @@ -1,4 +1,3 @@ -import gettext from typing import Optional import click @@ -28,8 +27,10 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..392bf4f8e Binary files /dev/null and b/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..9f3d96ade --- /dev/null +++ b/pulpcore/cli/ansible/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,195 @@ +# Translations for the pulp-cli ansible plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: 2021-12-06 11:29+0100\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/ansible/content.py:55 pulpcore/cli/ansible/content.py:87 +#: pulpcore/cli/ansible/repository.py:116 +#, python-brace-format +msgid "Name of {entity}" +msgstr "Name von {entity}" + +#: pulpcore/cli/ansible/content.py:56 pulpcore/cli/ansible/content.py:95 +#: pulpcore/cli/ansible/repository.py:124 +#, python-brace-format +msgid "Namespace of {entity}" +msgstr "Namensraum von {entity}" + +#: pulpcore/cli/ansible/content.py:57 pulpcore/cli/ansible/content.py:102 +#: pulpcore/cli/ansible/repository.py:131 +#, python-brace-format +msgid "Version of {entity}" +msgstr "Version von {entity}" + +#: pulpcore/cli/ansible/content.py:64 +msgid "" +"Only show highest version of collection version (only works for collection " +"versions)" +msgstr "" + +#: pulpcore/cli/ansible/content.py:70 +msgid "" +"Comma separated list of tags that must all match (only works for collection " +"versions)" +msgstr "" + +#: pulpcore/cli/ansible/content.py:76 +msgid "String list of fields to include in the result" +msgstr "" + +#: pulpcore/cli/ansible/content.py:80 +msgid "String list of fields to exclude from result" +msgstr "" + +#: pulpcore/cli/ansible/content.py:117 +#, python-brace-format +msgid "Name of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/content.py:118 +#, python-brace-format +msgid "Namespace of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/content.py:119 +#, python-brace-format +msgid "Version of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/context.py:20 +msgid "ansible collection version" +msgstr "" + +#: pulpcore/cli/ansible/context.py:21 +msgid "ansible collection versions" +msgstr "" + +#: pulpcore/cli/ansible/context.py:34 +msgid "ansible role" +msgstr "" + +#: pulpcore/cli/ansible/context.py:35 +msgid "ansible roles" +msgstr "" + +#: pulpcore/cli/ansible/context.py:43 +msgid "ansible distribution" +msgstr "" + +#: pulpcore/cli/ansible/context.py:44 +msgid "ansible distributions" +msgstr "" + +#: pulpcore/cli/ansible/context.py:62 +msgid "role remote" +msgstr "" + +#: pulpcore/cli/ansible/context.py:63 +msgid "role remotes" +msgstr "" + +#: pulpcore/cli/ansible/context.py:73 +msgid "collection remote" +msgstr "" + +#: pulpcore/cli/ansible/context.py:74 +msgid "collection remotes" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:68 +msgid "the base (relative) path component of the published url." +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:72 +msgid "a repository version number, leave blank for latest" +msgstr "" +"Versionsnummer des Repositories, leer lassen um die letzte zu verwenden" + +#: pulpcore/cli/ansible/distribution.py:92 +msgid "new base_path" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:93 +msgid "new repository to be served" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:98 +msgid "version of new repository to be served, leave blank for always latest" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:147 +#, python-brace-format +msgid "" +"Distribution {name} doesn't have a repository set, please specify the " +"repository to use with --repository" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:36 +#, python-brace-format +msgid "Option {parameter} not valid for Role remote, see --help" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:69 +msgid "policy to use when downloading" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:76 +msgid "Collections only: a Collection requirements yaml" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:81 +msgid "Collections only: a string of a requirements yaml" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:86 +msgid "Collections only: URL to receive a session token" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:91 +msgid "Collections only: token key use for authentication" +msgstr "" + +#: pulpcore/cli/ansible/repository.py:55 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:154 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"name\", \"namespace\", " +"\"version\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:163 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"name\", \"namespace\", " +"\"version\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:223 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/ansible/locale/messages.pot b/pulpcore/cli/ansible/locale/messages.pot new file mode 100644 index 000000000..6cc001f8d --- /dev/null +++ b/pulpcore/cli/ansible/locale/messages.pot @@ -0,0 +1,194 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/ansible/content.py:55 pulpcore/cli/ansible/content.py:87 +#: pulpcore/cli/ansible/repository.py:116 +#, python-brace-format +msgid "Name of {entity}" +msgstr "" + +#: pulpcore/cli/ansible/content.py:56 pulpcore/cli/ansible/content.py:95 +#: pulpcore/cli/ansible/repository.py:124 +#, python-brace-format +msgid "Namespace of {entity}" +msgstr "" + +#: pulpcore/cli/ansible/content.py:57 pulpcore/cli/ansible/content.py:102 +#: pulpcore/cli/ansible/repository.py:131 +#, python-brace-format +msgid "Version of {entity}" +msgstr "" + +#: pulpcore/cli/ansible/content.py:64 +msgid "" +"Only show highest version of collection version (only works for collection " +"versions)" +msgstr "" + +#: pulpcore/cli/ansible/content.py:70 +msgid "" +"Comma separated list of tags that must all match (only works for collection " +"versions)" +msgstr "" + +#: pulpcore/cli/ansible/content.py:76 +msgid "String list of fields to include in the result" +msgstr "" + +#: pulpcore/cli/ansible/content.py:80 +msgid "String list of fields to exclude from result" +msgstr "" + +#: pulpcore/cli/ansible/content.py:117 +#, python-brace-format +msgid "Name of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/content.py:118 +#, python-brace-format +msgid "Namespace of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/content.py:119 +#, python-brace-format +msgid "Version of {entity}, only required for Roles" +msgstr "" + +#: pulpcore/cli/ansible/context.py:20 +msgid "ansible collection version" +msgstr "" + +#: pulpcore/cli/ansible/context.py:21 +msgid "ansible collection versions" +msgstr "" + +#: pulpcore/cli/ansible/context.py:34 +msgid "ansible role" +msgstr "" + +#: pulpcore/cli/ansible/context.py:35 +msgid "ansible roles" +msgstr "" + +#: pulpcore/cli/ansible/context.py:43 +msgid "ansible distribution" +msgstr "" + +#: pulpcore/cli/ansible/context.py:44 +msgid "ansible distributions" +msgstr "" + +#: pulpcore/cli/ansible/context.py:62 +msgid "role remote" +msgstr "" + +#: pulpcore/cli/ansible/context.py:63 +msgid "role remotes" +msgstr "" + +#: pulpcore/cli/ansible/context.py:73 +msgid "collection remote" +msgstr "" + +#: pulpcore/cli/ansible/context.py:74 +msgid "collection remotes" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:68 +msgid "the base (relative) path component of the published url." +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:72 +msgid "a repository version number, leave blank for latest" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:92 +msgid "new base_path" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:93 +msgid "new repository to be served" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:98 +msgid "version of new repository to be served, leave blank for always latest" +msgstr "" + +#: pulpcore/cli/ansible/distribution.py:147 +#, python-brace-format +msgid "" +"Distribution {name} doesn't have a repository set, please specify the " +"repository to use with --repository" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:36 +#, python-brace-format +msgid "Option {parameter} not valid for Role remote, see --help" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:69 +msgid "policy to use when downloading" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:76 +msgid "Collections only: a Collection requirements yaml" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:81 +msgid "Collections only: a string of a requirements yaml" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:86 +msgid "Collections only: URL to receive a session token" +msgstr "" + +#: pulpcore/cli/ansible/remote.py:91 +msgid "Collections only: token key use for authentication" +msgstr "" + +#: pulpcore/cli/ansible/repository.py:55 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:154 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"name\", \"namespace\", " +"\"version\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:163 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"name\", \"namespace\", " +"\"version\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/ansible/repository.py:223 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/ansible/remote.py b/pulpcore/cli/ansible/remote.py index 360969cca..4b769d381 100644 --- a/pulpcore/cli/ansible/remote.py +++ b/pulpcore/cli/ansible/remote.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, Optional, Union import click @@ -24,8 +23,10 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _requirements_callback( diff --git a/pulpcore/cli/ansible/repository.py b/pulpcore/cli/ansible/repository.py index cfb86d696..b7bf60fd2 100644 --- a/pulpcore/cli/ansible/repository.py +++ b/pulpcore/cli/ansible/repository.py @@ -1,4 +1,3 @@ -import gettext from typing import Any import click @@ -38,8 +37,10 @@ update_command, version_command, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext remote_option = resource_option( diff --git a/pulpcore/cli/common/__init__.py b/pulpcore/cli/common/__init__.py index 32b567e58..293393a09 100644 --- a/pulpcore/cli/common/__init__.py +++ b/pulpcore/cli/common/__init__.py @@ -1,4 +1,3 @@ -import gettext import os import sys from typing import Any, Optional @@ -17,10 +16,13 @@ from pulpcore.cli.common.config import CONFIG_LOCATIONS, config, config_options, validate_config from pulpcore.cli.common.context import PluginRequirement, PulpContext from pulpcore.cli.common.debug import debug +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext __version__ = "0.13.0.dev" +translation = get_translation(__name__) +_ = translation.gettext + ############################################################################## # Main entry point diff --git a/pulpcore/cli/common/config.py b/pulpcore/cli/common/config.py index 13938f6f6..5ea117eeb 100644 --- a/pulpcore/cli/common/config.py +++ b/pulpcore/cli/common/config.py @@ -1,11 +1,14 @@ -import gettext from pathlib import Path from typing import Any, Callable, Dict, List, MutableMapping, Optional, TypeVar import click import toml -_ = gettext.gettext +from pulpcore.cli.common.i18n import get_translation + +translation = get_translation(__name__) +_ = translation.gettext + _T = TypeVar("_T") CONFIG_LOCATIONS = [ diff --git a/pulpcore/cli/common/context.py b/pulpcore/cli/common/context.py index e15027e35..8ad29b72c 100644 --- a/pulpcore/cli/common/context.py +++ b/pulpcore/cli/common/context.py @@ -1,5 +1,4 @@ import datetime -import gettext import json import sys import time @@ -10,6 +9,7 @@ from packaging.version import parse as parse_version from requests import HTTPError +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.common.openapi import OpenAPI, OpenAPIError try: @@ -22,7 +22,8 @@ PYGMENTS = True PYGMENTS_STYLE = "solarized-dark" -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext DEFAULT_LIMIT = 25 BATCH_SIZE = 25 diff --git a/pulpcore/cli/common/debug.py b/pulpcore/cli/common/debug.py index 6d5c39369..fbc3bbffd 100644 --- a/pulpcore/cli/common/debug.py +++ b/pulpcore/cli/common/debug.py @@ -1,4 +1,3 @@ -import gettext import sys from typing import IO, Any, Dict, Iterable, Optional @@ -6,8 +5,10 @@ from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context from pulpcore.cli.common.generic import load_json_callback +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group(help=_("Commands useful for debugging")) diff --git a/pulpcore/cli/common/generic.py b/pulpcore/cli/common/generic.py index bba68793e..ac2f8e9ca 100644 --- a/pulpcore/cli/common/generic.py +++ b/pulpcore/cli/common/generic.py @@ -1,4 +1,3 @@ -import gettext import json import re from functools import lru_cache @@ -23,8 +22,10 @@ pass_repository_context, pass_repository_version_context, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext _F = Callable[..., Any] _FC = TypeVar("_FC", _F, click.Command) diff --git a/pulpcore/cli/common/i18n.py b/pulpcore/cli/common/i18n.py new file mode 100644 index 000000000..22f7dad37 --- /dev/null +++ b/pulpcore/cli/common/i18n.py @@ -0,0 +1,15 @@ +import gettext +from functools import lru_cache + +import pkg_resources + + +def get_translation(name: str) -> gettext.NullTranslations: + localedir = pkg_resources.resource_filename(name, "locale") + return _get_translation_for_domain("messages", localedir) + + +# Need to call lru_cache() before using it as a decorator for python 3.7 compatibility +@lru_cache(maxsize=None) +def _get_translation_for_domain(domain: str, localedir: str) -> gettext.NullTranslations: + return gettext.translation(domain, localedir=localedir, fallback=True) diff --git a/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..540148056 Binary files /dev/null and b/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..0d616ae22 --- /dev/null +++ b/pulpcore/cli/common/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,643 @@ +# Translations for the pulp-cli common plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: 2021-12-06 11:08+0100\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/common/__init__.py:68 +#, python-brace-format +msgid "Profile named '{profile}' not found." +msgstr "Profil mit Namen '{profile}' nicht gefunden." + +#: pulpcore/cli/common/__init__.py:72 +msgid "Config file failed to parse. ({})." +msgstr "Konfigurationsdatei konnte nicht entziffert werden. ({})." + +#: pulpcore/cli/common/__init__.py:73 +msgid "Continue without config?" +msgstr "Ohne Konfiguration fortfahren?" + +#: pulpcore/cli/common/__init__.py:75 +msgid "Aborted." +msgstr "Abgebrochen." + +#: pulpcore/cli/common/__init__.py:79 +msgid "pulp3 command line interface" +msgstr "Pulp 3 Kommandozeilenschnittstelle" + +#: pulpcore/cli/common/__init__.py:83 +msgid "Config profile to use" +msgstr "Zu benutzendes Konfigurationsprofil" + +#: pulpcore/cli/common/__init__.py:91 +msgid "Path of a Pulp CLI settings file to use instead of the default location" +msgstr "" +"Pfad einer Pulp CLI Konfigurationsdatei, die anstatt des voreingestellten " +"Ort genutzt werden soll." + +#: pulpcore/cli/common/__init__.py:99 +msgid "Start tasks in the background instead of awaiting them" +msgstr "Starte Aufgaben im Hintergrund, anstatt auf sie zu warten." + +#: pulpcore/cli/common/__init__.py:101 +msgid "Invalidate cached API docs" +msgstr "Annulliere vorgespeicherte API Dokumentation." + +#: pulpcore/cli/common/config.py:34 +msgid "API base url" +msgstr "API Basisadresse" + +#: pulpcore/cli/common/config.py:35 +msgid "Username on pulp server" +msgstr "Benutzername auf dem pulp Server" + +#: pulpcore/cli/common/config.py:36 +msgid "Password on pulp server" +msgstr "Passwort auf dem pulp server" + +#: pulpcore/cli/common/config.py:37 +msgid "Path to client certificate" +msgstr "Verzeichnis zum Benutzerzertifikat" + +#: pulpcore/cli/common/config.py:41 +msgid "Path to client private key. Not required if client cert contains this." +msgstr "" +"Verzeichis zum Schlüssel des Benutzerzertifikats. Nicht notwendig, wenn in " +"Benutzerzertifikat enthalten." + +#: pulpcore/cli/common/config.py:43 +msgid "Verify SSL connection" +msgstr "SSL-Verbindung verifizieren" + +#: pulpcore/cli/common/config.py:48 +msgid "Format of the response" +msgstr "Format der Antwort" + +#: pulpcore/cli/common/config.py:53 +msgid "Trace commands without performing any unsafe HTTP calls" +msgstr "Verfolge Kommandos ohne gefährliche HTTP Aufrufe durchzuführen." + +#: pulpcore/cli/common/config.py:60 +msgid "Time to wait for background tasks, set to 0 to wait infinitely" +msgstr "" +"Dauer um auf Hintergrundprozesse zu warten. Setze auf 0 um ewig zu warten." + +#: pulpcore/cli/common/config.py:67 +msgid "Increase verbosity; explain api calls as they are made" +msgstr "Erhöhe Gesprächigkeit; erläutert API Aufrufe wenn sie gemacht werden." + +#: pulpcore/cli/common/config.py:74 +msgid "Value cannot be None." +msgstr "Der Wert kann nicht 'None' sein." + +#: pulpcore/cli/common/config.py:88 +#, python-brace-format +msgid "'format' is not one of {choices}" +msgstr "'format' enthält nicht eines aus '{choices}'." + +#: pulpcore/cli/common/config.py:90 +msgid "'dry_run' is not a bool" +msgstr "'dry_run' enthält keinen bool'schen Ausdruck." + +#: pulpcore/cli/common/config.py:92 +msgid "'timeout' is not an integer" +msgstr "'timeout' enthält keine ganze Zahl." + +#: pulpcore/cli/common/config.py:94 +msgid "'verbose' is not an integer" +msgstr "'verbose' enthält keine ganze Zahl." + +#: pulpcore/cli/common/config.py:97 +msgid "Unknown settings: '{}'." +msgstr "Unbekannte Einstellungen: '{}'." + +#: pulpcore/cli/common/config.py:101 +msgid "Missing settings: '{}'." +msgstr "Fehlende Einstellungen: '{}'." + +#: pulpcore/cli/common/config.py:110 +msgid "Could not locate default profile 'cli' setting" +msgstr "Konnte voreingestelltes Konfigurationsprofil 'cli' nicht finden." + +#: pulpcore/cli/common/config.py:115 +#, python-brace-format +msgid "Invalid profile '{key}'" +msgstr "Ungültiges Profil '{key}'" + +#: pulpcore/cli/common/config.py:120 +#, python-brace-format +msgid "Profile {key}:" +msgstr "Profil {key}:" + +#: pulpcore/cli/common/config.py:127 +msgid "Manage pulp-cli config file" +msgstr "" + +#: pulpcore/cli/common/config.py:132 +msgid "Create a pulp-cli config settings file" +msgstr "" + +#: pulpcore/cli/common/config.py:135 +msgid "Edit the config file in an editor" +msgstr "" + +#: pulpcore/cli/common/config.py:136 +msgid "Overwrite any existing config file" +msgstr "" + +#: pulpcore/cli/common/config.py:151 +#, python-brace-format +msgid "" +"File '{location}' already exists. Use --overwrite if you want to overwrite " +"it." +msgstr "" + +#: pulpcore/cli/common/config.py:167 +msgid "Config file location" +msgstr "" + +#: pulpcore/cli/common/config.py:178 pulpcore/cli/common/config.py:208 +msgid "No output from editor. Aborting." +msgstr "" + +#: pulpcore/cli/common/config.py:190 +#, python-brace-format +msgid "Created config file at '{location}'." +msgstr "" + +#: pulpcore/cli/common/config.py:193 +msgid "Open the settings config file in an editor" +msgstr "" + +#: pulpcore/cli/common/config.py:199 +#, python-brace-format +msgid "" +"File '{location}' does not exists. If you wish to create the file, use the " +"pulp create command." +msgstr "" + +#: pulpcore/cli/common/config.py:216 +msgid "Retry" +msgstr "" + +#: pulpcore/cli/common/config.py:221 +msgid "Validate a pulp-cli config file" +msgstr "" + +#: pulpcore/cli/common/config.py:223 +msgid "Validate that all settings are present" +msgstr "" + +#: pulpcore/cli/common/config.py:228 +#, python-brace-format +msgid "Invalid toml file '{location}'." +msgstr "" + +#: pulpcore/cli/common/config.py:235 +#, python-brace-format +msgid "File '{location}' is a valid pulp-cli config." +msgstr "" + +#: pulpcore/cli/common/context.py:124 +#, python-brace-format +msgid "Format '{format}' not implemented." +msgstr "" + +#: pulpcore/cli/common/context.py:145 +#, python-brace-format +msgid "Started background task {task_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:155 +#, python-brace-format +msgid "Started background task group {task_group_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:172 +#, python-brace-format +msgid "Task {task_href} failed: '{description}'" +msgstr "" + +#: pulpcore/cli/common/context.py:177 +#, python-brace-format +msgid "Task {task_href} canceled" +msgstr "" + +#: pulpcore/cli/common/context.py:181 +#, python-brace-format +msgid "Unknown task state: {state}" +msgstr "" + +#: pulpcore/cli/common/context.py:193 +#, python-brace-format +msgid "Waiting for task {task_href} timed out." +msgstr "" + +#: pulpcore/cli/common/context.py:210 +msgid "Not waiting for task because --background was specified." +msgstr "" + +#: pulpcore/cli/common/context.py:215 +#, python-brace-format +msgid "Task {task_href} sent to background." +msgstr "" + +#: pulpcore/cli/common/context.py:236 +#, python-brace-format +msgid "Waiting for task {task_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:246 +#, python-brace-format +msgid "Waiting for task group {task_group_href} timed out." +msgstr "" + +#: pulpcore/cli/common/context.py:257 +#, python-brace-format +msgid "Task group {task_group_href} sent to background." +msgstr "" + +#: pulpcore/cli/common/context.py:294 +msgid "this command" +msgstr "dieses Kommando" + +#: pulpcore/cli/common/context.py:297 +#, python-brace-format +msgid "" +"The server provides the pulp component '{specifier}', which prevents the use " +"of {feature}. See 'pulp status' for installed components." +msgstr "" + +#: pulpcore/cli/common/context.py:303 +#, python-brace-format +msgid "" +"The server does not provide the pulp component '{specifier}', which is " +"needed to use {feature}. See 'pulp status' for installed components." +msgstr "" + +#: pulpcore/cli/common/context.py:321 +msgid "entity" +msgstr "" + +#: pulpcore/cli/common/context.py:322 +msgid "entities" +msgstr "" + +#: pulpcore/cli/common/context.py:360 +#, python-brace-format +msgid "A {entity} must be specified for this command." +msgstr "" + +#: pulpcore/cli/common/context.py:444 +#, python-brace-format +msgid "Not all {count} entries were shown." +msgstr "Nicht alle {count} Einträge werden angezeigt." + +#: pulpcore/cli/common/context.py:451 +#, python-brace-format +msgid "Could not find {entity} with {kwargs}." +msgstr "Kann {entity} mit {kwargs} nicht finden." + +#: pulpcore/cli/common/context.py:520 +#, python-brace-format +msgid "Could not find label with key '{key}'." +msgstr "" + +#: pulpcore/cli/common/context.py:533 +msgid "remote" +msgstr "" + +#: pulpcore/cli/common/context.py:534 +msgid "remotes" +msgstr "" + +#: pulpcore/cli/common/context.py:553 +msgid "repository version" +msgstr "" + +#: pulpcore/cli/common/context.py:554 +msgid "repository versions" +msgstr "" + +#: pulpcore/cli/common/context.py:580 +msgid "repository" +msgstr "" + +#: pulpcore/cli/common/context.py:581 +msgid "repositories" +msgstr "" + +#: pulpcore/cli/common/context.py:634 pulpcore/cli/common/context.py:635 +msgid "content" +msgstr "" + +#: pulpcore/cli/common/debug.py:13 +msgid "Commands useful for debugging" +msgstr "Befehle zum Debuggen" + +#: pulpcore/cli/common/debug.py:22 +msgid "Succeed only if the installed version is not smaller." +msgstr "" + +#: pulpcore/cli/common/debug.py:23 +msgid "Succeed only if the installed version is smaller." +msgstr "" + +#: pulpcore/cli/common/debug.py:82 +#, python-brace-format +msgid "No operation with id {operation_id} found." +msgstr "" + +#: pulpcore/cli/common/generic.py:67 +#, python-brace-format +msgid "the {name} option" +msgstr "" + +#: pulpcore/cli/common/generic.py:92 +#, python-brace-format +msgid "Option is grouped with {option_list}." +msgstr "" + +#: pulpcore/cli/common/generic.py:105 +#, python-brace-format +msgid "Illegal usage, please specify all options in the group: {option_list}" +msgstr "" + +#: pulpcore/cli/common/generic.py:195 +#, python-brace-format +msgid "Failed to load content from {file}" +msgstr "Das Laden des Inhalts aus der Datei {file} ist fehlgeschlagen" + +#: pulpcore/cli/common/generic.py:216 +msgid "Failed to decode JSON" +msgstr "Die JSON-Dekodierung ist fehlgeschlagen" + +#: pulpcore/cli/common/generic.py:235 +#, python-brace-format +msgid "Validation of '{parameter}' failed: {error}" +msgstr "" + +#: pulpcore/cli/common/generic.py:295 +#, python-brace-format +msgid "The option {option_name} does not support href." +msgstr "" + +#: pulpcore/cli/common/generic.py:302 +#, python-brace-format +msgid "'{value}' is not a valid href for {option_name}." +msgstr "" + +#: pulpcore/cli/common/generic.py:321 +#, python-brace-format +msgid "A resource type must be specified with the {option_name} option." +msgstr "" + +#: pulpcore/cli/common/generic.py:329 +#, python-brace-format +msgid "A plugin must be specified with the {option_name} option." +msgstr "" + +#: pulpcore/cli/common/generic.py:339 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' is not valid for the {option_name} " +"option." +msgstr "" + +#: pulpcore/cli/common/generic.py:352 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' does not support the '{capability}' " +"capability." +msgstr "" + +#: pulpcore/cli/common/generic.py:378 +#, python-brace-format +msgid "Limit the number of {entities} to show." +msgstr "" + +#: pulpcore/cli/common/generic.py:384 +#, python-brace-format +msgid "Skip a number of {entities} to show." +msgstr "" + +#: pulpcore/cli/common/generic.py:389 +#, python-brace-format +msgid "HREF of the {entity}" +msgstr "" + +#: pulpcore/cli/common/generic.py:396 +#, python-brace-format +msgid "Name of the {entity}" +msgstr "" + +#: pulpcore/cli/common/generic.py:403 +msgid "HREF of the repository" +msgstr "HREF des Repositories" + +#: pulpcore/cli/common/generic.py:410 +msgid "Name of the repository" +msgstr "" + +#: pulpcore/cli/common/generic.py:417 +msgid "Repository version number" +msgstr "" + +#: pulpcore/cli/common/generic.py:426 +#, python-brace-format +msgid "Filter {entities} by a label search query." +msgstr "" + +#: pulpcore/cli/common/generic.py:432 +#, python-brace-format +msgid "Base-path of the {entity}" +msgstr "Basispfad des/der {entity}" + +#: pulpcore/cli/common/generic.py:439 +#, python-brace-format +msgid "{entity} base-path contains search" +msgstr "" + +#: pulpcore/cli/common/generic.py:447 +#, python-brace-format +msgid "" +"Search for {entities} with these content hrefs in them (JSON list or @file " +"containing a JSON list)" +msgstr "" + +#: pulpcore/cli/common/generic.py:455 +#, python-brace-format +msgid "Chunk size to break up {entity} into. Defaults to 1MB" +msgstr "" + +#: pulpcore/cli/common/generic.py:463 +#, python-brace-format +msgid "Search for {entities} created at or after this ISO 8601 date" +msgstr "" + +#: pulpcore/cli/common/generic.py:470 +#, python-brace-format +msgid "Search for {entities} created at or before this ISO 8601 date" +msgstr "" + +#: pulpcore/cli/common/generic.py:477 +msgid "Number of repository versions to keep." +msgstr "" + +#: pulpcore/cli/common/generic.py:484 +#, python-brace-format +msgid "Search {entities} by repository version HREF" +msgstr "" + +#: pulpcore/cli/common/generic.py:492 pulpcore/cli/common/generic.py:525 +msgid "a PEM encoded CA certificate or @file containing same" +msgstr "eine PEM kodierte Zertifikatsauthorität oder @Datei die sie enthält" + +#: pulpcore/cli/common/generic.py:497 pulpcore/cli/common/generic.py:530 +msgid "a PEM encoded client certificate or @file containing same" +msgstr "ein PEM kodiertes Benutzerzertifikat oder @Datei die es enthält" + +#: pulpcore/cli/common/generic.py:502 pulpcore/cli/common/generic.py:535 +msgid "a PEM encode private key or @file containing same" +msgstr "" + +#: pulpcore/cli/common/generic.py:507 pulpcore/cli/common/generic.py:540 +msgid "total number of simultaneous connections" +msgstr "" + +#: pulpcore/cli/common/generic.py:513 pulpcore/cli/common/generic.py:546 +msgid "limit download rate in requests per second" +msgstr "" + +#: pulpcore/cli/common/generic.py:566 +#, python-brace-format +msgid "Show the list of optionally filtered {entities}." +msgstr "" + +#: pulpcore/cli/common/generic.py:598 +#, python-brace-format +msgid "Show details of a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:624 +#, python-brace-format +msgid "Create a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:655 +#, python-brace-format +msgid "Update a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:682 +#, python-brace-format +msgid "Destroy a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:749 +msgid "Add or update a label" +msgstr "" + +#: pulpcore/cli/common/generic.py:750 pulpcore/cli/common/generic.py:759 +#: pulpcore/cli/common/generic.py:767 +msgid "Key of the label" +msgstr "" + +#: pulpcore/cli/common/generic.py:751 +msgid "Value of the label" +msgstr "" + +#: pulpcore/cli/common/generic.py:758 +msgid "Remove a label with a given key" +msgstr "" + +#: pulpcore/cli/common/generic.py:766 +msgid "Show the value for a particular label key" +msgstr "Zeige den Wert zu einem bestimmen Anhängerschlüssel" + +#: pulpcore/cli/common/generic.py:840 +msgid "Remove all content from repository version" +msgstr "" + +#: pulpcore/cli/common/openapi.py:49 +msgid "Cannot use both username/password and cert auth." +msgstr "" + +#: pulpcore/cli/common/openapi.py:52 +msgid "Password is required if username is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:54 +msgid "Username is required if password is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:60 +msgid "Cert is required if key is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:99 +msgid "Unknown schema version" +msgstr "" + +#: pulpcore/cli/common/openapi.py:144 +#, python-brace-format +msgid "Required parameters [{required}] missing for {param_type}." +msgstr "" + +#: pulpcore/cli/common/openapi.py:179 +msgid "No suitable content type for file upload specified." +msgstr "" + +#: pulpcore/cli/common/openapi.py:191 +msgid "No suitable content type for request specified." +msgstr "" + +#: pulpcore/cli/common/openapi.py:210 +#, python-brace-format +msgid "Unexpected response '{code}' (expected '{expected}')." +msgstr "" + +#: pulpcore/cli/common/openapi.py:236 +msgid "Cookie parameters are not implemented." +msgstr "" + +#: pulpcore/cli/common/openapi.py:247 +#, python-brace-format +msgid "Parameter [{names}] not available for {operation_id}." +msgstr "" + +#: pulpcore/cli/common/openapi.py:263 +msgid "Call aborted due to safe mode" +msgstr "Kommando abgebrochen wegen Trockenlauf" + +#: pulpcore/cli/common/openapi.py:270 +#, python-brace-format +msgid "Received redirect to '{url}'. Please check your CLI configuration." +msgstr "" + +#: pulpcore/cli/common/openapi.py:275 +#, python-brace-format +msgid "Response: {status_code}" +msgstr "Antwort: {status_code}" + +#~ msgid "Path to the Pulp settings.toml file" +#~ msgstr "Pfad zur Pulp Einstellungsdatei settings.toml" + +#~ msgid "Name of the entry to destroy" +#~ msgstr "Name der zu löschenden Entität" + +#~ msgid "HREF of the entry to destroy" +#~ msgstr "HREF der zu löschenden Entität" diff --git a/pulpcore/cli/common/locale/messages.pot b/pulpcore/cli/common/locale/messages.pot new file mode 100644 index 000000000..d94792cb4 --- /dev/null +++ b/pulpcore/cli/common/locale/messages.pot @@ -0,0 +1,629 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/common/__init__.py:68 +#, python-brace-format +msgid "Profile named '{profile}' not found." +msgstr "" + +#: pulpcore/cli/common/__init__.py:72 +msgid "Config file failed to parse. ({})." +msgstr "" + +#: pulpcore/cli/common/__init__.py:73 +msgid "Continue without config?" +msgstr "" + +#: pulpcore/cli/common/__init__.py:75 +msgid "Aborted." +msgstr "" + +#: pulpcore/cli/common/__init__.py:79 +msgid "pulp3 command line interface" +msgstr "" + +#: pulpcore/cli/common/__init__.py:83 +msgid "Config profile to use" +msgstr "" + +#: pulpcore/cli/common/__init__.py:91 +msgid "Path of a Pulp CLI settings file to use instead of the default location" +msgstr "" + +#: pulpcore/cli/common/__init__.py:99 +msgid "Start tasks in the background instead of awaiting them" +msgstr "" + +#: pulpcore/cli/common/__init__.py:101 +msgid "Invalidate cached API docs" +msgstr "" + +#: pulpcore/cli/common/config.py:34 +msgid "API base url" +msgstr "" + +#: pulpcore/cli/common/config.py:35 +msgid "Username on pulp server" +msgstr "" + +#: pulpcore/cli/common/config.py:36 +msgid "Password on pulp server" +msgstr "" + +#: pulpcore/cli/common/config.py:37 +msgid "Path to client certificate" +msgstr "" + +#: pulpcore/cli/common/config.py:41 +msgid "Path to client private key. Not required if client cert contains this." +msgstr "" + +#: pulpcore/cli/common/config.py:43 +msgid "Verify SSL connection" +msgstr "" + +#: pulpcore/cli/common/config.py:48 +msgid "Format of the response" +msgstr "" + +#: pulpcore/cli/common/config.py:53 +msgid "Trace commands without performing any unsafe HTTP calls" +msgstr "" + +#: pulpcore/cli/common/config.py:60 +msgid "Time to wait for background tasks, set to 0 to wait infinitely" +msgstr "" + +#: pulpcore/cli/common/config.py:67 +msgid "Increase verbosity; explain api calls as they are made" +msgstr "" + +#: pulpcore/cli/common/config.py:74 +msgid "Value cannot be None." +msgstr "" + +#: pulpcore/cli/common/config.py:88 +#, python-brace-format +msgid "'format' is not one of {choices}" +msgstr "" + +#: pulpcore/cli/common/config.py:90 +msgid "'dry_run' is not a bool" +msgstr "" + +#: pulpcore/cli/common/config.py:92 +msgid "'timeout' is not an integer" +msgstr "" + +#: pulpcore/cli/common/config.py:94 +msgid "'verbose' is not an integer" +msgstr "" + +#: pulpcore/cli/common/config.py:97 +msgid "Unknown settings: '{}'." +msgstr "" + +#: pulpcore/cli/common/config.py:101 +msgid "Missing settings: '{}'." +msgstr "" + +#: pulpcore/cli/common/config.py:110 +msgid "Could not locate default profile 'cli' setting" +msgstr "" + +#: pulpcore/cli/common/config.py:115 +#, python-brace-format +msgid "Invalid profile '{key}'" +msgstr "" + +#: pulpcore/cli/common/config.py:120 +#, python-brace-format +msgid "Profile {key}:" +msgstr "" + +#: pulpcore/cli/common/config.py:127 +msgid "Manage pulp-cli config file" +msgstr "" + +#: pulpcore/cli/common/config.py:132 +msgid "Create a pulp-cli config settings file" +msgstr "" + +#: pulpcore/cli/common/config.py:135 +msgid "Edit the config file in an editor" +msgstr "" + +#: pulpcore/cli/common/config.py:136 +msgid "Overwrite any existing config file" +msgstr "" + +#: pulpcore/cli/common/config.py:151 +#, python-brace-format +msgid "" +"File '{location}' already exists. Use --overwrite if you want to overwrite " +"it." +msgstr "" + +#: pulpcore/cli/common/config.py:167 +msgid "Config file location" +msgstr "" + +#: pulpcore/cli/common/config.py:178 pulpcore/cli/common/config.py:208 +msgid "No output from editor. Aborting." +msgstr "" + +#: pulpcore/cli/common/config.py:190 +#, python-brace-format +msgid "Created config file at '{location}'." +msgstr "" + +#: pulpcore/cli/common/config.py:193 +msgid "Open the settings config file in an editor" +msgstr "" + +#: pulpcore/cli/common/config.py:199 +#, python-brace-format +msgid "" +"File '{location}' does not exists. If you wish to create the file, use the " +"pulp create command." +msgstr "" + +#: pulpcore/cli/common/config.py:216 +msgid "Retry" +msgstr "" + +#: pulpcore/cli/common/config.py:221 +msgid "Validate a pulp-cli config file" +msgstr "" + +#: pulpcore/cli/common/config.py:223 +msgid "Validate that all settings are present" +msgstr "" + +#: pulpcore/cli/common/config.py:228 +#, python-brace-format +msgid "Invalid toml file '{location}'." +msgstr "" + +#: pulpcore/cli/common/config.py:235 +#, python-brace-format +msgid "File '{location}' is a valid pulp-cli config." +msgstr "" + +#: pulpcore/cli/common/context.py:124 +#, python-brace-format +msgid "Format '{format}' not implemented." +msgstr "" + +#: pulpcore/cli/common/context.py:145 +#, python-brace-format +msgid "Started background task {task_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:155 +#, python-brace-format +msgid "Started background task group {task_group_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:172 +#, python-brace-format +msgid "Task {task_href} failed: '{description}'" +msgstr "" + +#: pulpcore/cli/common/context.py:177 +#, python-brace-format +msgid "Task {task_href} canceled" +msgstr "" + +#: pulpcore/cli/common/context.py:181 +#, python-brace-format +msgid "Unknown task state: {state}" +msgstr "" + +#: pulpcore/cli/common/context.py:193 +#, python-brace-format +msgid "Waiting for task {task_href} timed out." +msgstr "" + +#: pulpcore/cli/common/context.py:210 +msgid "Not waiting for task because --background was specified." +msgstr "" + +#: pulpcore/cli/common/context.py:215 +#, python-brace-format +msgid "Task {task_href} sent to background." +msgstr "" + +#: pulpcore/cli/common/context.py:236 +#, python-brace-format +msgid "Waiting for task {task_href}" +msgstr "" + +#: pulpcore/cli/common/context.py:246 +#, python-brace-format +msgid "Waiting for task group {task_group_href} timed out." +msgstr "" + +#: pulpcore/cli/common/context.py:257 +#, python-brace-format +msgid "Task group {task_group_href} sent to background." +msgstr "" + +#: pulpcore/cli/common/context.py:294 +msgid "this command" +msgstr "" + +#: pulpcore/cli/common/context.py:297 +#, python-brace-format +msgid "" +"The server provides the pulp component '{specifier}', which prevents the use " +"of {feature}. See 'pulp status' for installed components." +msgstr "" + +#: pulpcore/cli/common/context.py:303 +#, python-brace-format +msgid "" +"The server does not provide the pulp component '{specifier}', which is " +"needed to use {feature}. See 'pulp status' for installed components." +msgstr "" + +#: pulpcore/cli/common/context.py:321 +msgid "entity" +msgstr "" + +#: pulpcore/cli/common/context.py:322 +msgid "entities" +msgstr "" + +#: pulpcore/cli/common/context.py:360 +#, python-brace-format +msgid "A {entity} must be specified for this command." +msgstr "" + +#: pulpcore/cli/common/context.py:444 +#, python-brace-format +msgid "Not all {count} entries were shown." +msgstr "" + +#: pulpcore/cli/common/context.py:451 +#, python-brace-format +msgid "Could not find {entity} with {kwargs}." +msgstr "" + +#: pulpcore/cli/common/context.py:520 +#, python-brace-format +msgid "Could not find label with key '{key}'." +msgstr "" + +#: pulpcore/cli/common/context.py:533 +msgid "remote" +msgstr "" + +#: pulpcore/cli/common/context.py:534 +msgid "remotes" +msgstr "" + +#: pulpcore/cli/common/context.py:553 +msgid "repository version" +msgstr "" + +#: pulpcore/cli/common/context.py:554 +msgid "repository versions" +msgstr "" + +#: pulpcore/cli/common/context.py:580 +msgid "repository" +msgstr "" + +#: pulpcore/cli/common/context.py:581 +msgid "repositories" +msgstr "" + +#: pulpcore/cli/common/context.py:634 pulpcore/cli/common/context.py:635 +msgid "content" +msgstr "" + +#: pulpcore/cli/common/debug.py:13 +msgid "Commands useful for debugging" +msgstr "" + +#: pulpcore/cli/common/debug.py:22 +msgid "Succeed only if the installed version is not smaller." +msgstr "" + +#: pulpcore/cli/common/debug.py:23 +msgid "Succeed only if the installed version is smaller." +msgstr "" + +#: pulpcore/cli/common/debug.py:82 +#, python-brace-format +msgid "No operation with id {operation_id} found." +msgstr "" + +#: pulpcore/cli/common/generic.py:67 +#, python-brace-format +msgid "the {name} option" +msgstr "" + +#: pulpcore/cli/common/generic.py:92 +#, python-brace-format +msgid "Option is grouped with {option_list}." +msgstr "" + +#: pulpcore/cli/common/generic.py:105 +#, python-brace-format +msgid "Illegal usage, please specify all options in the group: {option_list}" +msgstr "" + +#: pulpcore/cli/common/generic.py:195 +#, python-brace-format +msgid "Failed to load content from {file}" +msgstr "" + +#: pulpcore/cli/common/generic.py:216 +msgid "Failed to decode JSON" +msgstr "" + +#: pulpcore/cli/common/generic.py:235 +#, python-brace-format +msgid "Validation of '{parameter}' failed: {error}" +msgstr "" + +#: pulpcore/cli/common/generic.py:295 +#, python-brace-format +msgid "The option {option_name} does not support href." +msgstr "" + +#: pulpcore/cli/common/generic.py:302 +#, python-brace-format +msgid "'{value}' is not a valid href for {option_name}." +msgstr "" + +#: pulpcore/cli/common/generic.py:321 +#, python-brace-format +msgid "A resource type must be specified with the {option_name} option." +msgstr "" + +#: pulpcore/cli/common/generic.py:329 +#, python-brace-format +msgid "A plugin must be specified with the {option_name} option." +msgstr "" + +#: pulpcore/cli/common/generic.py:339 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' is not valid for the {option_name} " +"option." +msgstr "" + +#: pulpcore/cli/common/generic.py:352 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' does not support the '{capability}' " +"capability." +msgstr "" + +#: pulpcore/cli/common/generic.py:378 +#, python-brace-format +msgid "Limit the number of {entities} to show." +msgstr "" + +#: pulpcore/cli/common/generic.py:384 +#, python-brace-format +msgid "Skip a number of {entities} to show." +msgstr "" + +#: pulpcore/cli/common/generic.py:389 +#, python-brace-format +msgid "HREF of the {entity}" +msgstr "" + +#: pulpcore/cli/common/generic.py:396 +#, python-brace-format +msgid "Name of the {entity}" +msgstr "" + +#: pulpcore/cli/common/generic.py:403 +msgid "HREF of the repository" +msgstr "" + +#: pulpcore/cli/common/generic.py:410 +msgid "Name of the repository" +msgstr "" + +#: pulpcore/cli/common/generic.py:417 +msgid "Repository version number" +msgstr "" + +#: pulpcore/cli/common/generic.py:426 +#, python-brace-format +msgid "Filter {entities} by a label search query." +msgstr "" + +#: pulpcore/cli/common/generic.py:432 +#, python-brace-format +msgid "Base-path of the {entity}" +msgstr "" + +#: pulpcore/cli/common/generic.py:439 +#, python-brace-format +msgid "{entity} base-path contains search" +msgstr "" + +#: pulpcore/cli/common/generic.py:447 +#, python-brace-format +msgid "" +"Search for {entities} with these content hrefs in them (JSON list or @file " +"containing a JSON list)" +msgstr "" + +#: pulpcore/cli/common/generic.py:455 +#, python-brace-format +msgid "Chunk size to break up {entity} into. Defaults to 1MB" +msgstr "" + +#: pulpcore/cli/common/generic.py:463 +#, python-brace-format +msgid "Search for {entities} created at or after this ISO 8601 date" +msgstr "" + +#: pulpcore/cli/common/generic.py:470 +#, python-brace-format +msgid "Search for {entities} created at or before this ISO 8601 date" +msgstr "" + +#: pulpcore/cli/common/generic.py:477 +msgid "Number of repository versions to keep." +msgstr "" + +#: pulpcore/cli/common/generic.py:484 +#, python-brace-format +msgid "Search {entities} by repository version HREF" +msgstr "" + +#: pulpcore/cli/common/generic.py:492 pulpcore/cli/common/generic.py:525 +msgid "a PEM encoded CA certificate or @file containing same" +msgstr "" + +#: pulpcore/cli/common/generic.py:497 pulpcore/cli/common/generic.py:530 +msgid "a PEM encoded client certificate or @file containing same" +msgstr "" + +#: pulpcore/cli/common/generic.py:502 pulpcore/cli/common/generic.py:535 +msgid "a PEM encode private key or @file containing same" +msgstr "" + +#: pulpcore/cli/common/generic.py:507 pulpcore/cli/common/generic.py:540 +msgid "total number of simultaneous connections" +msgstr "" + +#: pulpcore/cli/common/generic.py:513 pulpcore/cli/common/generic.py:546 +msgid "limit download rate in requests per second" +msgstr "" + +#: pulpcore/cli/common/generic.py:566 +#, python-brace-format +msgid "Show the list of optionally filtered {entities}." +msgstr "" + +#: pulpcore/cli/common/generic.py:598 +#, python-brace-format +msgid "Show details of a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:624 +#, python-brace-format +msgid "Create a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:655 +#, python-brace-format +msgid "Update a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:682 +#, python-brace-format +msgid "Destroy a {entity}." +msgstr "" + +#: pulpcore/cli/common/generic.py:749 +msgid "Add or update a label" +msgstr "" + +#: pulpcore/cli/common/generic.py:750 pulpcore/cli/common/generic.py:759 +#: pulpcore/cli/common/generic.py:767 +msgid "Key of the label" +msgstr "" + +#: pulpcore/cli/common/generic.py:751 +msgid "Value of the label" +msgstr "" + +#: pulpcore/cli/common/generic.py:758 +msgid "Remove a label with a given key" +msgstr "" + +#: pulpcore/cli/common/generic.py:766 +msgid "Show the value for a particular label key" +msgstr "" + +#: pulpcore/cli/common/generic.py:840 +msgid "Remove all content from repository version" +msgstr "" + +#: pulpcore/cli/common/openapi.py:49 +msgid "Cannot use both username/password and cert auth." +msgstr "" + +#: pulpcore/cli/common/openapi.py:52 +msgid "Password is required if username is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:54 +msgid "Username is required if password is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:60 +msgid "Cert is required if key is set." +msgstr "" + +#: pulpcore/cli/common/openapi.py:99 +msgid "Unknown schema version" +msgstr "" + +#: pulpcore/cli/common/openapi.py:144 +#, python-brace-format +msgid "Required parameters [{required}] missing for {param_type}." +msgstr "" + +#: pulpcore/cli/common/openapi.py:179 +msgid "No suitable content type for file upload specified." +msgstr "" + +#: pulpcore/cli/common/openapi.py:191 +msgid "No suitable content type for request specified." +msgstr "" + +#: pulpcore/cli/common/openapi.py:210 +#, python-brace-format +msgid "Unexpected response '{code}' (expected '{expected}')." +msgstr "" + +#: pulpcore/cli/common/openapi.py:236 +msgid "Cookie parameters are not implemented." +msgstr "" + +#: pulpcore/cli/common/openapi.py:247 +#, python-brace-format +msgid "Parameter [{names}] not available for {operation_id}." +msgstr "" + +#: pulpcore/cli/common/openapi.py:263 +msgid "Call aborted due to safe mode" +msgstr "" + +#: pulpcore/cli/common/openapi.py:270 +#, python-brace-format +msgid "Received redirect to '{url}'. Please check your CLI configuration." +msgstr "" + +#: pulpcore/cli/common/openapi.py:275 +#, python-brace-format +msgid "Response: {status_code}" +msgstr "" diff --git a/pulpcore/cli/common/openapi.py b/pulpcore/cli/common/openapi.py index b50a508de..9b330059e 100644 --- a/pulpcore/cli/common/openapi.py +++ b/pulpcore/cli/common/openapi.py @@ -1,7 +1,6 @@ # copyright (c) 2020, Matthias Dellweg # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) -import gettext import json import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union @@ -10,7 +9,10 @@ import requests import urllib3 -_ = gettext.gettext +from pulpcore.cli.common.i18n import get_translation + +translation = get_translation(__name__) +_ = translation.gettext SAFE_METHODS = ["GET", "HEAD", "OPTIONS"] diff --git a/pulpcore/cli/container/__init__.py b/pulpcore/cli/container/__init__.py index 992ac72da..8bf78e873 100644 --- a/pulpcore/cli/container/__init__.py +++ b/pulpcore/cli/container/__init__.py @@ -1,13 +1,13 @@ -import gettext - from pulpcore.cli.common import main from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.container.distribution import distribution from pulpcore.cli.container.namespace import namespace from pulpcore.cli.container.remote import remote from pulpcore.cli.container.repository import repository -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @main.group() diff --git a/pulpcore/cli/container/context.py b/pulpcore/cli/container/context.py index 7fa3a0ac3..b68a770c4 100644 --- a/pulpcore/cli/container/context.py +++ b/pulpcore/cli/container/context.py @@ -1,5 +1,3 @@ -import gettext - from pulpcore.cli.common.context import ( EntityDefinition, PluginRequirement, @@ -9,8 +7,10 @@ PulpRepositoryVersionContext, registered_repository_contexts, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpContainerNamespaceContext(PulpEntityContext): diff --git a/pulpcore/cli/container/distribution.py b/pulpcore/cli/container/distribution.py index 11ee5ad90..69e1ab8c3 100644 --- a/pulpcore/cli/container/distribution.py +++ b/pulpcore/cli/container/distribution.py @@ -1,4 +1,3 @@ -import gettext from typing import Optional, Union, cast import click @@ -23,13 +22,15 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.container.context import ( PulpContainerDistributionContext, PulpContainerPushRepositoryContext, PulpContainerRepositoryContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..b900ce869 Binary files /dev/null and b/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..a839115db --- /dev/null +++ b/pulpcore/cli/container/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,74 @@ +# Translations for the pulp-cli container plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: 2021-12-06 11:20+0100\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/container/context.py:17 +msgid "container namespace" +msgstr "Container Namensraum" + +#: pulpcore/cli/container/context.py:18 +msgid "container namespaces" +msgstr "Container Namensräume" + +#: pulpcore/cli/container/context.py:27 +msgid "container distribution" +msgstr "" + +#: pulpcore/cli/container/context.py:28 +msgid "container distributions" +msgstr "" + +#: pulpcore/cli/container/context.py:46 +msgid "container remote" +msgstr "" + +#: pulpcore/cli/container/context.py:47 +msgid "container remotes" +msgstr "" + +#: pulpcore/cli/container/distribution.py:71 +#: pulpcore/cli/container/distribution.py:87 +msgid "a repository version number, leave blank for latest" +msgstr "" +"Versionsnummer des Repositories, leer lassen um die letzte zu verwenden" + +#: pulpcore/cli/container/distribution.py:133 +#, python-brace-format +msgid "" +"Distribution {distribution} doesn't have a repository set, please specify " +"the repository to use with --repository" +msgstr "" + +#: pulpcore/cli/container/repository.py:49 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/container/repository.py:102 +msgid "Repository type does not support sync." +msgstr "Dieser Repository Typ unterstützt Sync nicht." + +#: pulpcore/cli/container/repository.py:114 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" +"Repository '{name}' hat keine voreingestellte Gegenstelle. Bitte mit '--" +"remote' angeben." diff --git a/pulpcore/cli/container/locale/messages.pot b/pulpcore/cli/container/locale/messages.pot new file mode 100644 index 000000000..c6c11ead5 --- /dev/null +++ b/pulpcore/cli/container/locale/messages.pot @@ -0,0 +1,71 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 20:29+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/container/context.py:17 +msgid "container namespace" +msgstr "" + +#: pulpcore/cli/container/context.py:18 +msgid "container namespaces" +msgstr "" + +#: pulpcore/cli/container/context.py:27 +msgid "container distribution" +msgstr "" + +#: pulpcore/cli/container/context.py:28 +msgid "container distributions" +msgstr "" + +#: pulpcore/cli/container/context.py:46 +msgid "container remote" +msgstr "" + +#: pulpcore/cli/container/context.py:47 +msgid "container remotes" +msgstr "" + +#: pulpcore/cli/container/distribution.py:71 +#: pulpcore/cli/container/distribution.py:87 +msgid "a repository version number, leave blank for latest" +msgstr "" + +#: pulpcore/cli/container/distribution.py:133 +#, python-brace-format +msgid "" +"Distribution {distribution} doesn't have a repository set, please specify " +"the repository to use with --repository" +msgstr "" + +#: pulpcore/cli/container/repository.py:49 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/container/repository.py:102 +msgid "Repository type does not support sync." +msgstr "" + +#: pulpcore/cli/container/repository.py:114 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/container/namespace.py b/pulpcore/cli/container/namespace.py index 0aa3607f2..c764b1d1d 100644 --- a/pulpcore/cli/container/namespace.py +++ b/pulpcore/cli/container/namespace.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -11,9 +9,11 @@ name_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.container.context import PulpContainerNamespaceContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/container/remote.py b/pulpcore/cli/container/remote.py index 67576f80f..47dc74445 100644 --- a/pulpcore/cli/container/remote.py +++ b/pulpcore/cli/container/remote.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -17,9 +15,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.container.context import PulpContainerRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/container/repository.py b/pulpcore/cli/container/repository.py index 409248ee5..66f2fc64e 100644 --- a/pulpcore/cli/container/repository.py +++ b/pulpcore/cli/container/repository.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, Dict import click @@ -28,6 +27,7 @@ update_command, version_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.container.context import ( PulpContainerPushRepositoryContext, PulpContainerRemoteContext, @@ -35,7 +35,8 @@ ) from pulpcore.cli.core.generic import task_command -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext remote_option = resource_option( diff --git a/pulpcore/cli/core/__init__.py b/pulpcore/cli/core/__init__.py index a8e51b88e..e6161f584 100644 --- a/pulpcore/cli/core/__init__.py +++ b/pulpcore/cli/core/__init__.py @@ -1,5 +1,3 @@ -import gettext - from pulpcore.cli.common import main from pulpcore.cli.core.access_policy import access_policy from pulpcore.cli.core.artifact import artifact @@ -21,8 +19,6 @@ from pulpcore.cli.core.user import user from pulpcore.cli.core.worker import worker -_ = gettext.gettext - # Register commands with cli main.add_command(access_policy) main.add_command(artifact) diff --git a/pulpcore/cli/core/access_policy.py b/pulpcore/cli/core/access_policy.py index b4e7da87c..58e4ca7ae 100644 --- a/pulpcore/cli/core/access_policy.py +++ b/pulpcore/cli/core/access_policy.py @@ -14,8 +14,12 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpAccessPolicyContext +translation = get_translation(__name__) +_ = translation.gettext + def _vs_name_callback(ctx: click.Context, param: click.Parameter, value: str) -> str: if value is not None: diff --git a/pulpcore/cli/core/artifact.py b/pulpcore/cli/core/artifact.py index 936388f60..7ca904122 100644 --- a/pulpcore/cli/core/artifact.py +++ b/pulpcore/cli/core/artifact.py @@ -1,13 +1,14 @@ -import gettext from typing import IO import click from pulpcore.cli.common.context import PulpContext, pass_entity_context, pass_pulp_context from pulpcore.cli.common.generic import chunk_size_option, href_option, list_command, show_command +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpArtifactContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/content.py b/pulpcore/cli/core/content.py index 1df7f1542..d014c5ce1 100644 --- a/pulpcore/cli/core/content.py +++ b/pulpcore/cli/core/content.py @@ -1,11 +1,11 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContentContext, PulpContext, pass_pulp_context from pulpcore.cli.common.generic import list_command +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/content_guard.py b/pulpcore/cli/core/content_guard.py index 355211cdc..4618cda20 100644 --- a/pulpcore/cli/core/content_guard.py +++ b/pulpcore/cli/core/content_guard.py @@ -1,4 +1,3 @@ -import gettext from typing import List, Optional import click @@ -18,9 +17,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpContentGuardContext, PulpRbacContentGuardContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/context.py b/pulpcore/cli/core/context.py index fcd68e19b..8b9ef7cbe 100644 --- a/pulpcore/cli/core/context.py +++ b/pulpcore/cli/core/context.py @@ -1,4 +1,3 @@ -import gettext import hashlib import os import sys @@ -12,8 +11,10 @@ PulpContext, PulpEntityContext, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpAccessPolicyContext(PulpEntityContext): diff --git a/pulpcore/cli/core/export.py b/pulpcore/cli/core/export.py index d72501c2f..5aed0e024 100644 --- a/pulpcore/cli/core/export.py +++ b/pulpcore/cli/core/export.py @@ -1,4 +1,3 @@ -import gettext import re from typing import Any, Dict, Iterable, Optional, Tuple @@ -15,9 +14,11 @@ registered_repository_contexts, ) from pulpcore.cli.common.generic import destroy_command, href_option, show_command +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpExportContext, PulpExporterContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _version_list_callback( diff --git a/pulpcore/cli/core/exporter.py b/pulpcore/cli/core/exporter.py index 76d01bd5d..575b89c0c 100644 --- a/pulpcore/cli/core/exporter.py +++ b/pulpcore/cli/core/exporter.py @@ -1,4 +1,3 @@ -import gettext from typing import Iterable import click @@ -20,9 +19,11 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpExporterContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext multi_repository_option = resource_option( diff --git a/pulpcore/cli/core/generic.py b/pulpcore/cli/core/generic.py index 8b8179923..0123e172b 100644 --- a/pulpcore/cli/core/generic.py +++ b/pulpcore/cli/core/generic.py @@ -1,4 +1,3 @@ -import gettext from typing import Any import click @@ -11,9 +10,11 @@ pass_pulp_context, ) from pulpcore.cli.common.generic import list_command, pulp_option +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpTaskContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext ############################################################################## diff --git a/pulpcore/cli/core/group.py b/pulpcore/cli/core/group.py index 3accc2fa1..ece058ac2 100644 --- a/pulpcore/cli/core/group.py +++ b/pulpcore/cli/core/group.py @@ -1,4 +1,3 @@ -import gettext from typing import Optional import click @@ -19,6 +18,7 @@ null_callback, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import ( PulpGroupContext, PulpGroupModelPermissionContext, @@ -29,7 +29,8 @@ PulpUserContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _object_callback(ctx: click.Context, param: click.Parameter, value: str) -> str: diff --git a/pulpcore/cli/core/importer.py b/pulpcore/cli/core/importer.py index 08c1b5e45..ae2fcd55e 100644 --- a/pulpcore/cli/core/importer.py +++ b/pulpcore/cli/core/importer.py @@ -1,4 +1,3 @@ -import gettext from typing import Dict, List, Tuple, Union import click @@ -11,9 +10,11 @@ name_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpImporterContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext RepositoryMap = Tuple[str, str] # source repo, destination repo diff --git a/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..f4ac28644 Binary files /dev/null and b/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..c05c76d84 --- /dev/null +++ b/pulpcore/cli/core/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,340 @@ +# Translations for the pulp-cli core plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-16 23:00+0200\n" +"PO-Revision-Date: 2021-12-06 11:22+0100\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/core/content_guard.py:61 pulpcore/cli/core/content_guard.py:89 +msgid "" +"Group to remove download permission from. Can be specified multiple times." +msgstr "" + +#: pulpcore/cli/core/content_guard.py:67 pulpcore/cli/core/content_guard.py:95 +msgid "" +"User to remove download permission from. Can be specified multiple times." +msgstr "" + +#: pulpcore/cli/core/context.py:16 +msgid "access policy" +msgstr "" + +#: pulpcore/cli/core/context.py:17 +msgid "access policies" +msgstr "" + +#: pulpcore/cli/core/context.py:25 +msgid "artifact" +msgstr "Artefakt" + +#: pulpcore/cli/core/context.py:26 +msgid "artifacts" +msgstr "Artefakte" + +#: pulpcore/cli/core/context.py:46 +msgid "Artifact already exists." +msgstr "Das Artefakt existiert bereits." + +#: pulpcore/cli/core/context.py:49 +#, python-brace-format +msgid "Uploading file {filename}" +msgstr "Datei {filename} wird hochgeladen" + +#: pulpcore/cli/core/context.py:75 +msgid "Upload complete. Creating artifact." +msgstr "Hochladen vollständig. Artefakt wird erstellt." + +#: pulpcore/cli/core/context.py:88 +msgid "Pulp exporter" +msgstr "Pulp Exporter" + +#: pulpcore/cli/core/context.py:89 +msgid "Pulp exporters" +msgstr "Pulp Exporter" + +#: pulpcore/cli/core/context.py:99 +msgid "Pulp export" +msgstr "Pulp Export" + +#: pulpcore/cli/core/context.py:100 +msgid "Pulp exports" +msgstr "Pulp Exporte" + +#: pulpcore/cli/core/context.py:114 +msgid "user group" +msgstr "Benutzergruppe" + +#: pulpcore/cli/core/context.py:115 +msgid "user groups" +msgstr "Benutzergruppen" + +#: pulpcore/cli/core/context.py:125 +msgid "group permission" +msgstr "Gruppen Berechtigung" + +#: pulpcore/cli/core/context.py:126 +msgid "group permissions" +msgstr "Gruppen Berechtigungen" + +#: pulpcore/cli/core/context.py:145 +#, python-brace-format +msgid "Could not find {entity} with {kwargs}." +msgstr "Kann {entity} mit {kwargs} nicht finden." + +#: pulpcore/cli/core/context.py:157 +msgid "group model permission" +msgstr "" + +#: pulpcore/cli/core/context.py:158 +msgid "group model permissions" +msgstr "" + +#: pulpcore/cli/core/context.py:167 +msgid "group object permission" +msgstr "" + +#: pulpcore/cli/core/context.py:168 +msgid "group object permissions" +msgstr "" + +#: pulpcore/cli/core/context.py:177 +msgid "group user" +msgstr "" + +#: pulpcore/cli/core/context.py:178 +msgid "group users" +msgstr "" + +#: pulpcore/cli/core/context.py:202 +msgid "Pulp importer" +msgstr "Pulp Importer" + +#: pulpcore/cli/core/context.py:203 +msgid "Pulp importers" +msgstr "Pulp Importer" + +#: pulpcore/cli/core/context.py:234 +msgid "signing service" +msgstr "Signatur Service" + +#: pulpcore/cli/core/context.py:235 +msgid "signing services" +msgstr "Signatur Services" + +#: pulpcore/cli/core/context.py:242 +msgid "task" +msgstr "Aufgabe" + +#: pulpcore/cli/core/context.py:243 +msgid "tasks" +msgstr "Aufgaben" + +#: pulpcore/cli/core/context.py:268 +msgid "task group" +msgstr "Aufgabengruppe" + +#: pulpcore/cli/core/context.py:269 +msgid "task groups" +msgstr "Aufgabengruppen" + +#: pulpcore/cli/core/context.py:276 +msgid "upload" +msgstr "" + +#: pulpcore/cli/core/context.py:277 +msgid "uploads" +msgstr "" + +#: pulpcore/cli/core/context.py:295 +msgid "user" +msgstr "Benutzer" + +#: pulpcore/cli/core/context.py:296 +msgid "users" +msgstr "Benutzer" + +#: pulpcore/cli/core/context.py:303 +msgid "worker" +msgstr "Arbeiter" + +#: pulpcore/cli/core/context.py:304 +msgid "workers" +msgstr "Arbeiter" + +#: pulpcore/cli/core/export.py:36 +#, python-brace-format +msgid "'{value}' is not a valid href for {option_name}." +msgstr "'{value}' ist kein gültiger Hyperlink für {option_name}." + +#: pulpcore/cli/core/export.py:47 +msgid "Repositories must be specified with plugin and type" +msgstr "Repositories müssen mit Plugin und Typ spezifiziert werden." + +#: pulpcore/cli/core/export.py:53 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' is not valid for the {option_name} " +"option." +msgstr "" +"Der Typ '{plugin}:{resource_type}' ist ungültig für die Option " +"{option_name}." + +#: pulpcore/cli/core/export.py:66 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' does not support the '{capability}' " +"capability." +msgstr "" +"Der Typ '{plugin}:{resource_type}' unterstützt die Fähigkeit '{capability}' " +"nicht." + +#: pulpcore/cli/core/export.py:97 +msgid "Name of owning PulpExporter" +msgstr "" + +#: pulpcore/cli/core/export.py:99 +msgid "Limit the number of exporters to show." +msgstr "" + +#: pulpcore/cli/core/export.py:101 +msgid "Skip a number of exporters to show." +msgstr "" + +#: pulpcore/cli/core/export.py:122 +msgid "Examples: 512MB, 1GB" +msgstr "" + +#: pulpcore/cli/core/exporter.py:36 +msgid "" +"Repository to export from in the form '[[:]:]' " +"or by href. Can be called multiple times." +msgstr "" + +#: pulpcore/cli/core/generic.py:25 +msgid "List only tasks with this name." +msgstr "" + +#: pulpcore/cli/core/generic.py:29 +msgid "List only tasks whose name contains this." +msgstr "" + +#: pulpcore/cli/core/generic.py:34 +msgid "List only tasks with this correlation id." +msgstr "" + +#: pulpcore/cli/core/generic.py:43 +msgid "List only tasks in this state." +msgstr "" + +#: pulpcore/cli/core/group.py:48 +msgid "This type of Permission does not have an object." +msgstr "" + +#: pulpcore/cli/core/group.py:50 +msgid "This type of Permission needs an object." +msgstr "" + +#: pulpcore/cli/core/group.py:60 +msgid "Manage user groups and their granted permissions." +msgstr "" + +#: pulpcore/cli/core/group.py:103 +msgid "Show a list of the permissioons granted to a group." +msgstr "" + +#: pulpcore/cli/core/group.py:108 +msgid "Grant a permission to the group." +msgstr "" + +#: pulpcore/cli/core/group.py:125 +msgid "Revoke a permission from the group." +msgstr "" + +#: pulpcore/cli/core/importer.py:26 +msgid "" +"A map of source repository name to destination repository name (eg. --repo-" +"map src dest)" +msgstr "" + +#: pulpcore/cli/core/orphan.py:24 +msgid "List of specific Contents to delete if they are orphans" +msgstr "" + +#: pulpcore/cli/core/orphan.py:33 +msgid "" +"How long in minutes Pulp should hold orphan Content and Artifacts before " +"becoming candidates for cleanup task" +msgstr "" + +#: pulpcore/cli/core/show.py:12 +msgid "HREF of the entry" +msgstr "HREF des Eintrags" + +#: pulpcore/cli/core/status.py:13 +msgid "Number of retries before failing." +msgstr "" + +#: pulpcore/cli/core/status.py:14 +msgid "Seconds to wait between retries." +msgstr "Wartezeit in Sekunden zwischen Versuchen." + +#: pulpcore/cli/core/status.py:21 +msgid "Cannot specify a negative retry count." +msgstr "Ein negativer Wiederholungszähler kann nicht angegeben werden." + +#: pulpcore/cli/core/task.py:34 +#, python-brace-format +msgid "UUID of the {entity}" +msgstr "UUID des/der {entity}" + +#: pulpcore/cli/core/task.py:54 +msgid "Wait for the task to finish" +msgstr "Warte bis die Aufgabe beendet ist." + +#: pulpcore/cli/core/task.py:62 +#, python-brace-format +msgid "Waiting for task {href} to finish." +msgstr "Warten bis die Aufgabe {href} beendet ist." + +#: pulpcore/cli/core/task.py:72 +msgid "Cancel all 'waiting' and 'running' tasks." +msgstr "Alle laufenden und wartenden Aufgaben abbrechen." + +#: pulpcore/cli/core/task.py:74 +msgid "Cancel all 'waiting' tasks." +msgstr "Alle wartenden Aufgaben abbrechen." + +#: pulpcore/cli/core/task.py:75 +msgid "Cancel all 'running' tasks." +msgstr "Alle laufenden Aufgaben abbrechen." + +#: pulpcore/cli/core/task.py:103 +#, python-brace-format +msgid "Task {href} is in state {state} and cannot be canceled." +msgstr "" +"Aufgabe {href} hat den Status {state} und kann nicht abgebrochen werden." + +#: pulpcore/cli/core/task.py:109 +#, python-brace-format +msgid "Waiting to cancel task {href}" +msgstr "Warte bis die Aufgabe {href} abgebrochen ist" + +#: pulpcore/cli/core/task.py:115 +msgid "Done." +msgstr "Fertig." + +#: pulpcore/cli/core/user.py:29 +msgid "Username of the entry" +msgstr "Benutzername des Eintrags" diff --git a/pulpcore/cli/core/locale/messages.pot b/pulpcore/cli/core/locale/messages.pot new file mode 100644 index 000000000..9056e550e --- /dev/null +++ b/pulpcore/cli/core/locale/messages.pot @@ -0,0 +1,335 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 19:41+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/core/content_guard.py:61 pulpcore/cli/core/content_guard.py:89 +msgid "" +"Group to remove download permission from. Can be specified multiple times." +msgstr "" + +#: pulpcore/cli/core/content_guard.py:67 pulpcore/cli/core/content_guard.py:95 +msgid "" +"User to remove download permission from. Can be specified multiple times." +msgstr "" + +#: pulpcore/cli/core/context.py:16 +msgid "access policy" +msgstr "" + +#: pulpcore/cli/core/context.py:17 +msgid "access policies" +msgstr "" + +#: pulpcore/cli/core/context.py:25 +msgid "artifact" +msgstr "" + +#: pulpcore/cli/core/context.py:26 +msgid "artifacts" +msgstr "" + +#: pulpcore/cli/core/context.py:46 +msgid "Artifact already exists." +msgstr "" + +#: pulpcore/cli/core/context.py:49 +#, python-brace-format +msgid "Uploading file {filename}" +msgstr "" + +#: pulpcore/cli/core/context.py:75 +msgid "Upload complete. Creating artifact." +msgstr "" + +#: pulpcore/cli/core/context.py:88 +msgid "Pulp exporter" +msgstr "" + +#: pulpcore/cli/core/context.py:89 +msgid "Pulp exporters" +msgstr "" + +#: pulpcore/cli/core/context.py:99 +msgid "Pulp export" +msgstr "" + +#: pulpcore/cli/core/context.py:100 +msgid "Pulp exports" +msgstr "" + +#: pulpcore/cli/core/context.py:114 +msgid "user group" +msgstr "" + +#: pulpcore/cli/core/context.py:115 +msgid "user groups" +msgstr "" + +#: pulpcore/cli/core/context.py:125 +msgid "group permission" +msgstr "" + +#: pulpcore/cli/core/context.py:126 +msgid "group permissions" +msgstr "" + +#: pulpcore/cli/core/context.py:145 +#, python-brace-format +msgid "Could not find {entity} with {kwargs}." +msgstr "" + +#: pulpcore/cli/core/context.py:157 +msgid "group model permission" +msgstr "" + +#: pulpcore/cli/core/context.py:158 +msgid "group model permissions" +msgstr "" + +#: pulpcore/cli/core/context.py:167 +msgid "group object permission" +msgstr "" + +#: pulpcore/cli/core/context.py:168 +msgid "group object permissions" +msgstr "" + +#: pulpcore/cli/core/context.py:177 +msgid "group user" +msgstr "" + +#: pulpcore/cli/core/context.py:178 +msgid "group users" +msgstr "" + +#: pulpcore/cli/core/context.py:202 +msgid "Pulp importer" +msgstr "" + +#: pulpcore/cli/core/context.py:203 +msgid "Pulp importers" +msgstr "" + +#: pulpcore/cli/core/context.py:234 +msgid "signing service" +msgstr "" + +#: pulpcore/cli/core/context.py:235 +msgid "signing services" +msgstr "" + +#: pulpcore/cli/core/context.py:242 +msgid "task" +msgstr "" + +#: pulpcore/cli/core/context.py:243 +msgid "tasks" +msgstr "" + +#: pulpcore/cli/core/context.py:268 +msgid "task group" +msgstr "" + +#: pulpcore/cli/core/context.py:269 +msgid "task groups" +msgstr "" + +#: pulpcore/cli/core/context.py:276 +msgid "upload" +msgstr "" + +#: pulpcore/cli/core/context.py:277 +msgid "uploads" +msgstr "" + +#: pulpcore/cli/core/context.py:295 +msgid "user" +msgstr "" + +#: pulpcore/cli/core/context.py:296 +msgid "users" +msgstr "" + +#: pulpcore/cli/core/context.py:303 +msgid "worker" +msgstr "" + +#: pulpcore/cli/core/context.py:304 +msgid "workers" +msgstr "" + +#: pulpcore/cli/core/export.py:36 +#, python-brace-format +msgid "'{value}' is not a valid href for {option_name}." +msgstr "" + +#: pulpcore/cli/core/export.py:47 +msgid "Repositories must be specified with plugin and type" +msgstr "" + +#: pulpcore/cli/core/export.py:53 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' is not valid for the {option_name} " +"option." +msgstr "" + +#: pulpcore/cli/core/export.py:66 +#, python-brace-format +msgid "" +"The type '{plugin}:{resource_type}' does not support the '{capability}' " +"capability." +msgstr "" + +#: pulpcore/cli/core/export.py:97 +msgid "Name of owning PulpExporter" +msgstr "" + +#: pulpcore/cli/core/export.py:99 +msgid "Limit the number of exporters to show." +msgstr "" + +#: pulpcore/cli/core/export.py:101 +msgid "Skip a number of exporters to show." +msgstr "" + +#: pulpcore/cli/core/export.py:122 +msgid "Examples: 512MB, 1GB" +msgstr "" + +#: pulpcore/cli/core/exporter.py:36 +msgid "" +"Repository to export from in the form '[[:]:]' " +"or by href. Can be called multiple times." +msgstr "" + +#: pulpcore/cli/core/generic.py:25 +msgid "List only tasks with this name." +msgstr "" + +#: pulpcore/cli/core/generic.py:29 +msgid "List only tasks whose name contains this." +msgstr "" + +#: pulpcore/cli/core/generic.py:34 +msgid "List only tasks with this correlation id." +msgstr "" + +#: pulpcore/cli/core/generic.py:43 +msgid "List only tasks in this state." +msgstr "" + +#: pulpcore/cli/core/group.py:48 +msgid "This type of Permission does not have an object." +msgstr "" + +#: pulpcore/cli/core/group.py:50 +msgid "This type of Permission needs an object." +msgstr "" + +#: pulpcore/cli/core/group.py:60 +msgid "Manage user groups and their granted permissions." +msgstr "" + +#: pulpcore/cli/core/group.py:103 +msgid "Show a list of the permissioons granted to a group." +msgstr "" + +#: pulpcore/cli/core/group.py:108 +msgid "Grant a permission to the group." +msgstr "" + +#: pulpcore/cli/core/group.py:125 +msgid "Revoke a permission from the group." +msgstr "" + +#: pulpcore/cli/core/importer.py:26 +msgid "" +"A map of source repository name to destination repository name (eg. --repo-" +"map src dest)" +msgstr "" + +#: pulpcore/cli/core/orphan.py:24 +msgid "List of specific Contents to delete if they are orphans" +msgstr "" + +#: pulpcore/cli/core/orphan.py:33 +msgid "" +"How long in minutes Pulp should hold orphan Content and Artifacts before " +"becoming candidates for cleanup task" +msgstr "" + +#: pulpcore/cli/core/show.py:12 +msgid "HREF of the entry" +msgstr "" + +#: pulpcore/cli/core/status.py:13 +msgid "Number of retries before failing." +msgstr "" + +#: pulpcore/cli/core/status.py:14 +msgid "Seconds to wait between retries." +msgstr "" + +#: pulpcore/cli/core/status.py:21 +msgid "Cannot specify a negative retry count." +msgstr "" + +#: pulpcore/cli/core/task.py:34 +#, python-brace-format +msgid "UUID of the {entity}" +msgstr "" + +#: pulpcore/cli/core/task.py:54 +msgid "Wait for the task to finish" +msgstr "" + +#: pulpcore/cli/core/task.py:62 +#, python-brace-format +msgid "Waiting for task {href} to finish." +msgstr "" + +#: pulpcore/cli/core/task.py:72 +msgid "Cancel all 'waiting' and 'running' tasks." +msgstr "" + +#: pulpcore/cli/core/task.py:74 +msgid "Cancel all 'waiting' tasks." +msgstr "" + +#: pulpcore/cli/core/task.py:75 +msgid "Cancel all 'running' tasks." +msgstr "" + +#: pulpcore/cli/core/task.py:103 +#, python-brace-format +msgid "Task {href} is in state {state} and cannot be canceled." +msgstr "" + +#: pulpcore/cli/core/task.py:109 +#, python-brace-format +msgid "Waiting to cancel task {href}" +msgstr "" + +#: pulpcore/cli/core/task.py:115 +msgid "Done." +msgstr "" + +#: pulpcore/cli/core/user.py:29 +msgid "Username of the entry" +msgstr "" diff --git a/pulpcore/cli/core/orphan.py b/pulpcore/cli/core/orphan.py index d09f4d0c0..cb2de5b01 100644 --- a/pulpcore/cli/core/orphan.py +++ b/pulpcore/cli/core/orphan.py @@ -1,12 +1,13 @@ -import gettext from typing import Any import click from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context from pulpcore.cli.common.generic import load_json_callback, pulp_option +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/orphans.py b/pulpcore/cli/core/orphans.py index a244e7c41..687769392 100644 --- a/pulpcore/cli/core/orphans.py +++ b/pulpcore/cli/core/orphans.py @@ -1,10 +1,10 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group(deprecated=True) diff --git a/pulpcore/cli/core/repository.py b/pulpcore/cli/core/repository.py index 9f373f8d1..36a704728 100644 --- a/pulpcore/cli/core/repository.py +++ b/pulpcore/cli/core/repository.py @@ -1,11 +1,11 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, PulpRepositoryContext, pass_pulp_context from pulpcore.cli.common.generic import list_command +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/show.py b/pulpcore/cli/core/show.py index 628533962..c4f2c639f 100644 --- a/pulpcore/cli/core/show.py +++ b/pulpcore/cli/core/show.py @@ -1,10 +1,10 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.command(name="show") diff --git a/pulpcore/cli/core/signing_service.py b/pulpcore/cli/core/signing_service.py index 05b45421f..d522fe563 100644 --- a/pulpcore/cli/core/signing_service.py +++ b/pulpcore/cli/core/signing_service.py @@ -1,12 +1,12 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context from pulpcore.cli.common.generic import href_option, list_command, name_option, show_command +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpSigningServiceContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/status.py b/pulpcore/cli/core/status.py index 79f11420c..7af48e534 100644 --- a/pulpcore/cli/core/status.py +++ b/pulpcore/cli/core/status.py @@ -1,11 +1,12 @@ -import gettext import time import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.command() diff --git a/pulpcore/cli/core/task.py b/pulpcore/cli/core/task.py index f03a8c347..9b32e1bf8 100644 --- a/pulpcore/cli/core/task.py +++ b/pulpcore/cli/core/task.py @@ -1,4 +1,3 @@ -import gettext import re from contextlib import suppress from datetime import datetime @@ -14,10 +13,12 @@ pass_pulp_context, ) from pulpcore.cli.common.generic import destroy_command, href_option, list_command, pulp_option +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpTaskContext from pulpcore.cli.core.generic import task_filter -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _uuid_callback( diff --git a/pulpcore/cli/core/task_group.py b/pulpcore/cli/core/task_group.py index bff99be2d..c5db4cac4 100644 --- a/pulpcore/cli/core/task_group.py +++ b/pulpcore/cli/core/task_group.py @@ -1,12 +1,12 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context from pulpcore.cli.common.generic import href_option, list_command, show_command +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpTaskGroupContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/core/user.py b/pulpcore/cli/core/user.py index cac8a8971..f6fca8e1c 100644 --- a/pulpcore/cli/core/user.py +++ b/pulpcore/cli/core/user.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import ( # PulpEntityContext,; pass_entity_context, @@ -19,9 +17,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpUserContext, PulpUserRoleContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext req_core_3_17 = PluginRequirement("core", min="3.17.dev") diff --git a/pulpcore/cli/core/worker.py b/pulpcore/cli/core/worker.py index bc8f57924..5b2970b33 100644 --- a/pulpcore/cli/core/worker.py +++ b/pulpcore/cli/core/worker.py @@ -2,8 +2,12 @@ from pulpcore.cli.common.context import PulpContext, pass_pulp_context from pulpcore.cli.common.generic import href_option, list_command, name_option, show_command +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpWorkerContext +translation = get_translation(__name__) +_ = translation.gettext + @click.group() @pass_pulp_context diff --git a/pulpcore/cli/file/__init__.py b/pulpcore/cli/file/__init__.py index f1f4e7351..946d20e5a 100644 --- a/pulpcore/cli/file/__init__.py +++ b/pulpcore/cli/file/__init__.py @@ -1,7 +1,6 @@ -import gettext - from pulpcore.cli.common import main from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.file.acs import acs from pulpcore.cli.file.content import content from pulpcore.cli.file.distribution import distribution @@ -9,7 +8,8 @@ from pulpcore.cli.file.remote import remote from pulpcore.cli.file.repository import repository -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @main.group(name="file") diff --git a/pulpcore/cli/file/acs.py b/pulpcore/cli/file/acs.py index 4636986c4..790ba498b 100644 --- a/pulpcore/cli/file/acs.py +++ b/pulpcore/cli/file/acs.py @@ -1,4 +1,3 @@ -import gettext from typing import Iterable import click @@ -20,9 +19,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.file.context import PulpFileACSContext, PulpFileRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext path_option = click.option( diff --git a/pulpcore/cli/file/content.py b/pulpcore/cli/file/content.py index 1b299b509..9b1426481 100644 --- a/pulpcore/cli/file/content.py +++ b/pulpcore/cli/file/content.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Optional, Union import click @@ -16,10 +15,12 @@ list_command, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpArtifactContext from pulpcore.cli.file.context import PulpFileContentContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _relative_path_callback(ctx: click.Context, param: click.Parameter, value: str) -> str: diff --git a/pulpcore/cli/file/context.py b/pulpcore/cli/file/context.py index 16921b791..51ba8e6e0 100644 --- a/pulpcore/cli/file/context.py +++ b/pulpcore/cli/file/context.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, ClassVar from pulpcore.cli.common.context import ( @@ -11,8 +10,10 @@ PulpRepositoryVersionContext, registered_repository_contexts, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpFileACSContext(PulpEntityContext): diff --git a/pulpcore/cli/file/distribution.py b/pulpcore/cli/file/distribution.py index c40315a27..0e20ef744 100644 --- a/pulpcore/cli/file/distribution.py +++ b/pulpcore/cli/file/distribution.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -17,9 +15,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.file.context import PulpFileDistributionContext, PulpFileRepositoryContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..174da5ee9 Binary files /dev/null and b/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..5deeb8210 --- /dev/null +++ b/pulpcore/cli/file/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,146 @@ +# Translations for the pulp-cli file plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-16 23:00+0200\n" +"PO-Revision-Date: 2021-12-06 11:23+0100\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/file/acs.py:29 +msgid "path to add to ACS; can be specified multiple times." +msgstr "" + +#: pulpcore/cli/file/acs.py:70 +msgid "ACS already has path '{}'." +msgstr "" + +#: pulpcore/cli/file/acs.py:90 +msgid "ACS does not have path(s): {}." +msgstr "" + +#: pulpcore/cli/file/acs.py:102 +msgid "" +"Remote to attach to ACS in the form '[[:]:]' or " +"by href." +msgstr "" + +#: pulpcore/cli/file/content.py:81 +msgid "Digest of the artifact to use" +msgstr "Fingerabdruck des zu verwendenden Artefakts" + +#: pulpcore/cli/file/context.py:20 +msgid "file ACS" +msgstr "" + +#: pulpcore/cli/file/context.py:21 +msgid "file ACSes" +msgstr "" + +#: pulpcore/cli/file/context.py:38 pulpcore/cli/file/context.py:39 +msgid "file content" +msgstr "" + +#: pulpcore/cli/file/context.py:47 +msgid "file distribution" +msgstr "" + +#: pulpcore/cli/file/context.py:48 +msgid "file distributions" +msgstr "" + +#: pulpcore/cli/file/context.py:68 +msgid "file publication" +msgstr "" + +#: pulpcore/cli/file/context.py:69 +msgid "file publications" +msgstr "" + +#: pulpcore/cli/file/context.py:86 +msgid "file remote" +msgstr "" + +#: pulpcore/cli/file/context.py:87 +msgid "file remotes" +msgstr "" + +#: pulpcore/cli/file/distribution.py:32 +msgid "" +"Repository to be used for auto-publishing. When set, this will unset the " +"'publication'. Specified as '[[:]:]' or as href." +msgstr "" + +#: pulpcore/cli/file/distribution.py:63 +msgid "" +"Publication to be served. This will unset the 'repository' and disable auto " +"publish." +msgstr "" + +#: pulpcore/cli/file/publication.py:50 +msgid "a repository version number, leave blank for latest" +msgstr "" +"Versionsnummer des Repositories, leer lassen um die letzte zu verwenden" + +#: pulpcore/cli/file/publication.py:54 +msgid "" +"Filename to use for manifest file containing metadata for all the files." +msgstr "" + +#: pulpcore/cli/file/repository.py:56 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/file/repository.py:80 +#, python-brace-format +msgid "Validation of '{parameter}' failed: {error}" +msgstr "" + +#: pulpcore/cli/file/repository.py:135 pulpcore/cli/file/repository.py:279 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"sha256\", \"relative_path" +"\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/file/repository.py:144 pulpcore/cli/file/repository.py:290 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"sha256\", \"relative_path" +"\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/file/repository.py:188 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" +"Repository '{name}' hat keine voreingestellte Gegenstelle. Bitte mit '--" +"remote' angeben." + +#~ msgid "Chunk size in bytes (default is 1 MB)" +#~ msgstr "Blockgröße in Bytes (Voreinstellung ist 1 MB)" + +#, python-brace-format +#~ msgid "Failed to load content from {json_file}" +#~ msgstr "Das Laden des Inhalts aus der Datei {json_file} ist fehlgeschlagen" + +#~ msgid "Failed to decode JSON" +#~ msgstr "Die JSON-Dekodierung ist fehlgeschlagen" diff --git a/pulpcore/cli/file/locale/messages.pot b/pulpcore/cli/file/locale/messages.pot new file mode 100644 index 000000000..3b96f2025 --- /dev/null +++ b/pulpcore/cli/file/locale/messages.pot @@ -0,0 +1,133 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 19:41+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/file/acs.py:29 +msgid "path to add to ACS; can be specified multiple times." +msgstr "" + +#: pulpcore/cli/file/acs.py:70 +msgid "ACS already has path '{}'." +msgstr "" + +#: pulpcore/cli/file/acs.py:90 +msgid "ACS does not have path(s): {}." +msgstr "" + +#: pulpcore/cli/file/acs.py:102 +msgid "" +"Remote to attach to ACS in the form '[[:]:]' or " +"by href." +msgstr "" + +#: pulpcore/cli/file/content.py:81 +msgid "Digest of the artifact to use" +msgstr "" + +#: pulpcore/cli/file/context.py:20 +msgid "file ACS" +msgstr "" + +#: pulpcore/cli/file/context.py:21 +msgid "file ACSes" +msgstr "" + +#: pulpcore/cli/file/context.py:38 pulpcore/cli/file/context.py:39 +msgid "file content" +msgstr "" + +#: pulpcore/cli/file/context.py:47 +msgid "file distribution" +msgstr "" + +#: pulpcore/cli/file/context.py:48 +msgid "file distributions" +msgstr "" + +#: pulpcore/cli/file/context.py:68 +msgid "file publication" +msgstr "" + +#: pulpcore/cli/file/context.py:69 +msgid "file publications" +msgstr "" + +#: pulpcore/cli/file/context.py:86 +msgid "file remote" +msgstr "" + +#: pulpcore/cli/file/context.py:87 +msgid "file remotes" +msgstr "" + +#: pulpcore/cli/file/distribution.py:32 +msgid "" +"Repository to be used for auto-publishing. When set, this will unset the " +"'publication'. Specified as '[[:]:]' or as href." +msgstr "" + +#: pulpcore/cli/file/distribution.py:63 +msgid "" +"Publication to be served. This will unset the 'repository' and disable auto " +"publish." +msgstr "" + +#: pulpcore/cli/file/publication.py:50 +msgid "a repository version number, leave blank for latest" +msgstr "" + +#: pulpcore/cli/file/publication.py:54 +msgid "" +"Filename to use for manifest file containing metadata for all the files." +msgstr "" + +#: pulpcore/cli/file/repository.py:56 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/file/repository.py:80 +#, python-brace-format +msgid "Validation of '{parameter}' failed: {error}" +msgstr "" + +#: pulpcore/cli/file/repository.py:135 pulpcore/cli/file/repository.py:279 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"sha256\", \"relative_path" +"\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/file/repository.py:144 pulpcore/cli/file/repository.py:290 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"sha256\", \"relative_path" +"\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/file/repository.py:188 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/file/publication.py b/pulpcore/cli/file/publication.py index ad9cad803..843e9b861 100644 --- a/pulpcore/cli/file/publication.py +++ b/pulpcore/cli/file/publication.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -12,9 +10,11 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.file.context import PulpFilePublicationContext, PulpFileRepositoryContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/file/remote.py b/pulpcore/cli/file/remote.py index 2bbd3efab..b9c666782 100644 --- a/pulpcore/cli/file/remote.py +++ b/pulpcore/cli/file/remote.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -16,9 +14,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.file.context import PulpFileRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/file/repository.py b/pulpcore/cli/file/repository.py index 2f92dd8d6..b03e7700c 100644 --- a/pulpcore/cli/file/repository.py +++ b/pulpcore/cli/file/repository.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, Dict, List, Optional import click @@ -35,6 +34,7 @@ update_command, version_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.generic import task_command from pulpcore.cli.file.context import ( PulpFileContentContext, @@ -42,7 +42,8 @@ PulpFileRepositoryContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext remote_option = resource_option( diff --git a/pulpcore/cli/migration/context.py b/pulpcore/cli/migration/context.py index 981547a65..0d63c0418 100644 --- a/pulpcore/cli/migration/context.py +++ b/pulpcore/cli/migration/context.py @@ -1,9 +1,10 @@ -import gettext from typing import Any from pulpcore.cli.common.context import PulpEntityContext +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpMigrationPlanContext(PulpEntityContext): diff --git a/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..23c15c579 Binary files /dev/null and b/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..2fa46cafe --- /dev/null +++ b/pulpcore/cli/migration/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,48 @@ +# Translations for the pulp-cli migration plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-16 23:00+0200\n" +"PO-Revision-Date: 2021-12-06 11:26+0100\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/migration/context.py:11 +msgid "pulp_2to3_migration_migration_plan" +msgstr "" + +#: pulpcore/cli/migration/context.py:27 +msgid "pulp_2to3_migration_pulp2_content" +msgstr "" + +#: pulpcore/cli/migration/context.py:34 +msgid "pulp_2to3_migration_pulp2_repository" +msgstr "" + +#: pulpcore/cli/migration/plan.py:37 +msgid "" +"Migration plan in json format. The argument can be prefixed with @ to use a " +"file containing the json." +msgstr "" + +#: pulpcore/cli/migration/plan.py:45 +msgid "Run migration plan" +msgstr "Führe Migrationsplan aus." + +#: pulpcore/cli/migration/plan.py:46 pulpcore/cli/migration/plan.py:53 +msgid "HREF of the plan" +msgstr "" + +#: pulpcore/cli/migration/plan.py:52 +msgid "Reset Pulp 3 data for plugins specified in the migration plan" +msgstr "" diff --git a/pulpcore/cli/migration/locale/messages.pot b/pulpcore/cli/migration/locale/messages.pot new file mode 100644 index 000000000..404dd493c --- /dev/null +++ b/pulpcore/cli/migration/locale/messages.pot @@ -0,0 +1,48 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 19:41+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/migration/context.py:11 +msgid "pulp_2to3_migration_migration_plan" +msgstr "" + +#: pulpcore/cli/migration/context.py:27 +msgid "pulp_2to3_migration_pulp2_content" +msgstr "" + +#: pulpcore/cli/migration/context.py:34 +msgid "pulp_2to3_migration_pulp2_repository" +msgstr "" + +#: pulpcore/cli/migration/plan.py:37 +msgid "" +"Migration plan in json format. The argument can be prefixed with @ to use a " +"file containing the json." +msgstr "" + +#: pulpcore/cli/migration/plan.py:45 +msgid "Run migration plan" +msgstr "" + +#: pulpcore/cli/migration/plan.py:46 pulpcore/cli/migration/plan.py:53 +msgid "HREF of the plan" +msgstr "" + +#: pulpcore/cli/migration/plan.py:52 +msgid "Reset Pulp 3 data for plugins specified in the migration plan" +msgstr "" diff --git a/pulpcore/cli/migration/plan.py b/pulpcore/cli/migration/plan.py index 4b3348747..43c023255 100644 --- a/pulpcore/cli/migration/plan.py +++ b/pulpcore/cli/migration/plan.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_entity_context, pass_pulp_context @@ -11,9 +9,11 @@ load_json_callback, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.migration.context import PulpMigrationPlanContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/python/content.py b/pulpcore/cli/python/content.py index 987644555..abed6205f 100644 --- a/pulpcore/cli/python/content.py +++ b/pulpcore/cli/python/content.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Optional, Union import click @@ -16,10 +15,12 @@ list_command, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpArtifactContext from pulpcore.cli.python.context import PulpPythonContentContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _sha256_artifact_callback( diff --git a/pulpcore/cli/python/context.py b/pulpcore/cli/python/context.py index f8f590d91..6d9ab00fd 100644 --- a/pulpcore/cli/python/context.py +++ b/pulpcore/cli/python/context.py @@ -1,4 +1,3 @@ -import gettext from typing import ClassVar from pulpcore.cli.common.context import ( @@ -11,8 +10,10 @@ PulpRepositoryVersionContext, registered_repository_contexts, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpPythonContentContext(PulpContentContext): diff --git a/pulpcore/cli/python/distribution.py b/pulpcore/cli/python/distribution.py index dc42b1dcb..0e74693be 100644 --- a/pulpcore/cli/python/distribution.py +++ b/pulpcore/cli/python/distribution.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context @@ -18,13 +16,15 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.python.context import ( PulpPythonDistributionContext, PulpPythonRemoteContext, PulpPythonRepositoryContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..51684a6f2 Binary files /dev/null and b/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..558250240 --- /dev/null +++ b/pulpcore/cli/python/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,131 @@ +# Translations for the pulp-cli python plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-10-16 23:00+0200\n" +"PO-Revision-Date: 2021-12-06 11:24+0100\n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/python/content.py:55 pulpcore/cli/python/content.py:76 +msgid "Exact name of file" +msgstr "" + +#: pulpcore/cli/python/content.py:60 +msgid "Digest of the artifact to use" +msgstr "Fingerabdruck des zu verwendenden Artefakts" + +#: pulpcore/cli/python/content.py:77 +msgid "Path to file" +msgstr "Pfad zur Datei" + +#: pulpcore/cli/python/context.py:20 +msgid "python package" +msgstr "" + +#: pulpcore/cli/python/context.py:21 +msgid "python packages" +msgstr "" + +#: pulpcore/cli/python/context.py:29 +msgid "python distribution" +msgstr "" + +#: pulpcore/cli/python/context.py:30 +msgid "python distributions" +msgstr "" + +#: pulpcore/cli/python/context.py:50 +msgid "python publication" +msgstr "" + +#: pulpcore/cli/python/context.py:51 +msgid "python publications" +msgstr "" + +#: pulpcore/cli/python/context.py:68 +msgid "python remote" +msgstr "" + +#: pulpcore/cli/python/context.py:69 +msgid "python remotes" +msgstr "" + +#: pulpcore/cli/python/distribution.py:33 +msgid "" +"Repository to be used for auto-publishing. When set, this will unset the " +"'publication'. Specified as '[[:]:]' or as href." +msgstr "" + +#: pulpcore/cli/python/distribution.py:64 +msgid "" +"Publication to be served. This will unset the 'repository' and disable auto " +"publish." +msgstr "" + +#: pulpcore/cli/python/publication.py:50 +msgid "a repository version number, leave blank for latest" +msgstr "" +"Versionsnummer des Repositories, leer lassen um die letzte zu verwenden" + +#: pulpcore/cli/python/remote.py:42 +msgid "Failed to decode JSON: {}" +msgstr "Die JSON-Dekodierung ist fehlgeschlagen: {}" + +#: pulpcore/cli/python/remote.py:72 +msgid "Package allowlist" +msgstr "" + +#: pulpcore/cli/python/remote.py:73 +msgid "Package blocklist" +msgstr "" + +#: pulpcore/cli/python/remote.py:124 +#, python-brace-format +msgid "Failed to load content from {requirements_file}" +msgstr "" + +#: pulpcore/cli/python/repository.py:53 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/python/repository.py:102 +msgid "Filename of the python package" +msgstr "" + +#: pulpcore/cli/python/repository.py:110 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object should have the key: \"filename\"\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/python/repository.py:119 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object should have the key: \"filename\"\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/python/repository.py:163 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" +"Repository '{name}' hat keine voreingestellte Gegenstelle. Bitte mit '--" +"remote' angeben." diff --git a/pulpcore/cli/python/locale/messages.pot b/pulpcore/cli/python/locale/messages.pot new file mode 100644 index 000000000..0b8a9bbf6 --- /dev/null +++ b/pulpcore/cli/python/locale/messages.pot @@ -0,0 +1,128 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-11-06 19:41+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/python/content.py:55 pulpcore/cli/python/content.py:76 +msgid "Exact name of file" +msgstr "" + +#: pulpcore/cli/python/content.py:60 +msgid "Digest of the artifact to use" +msgstr "" + +#: pulpcore/cli/python/content.py:77 +msgid "Path to file" +msgstr "" + +#: pulpcore/cli/python/context.py:20 +msgid "python package" +msgstr "" + +#: pulpcore/cli/python/context.py:21 +msgid "python packages" +msgstr "" + +#: pulpcore/cli/python/context.py:29 +msgid "python distribution" +msgstr "" + +#: pulpcore/cli/python/context.py:30 +msgid "python distributions" +msgstr "" + +#: pulpcore/cli/python/context.py:50 +msgid "python publication" +msgstr "" + +#: pulpcore/cli/python/context.py:51 +msgid "python publications" +msgstr "" + +#: pulpcore/cli/python/context.py:68 +msgid "python remote" +msgstr "" + +#: pulpcore/cli/python/context.py:69 +msgid "python remotes" +msgstr "" + +#: pulpcore/cli/python/distribution.py:33 +msgid "" +"Repository to be used for auto-publishing. When set, this will unset the " +"'publication'. Specified as '[[:]:]' or as href." +msgstr "" + +#: pulpcore/cli/python/distribution.py:64 +msgid "" +"Publication to be served. This will unset the 'repository' and disable auto " +"publish." +msgstr "" + +#: pulpcore/cli/python/publication.py:50 +msgid "a repository version number, leave blank for latest" +msgstr "" + +#: pulpcore/cli/python/remote.py:42 +msgid "Failed to decode JSON: {}" +msgstr "" + +#: pulpcore/cli/python/remote.py:72 +msgid "Package allowlist" +msgstr "" + +#: pulpcore/cli/python/remote.py:73 +msgid "Package blocklist" +msgstr "" + +#: pulpcore/cli/python/remote.py:124 +#, python-brace-format +msgid "Failed to load content from {requirements_file}" +msgstr "" + +#: pulpcore/cli/python/repository.py:53 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/python/repository.py:102 +msgid "Filename of the python package" +msgstr "" + +#: pulpcore/cli/python/repository.py:110 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object should have the key: \"filename\"\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/python/repository.py:119 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object should have the key: \"filename\"\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/python/repository.py:163 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/python/publication.py b/pulpcore/cli/python/publication.py index 8b73df84a..62c13f53e 100644 --- a/pulpcore/cli/python/publication.py +++ b/pulpcore/cli/python/publication.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -12,9 +10,11 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.python.context import PulpPythonPublicationContext, PulpPythonRepositoryContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( diff --git a/pulpcore/cli/python/remote.py b/pulpcore/cli/python/remote.py index 138b4b6db..99173234b 100644 --- a/pulpcore/cli/python/remote.py +++ b/pulpcore/cli/python/remote.py @@ -1,4 +1,3 @@ -import gettext import json from typing import Any, List, Optional @@ -20,9 +19,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.python.context import PulpPythonRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _package_list_callback(ctx: click.Context, param: click.Parameter, value: Optional[str]) -> Any: diff --git a/pulpcore/cli/python/repository.py b/pulpcore/cli/python/repository.py index 3c9ab7ed1..04372b4e3 100644 --- a/pulpcore/cli/python/repository.py +++ b/pulpcore/cli/python/repository.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, Dict, Optional import click @@ -32,6 +31,7 @@ update_command, version_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.generic import task_command from pulpcore.cli.python.context import ( PulpPythonContentContext, @@ -39,7 +39,8 @@ PulpPythonRepositoryContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext remote_option = resource_option( diff --git a/pulpcore/cli/rpm/__init__.py b/pulpcore/cli/rpm/__init__.py index c0e29c765..dafca49e1 100644 --- a/pulpcore/cli/rpm/__init__.py +++ b/pulpcore/cli/rpm/__init__.py @@ -1,7 +1,6 @@ -import gettext - from pulpcore.cli.common import main from pulpcore.cli.common.context import PluginRequirement, PulpContext, pass_pulp_context +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.rpm.acs import acs from pulpcore.cli.rpm.comps import comps_upload from pulpcore.cli.rpm.content import content @@ -10,7 +9,8 @@ from pulpcore.cli.rpm.remote import remote from pulpcore.cli.rpm.repository import repository -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @main.group() diff --git a/pulpcore/cli/rpm/acs.py b/pulpcore/cli/rpm/acs.py index 84e294c73..c570de5d4 100644 --- a/pulpcore/cli/rpm/acs.py +++ b/pulpcore/cli/rpm/acs.py @@ -1,4 +1,3 @@ -import gettext from typing import Iterable import click @@ -20,9 +19,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.rpm.context import PulpRpmACSContext, PulpRpmRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext path_option = click.option( diff --git a/pulpcore/cli/rpm/content.py b/pulpcore/cli/rpm/content.py index d1a4e946b..2c506c760 100644 --- a/pulpcore/cli/rpm/content.py +++ b/pulpcore/cli/rpm/content.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Optional, Union import click @@ -16,10 +15,12 @@ list_command, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.context import PulpArtifactContext from pulpcore.cli.rpm.context import PulpRpmPackageContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext def _relative_path_callback(ctx: click.Context, param: click.Parameter, value: str) -> str: diff --git a/pulpcore/cli/rpm/context.py b/pulpcore/cli/rpm/context.py index 58544a5d5..684c63d6d 100644 --- a/pulpcore/cli/rpm/context.py +++ b/pulpcore/cli/rpm/context.py @@ -1,4 +1,3 @@ -import gettext from typing import IO, Any, ClassVar, Optional import click @@ -13,8 +12,10 @@ PulpRepositoryVersionContext, registered_repository_contexts, ) +from pulpcore.cli.common.i18n import get_translation -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext class PulpRpmACSContext(PulpEntityContext): diff --git a/pulpcore/cli/rpm/distribution.py b/pulpcore/cli/rpm/distribution.py index f50db0dd3..d65c03cb5 100644 --- a/pulpcore/cli/rpm/distribution.py +++ b/pulpcore/cli/rpm/distribution.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -17,9 +15,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.rpm.context import PulpRpmDistributionContext, PulpRpmRepositoryContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext repository_option = resource_option( "--repository", diff --git a/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.mo b/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..878424a0c Binary files /dev/null and b/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.mo differ diff --git a/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.po b/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.po new file mode 100644 index 000000000..a8b91c444 --- /dev/null +++ b/pulpcore/cli/rpm/locale/de/LC_MESSAGES/messages.po @@ -0,0 +1,121 @@ +# Translations for the pulp-cli rpm plugin. +# Copyright (C) 2021 +# This file is distributed under the same license as the pulp-cli package. +# Matthias Dellweg , 2021. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-06 11:10+0100\n" +"PO-Revision-Date: 2021-12-06 11:24+0100\n" +"Last-Translator: Matthias Dellweg \n" +"Language-Team: \n" +"Language: de\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.0\n" + +#: pulpcore/cli/rpm/acs.py:30 +msgid "path to add to ACS; can be specified multiple times." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:71 +msgid "ACS already has path '{}'." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:91 +msgid "ACS does not have path(s): {}." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:103 +msgid "" +"Remote to attach to ACS in the form '[[:]:]' or " +"by href." +msgstr "" + +#: pulpcore/cli/rpm/comps.py:24 +msgid "Repository to associate the comps-units to, takes or href." +msgstr "" + +#: pulpcore/cli/rpm/content.py:96 +msgid "Digest of the artifact to use" +msgstr "Fingerabdruck des zu verwendenden Artefakts" + +#: pulpcore/cli/rpm/context.py:22 +msgid "rpm ACS" +msgstr "" + +#: pulpcore/cli/rpm/context.py:23 +msgid "rpm ACSes" +msgstr "" + +#: pulpcore/cli/rpm/context.py:45 +#, python-brace-format +msgid "Uploading file {filename}" +msgstr "" + +#: pulpcore/cli/rpm/context.py:55 +msgid "rpm distribution" +msgstr "" + +#: pulpcore/cli/rpm/context.py:56 +msgid "rpm distributions" +msgstr "" + +#: pulpcore/cli/rpm/context.py:76 +msgid "rpm publication" +msgstr "" + +#: pulpcore/cli/rpm/context.py:77 +msgid "rpm publications" +msgstr "" + +#: pulpcore/cli/rpm/context.py:94 +msgid "rpm remote" +msgstr "" + +#: pulpcore/cli/rpm/context.py:95 +msgid "rpm remotes" +msgstr "" + +#: pulpcore/cli/rpm/publication.py:46 +msgid "a repository version number, leave blank for latest" +msgstr "" +"Versionsnummer des Repositories, leer lassen um die letzte zu verwenden" + +#: pulpcore/cli/rpm/repository.py:56 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:94 +msgid "Href of the rpm package to use" +msgstr "" + +#: pulpcore/cli/rpm/repository.py:107 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"pulp_href\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:116 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"pulp_href\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:192 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" +"Repository '{name}' hat keine voreingestellte Gegenstelle. Bitte mit '--" +"remote' angeben." diff --git a/pulpcore/cli/rpm/locale/messages.pot b/pulpcore/cli/rpm/locale/messages.pot new file mode 100644 index 000000000..57080ab08 --- /dev/null +++ b/pulpcore/cli/rpm/locale/messages.pot @@ -0,0 +1,118 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-06 11:10+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: pulpcore/cli/rpm/acs.py:30 +msgid "path to add to ACS; can be specified multiple times." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:71 +msgid "ACS already has path '{}'." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:91 +msgid "ACS does not have path(s): {}." +msgstr "" + +#: pulpcore/cli/rpm/acs.py:103 +msgid "" +"Remote to attach to ACS in the form '[[:]:]' or " +"by href." +msgstr "" + +#: pulpcore/cli/rpm/comps.py:24 +msgid "Repository to associate the comps-units to, takes or href." +msgstr "" + +#: pulpcore/cli/rpm/content.py:96 +msgid "Digest of the artifact to use" +msgstr "" + +#: pulpcore/cli/rpm/context.py:22 +msgid "rpm ACS" +msgstr "" + +#: pulpcore/cli/rpm/context.py:23 +msgid "rpm ACSes" +msgstr "" + +#: pulpcore/cli/rpm/context.py:45 +#, python-brace-format +msgid "Uploading file {filename}" +msgstr "" + +#: pulpcore/cli/rpm/context.py:55 +msgid "rpm distribution" +msgstr "" + +#: pulpcore/cli/rpm/context.py:56 +msgid "rpm distributions" +msgstr "" + +#: pulpcore/cli/rpm/context.py:76 +msgid "rpm publication" +msgstr "" + +#: pulpcore/cli/rpm/context.py:77 +msgid "rpm publications" +msgstr "" + +#: pulpcore/cli/rpm/context.py:94 +msgid "rpm remote" +msgstr "" + +#: pulpcore/cli/rpm/context.py:95 +msgid "rpm remotes" +msgstr "" + +#: pulpcore/cli/rpm/publication.py:46 +msgid "a repository version number, leave blank for latest" +msgstr "" + +#: pulpcore/cli/rpm/repository.py:56 +msgid "" +"Remote used for synching in the form '[[:]:]' " +"or by href." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:94 +msgid "Href of the rpm package to use" +msgstr "" + +#: pulpcore/cli/rpm/repository.py:107 +msgid "" +"JSON string with a list of objects to add to the repository.\n" +" Each object must contain the following keys: \"pulp_href\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:116 +msgid "" +"JSON string with a list of objects to remove from the repository.\n" +" Each object must contain the following keys: \"pulp_href\".\n" +" The argument prefixed with the '@' can be the path to a JSON file with a " +"list of objects." +msgstr "" + +#: pulpcore/cli/rpm/repository.py:192 +#, python-brace-format +msgid "" +"Repository '{name}' does not have a default remote. Please specify with '--" +"remote'." +msgstr "" diff --git a/pulpcore/cli/rpm/publication.py b/pulpcore/cli/rpm/publication.py index a9d693d8d..e872b5814 100644 --- a/pulpcore/cli/rpm/publication.py +++ b/pulpcore/cli/rpm/publication.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -12,9 +10,11 @@ resource_option, show_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.rpm.context import PulpRpmPublicationContext, PulpRpmRepositoryContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/rpm/remote.py b/pulpcore/cli/rpm/remote.py index f5e9fe6be..f7839f5cb 100644 --- a/pulpcore/cli/rpm/remote.py +++ b/pulpcore/cli/rpm/remote.py @@ -1,5 +1,3 @@ -import gettext - import click from pulpcore.cli.common.context import PulpContext, pass_pulp_context @@ -16,9 +14,11 @@ show_command, update_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.rpm.context import PulpRpmRemoteContext -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext @click.group() diff --git a/pulpcore/cli/rpm/repository.py b/pulpcore/cli/rpm/repository.py index ed553cd2d..5221eb27f 100644 --- a/pulpcore/cli/rpm/repository.py +++ b/pulpcore/cli/rpm/repository.py @@ -1,4 +1,3 @@ -import gettext from typing import Any, Dict, Iterable, Optional import click @@ -33,6 +32,7 @@ update_command, version_command, ) +from pulpcore.cli.common.i18n import get_translation from pulpcore.cli.core.generic import task_command from pulpcore.cli.rpm.common import CHECKSUM_CHOICES from pulpcore.cli.rpm.context import ( @@ -41,7 +41,8 @@ PulpRpmRepositoryContext, ) -_ = gettext.gettext +translation = get_translation(__name__) +_ = translation.gettext SKIP_TYPES = ["srpm"] diff --git a/pyproject.toml b/pyproject.toml index bc9564ac9..4bcafb235 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,36 @@ template = "CHANGES/.TEMPLATE.md" issue_format = "[#{issue}](https://github.com/pulp/pulp-cli/issues/{issue})" start_string = "[//]: # (towncrier release notes start)\n" +[[tool.towncrier.type]] +directory = "feature" +name = "Features" +showcontent = true + +[[tool.towncrier.type]] +directory = "bugfix" +name = "Bugfixes" +showcontent = true + +[[tool.towncrier.type]] +directory = "doc" +name = "Improved Documentation" +showcontent = true + +[[tool.towncrier.type]] +directory = "removal" +name = "Deprecations and Removals" +showcontent = true + +[[tool.towncrier.type]] +directory = "translation" +name = "Translations" +showcontent = true + +[[tool.towncrier.type]] +directory = "misc" +name = "Misc" +showcontent = false + [tool.black] line-length = 100 diff --git a/setup.py b/setup.py index 134567bdd..6a4555095 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,9 @@ from setuptools import find_namespace_packages main_entrypoint = "pulp=pulpcore.cli.common:main" - plugin_packages = find_namespace_packages(include=["pulpcore.cli.*"]) + plugin_packages = find_namespace_packages( + include=["pulpcore.cli.*"], exclude=["pulpcore.cli.*.*"] + ) except ImportError: # Old versions of setuptools do not provide `find_namespace_packages` @@ -30,7 +32,6 @@ break long_description += line - setup( name="pulp-cli", description="Command line interface to talk to pulpcore's REST API.", @@ -41,7 +42,7 @@ url="https://github.com/pulp/pulp-cli", version="0.13.0.dev", packages=plugin_packages + extra_packages, - package_data={package: ["py.typed"] for package in plugin_packages}, + package_data={"": ["py.typed", "locale/*/LC_MESSAGES/*.mo"]}, python_requires=">=3.6", install_requires=[ "click>=7.1.2,<9.0.0",