Skip to content

Include translations in rhc builds#363

Draft
mjcr99 wants to merge 2 commits intomainfrom
macano/include-translations-in-rhc-builds
Draft

Include translations in rhc builds#363
mjcr99 wants to merge 2 commits intomainfrom
macano/include-translations-in-rhc-builds

Conversation

@mjcr99
Copy link
Contributor

@mjcr99 mjcr99 commented Feb 27, 2026

Description

This PR needs #362 to be merged to properly work.

Hi team, this PR implements the required changes to include translations in rhc builds, following are the key aspects covered:

  • A new target has been added to the Makefile to allow the creation of .mo files by calling make i18n target.
  • The SPEC file is updated to add the generated translations to the package.

Testing

To fully test this development, the following patch is provided es_test.patch, which includes the Spanish translation .po file. Apply it and commit it in a testing commit to let the Makefile archive target include it.

After it, follow the packaging instructions to create a package

The generated package is queried to check if it contains the generated translation:

[vagrant@lv-rhel101 rhc]$ rpm -qlp /var/lib/mock/fedora-43-x86_64/result/rhc-0.3.8-1.fc43.x86_64.rpm | grep "locale"
/usr/local/share/locale/es/LC_MESSAGES/rhc.mo

After it, the package can be installed:

[vagrant@lv-rhel101 rhc]$ sudo dnf install /var/lib/mock/fedora-43-x86_64/result/rhc-0.3.8-1.fc43.x86_64.rpm

Finally, the rhc cli can be called directly, indicating the preferred language, and the output is modified:

[vagrant@lv-rhel101 rhc]$ LANGUAGE=es rhc status --help
NAME:
   rhc status - Muestra el estado de la conexión del sistema a Red Hat

USAGE:
   rhc status

DESCRIPTION:
   El comando status muestra el estado de la conexión a Red Hat Subscription Management, Red Hat Lightspeed (anteriormente Insights) y Red Hat.

OPTIONS:
   --format value, -f value  muestra el estado en formato legible por máquina (formatos compatibles: "json")
   --help, -h                show help

* Card ID - CCT-148
This commit also updates the .gitignore file to avoid committing .mo files.

Also the VERSION extraction in the Makefile has been modified, since testing in RHEL 10.1
was resulting in weird behavior obtaining the following:

[vagrant@lv-rhel101 rhc]$ rpmspec rhc.spec --query --queryformat '%{version}'
0.3.80.3.80.3.8

While the expected was 0.3.8, the modification makes it more robust.
Signed-off-by: mjcr99 <macano@redhat.com>
…m into the package

* Card ID - CCT-148
Signed-off-by: mjcr99 <macano@redhat.com>
@mjcr99 mjcr99 marked this pull request as draft February 27, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant