Mailinglist Archive: yast-devel (144 mails)

< Previous Next >
[yast-devel] Translation fixes
  • From: Michal Svec <msvec@xxxxxxx>
  • Date: Tue, 12 Feb 2008 14:17:16 +0100 (CET)
  • Message-id: <Pine.LNX.4.64.0802121411350.21805@xxxxxxxxx>

Hi,

I ran check_ycp through the repo and fixed the missing translations where
it seemed appropriate. Please have a look at the attached patch, if
there are no complaints I'd commit it later today.

You could do the test youself via 'y2tool check_ycp' or the script I used
(attached), it reports much more, besides translations :)

I left out ca-management, as it contains quite a lot of those and I was
not sure which are on purpose.

Thanks,
MichalIndex: kdump/src/uifunctions.ycp
===================================================================
--- kdump/src/uifunctions.ycp (revision 38031)
+++ kdump/src/uifunctions.ycp (working copy)
@@ -54,7 +54,7 @@ boolean set_kdump_append = false;

term local_filesystem = `VBox(
`Frame(_("Local Filesystem"),`HBox(`HSpacing(1),`VBox(
- `Left(`ComboBox(`id("local_partitions"), "&Select Partition",
local_partitions_list)),
+ `Left(`ComboBox(`id("local_partitions"), _("&Select Partition"),
local_partitions_list)),
`Left(`HBox(
`TextEntry(`id("dir_save_image"), _("&Directory for Saving Dumps")),
`VBox ( `Label(""),
@@ -67,7 +67,7 @@ term local_filesystem = `VBox(

term raw_disk = `VBox(
`Frame(_("Raw Disk"),`HBox(`HSpacing(1),`VBox(
- `Left(`ComboBox(`id("raw_partitions"), "&Select Partition",
raw_partitions_list)),
+ `Left(`ComboBox(`id("raw_partitions"), _("&Select Partition"),
raw_partitions_list)),
`Left(`HBox(
`TextEntry(`id("dir_save_image"), _("&Directory for Saving Dumps")),
`VBox ( `Label(""),
Index: kdump/src/dialogs.ycp
===================================================================
--- kdump/src/dialogs.ycp (revision 38031)
+++ kdump/src/dialogs.ycp (working copy)
@@ -195,7 +195,7 @@ map<string,map<string,any> > wid_handlin
`RadioButtonGroup(`id("switch_kdum_comm_line"),
`HBox(`HSpacing(1),`VBox(
`Left(`Label("")),
- `Left(`CheckBox(`id("enable_append"), `opt(`notify), "A&ppend
kdump Commandline"))
+ `Left(`CheckBox(`id("enable_append"), `opt(`notify), _("A&ppend
kdump Commandline")))
))
)
),
@@ -212,12 +212,12 @@ map<string,map<string,any> > wid_handlin
"widget" : `custom,
"custom_widget" : `HSquash(`VBox(
`Left(`HBox(
- `Left(`Label("Total System Memory [MB]:")),
+ `Left(`Label(_("Total System Memory [MB]:"))),
`Left(`Label(`id("total_memory"),"4096")),
`HStretch ()
)),
`Left(`HBox(
- `Left(`Label("Usable Memory [MB]:")),
+ `Left(`Label(_("Usable Memory [MB]:"))),
`Left(`Label(`id("usable_memory"),"3968")),
`HStretch ()
)),
@@ -234,11 +234,11 @@ map<string,map<string,any> > wid_handlin
"custom_widget" : `VBox(
`Frame ( _("Dump Level"), `VBox(
`Left(`HBox(`HSpacing(1),`HBox(
- `Left(`CheckBox(`id("zero_page"), "&Zero Page")),
- `Left(`CheckBox(`id("cache_page"), `opt(`notify), "Cach&e Page")),
- `Left(`CheckBox(`id("cache_private"), `opt(`notify), "Cache
Priva&te")),
- `Left(`CheckBox(`id("user_data"), "&User Data")),
- `Left(`CheckBox(`id("free_page"), "&Free Page")),
+ `Left(`CheckBox(`id("zero_page"), _("&Zero Page"))),
+ `Left(`CheckBox(`id("cache_page"), `opt(`notify), _("Cach&e
Page"))),
+ `Left(`CheckBox(`id("cache_private"), `opt(`notify), _("Cache
Priva&te"))),
+ `Left(`CheckBox(`id("user_data"), _("&User Data"))),
+ `Left(`CheckBox(`id("free_page"), _("&Free Page"))),
`HStretch ()
)))
))),
Index: ca-management/src/crlDefault.ycp
===================================================================
--- ca-management/src/crlDefault.ycp (revision 38031)
+++ ca-management/src/crlDefault.ycp (working copy)
@@ -121,7 +121,7 @@
_("&Valid Period (days):"), 1,
10000,
CaMgm::validPeriod));

- contents = add (contents, `Frame ("Authority Key Identifier",
+ contents = add (contents, `Frame (_("Authority Key Identifier"),
`VBox (`Left
(`CheckBox(`id(`id_exp_cri_authorityKeyIdentifier),

_("&Critical"),

CaMgm::exp_cri_authorityKeyIdentifier)),
@@ -130,7 +130,7 @@

CaMgm::exp_authorityKeyIdentifier)
)));

- contents = add (contents, `Frame ("Issuer Alt Name",
+ contents = add (contents, `Frame (_("Issuer Alt Name"),
`VBox (`Left
(`CheckBox(`id(`id_adv_cri_issuer_alt_name),

_("C&ritical"),

CaMgm::adv_cri_issuer_alt_name)
Index: ca-management/src/new_cert_items.ycp
===================================================================
--- ca-management/src/new_cert_items.ycp (revision 38031)
+++ ca-management/src/new_cert_items.ycp (working copy)
@@ -223,7 +223,7 @@

CaMgm::adv_cri_key_usage)),

`VSpacing(1.5),

`HBox( `HSpacing( 1 ),
-
`Frame( "Key Usage:",
+
`Frame( _("Key Usage:"),

`HBox( `VBox(

`Left (`CheckBox(
`id(`digitalSignature),


"digitalSignature",
Index: yast2/library/modules/ValueBrowser.ycp
===================================================================
--- yast2/library/modules/ValueBrowser.ycp (revision 38031)
+++ yast2/library/modules/ValueBrowser.ycp (working copy)
@@ -14,6 +14,8 @@

textdomain "base";

+ import "Label";
+
/**
* Helper function that replaces all ocurences of "\n" with "\\n", so
items are not multiline :-)
* @param s string to escape
@@ -143,7 +145,7 @@ block <type>
`VBox (
// translators: Tree header
`Tree (`opt (`hstretch, `vstretch), _("&Variable"),
[ items ]),
- `PushButton ("&OK")
+ `PushButton (Label::OKButton())
)
);
UI::UserInput ();
Index: metapackage/MetaPackageHandler.ycp
===================================================================
--- metapackage/MetaPackageHandler.ycp (revision 38031)
+++ metapackage/MetaPackageHandler.ycp (working copy)
@@ -166,7 +166,7 @@

term nothing = `VBox
(
- `Heading("There is nothing to do")
+ `Heading(_("There is nothing to do"))
);


Index: autoinstallation/src/clients/ayast_probe.ycp
===================================================================
--- autoinstallation/src/clients/ayast_probe.ycp (revision 38031)
+++ autoinstallation/src/clients/ayast_probe.ycp (working copy)
@@ -14,6 +14,7 @@
import "Stage";
Stage::Set( "initial" );
import "AutoInstallRules";
+ import "Label";
import "UI";
AutoInstallRules::ProbeRules();

@@ -52,7 +53,7 @@
UI::OpenDialog( `opt(`defaultsize),
`VBox(
`RichText( text ),
- `PushButton(`opt(`default), "&OK")
+ `PushButton(`opt(`default), Label::OKButton())
)
);
UI::UserInput();
Index: autoinstallation/src/dialogs/script_dialogs.ycp
===================================================================
--- autoinstallation/src/dialogs/script_dialogs.ycp (revision 38031)
+++ autoinstallation/src/dialogs/script_dialogs.ycp (working copy)
@@ -166,7 +166,7 @@ you to debug your script.</P>
`CheckBox( `id( `feedback ), _("&Feedback"), (
script["feedback"]:false ) ),
// a checkbox where you can choose if you want
to see script-debug output or not
`CheckBox( `id( `debug ), _("&Debug"), (
script["debug"]:true ) ),
- `CheckBox( `id( `chrooted ), "&Chrooted", (
script["chrooted"]:false ) ),
+ `CheckBox( `id( `chrooted ), _("&Chrooted"), (
script["chrooted"]:false ) ),
// a checkbox where you can choose if you need
to have network when the script is running
`CheckBox( `id( `network ), _("&Network"), (
script["network_needed"]:false ) )
),
Index: autoinstallation/src/dialogs/general_dialogs.ycp
===================================================================
--- autoinstallation/src/dialogs/general_dialogs.ycp (revision 38031)
+++ autoinstallation/src/dialogs/general_dialogs.ycp (working copy)
@@ -9,6 +9,7 @@
{
textdomain "autoinst";
import "GetInstArgs";
+ import "Label";


/**
@@ -151,17 +152,17 @@ For signature handling, read the AutoYaS
selection
) ),
`VBox(
- `PushButton( `id( `delSelection ), `opt( `default,
`hstretch ), _("Delete") )
+ `PushButton( `id( `delSelection ), `opt( `default,
`hstretch ), Label::DeleteButton() )
)
),
`HBox(
- `TextEntry( `id(`selLabel), "Label", "" ),
+ `TextEntry( `id(`selLabel), _("Label"), "" ),
`TextEntry( `id(`selValue), _("Value"), "" ),
- `PushButton( `id( `addSelection ), `opt( `default,
`hstretch ), _("Add") )
+ `PushButton( `id( `addSelection ), `opt( `default,
`hstretch ), Label::AddButton() )
),
`HBox(
- `PushButton( `id( `ok ), `opt( `default, `hstretch ),
_("Ok") ),
- `PushButton( `id( `abort ), `opt( `default, `hstretch
), _("Abort") )
+ `PushButton( `id( `ok ), `opt( `default, `hstretch ),
Label::OKButton() ),
+ `PushButton( `id( `abort ), `opt( `default, `hstretch
), Label::AbortButton() )
)
)
);
Index: iscsi-server/src/widgets.ycp
===================================================================
--- iscsi-server/src/widgets.ycp (revision 38031)
+++ iscsi-server/src/widgets.ycp (working copy)
@@ -75,7 +75,7 @@ map <string, any> LUNDetailDialog(map<st
UI::ChangeWidget(`sectors, `Enabled, !enable);

if (ret == `browse){
- string file = UI::AskForExistingFile("/", "", _(""));
+ string file = UI::AskForExistingFile("/", "", "");
if (file!=nil) UI::ChangeWidget(`file_path, `Value, file);
}
ret = (symbol)UI::UserInput();
@@ -546,7 +546,7 @@ symbol handleLUN(string key, map event){
UI::ChangeWidget(`sectors, `Enabled, !enable);

if (event["EventReason"]:"" == "Activated" && event["WidgetID"]:nil ==
`browse){
- string file = UI::AskForExistingFile("/", "", _(""));
+ string file = UI::AskForExistingFile("/", "", "");
if (file!=nil) UI::ChangeWidget(`file_path, `Value, file);
}
}
Index: core/agents-perl/doc/ag_background_example.ycp
===================================================================
--- core/agents-perl/doc/ag_background_example.ycp (revision 38031)
+++ core/agents-perl/doc/ag_background_example.ycp (working copy)
@@ -17,16 +17,18 @@

{

+import "Label";
+
UI::OpenDialog(
`VBox(
`VSpacing(0.5),
`HSpacing( `opt(`hstretch), 80),
`HBox(
- `Label("Searching in directory: "),
+ `Label(_("Searching in directory: ")),
`Label(`id(`dir), `opt(`hstretch), "")
),
`VSpacing(0.5),
- `PushButton(`id(`abort), "Abort"),
+ `PushButton(`id(`abort), Label::AbortButton()),
`VSpacing(0.5)
)
);
Index: core/libyui/doc/SimplePatchSelector-empty.ycp
===================================================================
--- core/libyui/doc/SimplePatchSelector-empty.ycp (revision 38031)
+++ core/libyui/doc/SimplePatchSelector-empty.ycp (working copy)
@@ -1,11 +1,13 @@
// Simple example for SimplePatchSelector
{
+ import "Label";
+
if ( ! UI::HasSpecialWidget(`SimplePatchSelector ) )
{
UI::OpenDialog(
`VBox(
- `Label("Error: This UI doesn't support the
SimplePatchSelector widget!"),
- `PushButton(`opt(`default), "&OK")
+ `Label(_("Error: This UI doesn't support the
SimplePatchSelector widget!")),
+ `PushButton(`opt(`default), Label::OKButton())
)
);
UI::UserInput();
Index: ftp-server/src/complex.ycp
===================================================================
--- ftp-server/src/complex.ycp (revision 38031)
+++ ftp-server/src/complex.ycp (working copy)
@@ -67,14 +67,14 @@ boolean ReadFTPService () {
UI::OpenDialog(
`RadioButtonGroup(`id("IntstallFTPd"),
`VBox(
- `Heading ("No server package installed"),
- `Left(`Label("Choose ftp daemon please.")),
- `Left(`Label("If you want to cancel configuration of ftp you can
push Cancel button.")),
+ `Heading (_("No server package installed")),
+ `Left(`Label(_("Choose ftp daemon please."))),
+ `Left(`Label(_("If you want to cancel configuration of ftp you can
push Cancel button."))),
`Left(`RadioButton(`id(0), `opt(`notify), "&vsftpd", true)),
`Left(`RadioButton(`id(1), `opt(`notify), "&pure-ftpd")),
`HBox(
- `PushButton(`id(`accept), "&Install"),
- `PushButton(`id(`cancel), "&Cancel")
+ `PushButton(`id(`accept), Label::InstallButton()),
+ `PushButton(`id(`cancel), Label::CancelButton())
)
) // end of `VBox(
) //end of `RadioButtonGroup(`id("IntstallFTPd")
@@ -159,12 +159,12 @@ boolean ReadFTPService () {
(FtpServer::pureftpd_installed) && (FtpServer::vsftpd_installed)) {
UI::OpenDialog(
`RadioButtonGroup(`id(`rb), `VBox(
- `Label("Choose daemon?"),
+ `Label(_("Choose daemon?")),
`Left(`RadioButton(`id(0), `opt(`notify), "&vsftpd",
((FtpServer::vsftpd_edit)? true:false))),
`Left(`RadioButton(`id(1), `opt(`notify), "&pure-ftpd",
((FtpServer::vsftpd_edit)? false:true))),
`HBox(
- `PushButton(`id(`close), "&Accept"),
- `PushButton(`id(`abort), "&Cancel")
+ `PushButton(`id(`close), Label::AcceptButton()),
+ `PushButton(`id(`abort), Label::CancelButton())
)
)) //end of `RadioButtonGroup(`id(`rb), `VBox(
); //end of UI::OpenDialog(
Index: ftp-server/src/wid_functions.ycp
===================================================================
--- ftp-server/src/wid_functions.ycp (revision 38031)
+++ ftp-server/src/wid_functions.ycp (working copy)
@@ -81,11 +81,11 @@ void SetStartedViaXinetd (boolean enable
if (Mode::normal()) {
UI::OpenDialog(
`VBox(
- `Label("Xinetd is not started!"),
- `Label("Do you want to start it?"),
+ `Label(_("Xinetd is not started!")),
+ `Label(_("Do you want to start it?")),
`HBox(
- `PushButton(`id(`accept), "&Start"),
- `PushButton(`id(`cancel), "Canc&el")
+ `PushButton(`id(`accept), _("&Start")),
+ `PushButton(`id(`cancel), Label::CancelButton())
)
) // end of `VBox(
); // end of UI::OpenDialog(
Index: kerberos-server/src/complex.ycp
===================================================================
--- kerberos-server/src/complex.ycp (revision 38031)
+++ kerberos-server/src/complex.ycp (working copy)
@@ -105,7 +105,7 @@ symbol AskDBtypeDialog() {
term content = `HVCenter(
`HVSquash(
/* Button group label */
- `Frame( "Select the database backend you want to use",
+ `Frame(_("Select the database backend you want to use"),
`RadioButtonGroup( `id(`rb),
`VBox(
// Checkbox text
@@ -346,7 +346,7 @@ symbol AskLdapDialog(boolean init) {

pwCheckbox1 = `CheckBox( `id(`kdc_use_kdcpw), `opt (`notify),
// Checkbox text
- "Use previously
entered password", true);
+ _("Use
previously entered password"), true);
}

term content = `HBox ( `HSpacing (3), `VBox (
Index: dhcp-server/src/dialogs2.ycp
===================================================================
--- dhcp-server/src/dialogs2.ycp (revision 38031)
+++ dhcp-server/src/dialogs2.ycp (working copy)
@@ -1849,7 +1849,7 @@ map<string,map<string,any> > new_widgets
],
"other_options" : $[
"widget" : `custom,
- "custom_widget" : `TextEntry (`id("other_opts"), "DHCP Server Start-Up
Arguments"),
+ "custom_widget" : `TextEntry (`id("other_opts"), _("DHCP Server
Start-Up Arguments")),
"init" : OtherOptionsInit,
"validate_type" : `function,
"validate_function" : OtherOptionsValidate,
Index: ldap-server/src/tree_structure.ycp
===================================================================
--- ldap-server/src/tree_structure.ycp (revision 38031)
+++ ldap-server/src/tree_structure.ycp (working copy)
@@ -461,7 +461,7 @@ define boolean cb_input_tls()
{
UI::CloseDialog();
dlg_name = "import";
- UI::OpenDialog(
(term)widget_map["g_tls","dialogs","import"]:`Label( "dialog not found" ) );
+ UI::OpenDialog(
(term)widget_map["g_tls","dialogs","import"]:`Label(_("dialog not found")) );

//fill textentries
UI::ChangeWidget( `te_cert_file, `Value,
importPaths["ServerCertificateFile"]:"" );
@@ -568,7 +568,7 @@ define boolean cb_input_databases()
list<string> dblist = LdapServer::ReadDbList();
integer numDbs = size(dblist);

- UI::OpenDialog(
(term)widget_map["databases","dialogs","adddb"]:`Label( "dialog not found" ) );
+ UI::OpenDialog(
(term)widget_map["databases","dialogs","adddb"]:`Label(_("dialog not found")) );

UI::ChangeWidget( `te_rootdn, `Value, "cn=Administrator" );
UI::ChangeWidget( `te_directory, `Value, "/var/lib/ldap/" );
Index: ipsec/src/IPsecPopups.ycp
===================================================================
--- ipsec/src/IPsecPopups.ycp (revision 38031)
+++ ipsec/src/IPsecPopups.ycp (working copy)
@@ -10,7 +10,7 @@ global string Password(string headline)
UI::OpenDialog(
`VBox(
`Heading(headline),
- `Password(`id(`pass), "Password:"),
+ `Password(`id(`pass), _("Password:")),
`VSpacing(0.5),
`HBox(
`PushButton(`id(`ok), Label::OKButton()),
Index: x11/src/dialog/x11Dialog.ycp
===================================================================
--- x11/src/dialog/x11Dialog.ycp (revision 38031)
+++ x11/src/dialog/x11Dialog.ycp (working copy)
@@ -27,6 +27,7 @@ textdomain "x11";
// Imports...
//--------------------------------
import "XMessages";
+import "Label";
import "Popup";

//================================
@@ -61,8 +62,8 @@ define string setupColors ( string curre
]
)),
`Right (`HBox (
- `PushButton(`id(`ok),"&OK"),
- `PushButton(`id(`cancel),"&Cancel")
+ `PushButton(`id(`ok),Label::OKButton()),
+ `PushButton(`id(`cancel),Label::CancelButton())
))
)
);
@@ -112,8 +113,8 @@ define string setupResolutions (
`VBox(
`HBox(`Left ( `ComboBox(`id(`resitem),topic, reslist))),
`Right (`HBox (
- `PushButton(`id(`ok),"&OK"),
- `PushButton(`id(`cancel),"&Cancel")
+ `PushButton(`id(`ok),Label::OKButton()),
+ `PushButton(`id(`cancel),Label::CancelButton())
))
)
);
@@ -152,8 +153,8 @@ define list<string> setupDisplaySize (
`Right ( `ComboBox(`id(`ratiositem),topic2,
ratioslist))
),
`Right (`HBox (
- `PushButton(`id(`ok),"&OK"),
- `PushButton(`id(`cancel),"&Cancel")
+ `PushButton(`id(`ok),Label::OKButton()),
+ `PushButton(`id(`cancel),Label::CancelButton())
))
)
);
@@ -197,8 +198,8 @@ define list setupMonitor (
`SelectionBox(`id(`model) ,`opt(`notify,`immediate),"",
[])
),
`Right( `HBox (
- `PushButton(`id(`ok),"&OK"),
- `PushButton(`id(`cancel),"&Cancel")
+ `PushButton(`id(`ok),Label::OKButton()),
+ `PushButton(`id(`cancel),Label::CancelButton())
))
)
);
#!/bin/bash

CVSHEAD="/local/src/yast"

checkycp="$CVSHEAD/source/devtools/yast2/check_ycp/check_ycp"
files="$(find "${@:-.}" -name "*.ycp"| grep -vE '/(examples|testsuite)/')"

test -z "$files" || $checkycp $files 2>&1
< Previous Next >