text interface: Switched back to default keys.

Translatable command keys were a mistake.
develop 0.10.1
tastytea 2018-10-18 22:42:05 +02:00
parent 8e55e14e49
commit c856555df8
No known key found for this signature in database
GPG Key ID: CFC39497F1B26E07
4 changed files with 58 additions and 221 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.6)
project (whyblocked
VERSION 0.10.0
VERSION 0.10.1
LANGUAGES CXX
)

View File

@ -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,40 +249,57 @@ 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])
{
case 'a':
case 'A':
{
add();
break;
}
else if (answer[0] == tr("e")[0] || answer[0] == tr("E")[0])
case 'e':
case 'E':
{
edit();
break;
}
else if (answer[0] == tr("r")[0] || answer[0] == tr("R")[0])
case 'r':
case 'R':
{
remove();
break;
}
else if (answer[0] == tr("v")[0] || answer[0] == tr("V")[0])
case 'v':
case 'V':
{
view();
break;
}
else if (answer[0] == tr("d")[0] || answer[0] == tr("D")[0])
case 'd':
case 'D':
{
details();
break;
}
else if (answer[0] == tr("h")[0] || answer[0] == tr("H")[0])
case 'h':
case 'H':
{
help();
break;
}
else if (answer[0] == tr("q")[0] || answer[0] == tr("Q")[0])
case 'q':
case 'Q':
{
keeprunning = false;
break;
}
else
default:
{
cout << tr("Response not understood.") << '\n';
}
}
}
}
int main(int argc, char *argv[])
{

View File

@ -252,28 +252,8 @@
<name>Text</name>
<message>
<location filename="../src/interface_text.cpp" line="51"/>
<source>Blocked(b) or silenced(s)</source>
<translation>Blockiert(b) oder Gedämpft(g)</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="52"/>
<source>b</source>
<translation>b</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="52"/>
<source>B</source>
<translation>B</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="56"/>
<source>s</source>
<translation>g</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="56"/>
<source>S</source>
<translation>G</translation>
<source>Blocked or silenced?</source>
<translation>Blockiert oder gedämpft?</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="67"/>
@ -406,12 +386,12 @@
<message>
<location filename="../src/interface_text.cpp" line="235"/>
<source>Type add, edit, remove, view or details. Or just the first letter.</source>
<translation>Schreibe zufügen, ändern, entfernen, anschauen oder details. Oder nur den Anfangsbuchstaben.</translation>
<translation>Schreibe a für hinzufügen, e für ändern, r für entfernen, v für anschauen oder d für Details.</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="238"/>
<source>Type help or h to show this help. Type quit or q to quit the program.</source>
<translation>Schreibe hilfe oder h, um die Hilfe anzuzeigen. Schreibe beenden oder b um das Programm zu beenden.</translation>
<translation>Schreibe hilfe oder h, um die Hilfe anzuzeigen. Schreibe q um das Programm zu beenden.</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="247"/>
@ -419,77 +399,7 @@
<translation>Dies ist Whyblocked</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="252"/>
<source>a</source>
<translation>z</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="252"/>
<source>A</source>
<translation>Z</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="256"/>
<source>e</source>
<translation>ä</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="256"/>
<source>E</source>
<translation>Ä</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="260"/>
<source>r</source>
<translation>e</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="260"/>
<source>R</source>
<translation>E</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="264"/>
<source>v</source>
<translation>a</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="264"/>
<source>V</source>
<translation>A</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="268"/>
<source>d</source>
<translation>d</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="268"/>
<source>D</source>
<translation>D</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="272"/>
<source>h</source>
<translation>h</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="272"/>
<source>H</source>
<translation>H</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="276"/>
<source>q</source>
<translation>b</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="276"/>
<source>Q</source>
<translation>B</translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="282"/>
<location filename="../src/interface_text.cpp" line="298"/>
<source>Response not understood.</source>
<translation>Antwort nicht verstanden.</translation>
</message>

View File

@ -252,27 +252,7 @@
<name>Text</name>
<message>
<location filename="../src/interface_text.cpp" line="51"/>
<source>Blocked(b) or silenced(s)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="52"/>
<source>b</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="52"/>
<source>B</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="56"/>
<source>s</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="56"/>
<source>S</source>
<source>Blocked or silenced?</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -419,77 +399,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="252"/>
<source>a</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="252"/>
<source>A</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="256"/>
<source>e</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="256"/>
<source>E</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="260"/>
<source>r</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="260"/>
<source>R</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="264"/>
<source>v</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="264"/>
<source>V</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="268"/>
<source>d</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="268"/>
<source>D</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="272"/>
<source>h</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="272"/>
<source>H</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="276"/>
<source>q</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="276"/>
<source>Q</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/interface_text.cpp" line="282"/>
<location filename="../src/interface_text.cpp" line="298"/>
<source>Response not understood.</source>
<translation type="unfinished"></translation>
</message>