i18n
i18n copied to clipboard
There is no title1 in the generated code
Tee intl_en.arb :
{
"@@last_modified": "2022-05-25T22:20:15.821290",
"@@locale":"en",
"title1": "Flutter APP EN",
"@title1": {
"description": "Title for the Demo application",
"type": "text",
"placeholders_order": [],
"placeholders": {}
}
}
I run this to generator the code:
flutter pub run intl_generator:extract_to_arb --output-dir=l10n-arb \lib/cal2.dart
flutter pub run intl_generator:generate_from_arb --output-dir=lib/l10n --no-use-deferred-loading lib/l10n/localization_intl.dart l10n-arb/intl_*.arb
This is my generator code:
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
final messages = MessageLookup();
typedef String MessageIfAbsent(String? messageStr, List<Object>? args);
class MessageLookup extends MessageLookupByLibrary {
String get localeName => 'en';
final messages = _notInlinedMessages(_notInlinedMessages);
static Map<String, Function> _notInlinedMessages(_) => <String, Function>{};
}
This is your demo:
import 'package:intl/intl.dart';
import 'package:intl/message_lookup_by_library.dart';
final messages = MessageLookup();
final _keepAnalysisHappy = Intl.defaultLocale;
typedef MessageIfAbsent(String message_str, List args);
class MessageLookup extends MessageLookupByLibrary {
get localeName => 'en';
final messages = _notInlinedMessages(_notInlinedMessages);
static _notInlinedMessages(_) =>
{"title": MessageLookupByLibrary.simpleMessage("Hello World")};
}
I cannot reproduce this - maybe you should specify \lib/cal2.dart also for the intl_generator:generate_from_arb command.