Progress bar: added status translations

This commit is contained in:
Observer KRypt0n_ 2023-02-04 15:48:29 +02:00
parent 28d7663420
commit fe898e6b90
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
3 changed files with 14 additions and 3 deletions

View file

@ -3,6 +3,11 @@ none = None
default = Default default = Default
checking-free-space = Checking free space
downloading = Downloading
unpacking = Unpacking
launch = Launch launch = Launch

View file

@ -3,6 +3,11 @@ none = Нет
default = По умолчанию default = По умолчанию
checking-free-space = Проверка свободного места
downloading = Загрузка
unpacking = Распаковка
launch = Запустить launch = Запустить

View file

@ -6,6 +6,7 @@ use adw::prelude::*;
use anime_launcher_sdk::anime_game_core::installer::installer::Update as InstallerUpdate; use anime_launcher_sdk::anime_game_core::installer::installer::Update as InstallerUpdate;
use crate::prettify_bytes; use crate::prettify_bytes;
use crate::i18n::*;
pub struct ProgressBarInit { pub struct ProgressBarInit {
pub caption: Option<String>, pub caption: Option<String>,
@ -132,9 +133,9 @@ impl SimpleAsyncComponent for ProgressBar {
// TODO: add translation // TODO: add translation
AppMsg::UpdateFromState(state) => { AppMsg::UpdateFromState(state) => {
match state { match state {
InstallerUpdate::CheckingFreeSpace(_) => self.caption = Some(String::from("Checking free space")), InstallerUpdate::CheckingFreeSpace(_) => self.caption = Some(tr("checking-free-space")),
InstallerUpdate::DownloadingStarted(_) => self.caption = Some(String::from("Downloading")), InstallerUpdate::DownloadingStarted(_) => self.caption = Some(tr("downloading")),
InstallerUpdate::UnpackingStarted(_) => self.caption = Some(String::from("Unpacking")), InstallerUpdate::UnpackingStarted(_) => self.caption = Some(tr("unpacking")),
InstallerUpdate::DownloadingProgress(curr, total) | InstallerUpdate::DownloadingProgress(curr, total) |
InstallerUpdate::UnpackingProgress(curr, total) => { InstallerUpdate::UnpackingProgress(curr, total) => {