summaryrefslogtreecommitdiffstats
path: root/src/input-device/input-device.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/input-device/input-device.vala')
-rw-r--r--src/input-device/input-device.vala15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/input-device/input-device.vala b/src/input-device/input-device.vala
index 6988c6d..1dba213 100644
--- a/src/input-device/input-device.vala
+++ b/src/input-device/input-device.vala
@@ -1,4 +1,5 @@
/* Copyright 2015, Sebastian Reichel <sre@ring0.de>
+ * Copyright 2017-2018, Johannes Rudolph <johannes.rudolph@gmx.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -23,7 +24,7 @@ public class Device {
public Device(string device) {
if (device == "ignore") {
- stdout.printf("Ignoring InputDevice!\n");
+ stdout.printf(_("Ignoring InputDevice!\n"));
return;
}
try {
@@ -36,10 +37,10 @@ public class Device {
Posix.fcntl(fd, Posix.F_SETFL, flags | Posix.O_NONBLOCK);
if(!(io_read.add_watch(IOCondition.IN | IOCondition.HUP, device_read) != 0)) {
- error("Could not bind IOChannel");
+ error(_("Could not bind IOChannel"));
}
} catch(FileError e) {
- error("FileError: %s", e.message);
+ error(_("File Error: %s"), e.message);
}
}
@@ -211,7 +212,7 @@ public class Device {
char key = '\0';
if((cond & IOCondition.HUP) == IOCondition.HUP)
- error("Lost device");
+ error(_("Lost device"));
do {
int fd = source.unix_get_fd();
@@ -220,7 +221,7 @@ public class Device {
/* short read */
if (s != sizeof(Linux.Input.Event)) {
if(s > 0)
- stdout.printf("short read!\n");
+ stdout.printf(_("short read!\n"));
return true;
}
@@ -245,7 +246,7 @@ public class Device {
buffer += "%c".printf(key);
} while(key != '\n');
- stdout.printf("barcode: %s\n", buffer);
+ stdout.printf(_("barcode: %s\n"), buffer);
if(buffer.has_prefix("USER ") || buffer.has_prefix("STOCK") || buffer.has_prefix("AMOUNT ")) {
if(!check_code39_checksum(buffer))
@@ -315,7 +316,7 @@ public class Device {
/**
* @param duration duration of the blink in 0.1 seconds
*/
- public void blink(uint duration) {
+ public void blink(uint duration) throws IOError, DBusError {
/* not supported */
}
}