mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 04:28:49 +03:00
Add 'and' to typing display
This commit is contained in:
parent
b28115eb37
commit
0398c846f6
11 changed files with 85 additions and 88 deletions
|
@ -494,15 +494,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> tippt</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation>
|
||||||
<message>
|
<numerusform>%1%2 tippt</numerusform>
|
||||||
<location line="+2"/>
|
<numerusform>%1 und %2 tippen</numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation> tippen</translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> πληκτρολογεί</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation> πληκτρολογούν</translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation type="unfinished"></translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation>
|
||||||
<message>
|
<numerusform>%1%2 is typing</numerusform>
|
||||||
<location line="+2"/>
|
<numerusform>%1 and %2 are typing</numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation type="unfinished"></translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation type="unfinished"></translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -495,15 +495,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> est en train d'écrire</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation> sont en train d'écrire</translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,14 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> is aan het typen</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
</translation>
|
||||||
<translation> zijn aan het typen</translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,15 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> pisze</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
<numerusform></numerusform>
|
||||||
<translation> piszą</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,15 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> печатает</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
<numerusform></numerusform>
|
||||||
<source> are typing</source>
|
<numerusform></numerusform>
|
||||||
<translation> печатают</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -494,15 +494,13 @@
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TypingDisplay</name>
|
<name>TypingDisplay</name>
|
||||||
<message>
|
<message numerus="yes">
|
||||||
<location filename="../../src/TypingDisplay.cpp" line="+46"/>
|
<location filename="../../src/TypingDisplay.cpp" line="+37"/>
|
||||||
<source> is typing</source>
|
<source>%1 and %2 are typing</source>
|
||||||
<translation> 正在打字</translation>
|
<comment>Multiple users are typing. First argument is a comma separated list of potentially multiple users. Second argument is the last user of that list. (If only one user is typing, %1 is empty. You should still use it in your string though to silence Qt warnings.)</comment>
|
||||||
</message>
|
<translation type="unfinished">
|
||||||
<message>
|
<numerusform></numerusform>
|
||||||
<location line="+2"/>
|
</translation>
|
||||||
<source> are typing</source>
|
|
||||||
<translation> 正在打字</translation>
|
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|
|
@ -33,6 +33,14 @@ TypingDisplay::setUsers(const QStringList &uid)
|
||||||
|
|
||||||
text_.clear();
|
text_.clear();
|
||||||
|
|
||||||
|
QString temp = text_ +=
|
||||||
|
tr("%1 and %2 are typing",
|
||||||
|
"Multiple users are typing. First argument is a comma separated list of potentially "
|
||||||
|
"multiple users. Second argument is the last user of that list. (If only one user is "
|
||||||
|
"typing, %1 is empty. You should still use it in your string though to silence Qt "
|
||||||
|
"warnings.)",
|
||||||
|
uid.size());
|
||||||
|
|
||||||
if (uid.isEmpty()) {
|
if (uid.isEmpty()) {
|
||||||
hide();
|
hide();
|
||||||
update();
|
update();
|
||||||
|
@ -40,12 +48,9 @@ TypingDisplay::setUsers(const QStringList &uid)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
text_ = uid.join(", ");
|
QStringList uidWithoutLast = uid;
|
||||||
|
uidWithoutLast.pop_back();
|
||||||
if (uid.size() == 1)
|
text_ = temp.arg(uidWithoutLast.join(", ")).arg(uid.back());
|
||||||
text_ += tr(" is typing");
|
|
||||||
else if (uid.size() > 1)
|
|
||||||
text_ += tr(" are typing");
|
|
||||||
|
|
||||||
show();
|
show();
|
||||||
update();
|
update();
|
||||||
|
|
|
@ -277,7 +277,7 @@ private:
|
||||||
QFutureWatcher<QString> *colorGenerating_;
|
QFutureWatcher<QString> *colorGenerating_;
|
||||||
|
|
||||||
QString event_id_;
|
QString event_id_;
|
||||||
mtx::events::MessageType message_type_ = mtx::events::MessageType::Unknown;
|
mtx::events::MessageType message_type_ = mtx::events::MessageType::Unknown;
|
||||||
QString room_id_;
|
QString room_id_;
|
||||||
|
|
||||||
DescInfo descriptionMsg_;
|
DescInfo descriptionMsg_;
|
||||||
|
|
Loading…
Reference in a new issue