Mailinglist Archive: yast-devel (144 mails)

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

EHm, wrong repo :-|
Updated version against current trunk.

M.


On Tue, 12 Feb 2008, Michal Svec wrote:


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,
Michal
Index: yast2/library/modules/ValueBrowser.ycp
===================================================================
--- yast2/library/modules/ValueBrowser.ycp (revision 44393)
+++ 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: autoinstallation/src/clients/ayast_probe.ycp
===================================================================
--- autoinstallation/src/clients/ayast_probe.ycp (revision 44393)
+++ 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 44393)
+++ 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 44393)
+++ autoinstallation/src/dialogs/general_dialogs.ycp (working copy)
@@ -9,6 +9,7 @@
{
textdomain "autoinst";
import "GetInstArgs";
+ import "Label";


/**
@@ -159,17 +160,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), `opt(`notify,`immediate),
"Label", "" ),
+ `TextEntry( `id(`selLabel), `opt(`notify,`immediate),
_("Label"), "" ),
`TextEntry( `id(`selValue), `opt(`notify,`immediate),
_("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: autoinstallation/src/modules/Profile.ycp
===================================================================
--- autoinstallation/src/modules/Profile.ycp (revision 44393)
+++ autoinstallation/src/modules/Profile.ycp (working copy)
@@ -14,6 +14,7 @@
import "Mode";
import "AutoinstConfig";
import "XML";
+ import "Label";
import "Popup";
import "ProductControl";
import "Directory";
@@ -329,10 +330,10 @@
do {
UI::OpenDialog(
`VBox(
- `Label("Encrypted AutoYaST profile.
Please enter the password twice"),
+ `Label(_("Encrypted AutoYaST profile.
Please enter the password twice")),
`Password(`id(`password), ""),
`Password(`id(`password2), ""),
- `PushButton(`id(`ok), "&OK")
+ `PushButton(`id(`ok),
Label::OKButton())
)
);
any button = nil;
@@ -627,9 +628,9 @@
while( out["stdout"]:"" == "" ) {
UI::OpenDialog(
`VBox(
- `Label("Encrypted AutoYaST profile. Please
enter the correct password."),
+ `Label(_("Encrypted AutoYaST profile. Please
enter the correct password.")),
`Password(`id(`password), ""),
- `PushButton(`id(`ok), "&OK")
+ `PushButton(`id(`ok), Label::OKButton())
)
);
string p = "";
Index: core/agents-perl/doc/ag_background_example.ycp
===================================================================
--- core/agents-perl/doc/ag_background_example.ycp (revision 44393)
+++ 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: network/src/lan/address.ycp
===================================================================
--- network/src/lan/address.ycp (revision 44393)
+++ network/src/lan/address.ycp (working copy)
@@ -592,7 +592,7 @@ map<string, map<string,any> > widget_des
`HSpacing(1),
`TextEntry(`id(`netmask), _("&Subnet Mask")),
`HSpacing(1),
- `TextEntry(`id(`hostname), "&Hostname"),
+ `TextEntry(`id(`hostname), _("&Hostname")),
`HStretch()
)
)
Index: network/src/lan/hardware.ycp
===================================================================
--- network/src/lan/hardware.ycp (revision 44393)
+++ network/src/lan/hardware.ycp (working copy)
@@ -412,7 +412,7 @@ symbol handleHW (string key, map event)
`VBox(
`RadioButtonGroup(`id(`udev_type),
`VBox(
- `Label("Rule by:"),
+ `Label(_("Rule by:")),
`Left(`RadioButton(`id(`mac), sformat("MAC address : %1",
LanItems::getCurrentItem()["hwinfo", "mac"]:""))),
`Left(`RadioButton(`id(`busid), sformat("BusID : %1",
LanItems::getCurrentItem()["hwinfo", "busid"]:"") ))
)
Index: kerberos-server/src/complex.ycp
===================================================================
--- kerberos-server/src/complex.ycp (revision 44393)
+++ 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
@@ -352,7 +352,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: ldap-server/src/tree_structure.ycp
===================================================================
--- ldap-server/src/tree_structure.ycp (revision 44393)
+++ 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: squid/src/popup_dialogs.ycp
===================================================================
--- squid/src/popup_dialogs.ycp (revision 44393)
+++ squid/src/popup_dialogs.ycp (working copy)
@@ -53,7 +53,7 @@ boolean AddEditHttpPortDialog(integer id
`VSpacing(0.5),
`TextEntry(`id("host"), _("Host"), ""),
`TextEntry(`id("port"), _("Port"), ""),
- `Left(`CheckBox(`id("transparent"), "Transparent", false)),
+ `Left(`CheckBox(`id("transparent"), _("Transparent"), false)),
`VSpacing(),
`VStretch(),
`HBox(
Index: ipsec/src/IPsecPopups.ycp
===================================================================
--- ipsec/src/IPsecPopups.ycp (revision 44393)
+++ 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 44393)
+++ 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())
))
)
);
< Previous Next >
References