mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-25 06:16:18 +03:00
Progress bar: added status translations
This commit is contained in:
parent
28d7663420
commit
fe898e6b90
3 changed files with 14 additions and 3 deletions
|
@ -3,6 +3,11 @@ none = None
|
|||
default = Default
|
||||
|
||||
|
||||
checking-free-space = Checking free space
|
||||
downloading = Downloading
|
||||
unpacking = Unpacking
|
||||
|
||||
|
||||
launch = Launch
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,11 @@ none = Нет
|
|||
default = По умолчанию
|
||||
|
||||
|
||||
checking-free-space = Проверка свободного места
|
||||
downloading = Загрузка
|
||||
unpacking = Распаковка
|
||||
|
||||
|
||||
launch = Запустить
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ use adw::prelude::*;
|
|||
use anime_launcher_sdk::anime_game_core::installer::installer::Update as InstallerUpdate;
|
||||
|
||||
use crate::prettify_bytes;
|
||||
use crate::i18n::*;
|
||||
|
||||
pub struct ProgressBarInit {
|
||||
pub caption: Option<String>,
|
||||
|
@ -132,9 +133,9 @@ impl SimpleAsyncComponent for ProgressBar {
|
|||
// TODO: add translation
|
||||
AppMsg::UpdateFromState(state) => {
|
||||
match state {
|
||||
InstallerUpdate::CheckingFreeSpace(_) => self.caption = Some(String::from("Checking free space")),
|
||||
InstallerUpdate::DownloadingStarted(_) => self.caption = Some(String::from("Downloading")),
|
||||
InstallerUpdate::UnpackingStarted(_) => self.caption = Some(String::from("Unpacking")),
|
||||
InstallerUpdate::CheckingFreeSpace(_) => self.caption = Some(tr("checking-free-space")),
|
||||
InstallerUpdate::DownloadingStarted(_) => self.caption = Some(tr("downloading")),
|
||||
InstallerUpdate::UnpackingStarted(_) => self.caption = Some(tr("unpacking")),
|
||||
|
||||
InstallerUpdate::DownloadingProgress(curr, total) |
|
||||
InstallerUpdate::UnpackingProgress(curr, total) => {
|
||||
|
|
Loading…
Reference in a new issue