mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 09:16:54 +00:00
fix(i18l): Un-hardcode service status descriptions
This commit is contained in:
parent
d36c8e987d
commit
c1cba41b7b
|
@ -192,7 +192,16 @@
|
||||||
"disable": "Disable service",
|
"disable": "Disable service",
|
||||||
"enable": "Enable service",
|
"enable": "Enable service",
|
||||||
"move": "Move to another volume",
|
"move": "Move to another volume",
|
||||||
"uses": "Uses {usage} on {volume}"
|
"uses": "Uses {usage} on {volume}",
|
||||||
|
"status": {
|
||||||
|
"active": "Up and running",
|
||||||
|
"inactive": "Stopped",
|
||||||
|
"failed": "Failed to start",
|
||||||
|
"off": "Disabled",
|
||||||
|
"activating": "Activating",
|
||||||
|
"deactivating": "Deactivating",
|
||||||
|
"reloading": "Restarting"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"mail": {
|
"mail": {
|
||||||
"title": "E-Mail",
|
"title": "E-Mail",
|
||||||
|
|
|
@ -188,79 +188,79 @@ class ServiceStatusCard extends StatelessWidget {
|
||||||
Widget build(final BuildContext context) {
|
Widget build(final BuildContext context) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case ServiceStatus.active:
|
case ServiceStatus.active:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.check_circle_outline,
|
Icons.check_circle_outline,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Up and running'),
|
title: Text('service_page.status.active'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.inactive:
|
case ServiceStatus.inactive:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
tertiary: true,
|
tertiary: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.stop_circle_outlined,
|
Icons.stop_circle_outlined,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Stopped'),
|
title: Text('service_page.status.inactive'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.failed:
|
case ServiceStatus.failed:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
error: true,
|
error: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.error_outline,
|
Icons.error_outline,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Failed to start'),
|
title: Text('service_page.status.failed'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.off:
|
case ServiceStatus.off:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
tertiary: true,
|
tertiary: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.power_settings_new,
|
Icons.power_settings_new,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Disabled'),
|
title: Text('service_page.status.off'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.activating:
|
case ServiceStatus.activating:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
tertiary: true,
|
tertiary: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.restart_alt_outlined,
|
Icons.restart_alt_outlined,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Activating'),
|
title: Text('service_page.status.activating'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.deactivating:
|
case ServiceStatus.deactivating:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
tertiary: true,
|
tertiary: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.restart_alt_outlined,
|
Icons.restart_alt_outlined,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Deactivating'),
|
title: Text('service_page.status.deactivating'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
case ServiceStatus.reloading:
|
case ServiceStatus.reloading:
|
||||||
return const FilledCard(
|
return FilledCard(
|
||||||
tertiary: true,
|
tertiary: true,
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(
|
leading: const Icon(
|
||||||
Icons.restart_alt_outlined,
|
Icons.restart_alt_outlined,
|
||||||
size: 24,
|
size: 24,
|
||||||
),
|
),
|
||||||
title: Text('Restarting'),
|
title: Text('service_page.status.reloading'.tr()),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue