ACC SHELL

Path : /usr/share/YaST2/clients/
File Upload :
Current File : //usr/share/YaST2/clients/country_simple_proposal.ycp

/**
 * File:		country_simple_proposal.ycp
 * Author:		Jiri Suchomel <jsuchome@suse.cz>
 * Purpose:		Proposal for both language and keyboard layout settings.
 *
 * $Id: country_simple_proposal.ycp 33046 2006-09-22 08:18:34Z jsuchome $
 */
{
    textdomain "country";

    import "HTML";
    import "Keyboard";
    import "Language";

    string func  = (string) WFM::Args(0);
    map    param = (map) WFM::Args(1);
    map    ret   = $[];

    if ( func == "MakeProposal" )
    {
	boolean force_reset      = param["force_reset"     ]:false;
	boolean language_changed = param["language_changed"]:false;
	// summary label <%1>-<%2> are HTML tags, leave untouched
	string kbd_proposal	= sformat (_("<%1>Keyboard Layout<%2>: %3"),
			"a href=\"country--keyboard\"", "/a",
			Keyboard::MakeProposal (force_reset, language_changed)
	);
	list<string> proposal	=
	    Language::MakeProposal (force_reset, language_changed);
	// summary label <%1>-<%2> are HTML tags, leave untouched
	proposal[0]	= sformat (_("<%1>Language<%2>: %3"),
			 "a href=\"country--language\"", "/a",
			 Language::GetName ()
	);

	ret = $[
	    "preformatted_proposal" : HTML::List (add (proposal, kbd_proposal)),
	    "language_changed"	: false,
	    "links"	: [ "country--language", "country--keyboard" ]
	];
    }
    else if ( func == "Description" )
    {
	ret	= $[
	    // rich text label
	    "rich_text_title"	:	_("Locale Settings"),
	    "menu_titles"		: [
		// menu button label
		$[ "id"	: "country--language", "title" : _("&Language") ],
		// menu button label
		$[ "id"	: "country--keyboard", "title" : _("&Keyboard Layout") ]
	    ],
	    "id"			: "country",
	];
    }
    else if (func == "AskUser")
    {
	if (param["chosen_id"]:"" == "country--keyboard")
	    ret = (map) WFM::CallFunction ("keyboard_proposal", [func, param]);
	else
	    ret = (map) WFM::CallFunction ("language_proposal", [func, param]);
    }
    return ret;
}

ACC SHELL 2018