blob: c6437f6eb70c66e57aa2aa17144fa71318a98c7d [file] [log] [blame] [edit]
// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// ignore_for_file: prefer_function_declarations_over_variables
import 'dart:io';
// ignore: avoid_relative_lib_imports
import '../lib/AboutPage_messages.g.dart';
Future<void> main(List<String> arguments) async {
final messages = AboutPageMessages(
(id) => File(id.split('/').skip(2).join('/')).readAsString(),
);
// final index = AboutPageMessagesEnum.aboutMessage;
await messages.loadLocale('en');
print('AboutMessage en:');
print('\t${messages.aboutMessage('typesafe.en')}');
///To enable this, add `generateFindById: true` to the pubspec section
// print('\t${messages.getById('aboutMessage', ['get-by-id.en'])}');
///To enable this, add `generateFindBy: enumerate` to the pubspec section
// print('\t${messages.getByEnum(index, ['get-by-index.en'])}');
await messages.loadLocale('fr');
print('AboutMessage fr:');
print('\t${messages.aboutMessage('typesafe.fr')}');
///To enable this, add `generateFindById: true` to the pubspec section
// print('\t${messages.getById('aboutMessage', ['get-by-id.fr'])}');
///To enable this, add `generateFindBy: enumerate` to the pubspec section
// print('\t${messages.getByEnum(index, ['get-by-index.fr'])}');
}