forked from bxxasn/flutter_csv_localization
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.g.dart
More file actions
139 lines (115 loc) · 3.57 KB
/
Copy pathexample.g.dart
File metadata and controls
139 lines (115 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import 'package:flutter/foundation.dart';
import 'package:flutter/widgets.dart';
class AppLocalizationsDelegate extends LocalizationsDelegate<AppLocalizations> {
@override
bool isSupported(Locale locale) =>
AppLocalizations.languages.containsKey(locale);
@override
Future<AppLocalizations> load(Locale locale) =>
SynchronousFuture<AppLocalizations>(AppLocalizations(locale));
@override
bool shouldReload(AppLocalizationsDelegate old) => false;
}
class AppLocalizations {
AppLocalizations(this.locale) : this.labels = languages[locale];
final Locale locale;
static final Map<Locale, AppLocalizations_Labels> languages = {
Locale.fromSubtags(languageCode: "fr"): AppLocalizations_Labels(
dates: AppLocalizations_Labels_Dates(
weekday: AppLocalizations_Labels_Dates_Weekday(
monday: "lundi",
tuesday: "mardia",
wednesday: "mercredi",
thursday: "jeudi",
friday: "vendredi",
saturday: "samedi",
sunday: "dimanche",
),
month: AppLocalizations_Labels_Dates_Month(
january: "janvier",
february: "février",
march: "mars",
april: "avril",
),
),
),
Locale.fromSubtags(languageCode: "en"): AppLocalizations_Labels(
dates: AppLocalizations_Labels_Dates(
weekday: AppLocalizations_Labels_Dates_Weekday(
monday: "monday",
tuesday: "tuesday",
wednesday: "wednesday",
thursday: "thursday",
friday: "friday",
saturday: "saturday",
sunday: "sunday",
),
month: AppLocalizations_Labels_Dates_Month(
january: "january",
february: "february",
march: "march",
april: "april",
),
),
),
Locale.fromSubtags(
languageCode: "zh",
scriptCode: "Hans",
countryCode: "CN"): AppLocalizations_Labels(
dates: AppLocalizations_Labels_Dates(
weekday: AppLocalizations_Labels_Dates_Weekday(
monday: "星期一",
tuesday: "星期二",
wednesday: "星期三",
thursday: "星期四",
friday: "星期五",
saturday: "星期六",
sunday: "星期日",
),
month: AppLocalizations_Labels_Dates_Month(
january: "一月",
february: "二月",
march: "游行",
april: "四月",
),
),
),
};
final AppLocalizations_Labels labels;
static AppLocalizations_Labels of(BuildContext context) =>
Localizations.of<AppLocalizations>(context, AppLocalizations).labels;
}
class AppLocalizations_Labels_Dates_Weekday {
AppLocalizations_Labels_Dates_Weekday(
{this.monday,
this.tuesday,
this.wednesday,
this.thursday,
this.friday,
this.saturday,
this.sunday});
final String monday;
final String tuesday;
final String wednesday;
final String thursday;
final String friday;
final String saturday;
final String sunday;
}
class AppLocalizations_Labels_Dates_Month {
AppLocalizations_Labels_Dates_Month(
{this.january, this.february, this.march, this.april});
final String january;
final String february;
final String march;
final String april;
}
class AppLocalizations_Labels_Dates {
AppLocalizations_Labels_Dates({this.weekday, this.month});
final AppLocalizations_Labels_Dates_Weekday weekday;
final AppLocalizations_Labels_Dates_Month month;
}
class AppLocalizations_Labels {
AppLocalizations_Labels({this.dates});
final AppLocalizations_Labels_Dates dates;
}