Bug 2220829
| Summary: | config-manager plug-in doesn't work with system es_PE locale | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Marc Muehlfeld <mmuehlfe> |
| Component: | dnf-plugins-core | Assignee: | Pavla Kratochvilova <pkratoch> |
| Status: | POST --- | QA Contact: | swm-qe |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.2 | CC: | james.antill, pkratoch, ppisar |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Marc Muehlfeld
2023-07-06 07:45:21 UTC
This problem was identified in https://access.redhat.com/discussions/7020735 A minimal reproducer: # dnf install python3-dnf-plugins-core glibc-langpack-es [...] # LC_ALL=es_PE.UTF-8 dnf config-manager --dump Error al cargar el complemento "config_manager": '*prog' No existe el comando: config-manager. Por favor, utilice /usr/bin/dnf --help Podría ser un comando del complemento DNF, intente: "dnf install 'dnf-command(config-manager)'" python3-dnf-plugins-core-4.3.0-9.el9.noarch is also affected. /usr/share/locale/es/LC_MESSAGES/dnf-plugins-core.mo contains this suspicious translation:
msgid "manage {prog} configuration options and repositories"
msgstr "Dirige {*prog} opciones de configuración y repositorios"
/usr/lib/python3.9/site-packages/dnf-plugins/config_manager.py contains this Python code:
summary = _('manage {prog} configuration options and repositories').format(
prog=dnf.util.MAIN_PROG)
The spurious asterisk character triggers a Python exception when formatting the string:
$ python3 -c 'print("{prog}".format(prog="foo"))'
foo
$ python3 -c 'print("{*prog}".format(prog="foo"))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
KeyError: '*prog'
Which is interpreted by DNF as a failure when loading a plugin for config-manager subcommand.
The Spanish translation needs this fix:
msgid "manage {prog} configuration options and repositories"
-msgstr "Dirige {*prog} opciones de configuración y repositorios"
+msgstr "Dirige {prog} opciones de configuración y repositorios"
This issue has already been fixed in upstream commit <https://github.com/rpm-software-management/dnf-plugins-core/commit/3f6e34c47ec11b0572ded83f3c54a89c24b22c99>. |