mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-25 05:58:42 +01:00
feat: zashi zkool sweep, and minor fixes (#2838)
feat: restore from keys zcash fix: don't display empty keys
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import 'package:translator/translator.dart';
|
||||
|
||||
import '../../print_verbose_dummy.dart';
|
||||
import 'arb_file_utils.dart';
|
||||
import 'translation_constants.dart';
|
||||
|
||||
@@ -33,8 +34,12 @@ Future<String> getTranslation(String text, String lang) async {
|
||||
final placeholder =
|
||||
regExp.allMatches(text).map((e) => text.substring(e.start, e.end)).toList().asMap();
|
||||
|
||||
var translation = (await translator.translate(text, from: defaultLang, to: lang)).text;
|
||||
|
||||
String translation = text;
|
||||
try {
|
||||
translation = (await translator.translate(text, from: defaultLang, to: lang)).text;
|
||||
} catch (e) {
|
||||
printV("$lang, $text, $e");
|
||||
}
|
||||
placeholder.forEach((index, value) {
|
||||
final translatedPlaceholder = regExp.allMatches(translation).toList()[index];
|
||||
translation =
|
||||
|
||||
Reference in New Issue
Block a user