regenerate the i18n files
This commit is contained in:
parent
bbb7f14a9e
commit
94157c91e9
10
examples/stocks/lib/i18n/regenerate.md
Normal file
10
examples/stocks/lib/i18n/regenerate.md
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
To rebuild the i18n files:
|
||||||
|
|
||||||
|
```
|
||||||
|
pub run intl:generate_from_arb \
|
||||||
|
--output-dir=lib/i18n \
|
||||||
|
--generated-file-prefix=stock_ \
|
||||||
|
--no-use-deferred-loading \
|
||||||
|
lib/*.dart \
|
||||||
|
lib/i18n/*.arb
|
||||||
|
```
|
@ -1,30 +1,29 @@
|
|||||||
/*
|
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
||||||
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
// This is a library that looks up messages for specific locales by
|
||||||
* This is a library that looks up messages for specific locales by
|
// delegating to the appropriate library.
|
||||||
* delegating to the appropriate library.
|
|
||||||
*/
|
|
||||||
|
|
||||||
library messages_all;
|
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:intl/message_lookup_by_library.dart';
|
import 'package:intl/message_lookup_by_library.dart';
|
||||||
import 'package:intl/src/intl_helpers.dart';
|
import 'package:intl/src/intl_helpers.dart';
|
||||||
import 'package:intl/intl.dart';
|
|
||||||
|
|
||||||
import 'stock_messages_en.dart' as messages_en;
|
import 'stock_messages_en.dart' as messages_en;
|
||||||
import 'stock_messages_es.dart' as messages_es;
|
import 'stock_messages_es.dart' as messages_es;
|
||||||
|
|
||||||
|
|
||||||
Map<String, Function> _deferredLibraries = {
|
Map<String, Function> _deferredLibraries = {
|
||||||
'en' : () => new Future.value(null),
|
'en': () => new Future.value(null),
|
||||||
'es' : () => new Future.value(null),
|
'es': () => new Future.value(null),
|
||||||
};
|
};
|
||||||
|
|
||||||
MessageLookupByLibrary _findExact(localeName) {
|
MessageLookupByLibrary _findExact(localeName) {
|
||||||
switch (localeName) {
|
switch (localeName) {
|
||||||
case 'en' : return messages_en.messages;
|
case 'en':
|
||||||
case 'es' : return messages_es.messages;
|
return messages_en.messages;
|
||||||
default: return null;
|
case 'es':
|
||||||
|
return messages_es.messages;
|
||||||
|
default:
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,29 +1,22 @@
|
|||||||
/*
|
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
||||||
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
// This is a library that provides messages for a en locale. All the
|
||||||
* This is a library that provides messages for a en locale. All the
|
// messages from the main program should be duplicated here with the same
|
||||||
* messages from the main program should be duplicated here with the same
|
// function name.
|
||||||
* function name.
|
|
||||||
*/
|
|
||||||
|
|
||||||
library messages_en;
|
|
||||||
|
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:intl/message_lookup_by_library.dart';
|
import 'package:intl/message_lookup_by_library.dart';
|
||||||
|
|
||||||
final messages = new MessageLookup();
|
final messages = new MessageLookup();
|
||||||
|
|
||||||
|
final _keepAnalysisHappy = Intl.defaultLocale;
|
||||||
|
|
||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
|
|
||||||
get localeName => 'en';
|
get localeName => 'en';
|
||||||
static market() => "MARKET";
|
|
||||||
|
|
||||||
static portfolio() => "PORTFOLIO";
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
|
static _notInlinedMessages(_) => {
|
||||||
static title() => "Stocks";
|
"market" : MessageLookupByLibrary.simpleMessage("MARKET"),
|
||||||
|
"portfolio" : MessageLookupByLibrary.simpleMessage("PORTFOLIO"),
|
||||||
|
"title" : MessageLookupByLibrary.simpleMessage("Stocks")
|
||||||
final messages = const {
|
|
||||||
"market" : market,
|
|
||||||
"portfolio" : portfolio,
|
|
||||||
"title" : title
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,29 +1,22 @@
|
|||||||
/*
|
// DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
||||||
* DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
|
// This is a library that provides messages for a es locale. All the
|
||||||
* This is a library that provides messages for a es locale. All the
|
// messages from the main program should be duplicated here with the same
|
||||||
* messages from the main program should be duplicated here with the same
|
// function name.
|
||||||
* function name.
|
|
||||||
*/
|
|
||||||
|
|
||||||
library messages_es;
|
|
||||||
|
|
||||||
|
import 'package:intl/intl.dart';
|
||||||
import 'package:intl/message_lookup_by_library.dart';
|
import 'package:intl/message_lookup_by_library.dart';
|
||||||
|
|
||||||
final messages = new MessageLookup();
|
final messages = new MessageLookup();
|
||||||
|
|
||||||
|
final _keepAnalysisHappy = Intl.defaultLocale;
|
||||||
|
|
||||||
class MessageLookup extends MessageLookupByLibrary {
|
class MessageLookup extends MessageLookupByLibrary {
|
||||||
|
|
||||||
get localeName => 'es';
|
get localeName => 'es';
|
||||||
static market() => "MERCADO";
|
|
||||||
|
|
||||||
static portfolio() => "CARTERA";
|
final messages = _notInlinedMessages(_notInlinedMessages);
|
||||||
|
static _notInlinedMessages(_) => {
|
||||||
static title() => "Acciones";
|
"market" : MessageLookupByLibrary.simpleMessage("MERCADO"),
|
||||||
|
"portfolio" : MessageLookupByLibrary.simpleMessage("CARTERA"),
|
||||||
|
"title" : MessageLookupByLibrary.simpleMessage("Acciones")
|
||||||
final messages = const {
|
|
||||||
"market" : market,
|
|
||||||
"portfolio" : portfolio,
|
|
||||||
"title" : title
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -386,7 +386,7 @@ class AnalyzeCommand extends FlutterCommand {
|
|||||||
} else if (filename.endsWith('.mojom.dart')) {
|
} else if (filename.endsWith('.mojom.dart')) {
|
||||||
// autogenerated code - TODO(ianh): Fix the Dart mojom compiler
|
// autogenerated code - TODO(ianh): Fix the Dart mojom compiler
|
||||||
shouldIgnore = true;
|
shouldIgnore = true;
|
||||||
} else if ((sourceLines[0] == '/*') && (' * DO NOT EDIT. This is code generated'.matchAsPrefix(sourceLines[1]) != null)) {
|
} else if (sourceLines.first.startsWith('// DO NOT EDIT. This is code generated')) {
|
||||||
// autogenerated code - TODO(ianh): Fix the intl package resource generator
|
// autogenerated code - TODO(ianh): Fix the intl package resource generator
|
||||||
shouldIgnore = true;
|
shouldIgnore = true;
|
||||||
} else if (level == 'lint' && errorMessage == 'Name non-constant identifiers using lowerCamelCase.') {
|
} else if (level == 'lint' && errorMessage == 'Name non-constant identifiers using lowerCamelCase.') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user