Skip to content

Commit

Permalink
feat: replacement of i10n technical scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
linaaaqi committed Nov 29, 2022
1 parent 8db61a8 commit 4beb62c
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 262 deletions.
3 changes: 0 additions & 3 deletions intl.sh

This file was deleted.

3 changes: 3 additions & 0 deletions l10n.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
arb-dir: lib/l10n
template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
File renamed without changes.
File renamed without changes.
46 changes: 0 additions & 46 deletions lib/l10n/home/localization_intl.dart

This file was deleted.

68 changes: 0 additions & 68 deletions lib/l10n/home/messages_all.dart

This file was deleted.

26 changes: 0 additions & 26 deletions lib/l10n/home/messages_messages.dart

This file was deleted.

26 changes: 0 additions & 26 deletions lib/l10n/home/messages_messages_zh_CN.dart

This file was deleted.

6 changes: 5 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart' as services;
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:sail_app/constant/app_colors.dart';
import 'package:sail_app/constant/app_strings.dart';
import 'package:provider/provider.dart';
Expand All @@ -10,7 +11,8 @@ import 'package:sail_app/models/user_subscribe_model.dart';
import 'package:sail_app/router/application.dart';
import 'package:sail_app/router/routers.dart';
import 'package:sail_app/models/user_model.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';


void main() async {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -50,7 +52,9 @@ class SailApp extends StatelessWidget {
onGenerateRoute: Application.router?.generator,
localizationsDelegates: const [
// 本地化的代理类
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: const [
Expand Down
91 changes: 0 additions & 91 deletions pubspec.lock
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "47.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "4.7.0"
another_flushbar:
dependency: transitive
description:
Expand All @@ -29,13 +15,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.1"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -71,41 +50,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.16.0"
convert:
dependency: transitive
description:
name: convert
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
crisp:
dependency: "direct main"
description:
name: crisp
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.1"
crypto:
dependency: transitive
description:
name: crypto
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.2"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.5"
dart_style:
dependency: transitive
description:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.4"
dio:
dependency: "direct main"
description:
Expand Down Expand Up @@ -245,13 +203,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "9.2.0"
glob:
dependency: transitive
description:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.1"
http_parser:
dependency: transitive
description:
Expand All @@ -266,13 +217,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
intl_generator:
dependency: "direct dev"
description:
name: intl_generator
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0"
js:
dependency: transitive
description:
Expand Down Expand Up @@ -322,13 +266,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
package_config:
dependency: transitive
description:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
path:
dependency: transitive
description:
Expand Down Expand Up @@ -385,13 +322,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "5.0.0"
platform:
dependency: transitive
description:
Expand Down Expand Up @@ -420,13 +350,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.4"
pub_semver:
dependency: transitive
description:
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
quiver:
dependency: transitive
description:
Expand Down Expand Up @@ -614,13 +537,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
webview_flutter:
dependency: "direct main"
description:
Expand Down Expand Up @@ -663,13 +579,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0+2"
yaml:
dependency: transitive
description:
name: yaml
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.17.0 <3.0.0"
flutter: ">=3.0.0"
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dependencies:

dev_dependencies:
flutter_lints: ^2.0.1
intl_generator: ^0.3.0
flutter_test:
sdk: flutter

Expand All @@ -59,6 +58,8 @@ dev_dependencies:
# The following section is specific to Flutter.
flutter:

generate: true

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down

0 comments on commit 4beb62c

Please sign in to comment.