mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 13:09:32 +00:00
22 lines
No EOL
632 B
Dart
22 lines
No EOL
632 B
Dart
import 'utils/translation/arb_file_utils.dart';
|
|
import 'utils/translation/translation_constants.dart';
|
|
import 'utils/translation/translation_utils.dart';
|
|
|
|
void main(List<String> args) async {
|
|
if (args.length != 2) {
|
|
throw Exception(
|
|
'Insufficient arguments!\n\nTry to run `./append_translation.dart greetings "Hello World!"`');
|
|
}
|
|
|
|
final name = args.first;
|
|
final text = args.last;
|
|
|
|
print('Appending "$name": "$text"');
|
|
|
|
for (var lang in langs) {
|
|
final fileName = getArbFileName(lang);
|
|
final translation = await getTranslation(text, lang);
|
|
|
|
appendStringToArbFile(fileName, name, translation);
|
|
}
|
|
} |