4
4
spacing: 15
5
5
6
6
MDLabel:
7
- text: ' Python Password '
7
+ text: app.info[ ' name ' ]
8
8
font_style: ' Button'
9
9
theme_text_color: ' Primary'
10
10
size_hint_y: None
25
25
26
26
OneLineIconListItem:
27
27
icon_color: ' black'
28
- text: ' Passwords '
28
+ text: app.tr( ' passwords ' )
29
29
on_press: root.change_screen(' passwords' )
30
30
IconLeftWidget:
31
31
icon: ' shield-lock-outline'
32
32
33
33
OneLineIconListItem:
34
- text: ' Settings '
34
+ text: app.tr( ' settings ' )
35
35
on_press: root.change_screen(' settings' )
36
36
IconLeftWidget:
37
37
icon: ' cogs'
38
38
39
39
OneLineIconListItem:
40
- text: ' Info '
40
+ text: app.tr( ' info ' )
41
41
on_press: root.change_screen(' info' )
42
42
IconLeftWidget:
43
43
icon: ' information-outline'
44
44
45
45
MDRoundFlatIconButton:
46
- text: ' Switch theme'
46
+ text: app.tr(' language' )
47
+ size_hint_x: 1
48
+ background_palette: ' Primary'
49
+ text_color: app.text_color_rgba
50
+ icon: ' flag-outline'
51
+ on_release: root.change_screen(' languages' )
52
+
53
+ MDRoundFlatIconButton:
54
+ text: app.tr(' switch_theme' )
55
+ size_hint_x: 1
47
56
background_palette: ' Primary'
48
57
text_color: app.text_color_rgba
49
58
icon: ' theme-light-dark'
56
65
Screen:
57
66
MDToolbar:
58
67
id : toolbar
59
- title: ' Python Password '
68
+ title: app.info[ ' name ' ]
60
69
pos_hint: {' top' : 1 }
61
70
elevation: 10
62
71
left_action_items: [[' menu' , lambda x : nav_drawer.set_state(' open' )]]
@@ -94,8 +103,8 @@ Screen:
94
103
95
104
MDTextField:
96
105
id : password_alias
97
- hint_text: ' Password alias '
98
- helper_text: ' 3+ characters long. '
106
+ hint_text: app.tr( ' password_alias ' )
107
+ helper_text: app.tr( ' x_characters_long ' , txt_format = ' 3 ' )
99
108
helper_text_mode: ' on_error'
100
109
mode: ' rectangle'
101
110
required: False
@@ -104,8 +113,8 @@ Screen:
104
113
105
114
MDTextField:
106
115
id : password_value
107
- hint_text: ' Password value '
108
- helper_text: ' 6+ characters long. '
116
+ hint_text: app.tr( ' password_value ' )
117
+ helper_text: app.tr( ' x_characters_long ' , txt_format = ' 6 ' )
109
118
helper_text_mode: ' on_error'
110
119
mode: ' rectangle'
111
120
required: False
@@ -114,16 +123,16 @@ Screen:
114
123
115
124
MDFillRoundFlatIconButton:
116
125
size_hint_x: 1
117
- text: ' Add password '
126
+ text: app.tr( ' save_password ' )
118
127
icon: ' key-plus'
119
128
on_press: app.add_password()
120
129
121
130
MDSeparator:
122
131
123
132
MDTextField:
124
133
id : del_password_alias
125
- hint_text: ' Password alias '
126
- helper_text: ' 3+ characters long. '
134
+ hint_text: app.tr( ' password_alias ' )
135
+ helper_text: app.tr( ' x_characters_long ' , txt_format = ' 3 ' )
127
136
helper_text_mode: ' on_error'
128
137
mode: ' rectangle'
129
138
required: False
@@ -132,7 +141,7 @@ Screen:
132
141
133
142
MDFillRoundFlatIconButton:
134
143
size_hint_x: 1
135
- text: ' Remove password '
144
+ text: app.tr( ' remove_password ' )
136
145
icon: ' key-minus'
137
146
on_release: app.del_password()
138
147
@@ -149,7 +158,7 @@ Screen:
149
158
150
159
MDFillRoundFlatIconButton:
151
160
size_hint_x: 1
152
- text: ' Refresh '
161
+ text: app.tr( ' refresh ' )
153
162
icon: ' refresh'
154
163
on_release: app.update_passwords_list()
155
164
@@ -167,7 +176,7 @@ Screen:
167
176
BoxLayout:
168
177
169
178
MDLabel:
170
- text: ' Change alpha password '
179
+ text: app.tr( ' change_master ' , txt_format = app.tr( ' alpha' ))
171
180
theme_text_color: ' Primary'
172
181
halign: ' center'
173
182
@@ -177,8 +186,8 @@ Screen:
177
186
178
187
MDTextField:
179
188
id : alpha_change
180
- hint_text: ' New alpha password '
181
- helper_text: ' 6+ characters long. '
189
+ hint_text: app.tr( ' new_master ' , txt_format = app.tr( ' alpha' ))
190
+ helper_text: app.tr( ' x_characters_long ' , txt_format = ' 6 ' )
182
191
helper_text_mode: ' on_error'
183
192
mode: ' rectangle'
184
193
required: False
@@ -192,13 +201,13 @@ Screen:
192
201
193
202
MDFillRoundFlatIconButton:
194
203
id : btn_alpha_change
195
- text: ' Save '
204
+ text: app.tr( ' save ' )
196
205
icon: ' checkbox-marked-outline'
197
206
on_release: app.change_master(' alpha' )
198
207
199
208
MDFillRoundFlatIconButton:
200
209
id : btn_alpha_reset
201
- text: ' Reset '
210
+ text: app.tr( ' reset ' )
202
211
icon: ' lock-reset'
203
212
on_release: app.reset_alpha()
204
213
@@ -207,7 +216,7 @@ Screen:
207
216
BoxLayout:
208
217
209
218
MDLabel:
210
- text: ' Change beta password '
219
+ text: app.tr( ' change_master ' , txt_format = app.tr( ' beta' ))
211
220
theme_text_color: ' Primary'
212
221
halign: ' center'
213
222
@@ -217,8 +226,8 @@ Screen:
217
226
218
227
MDTextField:
219
228
id : beta_change
220
- hint_text: ' New beta password '
221
- helper_text: ' 6+ characters long. '
229
+ hint_text: app.tr( ' new_master ' , txt_format = app.tr( ' beta' ))
230
+ helper_text: app.tr( ' x_characters_long ' , txt_format = ' 6 ' )
222
231
helper_text_mode: ' on_error'
223
232
mode: ' rectangle'
224
233
required: False
@@ -231,12 +240,12 @@ Screen:
231
240
spacing: 15
232
241
233
242
MDFillRoundFlatIconButton:
234
- text: ' Save '
243
+ text: app.tr( ' save ' )
235
244
icon: ' checkbox-marked-outline'
236
245
on_release: app.change_master(' beta' )
237
246
238
247
MDFillRoundFlatIconButton:
239
- text: ' Reset '
248
+ text: app.tr( ' reset ' )
240
249
icon: ' lock-reset'
241
250
on_release: app.reset_beta()
242
251
@@ -249,12 +258,12 @@ Screen:
249
258
Widget:
250
259
251
260
MDFillRoundFlatIconButton:
252
- text: ' Export backup '
261
+ text: app.tr( ' export_backup ' )
253
262
icon: ' database-export'
254
263
on_release: app.backup_export()
255
264
256
265
MDFillRoundFlatIconButton:
257
- text: ' Import backup '
266
+ text: app.tr( ' import_backup ' )
258
267
icon: ' database-import'
259
268
on_release: app.backup_import()
260
269
@@ -276,7 +285,7 @@ Screen:
276
285
orientation: ' vertical'
277
286
278
287
MDLabel:
279
- text: ' About the program '
288
+ text: app.tr( ' about ' )
280
289
theme_text_color: ' Primary'
281
290
size_hint: (1 , None )
282
291
height: ' 30dp'
@@ -287,34 +296,34 @@ Screen:
287
296
288
297
TwoLineListItem:
289
298
text: app.info[' name' ]
290
- secondary_text: ' Name '
299
+ secondary_text: app.tr( ' name ' )
291
300
on_release: app.detailed_info(' name' )
292
301
293
302
TwoLineListItem:
294
303
text: app.info[' version' ]
295
- secondary_text: ' Version '
304
+ secondary_text: app.tr( ' version ' )
296
305
on_release: app.detailed_info(' version' )
297
306
298
307
TwoLineListItem:
299
308
text: app.info[' author' ]
300
- secondary_text: ' Author '
309
+ secondary_text: app.tr( ' author ' )
301
310
on_release: app.detailed_info(' author' )
302
311
303
312
TwoLineListItem:
304
313
text: app.info[' icon' ]
305
- secondary_text: ' Program icon'
314
+ secondary_text: app.tr( ' icon' )
306
315
on_release: app.detailed_info(' icon' )
307
316
308
317
TwoLineListItem:
309
- text: app.info[' rd_party ' ]
310
- secondary_text: ' 3rd party software '
311
- on_release: app.detailed_info(' rd_party ' )
318
+ text: app.info[' 3rd_party ' ]
319
+ secondary_text: app.tr( ' 3rd_party ' )
320
+ on_release: app.detailed_info(' 3rd_party ' )
312
321
313
322
BoxLayout:
314
323
orientation: ' vertical'
315
324
316
325
MDLabel:
317
- text: ' Useful links'
326
+ text: app.tr( ' links' )
318
327
theme_text_color: ' Primary'
319
328
size_hint: (1 , None )
320
329
height: ' 30dp'
@@ -324,29 +333,60 @@ Screen:
324
333
MDList:
325
334
326
335
TwoLineAvatarListItem:
327
- text: ' GitHub repository '
336
+ text: app.tr( ' github ' )
328
337
secondary_text: ' '
329
338
on_release: app.open_url(app.info[' github' ])
330
339
331
340
IconLeftWidget:
332
341
icon: ' github-circle'
333
342
334
343
TwoLineAvatarListItem:
335
- text: ' FAQ '
344
+ text: app.tr( ' faq ' )
336
345
secondary_text: ' '
337
346
on_release: app.open_url(app.info[' faq' ])
338
347
339
348
IconLeftWidget:
340
349
icon: ' comment-question-outline'
341
350
342
351
TwoLineAvatarIconListItem:
343
- text: ' Mail '
352
+ text: app.tr( ' mail ' )
344
353
secondary_text: ' '
345
354
on_release: app.open_url(app.info[' mail' ])
346
355
347
356
IconLeftWidget:
348
357
icon: ' email-outline'
349
358
359
+ Screen:
360
+ name: ' languages'
361
+
362
+ BoxLayout:
363
+ size_hint: (1 , None )
364
+ height: root.height - toolbar.height
365
+ orientation: ' vertical'
366
+ spacing: 30
367
+ padding: (150 , 45 )
368
+
369
+ MDLabel:
370
+ text: app.tr(' available_languages' )
371
+ theme_text_color: ' Primary'
372
+ size_hint_y: None
373
+ halign: ' center'
374
+ valign: ' middle'
375
+ height: 14
376
+
377
+ MDSeparator:
378
+
379
+ ScrollView:
380
+ MDList:
381
+ id : languages_list
382
+
383
+ MDSeparator:
384
+
385
+ MDFillRoundFlatIconButton:
386
+ text: app.tr(' add_language' )
387
+ icon: ' flag-plus-outline'
388
+ on_release: app.add_language()
389
+
350
390
MDNavigationDrawer:
351
391
md_bg_color: app.theme_cls.bg_dark
352
392
id : nav_drawer
0 commit comments