Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove .pot Files from the Repository and Always Generate Them #1764

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bc-lee
Copy link
Contributor

@bc-lee bc-lee commented Oct 8, 2024

The dnf5 project synchronizes .pot and .po files between the dnf5 repository, the dnf5-l10n repository, and Weblate. The .pot files are generated using the xgettext command.

While the Source of Truth for .po files is Weblate, which syncs them to the dnf5-l10n and dnf5 repositories, the status of the .pot files is less clear. The build process merges .pot and .po files to generate .gmo files, but there is an issue where the .pot files in the dnf5 repository are not automatically updated.

PR #1745 attempts to resolve this by copying .pot files from the dnf5-l10n repository, but this process only occurs during the release phase. This is suboptimal, as .pot files can be generated directly from the source code.

This PR proposes removing .pot files from the dnf5 repository and generating them on-the-fly using the xgettext command. The .pot files will be generated in the build directory, and the build process will reference them accordingly. Additionally, this PR updates several GitHub Actions workflows to reflect these changes (e.g., removing the step that copies .pot files from dnf5-l10n and adjusting the path to .pot files in the Weblate sync workflow).

Related: #1744

Currently, dnf5 stores the pot (translation template) file in the dnf5
repository, as well as in the dnf5-l10n repository. The dnf5-l10n
repository's pot files are regularly updated by a command from the dnf5
repository. However, the dnf5 repository's pot file is not updated
automatically.

While recent commits have updated the pot file in the dnf5 repository
during the release process, it seems keeping the pot file in
the repository isn't necessary. We can generate the pot file using
gettext's xgettext command, and we already have a CMake target
to generate the pot file.

This commit changes the destination of the pot file generated by the
xgettext command to the build directory. Removing the pot file from
the repository will be done in the next commit.
.pot files are no longer stored in the repository.
.pot files are now generated in the build directory, not in the
repository.
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