Web lists-archives.com

Translating enum values in schema




Hi all:

I'm doing an schema for gsettings. This is part of it:

<schemalist gettext-domain="desktop-icons">
<enum id="org.gnome.shell.extension.desktop-icons.ZoomLevel">
<value value="0" nick="small"/>
<value value="1" nick="standard"/>
<value value="2" nick="large"/>
<value value="3" nick="huge"/>
</enum>
<schema path="/org/gnome/shell/extensions/desktop-icons/" id="org.gnome.shell.extensions.desktop-icons" gettext-domain="desktop-icons">
<key name="icon-size" enum="org.gnome.shell.extension.desktop-icons.ZoomLevel">
<default>"large"</default>
<summary>Icon size</summary>
<description>Set the size for the desktop icons.</description>
</key>

After passing xgettext, it adds to the .po file all the "summary" and "description" contents, but it doesn't add the nicks in the enum (this is, the strings "small", "standard", "large" and "huge" aren't added to the .pot file). But I want to show in my program the values translated.

Of course, I now that in the settings itself I must use the original strings, not the translated ones, but I don't want gsettings_schema_key to return those values already translated; I only want to ensure that xgettext adds those strings to the .pot file.

I tried adding l10n="messages" to each value, but the compiler doesn't like it. I tried using "alias" inside the key part, but they aren't added, and adding l10n to the aliases is also not allowed.

So the question is: how can I do that?

Thanks.

-- 
Nos leemos
		         RASTER    (Linux user #228804)
raster@xxxxxxxxxxxxxx              http://www.rastersoft.com

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list