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/storage/src/include/ep-dm.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-hd.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-loop.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-lvm.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-nfs.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-raid.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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/storage/src/include/ep-unused.ycp?rev=47046&r1=47045&r2=47046&view=diff
==============================================================================
--- 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