hello.ycp revision 1.1 1 // Example for use of GNU gettext.
2 // Copyright (C) 2003 Free Software Foundation, Inc.
3 // This file is in the public domain.
4
5 // Source code of the YCP program.
6
7 UI(``{
8 textdomain "hello-ycp";
9
10 map bash_out = SCR::Execute (.target.bash_output, "echo $PPID");
11 integer pid = tointeger (bash_out["stdout"]:"99999");
12
13 OpenDialog (
14 `VBox (
15 `HBox (
16 `Label (_("Hello, world!")),
17 `HStretch ()
18 ),
19 `HBox (
20 `Label (sformat (_("This program is running as process number %1."), pid)),
21 `HStretch ()
22 ),
23 `HBox (
24 `HStretch (),
25 `PushButton (`opt(`default), "&OK")
26 )
27 )
28 );
29 UserInput();
30 CloseDialog();
31 })
32