change quote to avoid escapes (#50368)

This commit is contained in:
Alexandre Ardhuin
2020-02-11 20:58:27 +01:00
committed by GitHub
parent fd1062debd
commit f15c887c63
171 changed files with 362 additions and 362 deletions

View File

@@ -53,7 +53,7 @@ Future<void> main(List<String> arguments) async {
'By default, the tool will generate the supported locales list in '
'alphabetical order. Use this flag if you would like to default to '
'a different locale. \n\n'
'For example, pass in [\'en_US\'] if you would like your app to '
"For example, pass in ['en_US'] if you would like your app to "
'default to American English if a device supports it.',
);

View File

@@ -126,7 +126,7 @@ const Set<String> numberFormatsWithNamedParameters = <String>{
};
List<String> generateIntlMethodArgs(Message message) {
final List<String> methodArgs = <String>['name: \'${message.resourceId}\''];
final List<String> methodArgs = <String>["name: '${message.resourceId}'"];
if (message.description != null)
methodArgs.add('desc: ${generateString(message.description)}');
if (message.placeholders.isNotEmpty) {
@@ -159,7 +159,7 @@ String generateDateFormattingLogic(Message message) {
'the "${placeholder.type}" type. To properly resolve for the right '
'${placeholder.type} format, the "format" attribute needs to be set '
'to determine which DateFormat to use. \n'
'Check the intl library\'s DateFormat class constructors for allowed '
"Check the intl library's DateFormat class constructors for allowed "
'date formats.'
);
}
@@ -167,7 +167,7 @@ String generateDateFormattingLogic(Message message) {
throw L10nException(
'Date format "${placeholder.format}" for placeholder '
'${placeholder.name} does not have a corresponding DateFormat '
'constructor\n. Check the intl library\'s DateFormat class '
"constructor\n. Check the intl library's DateFormat class "
'constructors for allowed date formats.'
);
}
@@ -192,7 +192,7 @@ String generateNumberFormattingLogic(Message message) {
throw L10nException(
'Number format ${placeholder.format} for the ${placeholder.name} '
'placeholder does not have a corresponding NumberFormat constructor.\n'
'Check the intl library\'s NumberFormat class constructors for allowed '
"Check the intl library's NumberFormat class constructors for allowed "
'number formats.'
);
}
@@ -584,14 +584,14 @@ class LocalizationsGenerator {
arbPathStrings.sort();
localeInfoList.sort();
supportedLanguageCodes.addAll(localeInfoList.map((LocaleInfo localeInfo) {
return '\'${localeInfo.languageCode}\'';
return "'${localeInfo.languageCode}'";
}));
if (preferredSupportedLocales != null) {
for (final LocaleInfo preferredLocale in preferredSupportedLocales) {
if (!localeInfoList.contains(preferredLocale)) {
throw L10nException(
'The preferred supported locale, \'$preferredLocale\', cannot be '
"The preferred supported locale, '$preferredLocale', cannot be "
'added. Please make sure that there is a corresponding arb file '
'with translations for the locale, or remove the locale from the '
'preferred supported locale list if there is no intent to support '
@@ -631,9 +631,9 @@ class LocalizationsGenerator {
final String languageCode = locale.languageCode;
final String countryCode = locale.countryCode;
resultingProperty += '\'$languageCode\'';
resultingProperty += "'$languageCode'";
if (countryCode != null)
resultingProperty += ', \'$countryCode\'';
resultingProperty += ", '$countryCode'";
resultingProperty += '),\n Locale(';
}
resultingProperty = resultingProperty.substring(0, resultingProperty.length - '),\n Locale('.length);