Author: aschnell Date: Thu Apr 24 19:47:58 2008 New Revision: 47046 URL: http://svn.opensuse.org/viewcvs/yast?rev=47046&view=rev Log: - mark things for translation - cleanup Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-loop.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-dm.ycp Thu Apr 24 19:47:58 2008 @@ -26,7 +26,7 @@ Greasemonkey::Transform( `VBox( `HStretch(), - `Left(`Heading(_("Device Mapper (DM)"))), + `IconAndHeading(_("Device Mapper (DM)"), ""), `Table(`id(`table), `opt(`keepSorting, `notify), table_header, table_contents) ) @@ -51,13 +51,15 @@ list<symbol> fields = StorageFields::Filter([ `mount_point, `size, `fs_type ]); UI::ReplaceWidget(`tree_panel, - `VBox( - `Left(`Heading("DM: " + part_device)), - `HStretch(), - StorageFields::Overview(fields, target_map, part_device), - `HBox( - `PushButton(`id(`edit), "Edit..."), - `HStretch() + Greasemonkey::Transform( + `VBox( + `IconAndHeading(sformat(_("DM: %1"), part_device), ""), + `HStretch(), + StorageFields::Overview(fields, target_map, part_device), + `HBox( + `PushButton(`id(`edit), "Edit..."), + `HStretch() + ) ) ) ); Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-hd.ycp Thu Apr 24 19:47:58 2008 @@ -111,42 +111,43 @@ } } - - if (widget == `rescan) + switch (widget) { - // popup text - CallConfig(_("Rescaning disks cancels all current changes. + case `rescan: + // popup text + CallConfig(_("Rescaning disks cancels all current changes. Really rescan disks?"), nil, nil); - } - else if (widget == `iscsi) - { - // popup text - CallConfig(_("Calling iSCSI configuration cancels all current changes. + break; + + case `iscsi: + // popup text + CallConfig(_("Calling iSCSI configuration cancels all current changes. Really call iSCSI configuration?"), ["yast2-iscsi-client"], "iscsi-client"); - } - else if (widget == `multipath) - { - // popup text - CallConfig(_("Calling Multipath configuration cancels all current changes. + break; + + case `multipath: + // popup text + CallConfig(_("Calling Multipath configuration cancels all current changes. Really call Multipath configuration?"), ["yast2-multipath"], "multipath"); - } - else if (widget == `dasd) - { - // popup text - CallConfig(_("Calling DASD configuration cancels all current changes. + break; + + case `dasd: + // popup text + CallConfig(_("Calling DASD configuration cancels all current changes. Really call DASD configuration?"), ["yast2-s390"], "dasd"); - } - else if (widget == `zfcp) - { - // popup text - CallConfig(_("Calling zFCP configuration cancels all current changes. + break; + + case `zfcp: + // popup text + CallConfig(_("Calling zFCP configuration cancels all current changes. Really call zFCP configuration?"), ["yast2-s390"], "zfcp"); - } - else if (widget == `xpram) - { - // popup text - CallConfig(_("Calling XPRAM configuration cancels all current changes. + break; + + case `xpram: + // popup text + CallConfig(_("Calling XPRAM configuration cancels all current changes. Really call XPRAM configuration?"), ["yast2-s390"], "xpram"); + break; } } @@ -179,13 +180,15 @@ { string disk_device = (string) user_data; - if (widget == `smart) - { - DisplayCommandOutput(sformat("/usr/sbin/smartctl --health '%1'", disk_device)); - } - else if (widget == `hdparm) + switch (widget) { - DisplayCommandOutput(sformat("/sbin/hdparm -aAgr '%1'", disk_device)); + case `smart: + DisplayCommandOutput(sformat("/usr/sbin/smartctl --health '%1'", disk_device)); + break; + + case `hdparm: + DisplayCommandOutput(sformat("/sbin/hdparm -aAgr '%1'", disk_device)); + break; } } @@ -216,7 +219,7 @@ list<term> expert_cmds = [ `item(`id(`delete_parttable), // menu entry text - "Delete Partition &Table and Disk Label") + _("Delete Partition &Table and Disk Label")) ]; if (Arch::s390()) @@ -233,12 +236,12 @@ `Table(`id(`table), `opt(`keepSorting, `notify), table_header, table_contents), `HBox( - `PushButton(`id(`add), "Add..."), - `PushButton(`id(`edit), "Edit..."), - `PushButton(`id(`resize), "Resize..."), - `PushButton(`id(`delete), "Delete..."), + `PushButton(`id(`add), _("Add...")), + `PushButton(`id(`edit), _("Edit...")), + `PushButton(`id(`resize), _("Resize...")), + `PushButton(`id(`delete), _("Delete...")), `HStretch(), - `MenuButton("Expert...", expert_cmds) + `MenuButton(_("Expert..."), expert_cmds) ) )); } @@ -290,10 +293,10 @@ UI::ReplaceWidget(`tree_panel, Greasemonkey::Transform( `VBox( - `IconAndHeading(_("Hard Disk:") + " " + DisplayName(disk), hd_icon), + `IconAndHeading(sformat(_("Hard Disk: %1"), DisplayName(disk)), hd_icon), TabPanel::DumbTab(`id(`tab), [ - `item(`id(`overview), "&Overview"), - `item(`id(`partitions), "&Partitions") + `item(`id(`overview), _("&Overview")), + `item(`id(`partitions), _("&Partitions")) ], `ReplacePoint(`id(`tab_panel), TabPanel::empty_panel) ) @@ -319,18 +322,18 @@ list<symbol> fields = StorageFields::Filter([ `device, `mount_point, `mount_by, `size, `fs_type, `encrypted, `newline, `uuid, `label, - `udev_path, `udev_id, `newline, `used_by ]); + `udev_path, `udev_id, `newline, `used_by ]); UI::ReplaceWidget(`tree_panel, Greasemonkey::Transform( `VBox( `HStretch(), - `IconAndHeading(_("Partition:") + " " + DisplayName(part), part_icon), + `IconAndHeading(sformat(_("Partition: %1"), DisplayName(part)), part_icon), StorageFields::Overview(fields, target_map, device), `HBox( - `PushButton(`id(`edit), "Edit..."), - `PushButton(`id(`resize), "Resize..."), - `PushButton(`id(`delete), "Delete..."), + `PushButton(`id(`edit), _("Edit...")), + `PushButton(`id(`resize), _("Resize...")), + `PushButton(`id(`delete), _("Delete...")), `HStretch() ) ) Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-loop.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-loop.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-loop.ycp Thu Apr 24 19:47:58 2008 @@ -27,7 +27,7 @@ Greasemonkey::Transform( `VBox( `HStretch(), - `Left(`Heading(_("Crypt Files"))), + `IconAndHeading(_("Crypt Files"), ""), `Table(`id(`table), `opt(`keepSorting, `notify), table_header, table_contents), `HBox( @@ -61,16 +61,17 @@ list<symbol> fields = StorageFields::Filter([ `mount_point, `size, `fs_type, `file_path ]); UI::ReplaceWidget(`tree_panel, - `VBox( - `Left(`Heading(_("Crypt File:") + " " + part_device)), - `HStretch(), - StorageFields::Overview(fields, target_map, part_device), - `HBox( - `PushButton(`id(`edit), _("Edit...")), - `PushButton(`id(`delete), _("Delete...")), - `HStretch() - ) - ) + Greasemonkey::Transform( + `VBox( + `IconAndHeading(sformat(_("Crypt File: %1"), part_device), ""), + `HStretch(), + StorageFields::Overview(fields, target_map, part_device), + `HBox( + `PushButton(`id(`edit), _("Edit...")), + `PushButton(`id(`delete), _("Delete...")), + `HStretch() + ) + )) ); } Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-lvm.ycp Thu Apr 24 19:47:58 2008 @@ -138,10 +138,10 @@ `Table(`id(`table), `opt(`keepSorting, `notify), table_header, table_contents), `HBox( - `PushButton(`id(`add), "Add..."), - `PushButton(`id(`edit), "Edit..."), - `PushButton(`id(`resize), "Resize..."), - `PushButton(`id(`delete), "Delete..."), + `PushButton(`id(`add), _("Add...")), + `PushButton(`id(`edit), _("Edit...")), + `PushButton(`id(`resize), _("Resize...")), + `PushButton(`id(`delete), _("Delete...")), `HStretch() ) ) @@ -215,11 +215,11 @@ UI::ReplaceWidget(`tree_panel, Greasemonkey::Transform( `VBox( - `IconAndHeading(_("Volume Group:") + " " + device, lvm_icon), + `IconAndHeading(sformat(_("Volume Group: %1"), device), lvm_icon), TabPanel::DumbTab(`id(`tab), [ - `item(`id(`overview), "&Overview"), - `item(`id(`lvs), "&Logical Volumes"), - `item(`id(`pvs), "&Physical Volumes") + `item(`id(`overview), _("&Overview")), + `item(`id(`lvs), _("&Logical Volumes")), + `item(`id(`pvs), _("&Physical Volumes")) ], `ReplacePoint(`id(`tab_panel), TabPanel::empty_panel) ) @@ -248,7 +248,7 @@ Greasemonkey::Transform( `VBox( `HStretch(), - `IconAndHeading(_("Logical Volume:") + " " + device, lvm_icon), + `IconAndHeading(sformat(_("Logical Volume: %1"), device), lvm_icon), StorageFields::Overview(fields, target_map, device), `HBox( `PushButton(`id(`edit), _("Edit...")), Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-nfs.ycp Thu Apr 24 19:47:58 2008 @@ -65,7 +65,7 @@ UI::ReplaceWidget(`tree_panel, Greasemonkey::Transform( `VBox( - `IconAndHeading(_("NFS Path:") + " " + part_device, nfs_icon), + `IconAndHeading(sformat(_("NFS Path: %1"), part_device), nfs_icon), `HStretch(), StorageFields::Overview(fields, target_map, part_device), `HBox( Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-raid.ycp Thu Apr 24 19:47:58 2008 @@ -64,8 +64,8 @@ `HStretch(), StorageFields::Overview(fields, tg, part_device), `HBox( - `PushButton(`id(`edit), "Edit..."), - `PushButton(`id(`delete), "Delete..."), + `PushButton(`id(`edit), _("Edit...")), + `PushButton(`id(`delete), _("Delete...")), `HStretch() ) ) @@ -125,13 +125,15 @@ `devices : $[ `create : CreateRaidDevicesTab, `user_data : user_data ] ]; UI::ReplaceWidget(`tree_panel, - `VBox( - `Left(`Heading("RAID: " + device)), - TabPanel::DumbTab(`id(`tab), [ - `item(`id(`overview), "&Overview"), - `item(`id(`devices), "Used Devices") - ], - `ReplacePoint(`id(`tab_panel), TabPanel::empty_panel) + Greasemonkey::Transform( + `VBox( + `IconAndHeading(sformat(_("RAID: %1"), device), ""), + TabPanel::DumbTab(`id(`tab), [ + `item(`id(`overview), _("&Overview")), + `item(`id(`devices), _("Used Devices")) + ], + `ReplacePoint(`id(`tab_panel), TabPanel::empty_panel) + ) ) ) ); Modified: branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/include/ep-unused.ycp Thu Apr 24 19:47:58 2008 @@ -13,7 +13,7 @@ symbol Predicate(map disk, map partition) { symbol disk_type = disk["type"]:`CT_UNKNOWN; - + if (partition == nil) { if (size(disk["partitions"]:[]) == 0 && @@ -21,7 +21,7 @@ { return `show; } - + return `follow; } else @@ -32,24 +32,26 @@ { return `show; } - + return `ignore; } } - + list<symbol> fields = StorageFields::Filter([ `device, `size, `format, `type ]); map<string, map> target_map = Storage::GetTargetMap(); - + term table_header = StorageFields::TableHeader(fields); list<term> table_contents = StorageFields::TableContents(fields, target_map, Predicate); UI::ReplaceWidget(`tree_panel, - `VBox( - `Left(`Heading(_("Unused Devices"))), - `Table(`id(`table), `opt(`keepSorting), - table_header, table_contents) - )); + Greasemonkey::Transform( + `VBox( + `IconAndHeading(_("Unused Devices"), ""), + `Table(`id(`table), `opt(`keepSorting), + table_header, table_contents) + )) + ); Wizard::RestoreHelp("Help about view with unused devices"); } Modified: branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/aschnell/part-redesign/sto... ============================================================================== --- branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp (original) +++ branches/tmp/aschnell/part-redesign/storage/src/modules/StorageFields.ycp Thu Apr 24 19:47:58 2008 @@ -37,8 +37,9 @@ */ global void IterateTargetMap(map<string, map> target_map, void(map<string, map>, map) callback) { - map disk_order = $[ `CT_DMRAID : 0, `CT_DISK : 1, `CT_MD : 2, `CT_LOOP : 3, - `CT_LVM : 4, `CT_EVMS : 5, `CT_DM : 6, `CT_NFS : 7 ]; + const map disk_order = $[ `CT_DMRAID : 0, `CT_DISK : 1, `CT_MD : 2, `CT_LOOP : 3, + `CT_LVM : 4, `CT_EVMS : 5, `CT_DM : 6, `CT_NFS : 7 ]; + list<string> keys = maplist(string dev, map disk, target_map, { return dev; }); keys = sort(string a, string b, keys, { integer oa = disk_order[target_map[a,"type"]:`CT_UNKNOWN]:8; @@ -195,7 +196,7 @@ if (style == `table) return value; else - return "Device: " + value + "\n"; + return sformat(_("Device: %1"), value) + "\n"; } case `size: @@ -204,7 +205,7 @@ if (style == `table) return value; else - return "Size: " + value + "\n"; + return sformat(_("Size: %1"), value) + "\n"; } case `type: @@ -260,7 +261,7 @@ if (style == `table) return value; else - return "Type: " + value + "\n"; + return sformat(_("Type: %1"), value) + "\n"; } case `format: @@ -278,16 +279,16 @@ if (style == `table) return value; else - return "Format: " + value + "\n"; + return sformat(_("Format: %1"), value) + "\n"; } case `encrypted: { - string value = data["enc_type"]:`none != `none ? "Yes" : "No"; + string value = data["enc_type"]:`none != `none ? _("Yes") : _("No"); if (style == `table) return value; else - return "Encrypted: " + value + "\n"; + return sformat(_("Encrypted: %1"), value) + "\n"; } case `fs_type: @@ -296,7 +297,7 @@ if (style == `table) return value; else - return "File System: " + value + "\n"; + return sformat(_("File System: %1"), value) + "\n"; } case `mount_point: @@ -307,7 +308,7 @@ if (style == `table) return value; else - return "Mount Point: " + value + "\n"; + return sformat(_("Mount Point: %1"), value) + "\n"; } case `mount_by: @@ -321,7 +322,7 @@ if (style == `table) return value; else - return "Mount By: " + value + "\n"; + return sformat(_("Mount By: %1"), value) + "\n"; } case `used_by: @@ -330,7 +331,7 @@ if (style == `table) return value; else - return "Used By: " + value + "\n"; + return sformat(_("Used By: %1"), value) + "\n"; } case `uuid: @@ -339,7 +340,7 @@ if (style == `table) return value; else - return "UUID: " + value + "\n"; + return sformat(_("UUID: %1"), value) + "\n"; } case `label: @@ -348,7 +349,7 @@ if (style == `table) return value; else - return "Label: " + value + "\n"; + return sformat(_("Label: %1"), value) + "\n"; } case `udev_path: @@ -357,7 +358,7 @@ if (style == `table) return value; else - return "Path: " + data["udev_path"]:"" + "\n"; + return sformat(_("Path: %1"), value) + "\n"; } case `udev_id: @@ -368,7 +369,7 @@ string ret = ""; integer i = 1; foreach(string id, data["udev_id"]:[""], { - ret = ret + "ID " + i + ": " + id + "\n"; + ret = ret + sformat(_("ID %1: %2"), i, id) + "\n"; i = i + 1; }); return ret; @@ -381,7 +382,7 @@ if (style == `table) return value; else - return "BIOS ID: " + value + "\n"; + return sformat(_("BIOS ID: %1"), value) + "\n"; } case `vendor: @@ -390,7 +391,7 @@ if (style == `table) return value; else - return "Vendor: " + value + "\n"; + return sformat(_("Vendor: %1"), value) + "\n"; } case `model: @@ -399,7 +400,7 @@ if (style == `table) return value; else - return "Model: " + value + "\n"; + return sformat(_("Model: %1"), value) + "\n"; } case `bus: @@ -408,7 +409,7 @@ if (style == `table) return value; else - return "Bus: " + value + "\n"; + return sformat(_("Bus: %1"), value) + "\n"; } case `lvm_metadata: @@ -419,7 +420,7 @@ if (style == `table) return value; else - return "Metadata Type: " + value + "\n"; + return sformat(_("Metadata Type: %1"), value) + "\n"; } case `pe_size: @@ -430,7 +431,7 @@ if (style == `table) return value; else - return "Physical Extent Size: " + value + "\n"; + return sformat(_("Physical Extent Size: %1"), value) + "\n"; } case `stripes: @@ -448,7 +449,7 @@ if (style == `table) return value; else - return "Stripes: " + value + "\n"; + return sformat(_("Stripes: %1"), value) + "\n"; } case `raid_type: @@ -457,7 +458,7 @@ if (style == `table) return value; else - return "RAID Type: " + value + "\n"; + return sformat(_("RAID Type: %1"), value) + "\n"; } case `start_cyl: @@ -472,7 +473,7 @@ if (style == `table) return value; else - return "Start Cylinder: " + value + "\n"; + return sformat(_("Start Cylinder: %1"), value) + "\n"; } case `end_cyl: @@ -487,7 +488,7 @@ if (style == `table) return value; else - return "End Cylinder: " + value + "\n"; + return sformat(_("End Cylinder: %1"), value) + "\n"; } case `file_path: @@ -496,7 +497,7 @@ if (style == `table) return value; else - return "File Path: " + value + "\n"; + return sformat(_("File Path: %1"), value) + "\n"; } default: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org