bugGNU 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: 

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

EXTRA_LOCALE_CATEGORIES = LC_TIME

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.

Bruno Haible <haible>
Project Administrator
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.

This is currently blocking a fix using translations for this issue in GNOME: https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/issues/30

Other relevant links:

  • gsettings documentation for schema files:

   https://docs.gtk.org/gio/class.Settings.html#description

  • gsettings schemas DTD about the l10n attribute:

   https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/gschema.dtd#L39

Sebastian Keller <skeller>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by skeller (Submitted the item)
  •  

    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 StatusNone Answer Provided
        Assigned toNone haible
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9