GNU gettext - Bugs: bug #61766, gsettings schemas translations do...
You are not allowed to post comments on this tracker with your current authentication level.
bug #61766: gsettings schemas translations do not support categories
Submitter: | Sebastian Keller <skeller> | ||
Submitted: | Thu 06 Jan 2022 12:18:02 AM UTC | ||
Category: | GSettings | Severity: | 3 - Normal |
Item Group: | None | Status: | Answer Provided |
Privacy: | Public | Assigned to: | haible |
Open/Closed: | Closed |
Thu 06 Jan 2022 10:54:14 PM UTC, comment #1: |
Bruno Haible <haible>![]() ![]() |
Thu 06 Jan 2022 12:18:02 AM UTC, original submission:
When using <default l10n='time'>'24h'</default> in a gsettings schema file to define a LC_TIME dependent default value, gettext only seems to recognize the presence of the "l10n" attribute but not the "time" value. This causes the translation to use the messages category rather than the time one. But gsettings will be looking for translations in the time category and not be able to find it.
https://docs.gtk.org/gio/class.Settings.html#description
https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/gschema.dtd#L39 |
Sebastian Keller <skeller> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2022-01-06 | haible | Status | None | ![]() |
Answer Provided |
Assigned to | None | ![]() |
haible | ||
Open/Closed | Open | ![]() |
Closed |
Powered by Savane 3.12.
Corresponding source code
While it would theoretically be possible to create a PO file for the LC_MESSAGES category and a different PO file for the LC_TIME category, this approach is a bit expensive to put in place.
The approach that is ready-to-use is:
1) xgettext extracts the messages for both categories into a single PO file.
2) This single PO file gets compiled to a single .mo file.
3) By defining the variable
in your package's po/Makevars file, you ensure that the PO file is accessed both in the LC_MESSAGES category and in the LC_TIME category.
Problem solved.