Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 8687d34fdaebc45b38e16d29a4190db0 > files > 1283

gettext-devel-0.17-1mdv2008.1.x86_64.rpm

// Example for use of GNU gettext.
// This file is in the public domain.

// Source code of the YCP program.

UI(``{
    textdomain "hello-ycp";

    map bash_out = SCR::Execute (.target.bash_output, "echo $PPID");
    integer pid = tointeger (bash_out["stdout"]:"99999");

    OpenDialog (
        `VBox (
             `HBox (
                  `Label (_("Hello, world!")),
                  `HStretch ()
                  ),
             `HBox (
                  `Label (sformat (_("This program is running as process number %1."), pid)),
                  `HStretch ()
                  ),
             `HBox (
                  `HStretch (),
                  `PushButton (`opt(`default), "&OK")
                  )
             )
        );
    UserInput();
    CloseDialog();
})