File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed
Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,18 @@ i18n = import('i18n')
88
99add_global_arguments (' -DGETTEXT_PACKAGE="@0@"' .format (meson .project_name()), language :' c' )
1010
11+ config_data = configuration_data ()
12+ config_data.set_quoted(' LOCALEDIR' , get_option (' prefix' ) / get_option (' localedir' ))
13+ config_data.set_quoted(' GETTEXT_PACKAGE' , meson .project_name())
14+ config_file = configure_file (
15+ input : ' src/Config.vala.in' ,
16+ output : ' @BASENAME@' ,
17+ configuration : config_data
18+ )
19+
1120executable (
1221 meson .project_name(),
22+ config_file,
1323 ' src/Application.vala' ,
1424 ' src/MainWindow.vala' ,
1525 ' src/IndividualView.vala' ,
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ public class Friends.Application : Gtk.Application {
6464 }
6565
6666 public static int main (string [] args ) {
67+ Intl . setlocale (LocaleCategory . ALL , " " );
68+ Intl . bindtextdomain (GETTEXT_PACKAGE , LOCALEDIR );
69+ Intl . bind_textdomain_codeset (GETTEXT_PACKAGE , " UTF-8" );
70+ Intl . textdomain (GETTEXT_PACKAGE );
71+
6772 var app = new Application ();
6873 return app. run (args);
6974 }
Original file line number Diff line number Diff line change 1+ public const string GETTEXT_PACKAGE = @GETTEXT_PACKAGE@;
2+ public const string LOCALEDIR = @LOCALEDIR@;
You can’t perform that action at this time.
0 commit comments