From 0c03d60203cf4660680cf5865ad61777012a7a46 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Thu, 11 Jul 2024 08:05:35 +0300 Subject: [PATCH] add translation --- locales/en_US.json | 54 +++++++++++++++++++++++++++++++++++-- src/bin/gui/build_ui/mod.rs | 4 +-- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/locales/en_US.json b/locales/en_US.json index 8a17dec..34e2c0e 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -1,6 +1,56 @@ { "application_name": "Pikman Update Manager", + "developer_name": "Cosmo", "installed_version_badge_text": "Installed", "candidate_version_badge_text": "Upgradable", - "arch_label_label": "Arch" -} \ No newline at end of file + "arch_label_label": "Arch", + "mark_for_update": "Mark This Package for Upgrade", + "description_button_label": "Description", + "extra_info_page_button_label": "Additional Info", + "uris_page_button_label": "Download URIs", + "changelog_page_button_label": "Changelog (todo)", + "extra_info_maintainer": "Maintainer", + "extra_info_download_size": "Download Size", + "extra_info_installed_size": "Size on Disk", + "update_status_error_perms": "Unknown Error! (Likely Permission Denied)", + "apt_update_dialog_heading": "APT Cache Update", + "apt_update_dialog_retry_label": "Retry", + "select_button_deselect_all": "De-Select All", + "select_button_select_all": "Select All", + "update_button_label": "Commit Upgrade", + "installed_version_to_be_installed": "Not Installed Yet", + "apt_pkg_property_unknown": "Unknown", + "apt_update_dialog_status_failed": "APT Cache Update: Failed!", + "excluded_updates_alert_dialog_heading": "Alert: Partial Upgrade", + "excluded_updates_alert_dialog_body": "It seems you have deselected some upgrades.\nThis is generally not recommended, and APT partial update security systems might not respect your input.", + "excluded_updates_alert_dialog_cancel_label": "Cancel", + "excluded_updates_alert_continue_label": "Continue", + "gui_changes_emu_msg_0": "The following opreations will be sent to the root process:", + "gui_changes_emu_msg_upgrading": "Upgrading", + "gui_changes_emu_msg_installing": "Installing", + "gui_changes_emu_msg_downgrading": "Downgrading", + "gui_changes_emu_msg_removing": "Uninstalling", + "package_count_upgrade_badge_label": "Packages to Upgrade", + "package_count_install_badge_label": "New Packages to Install", + "package_count_downgrade_badge_label": "Packages to Downgrade", + "package_count_remove_badge_label": "Packages to Uninstall", + "total_download_size_badge_label": "Total Download Size", + "total_installed_size_badge_label": "Total Size on Disk", + "apt_confirm_dialog_heading": "APT Upgrade Transaction: Please Review", + "apt_confirm_dialog_body": "The following changes are going to be made:", + "apt_confirm_dialog_cancel_label": "Decline", + "apt_confirm_dialog_confirm_label": "Confirm & Accept", + "apt_remove_confirm_dialog_heading": "APT Removal Confirmation: Please Review", + "apt_remove_confirm_dialog_body": "The Upgrade wants to remove the following packages: (This Might be extremely Dangerous!)", + "apt_remove_confirm_dialog_cancel_label": "Cancel", + "apt_remove_confirm_dialog_confirm_label": "Allow & Confirm", + "upgrade_status_error_perms": "Unknown Error! (Likely Permission Denied)", + "apt_upgrade_dialog_heading": "APT Upgrade Transaction: Hang Tight!", + "apt_upgrade_dialog_ok_label": "OK", + "apt_upgrade_dialog_open_log_file_label": "Open Log File", + "apt_upgrade_dialog_status_successful": "APT Upgrade Transaction Successful!", + "apt_upgrade_dialog_status_failed": "APT Upgrade Transaction Failed!", + "banner_text_no_internet": "Warning: No Internet Connection!", + "refresh_button_tooltip_text": "Refresh Opened Page", + "apt_update_page_title": "Native Updates (APT)" +} \ No newline at end of file diff --git a/src/bin/gui/build_ui/mod.rs b/src/bin/gui/build_ui/mod.rs index 8ef0e02..b0f8e89 100644 --- a/src/bin/gui/build_ui/mod.rs +++ b/src/bin/gui/build_ui/mod.rs @@ -46,11 +46,9 @@ pub fn build_ui(app: &Application) { } } else { *internet_connected_status.borrow_mut()=false; - if window_banner.title() != t!("banner_text_url_error").to_string() { window_banner.set_title(&banner_text); window_banner.set_revealed(true) } - } } })); @@ -86,7 +84,7 @@ pub fn build_ui(app: &Application) { // create the main Application window let window = ApplicationWindow::builder() // The text on the titlebar - .title(t!("app_name")) + .title(t!("application_name")) // link it to the application "app" .application(app) // Add the box called "window_box" to it