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

utils::format: Support for formatting localized messages (translation, localization of argument format) #2031

Merged

Conversation

jrohel
Copy link
Contributor

@jrohel jrohel commented Feb 3, 2025

New overloads of the utils::format method accept BgettextMessage as a format string. They allow to specify whether we want to translate the format string and define the locale used.

Returns the plural message id from the encoded message.
@jrohel jrohel force-pushed the bgettext_plural_id_and_format branch 2 times, most recently from d9a8312 to 980730f Compare February 4, 2025 06:45
@jan-kolarik jan-kolarik self-assigned this Feb 4, 2025
A new class `utils::Locale` has been created. It contains C and CPP
locale.

A variant of `utils::format` has been created which adds
the `utils::Locale` argument. This allows the user to specify a locale
for formatting.
@jrohel jrohel force-pushed the bgettext_plural_id_and_format branch from 980730f to c6331e5 Compare February 4, 2025 21:42
@jan-kolarik jan-kolarik added this pull request to the merge queue Feb 5, 2025
Merged via the queue into rpm-software-management:main with commit 0f4c6ee Feb 5, 2025
17 of 21 checks passed
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.

2 participants