Skip to content

Commit

Permalink
Add translations to pulp-glue
Browse files Browse the repository at this point in the history
fixes #634
  • Loading branch information
mdellweg committed Oct 4, 2023
1 parent c6b487f commit fe19d8e
Show file tree
Hide file tree
Showing 48 changed files with 3,678 additions and 1,418 deletions.
1 change: 1 addition & 0 deletions CHANGES/pulp-glue/634.translation
@@ -0,0 +1 @@
Added translation files machinery for pulp-glue.
22 changes: 17 additions & 5 deletions Makefile
@@ -1,9 +1,12 @@
LANGUAGES=de
PLUGINS=$(notdir $(wildcard pulpcore/cli/*))
GLUE_PLUGINS=$(notdir $(wildcard pulp-glue/pulp_glue/*))
CLI_PLUGINS=$(notdir $(wildcard pulpcore/cli/*))

info:
@echo Pulp glue
@echo plugins: $(GLUE_PLUGINS)
@echo Pulp CLI
@echo plugins: $(PLUGINS)
@echo plugins: $(CLI_PLUGINS)

black:
isort .
Expand Down Expand Up @@ -34,11 +37,20 @@ servedocs:
site:
mkdocs build

pulp-glue/pulp_glue/%/locale/messages.pot: pulp-glue/pulp_glue/%/*.py
xgettext -d $* -o $@ pulp-glue/pulp_glue/$*/*.py
sed -i 's/charset=CHARSET/charset=UTF-8/g' $@

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)
extract_messages: $(foreach GLUE_PLUGIN,$(GLUE_PLUGINS),pulp-glue/pulp_glue/$(GLUE_PLUGIN)/locale/messages.pot) $(foreach CLI_PLUGIN,$(CLI_PLUGINS),pulpcore/cli/$(CLI_PLUGIN)/locale/messages.pot)

$(foreach LANGUAGE,$(LANGUAGES),pulp-glue/pulp_glue/%/locale/$(LANGUAGE)/LC_MESSAGES/messages.po): pulp-glue/pulp_glue/%/locale/messages.pot
[ -e $(@D) ] || mkdir -p $(@D)
[ ! -e $@ ] || msgmerge --update $@ $<
[ -e $@ ] || cp $< $@

$(foreach LANGUAGE,$(LANGUAGES),pulpcore/cli/%/locale/$(LANGUAGE)/LC_MESSAGES/messages.po): pulpcore/cli/%/locale/messages.pot
[ -e $(@D) ] || mkdir -p $(@D)
Expand All @@ -48,7 +60,7 @@ $(foreach LANGUAGE,$(LANGUAGES),pulpcore/cli/%/locale/$(LANGUAGE)/LC_MESSAGES/me
%.mo: %.po
msgfmt -o $@ $<

compile_messages: $(foreach LANGUAGE,$(LANGUAGES),$(foreach PLUGIN,$(PLUGINS),pulpcore/cli/$(PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo))
compile_messages: $(foreach LANGUAGE,$(LANGUAGES),$(foreach GLUE_PLUGIN,$(GLUE_PLUGINS),pulp-glue/pulp_glue/$(GLUE_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo)) $(foreach LANGUAGE,$(LANGUAGES),$(foreach CLI_PLUGIN,$(CLI_PLUGINS),pulpcore/cli/$(CLI_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.mo))

.PHONY: info black lint test servedocs site
.PRECIOUS: $(foreach LANGUAGE,$(LANGUAGES),$(foreach PLUGIN,$(PLUGINS),pulpcore/cli/$(PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po))
.PRECIOUS: $(foreach LANGUAGE,$(LANGUAGES),$(foreach GLUE_PLUGIN,$(GLUE_PLUGINS),pulp-glue/pulp_glue/$(GLUE_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po)) $(foreach LANGUAGE,$(LANGUAGES),$(foreach CLI_PLUGIN,$(CLI_PLUGINS),pulpcore/cli/$(CLI_PLUGIN)/locale/$(LANGUAGE)/LC_MESSAGES/messages.po))
Binary file not shown.
165 changes: 165 additions & 0 deletions pulp-glue/pulp_glue/ansible/locale/de/LC_MESSAGES/messages.po
@@ -0,0 +1,165 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-04 09:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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:48
#, python-brace-format
msgid "Option {name} is deprecated."
msgstr ""

#: pulpcore/cli/ansible/content.py:90
msgid ""
"Repository to upload into in the form '[[<plugin>:]<resource_type>:]<name>' "
"or by href."
msgstr ""

#: pulpcore/cli/ansible/content.py:117 pulpcore/cli/ansible/content.py:173
#: pulpcore/cli/ansible/content.py:234 pulpcore/cli/ansible/repository.py:126
#, python-brace-format
msgid "Name of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:119 pulpcore/cli/ansible/content.py:182
#: pulpcore/cli/ansible/content.py:238 pulpcore/cli/ansible/repository.py:134
#, python-brace-format
msgid "Namespace of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:121 pulpcore/cli/ansible/content.py:190
#: pulpcore/cli/ansible/content.py:244 pulpcore/cli/ansible/repository.py:141
#, python-brace-format
msgid "Version of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:127
msgid "Only show highest version of collection version"
msgstr ""

#: pulpcore/cli/ansible/content.py:132
msgid "Comma separated list of tags that must all match"
msgstr ""

#: pulpcore/cli/ansible/content.py:137 pulpcore/cli/ansible/content.py:198
#, python-brace-format
msgid "Public key fingerprint of the {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:143 pulpcore/cli/ansible/content.py:208
#, python-brace-format
msgid "Collection of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:148
#, python-brace-format
msgid "Signing service used to create {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:159
msgid "String list of fields to include in the result [DEPRECATED]"
msgstr ""

#: pulpcore/cli/ansible/content.py:165
msgid "String list of fields to exclude from result [DEPRECATED]"
msgstr ""

#: pulpcore/cli/ansible/content.py:228
#, python-brace-format
msgid "Chunk size to break up {entity} into. Defaults to 1MB"
msgstr ""

#: pulpcore/cli/ansible/content.py:250
#, python-brace-format
msgid "Collection for this {entity}"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:69
msgid "the base (relative) path component of the published url."
msgstr ""

#: pulpcore/cli/ansible/distribution.py:74
msgid "a repository version number, leave blank for latest"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:96
msgid "new base_path"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:103
msgid "version of new repository to be served, leave blank for always latest"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:159
#, 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:70
msgid "policy to use when downloading"
msgstr ""

#: pulpcore/cli/ansible/remote.py:78
msgid ""
"(Deprecated) Please use '--requirements' instead\n"
"\n"
"Collections only: a Collection requirements yaml"
msgstr ""

#: pulpcore/cli/ansible/remote.py:86
msgid "Collections only: a string of a requirements yaml"
msgstr ""

#: pulpcore/cli/ansible/remote.py:91
msgid "Collections only: URL to receive a session token"
msgstr ""

#: pulpcore/cli/ansible/remote.py:96
msgid "Collections only: token key use for authentication"
msgstr ""

#: pulpcore/cli/ansible/repository.py:64
msgid ""
"Remote used for synching in the form '[[<plugin>:]<resource_type>:]<name>' "
"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:216
#, python-brace-format
msgid ""
"Repository '{name}' does not have a default remote. Please specify with '--"
"remote'."
msgstr ""
165 changes: 165 additions & 0 deletions pulp-glue/pulp_glue/ansible/locale/messages.pot
@@ -0,0 +1,165 @@
# 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 <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-04 09:24+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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:48
#, python-brace-format
msgid "Option {name} is deprecated."
msgstr ""

#: pulpcore/cli/ansible/content.py:90
msgid ""
"Repository to upload into in the form '[[<plugin>:]<resource_type>:]<name>' "
"or by href."
msgstr ""

#: pulpcore/cli/ansible/content.py:117 pulpcore/cli/ansible/content.py:173
#: pulpcore/cli/ansible/content.py:234 pulpcore/cli/ansible/repository.py:126
#, python-brace-format
msgid "Name of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:119 pulpcore/cli/ansible/content.py:182
#: pulpcore/cli/ansible/content.py:238 pulpcore/cli/ansible/repository.py:134
#, python-brace-format
msgid "Namespace of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:121 pulpcore/cli/ansible/content.py:190
#: pulpcore/cli/ansible/content.py:244 pulpcore/cli/ansible/repository.py:141
#, python-brace-format
msgid "Version of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:127
msgid "Only show highest version of collection version"
msgstr ""

#: pulpcore/cli/ansible/content.py:132
msgid "Comma separated list of tags that must all match"
msgstr ""

#: pulpcore/cli/ansible/content.py:137 pulpcore/cli/ansible/content.py:198
#, python-brace-format
msgid "Public key fingerprint of the {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:143 pulpcore/cli/ansible/content.py:208
#, python-brace-format
msgid "Collection of {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:148
#, python-brace-format
msgid "Signing service used to create {entity}"
msgstr ""

#: pulpcore/cli/ansible/content.py:159
msgid "String list of fields to include in the result [DEPRECATED]"
msgstr ""

#: pulpcore/cli/ansible/content.py:165
msgid "String list of fields to exclude from result [DEPRECATED]"
msgstr ""

#: pulpcore/cli/ansible/content.py:228
#, python-brace-format
msgid "Chunk size to break up {entity} into. Defaults to 1MB"
msgstr ""

#: pulpcore/cli/ansible/content.py:250
#, python-brace-format
msgid "Collection for this {entity}"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:69
msgid "the base (relative) path component of the published url."
msgstr ""

#: pulpcore/cli/ansible/distribution.py:74
msgid "a repository version number, leave blank for latest"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:96
msgid "new base_path"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:103
msgid "version of new repository to be served, leave blank for always latest"
msgstr ""

#: pulpcore/cli/ansible/distribution.py:159
#, 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:70
msgid "policy to use when downloading"
msgstr ""

#: pulpcore/cli/ansible/remote.py:78
msgid ""
"(Deprecated) Please use '--requirements' instead\n"
"\n"
"Collections only: a Collection requirements yaml"
msgstr ""

#: pulpcore/cli/ansible/remote.py:86
msgid "Collections only: a string of a requirements yaml"
msgstr ""

#: pulpcore/cli/ansible/remote.py:91
msgid "Collections only: URL to receive a session token"
msgstr ""

#: pulpcore/cli/ansible/remote.py:96
msgid "Collections only: token key use for authentication"
msgstr ""

#: pulpcore/cli/ansible/repository.py:64
msgid ""
"Remote used for synching in the form '[[<plugin>:]<resource_type>:]<name>' "
"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:216
#, python-brace-format
msgid ""
"Repository '{name}' does not have a default remote. Please specify with '--"
"remote'."
msgstr ""
Binary file not shown.

0 comments on commit fe19d8e

Please sign in to comment.