Commit 7d4ba6f
committed
refactor(i18n): Simplify localization structure and implementation
Refactored the localization implementation by removing the custom `i18n` function in favor of the standard `.tr()` method from the `easy_localization` package.
Key changes:
- Simplified the `zh-CN.yaml` translation file by flattening the nested structure under the `action` key.
- Updated `lib/core/i18n.dart` to use `key.tr()` for translations, streamlining the localization process.
- Added a `loadVanilla()` call in `main.dart` during the app's initialization sequence.1 parent a71ff16 commit 7d4ba6f
3 files changed
+15
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 112 | + | |
120 | 113 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
135 | 121 | | |
136 | | - | |
137 | | - | |
| 122 | + | |
138 | 123 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 124 | + | |
| 125 | + | |
148 | 126 | | |
149 | 127 | | |
150 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | | - | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
0 commit comments