Closed aral closed 2 years ago
In the core apps that ship with elementary OS, the Application constructor manually sets the locale and binds to the gettext package e.g. in Calculator:
Intl.setlocale (LocaleCategory.ALL, ""); GLib.Intl.bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); GLib.Intl.bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); GLib.Intl.textdomain (GETTEXT_PACKAGE);
The constants used come from the configuration file (Config.vala.in):
public const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@; public const string LOCALEDIR = @LOCALEDIR@;
And the actual values are substituted in meson.build:
config_data = configuration_data() config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir')) config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name()) config_file = configure_file( input: 'src/Config.vala.in', output: '@BASENAME@', configuration: config_data )
However, none of this is shown in the Translations section of the elementary OS developer documentation.
Can someone with better knowledge of all this than me please answer:
Thanks!
Now tracking in #16.
In the core apps that ship with elementary OS, the Application constructor manually sets the locale and binds to the gettext package e.g. in Calculator:
The constants used come from the configuration file (Config.vala.in):
And the actual values are substituted in meson.build:
However, none of this is shown in the Translations section of the elementary OS developer documentation.
Can someone with better knowledge of all this than me please answer:
Thanks!