mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
@@ -999,13 +999,23 @@ Widget msgboxIcon(String type) {
|
||||
// title should be null
|
||||
Widget msgboxContent(String type, String title, String text) {
|
||||
String translateText(String text) {
|
||||
List<String> words = text.split(' ');
|
||||
if (words.isNotEmpty && words[0].endsWith('_tip')) {
|
||||
words[0] = translate(words[0]);
|
||||
return words.join(' ');
|
||||
if (text.indexOf('Failed') == 0 && text.contains(': ')) {
|
||||
List<String> words = text.split(': ');
|
||||
for (var i = 0; i < words.length; ++i) {
|
||||
words[i] = translate(words[i]);
|
||||
}
|
||||
text = words.join(': ');
|
||||
} else {
|
||||
return translate(text);
|
||||
List<String> words = text.split(' ');
|
||||
if (words.length > 1 && words[0].endsWith('_tip')) {
|
||||
words[0] = translate(words[0]);
|
||||
final rest = text.substring(words[0].length + 1);
|
||||
text = '${words[0]} ${translate(rest)}';
|
||||
} else {
|
||||
text = translate(text);
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
return Row(
|
||||
|
||||
Reference in New Issue
Block a user