Skip to content

Commit 9f1d249

Browse files
committed
Drop unused code
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
1 parent f606289 commit 9f1d249

2 files changed

Lines changed: 1 addition & 36 deletions

File tree

extract_translations.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,12 @@
4242
The project version.
4343
(Default: f29)
4444
""", metavar="[f28, f29, rawhide, ...]")
45-
@click.option("-f", "--zanata-translation-file",
46-
default="fedora-modularity-translations",
47-
type=str, help="""
48-
The name of the translated file in Zanata.
49-
(Default: fedora-modularity-translations)
50-
""")
51-
def main(branch, zanata_url, zanata_project,
52-
zanata_project_version, zanata_translation_file):
45+
def main(branch, zanata_url, zanata_project, zanata_project_version):
5346
"""
5447
Extract translations from all modules included in a particular version of
5548
Fedora or EPEL.
5649
"""
5750
k = mmdtranslations.get_koji_session()
58-
script_dir = os.path.dirname(os.path.realpath(__file__))
5951

6052
if branch == "rawhide":
6153
branch = mmdtranslations.get_rawhide_version(k)

mmdtranslations.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -64,33 +64,6 @@ def get_latest_modules_in_tag(session, tag):
6464
return latest
6565

6666

67-
def get_streams_and_strings(session, builds):
68-
translatable_strings = set()
69-
module_streams = set()
70-
for build_id in builds.keys():
71-
build = session.getBuild(build_id)
72-
print("Processing %s:%s" % (build['package_name'], build['nvr']))
73-
74-
module_streams.add("%s:%s" % (
75-
build['extra']['typeinfo']['module']['name'],
76-
build['extra']['typeinfo']['module']['stream']))
77-
78-
modulemds = Modulemd.objects_from_string(
79-
build['extra']['typeinfo']['module']['modulemd_str'])
80-
81-
# We should only get a single modulemd document from Koji
82-
assert len(modulemds) == 1
83-
84-
translatable_strings.add(modulemds[0].props.summary)
85-
translatable_strings.add(modulemds[0].props.description)
86-
87-
# Get any profile descriptions
88-
for profile_name, profile in modulemds[0].peek_profiles().items():
89-
if profile.props.description:
90-
translatable_strings.add(profile.props.description)
91-
return module_streams, translatable_strings
92-
93-
9467
def get_module_catalog(session, builds):
9568
catalog = Catalog(project="fedora-modularity-translations")
9669

0 commit comments

Comments
 (0)