diff options
Diffstat (limited to 'src/web/main.vala')
-rw-r--r-- | src/web/main.vala | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/web/main.vala b/src/web/main.vala index e249d81..f7b0c30 100644 --- a/src/web/main.vala +++ b/src/web/main.vala @@ -21,6 +21,9 @@ public AudioPlayer audio; string templatedir; public static int main(string[] args) { + Intl.setlocale(LocaleCategory.ALL, ""); + Intl.textdomain("shopsystem"); + TlsCertificate? cert = null; string certificate = ""; string privatekey = ""; @@ -30,7 +33,7 @@ public static int main(string[] args) { db = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Database", "/io/mainframe/shopsystem/database"); pgp = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.PGP", "/io/mainframe/shopsystem/pgp"); cfg = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config"); - audio = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.AudioPlayer", "/io/mainframe/shopsystem/audio"); + audio = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.AudioPlayer", "/io/mainframe/shopsystem/audio"); templatedir = cfg.get_string("WEB", "filepath"); port = cfg.get_integer("WEB", "port"); @@ -38,19 +41,19 @@ public static int main(string[] args) { certificate = cfg.get_string("WEB", "cert"); privatekey = cfg.get_string("WEB", "key"); } catch(KeyFileError e) { - warning("KeyFileError: %s\n", e.message); + warning(_("KeyFile Error: %s\n"), e.message); } } catch(IOError e) { - error("IOError: %s\n", e.message); + error(_("IO Error: %s\n"), e.message); } catch(KeyFileError e) { - error("KeyFileError: %s\n", e.message); + error(_("KeyFile Error: %s\n"), e.message); } catch(DBusError e) { - error("DBusError: %s\n", e.message); + error(_("DBus Error: %s\n"), e.message); } - stdout.printf("Web Server Port: %u\n", port); - stdout.printf("TLS certificate: %s\n", certificate); - stdout.printf("TLS private key: %s\n", privatekey); + stdout.printf(_("Web Server Port: %u\n"), port); + stdout.printf(_("TLS certificate: %s\n"), certificate); + stdout.printf(_("TLS private key: %s\n"), privatekey); /* attach WebServer to MainLoop */ try { @@ -58,7 +61,7 @@ public static int main(string[] args) { cert = new TlsCertificate.from_files(certificate, privatekey); new WebServer(port, cert); } catch(Error e) { - error("Could not start Webserver: %s\n", e.message); + error(_("Could not start Webserver: %s\n"), e.message); } /* start MainLoop */ |