diff --git a/CMakeLists.txt b/CMakeLists.txt
index 10b857a..0cf5024 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (whyblocked
- VERSION 0.10.0
+ VERSION 0.10.1
LANGUAGES CXX
)
diff --git a/src/interface_text.cpp b/src/interface_text.cpp
index 4f98150..4e28253 100644
--- a/src/interface_text.cpp
+++ b/src/interface_text.cpp
@@ -48,12 +48,12 @@ const bool Text::askblocked()
{
while (true)
{
- const string blocked = get_answer(tr("Blocked(b) or silenced(s)"));
- if (blocked[0] == tr("b")[0] || blocked[0] == tr("B")[0])
+ const string blocked = get_answer(tr("Blocked or silenced?") + " [b/s]");
+ if (blocked[0] == 'b' || blocked[0] == 'B')
{
return true;
}
- else if (blocked[0] == tr("s")[0] || blocked[0] == tr("S")[0])
+ else if (blocked[0] == 's' || blocked[0] == 'S')
{
return false;
}
@@ -249,37 +249,54 @@ Text::Text(QObject *parent) : QObject(parent)
while (keeprunning)
{
string answer = get_answer("");
- if (answer[0] == tr("a")[0] || answer[0] == tr("A")[0])
+ switch (answer[0])
{
- add();
- }
- else if (answer[0] == tr("e")[0] || answer[0] == tr("E")[0])
- {
- edit();
- }
- else if (answer[0] == tr("r")[0] || answer[0] == tr("R")[0])
- {
- remove();
- }
- else if (answer[0] == tr("v")[0] || answer[0] == tr("V")[0])
- {
- view();
- }
- else if (answer[0] == tr("d")[0] || answer[0] == tr("D")[0])
- {
- details();
- }
- else if (answer[0] == tr("h")[0] || answer[0] == tr("H")[0])
- {
- help();
- }
- else if (answer[0] == tr("q")[0] || answer[0] == tr("Q")[0])
- {
- keeprunning = false;
- }
- else
- {
- cout << tr("Response not understood.") << '\n';
+ case 'a':
+ case 'A':
+ {
+ add();
+ break;
+ }
+ case 'e':
+ case 'E':
+ {
+ edit();
+ break;
+ }
+ case 'r':
+ case 'R':
+ {
+ remove();
+ break;
+ }
+ case 'v':
+ case 'V':
+ {
+ view();
+ break;
+ }
+ case 'd':
+ case 'D':
+ {
+ details();
+ break;
+ }
+ case 'h':
+ case 'H':
+ {
+ help();
+ break;
+ }
+ case 'q':
+ case 'Q':
+ {
+ keeprunning = false;
+ break;
+ }
+ default:
+ {
+ cout << tr("Response not understood.") << '\n';
+ }
}
}
}
diff --git a/translations/whyblocked_de.ts b/translations/whyblocked_de.ts
index a0814cc..a5bb53a 100644
--- a/translations/whyblocked_de.ts
+++ b/translations/whyblocked_de.ts
@@ -252,28 +252,8 @@
Text
-
- Blockiert(b) oder Gedämpft(g)
-
-
-
-
- b
-
-
-
-
- B
-
-
-
-
- g
-
-
-
-
- G
+
+ Blockiert oder gedämpft?
@@ -406,12 +386,12 @@
- Schreibe zufügen, ändern, entfernen, anschauen oder details. Oder nur den Anfangsbuchstaben.
+ Schreibe a für hinzufügen, e für ändern, r für entfernen, v für anschauen oder d für Details.
- Schreibe hilfe oder h, um die Hilfe anzuzeigen. Schreibe beenden oder b um das Programm zu beenden.
+ Schreibe hilfe oder h, um die Hilfe anzuzeigen. Schreibe q um das Programm zu beenden.
@@ -419,77 +399,7 @@
Dies ist Whyblocked
-
-
- z
-
-
-
-
- Z
-
-
-
-
- ä
-
-
-
-
- Ä
-
-
-
-
- e
-
-
-
-
- E
-
-
-
-
- a
-
-
-
-
- A
-
-
-
-
- d
-
-
-
-
- D
-
-
-
-
- h
-
-
-
-
- H
-
-
-
-
- b
-
-
-
-
- B
-
-
-
+
Antwort nicht verstanden.
diff --git a/translations/whyblocked_en.ts b/translations/whyblocked_en.ts
index 2b9d80b..d8e607d 100644
--- a/translations/whyblocked_en.ts
+++ b/translations/whyblocked_en.ts
@@ -252,27 +252,7 @@
Text
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -419,77 +399,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+