From 8e60fa48a8535da9eaa34ef35b5040c2eb68fc3b Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Thu, 28 Jun 2018 21:35:23 +0200 Subject: all: I18N support This adds I18N support using standard gettext system together with an initial German translation. This can be used to search locales in some directory: Intl.bindtextdomain("shopsystem", "/home/sre/src/serial-barcode-scanner"); And this can be used to switch language at runtime: Intl.setlocale(LocaleCategory.ALL, ""); --- src/curses-ui/message_box_overlay.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/curses-ui/message_box_overlay.vala') diff --git a/src/curses-ui/message_box_overlay.vala b/src/curses-ui/message_box_overlay.vala index 721ab06..7b5a09b 100644 --- a/src/curses-ui/message_box_overlay.vala +++ b/src/curses-ui/message_box_overlay.vala @@ -37,13 +37,13 @@ public class MessageBoxOverlay { Timeout.add_seconds(1, decrementTitleCountdown); } - private void setTitle() { + private void setTitle() { var title = " === %s (%d) === ".printf(dialogTitle, countdownValue); int title_x = (COLS - title.length)/2; - win.mvaddstr(0, title_x, title); + win.mvaddstr(0, title_x, title); } - private bool decrementTitleCountdown() { + private bool decrementTitleCountdown() { countdownValue--; setTitle(); win.refresh(); -- cgit v1.2.3