diff --git a/po/en_GB.po b/po/en_GB.po index d6a96350d..ecb928752 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-08 16:51+0000\n" -"PO-Revision-Date: 2024-09-29 02:16+0000\n" +"PO-Revision-Date: 2024-10-13 05:38+0000\n" "Last-Translator: David Hewitt \n" "Language-Team: English (United Kingdom) \n" @@ -21,7 +21,7 @@ msgstr "Connect to a Power Source" #: src/Application.vala:60 msgid "Installation will not succeed if this device loses power." -msgstr "" +msgstr "Installation will not succeed if this device loses power." #: src/Application.vala:73 #, c-format @@ -565,7 +565,7 @@ msgstr "Default (ext4)" #: src/Widgets/PartitionMenu.vala:261 msgid "Custom value must begin with /" -msgstr "" +msgstr "Custom value must begin with /" #~ msgid "" #~ "Your device is running on battery power. It's recommended to be plugged " diff --git a/po/es.po b/po/es.po index c6a04b1f4..53c338bbe 100644 --- a/po/es.po +++ b/po/es.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-08 16:51+0000\n" -"PO-Revision-Date: 2024-10-09 18:16+0000\n" +"PO-Revision-Date: 2024-10-14 17:11+0000\n" "Last-Translator: Italo Felipe Capasso Ballesteros \n" "Language-Team: Spanish \n" @@ -452,7 +452,7 @@ msgid "" "Create, resize, or otherwise manage partitions manually. This method may " "lead to data loss." msgstr "" -"Cree, redimensione o gestione manualmente las particiones. Este método puede " +"Cree, redimensione o gestione particiones manualmente. Este método puede " "provocar la pérdida de datos." #: src/Views/TryInstallView.vala:107 diff --git a/po/ja.po b/po/ja.po index 04daca212..25c34214e 100644 --- a/po/ja.po +++ b/po/ja.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-08 16:51+0000\n" -"PO-Revision-Date: 2024-10-09 18:16+0000\n" +"PO-Revision-Date: 2024-10-12 12:00+0000\n" "Last-Translator: Ryo Nakano \n" "Language-Team: Japanese \n" @@ -334,7 +334,7 @@ msgstr "言語を選択" #: src/Views/LanguageView.vala:295 src/Views/LanguageView.vala:342 msgid "Currently active language" -msgstr "現在使用可能な言語" +msgstr "現在の選択言語" #: src/Views/PartitioningView.vala:51 msgid "Select Partitions" diff --git a/po/pt_BR.po b/po/pt_BR.po index 9f12f786d..856eb2233 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -3,8 +3,8 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-08 16:51+0000\n" -"PO-Revision-Date: 2024-09-15 16:16+0000\n" -"Last-Translator: José Rafael \n" +"PO-Revision-Date: 2024-10-15 06:30+0000\n" +"Last-Translator: Gustavo Silva \n" "Language-Team: Portuguese (Brazil) \n" "Language: pt_BR\n" @@ -21,7 +21,7 @@ msgstr "Conecte a uma fonte de energia" #: src/Application.vala:60 msgid "Installation will not succeed if this device loses power." -msgstr "" +msgstr "A instalação irá falhar se o aparelho perder energia." #: src/Application.vala:73 #, c-format @@ -571,7 +571,7 @@ msgstr "Padrão (ext4)" #: src/Widgets/PartitionMenu.vala:261 msgid "Custom value must begin with /" -msgstr "" +msgstr "Valor customizado deve começar com /" #~ msgid "" #~ "Your device is running on battery power. It's recommended to be plugged " diff --git a/po/zh_TW.po b/po/zh_TW.po index 5d45203cf..50673f934 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-10-08 16:51+0000\n" -"PO-Revision-Date: 2024-10-07 08:07+0000\n" +"PO-Revision-Date: 2024-10-14 16:04+0000\n" "Last-Translator: Kisaragi Hiu \n" "Language-Team: Chinese (Traditional) \n" @@ -21,7 +21,7 @@ msgstr "請連接電源" #: src/Application.vala:60 msgid "Installation will not succeed if this device loses power." -msgstr "" +msgstr "裝置若是沒電會無法完成安裝。" #: src/Application.vala:73 #, c-format diff --git a/src/Application.vala b/src/Application.vala index 3afb029fb..fa825d970 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -21,11 +21,6 @@ public class Installer.App : Gtk.Application { } construct { - GLib.Intl.setlocale (LocaleCategory.ALL, ""); - GLib.Intl.bindtextdomain (application_id, Build.LOCALEDIR); - GLib.Intl.bind_textdomain_codeset (application_id, "UTF-8"); - GLib.Intl.textdomain (application_id); - add_main_option_entries (INSTALLER_OPTIONS); } @@ -84,5 +79,10 @@ public class Installer.App : Gtk.Application { } public static int main (string[] args) { + GLib.Intl.setlocale (LocaleCategory.ALL, ""); + GLib.Intl.bindtextdomain (Build.GETTEXT_PACKAGE, Build.LOCALEDIR); + GLib.Intl.bind_textdomain_codeset (Build.GETTEXT_PACKAGE, "UTF-8"); + GLib.Intl.textdomain (Build.GETTEXT_PACKAGE); + return new Installer.App ().run (args); } diff --git a/src/Views/CheckView.vala b/src/Views/CheckView.vala index d2d23d34c..0c046e5fa 100644 --- a/src/Views/CheckView.vala +++ b/src/Views/CheckView.vala @@ -28,7 +28,7 @@ public class Installer.CheckView : AbstractInstallerView { private Gtk.Box message_box; public bool has_messages { get { - return message_box.get_first_child != null; + return message_box.get_first_child () != null; } } diff --git a/src/Widgets/DiskBar.vala b/src/Widgets/DiskBar.vala index 0c5a228d4..5e4e790c8 100644 --- a/src/Widgets/DiskBar.vala +++ b/src/Widgets/DiskBar.vala @@ -69,6 +69,8 @@ public class Installer.DiskBar: Gtk.Box { public Gee.ArrayList partitions { get; construct; } public uint64 size { get; construct; } + private Gtk.ConstraintGuide guide; + public PartitionContainer (uint64 size, Gee.ArrayList partitions) { Object ( partitions: partitions, @@ -81,6 +83,28 @@ public class Installer.DiskBar: Gtk.Box { } construct { + guide = new Gtk.ConstraintGuide () { + max_width = 300, + min_width = 300, + nat_width = 600 + }; + + var layout_manager = ((Gtk.ConstraintLayout) get_layout_manager ()); + layout_manager.add_guide (guide); + + layout_manager.add_constraint ( + new Gtk.Constraint ( + guide, + HEIGHT, + EQ, + this, + HEIGHT, + 1.0, + 0.0, + Gtk.ConstraintStrength.REQUIRED + ) + ); + uint64 used = 0; var disk_sectors = size / 512; foreach (var partition in partitions) { @@ -100,17 +124,16 @@ public class Installer.DiskBar: Gtk.Box { var unused_bar = new Block (); unused_bar.add_css_class ("unused"); - append_partition (unused_bar, unused / size); + append_partition (unused_bar, (double) unused / size); } - var layout_manager = ((Gtk.ConstraintLayout) get_layout_manager ()); // Position last child at end layout_manager.add_constraint ( new Gtk.Constraint ( - get_last_child (), + null, END, EQ, - this, + get_last_child (), END, 1.0, 0.0, @@ -136,7 +159,7 @@ public class Installer.DiskBar: Gtk.Box { widget, HEIGHT, EQ, - this, + guide, HEIGHT, 1.0, 0.0, @@ -150,7 +173,7 @@ public class Installer.DiskBar: Gtk.Box { widget, WIDTH, EQ, - this, + guide, WIDTH, percentage, 0, @@ -163,10 +186,10 @@ public class Installer.DiskBar: Gtk.Box { // Position at start layout_manager.add_constraint ( new Gtk.Constraint ( - widget, + null, START, EQ, - this, + widget, START, 1.0, 0.0, @@ -182,8 +205,8 @@ public class Installer.DiskBar: Gtk.Box { EQ, previous_child, END, - 1.0, - 0.0, + 1, + 0, Gtk.ConstraintStrength.REQUIRED ) );