cake_wallet/tool/utils/utils.dart
Konstantin Ullrich 0eecf0bee5
Cw 483 add tagalog and filipino localizations (#1086)
* CW-483 Add "Add new language Script"

* CW-483 Add Filipino Language
2023-09-15 00:41:54 +03:00

13 lines
436 B
Dart

import 'package:intl/intl.dart';
String normalizeKeyName(String key) {
final parts = key.split('_');
final firstWord = parts.removeAt(0);
final capitalized = parts
.map((e) => toBeginningOfSentenceCase(e))
.fold('', (String acc, String? word) => acc + (word ?? ''));
return firstWord + capitalized;
}
String generateConst(String name, Map<String, dynamic> config) =>
'const $name = \'${config["$name"]}\';\n';