Add support for the Kannada (kn) locale (#37026)

This commit is contained in:
Hans Muller
2019-07-29 16:21:19 -07:00
committed by GitHub
parent c9a5f94372
commit 82f8ded8d2
10 changed files with 811 additions and 9 deletions

View File

@@ -401,3 +401,14 @@ String generateString(String s) {
output.write("'");
return output.toString();
}
/// Only used to generate localization strings for the Kannada locale ('kn') because
/// some of the localized strings contain characters that can crash Emacs on Linux.
/// See packages/flutter_localizations/lib/src/l10n/README for more information.
String generateEncodedString(String s) {
if (s.runes.every((int code) => code <= 0xFF))
return generateString(s);
final String unicodeEscapes = s.runes.map((int code) => '\\u{${code.toRadixString(16)}}').join();
return "'$unicodeEscapes'";
}