当前位置: 首页>>代码示例>>PHP>>正文


PHP _pgettext函数代码示例

本文整理汇总了PHP中_pgettext函数的典型用法代码示例。如果您正苦于以下问题:PHP _pgettext函数的具体用法?PHP _pgettext怎么用?PHP _pgettext使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_pgettext函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: PMA_RTE_getFooterLinks

/**
 * Creates a fieldset for adding a new item, if the user has the privileges.
 *
 * @param string $docu String used to create a link to the MySQL docs
 * @param string $priv Privilege to check for adding a new item
 * @param string $name MySQL name of the item
 *
 * @return string An HTML snippet with the link to add a new item
 */
function PMA_RTE_getFooterLinks($docu, $priv, $name)
{
    global $db, $url_query, $ajax_class;
    $icon = 'b_' . strtolower($name) . '_add.png';
    $retval = "";
    $retval .= "<!-- ADD " . $name . " FORM START -->\n";
    $retval .= "<fieldset class='left'>\n";
    $retval .= "    <legend>" . _pgettext('Create new procedure', 'New') . "</legend>\n";
    $retval .= "        <div class='wrap'>\n";
    if (PMA_Util::currentUserHasPrivilege($priv, $db)) {
        $retval .= "            <a {$ajax_class['add']} ";
        $retval .= "href='db_" . strtolower($name) . "s.php";
        $retval .= "?{$url_query}&amp;add_item=1'>";
        $retval .= PMA_Util::getIcon($icon);
        $retval .= PMA_RTE_getWord('add') . "</a>\n";
    } else {
        $retval .= "            " . PMA_Util::getIcon($icon);
        $retval .= PMA_RTE_getWord('no_create') . "\n";
    }
    $retval .= "            " . PMA_Util::showMySQLDocu('SQL-Syntax', $docu) . "\n";
    $retval .= "        </div>\n";
    $retval .= "</fieldset>\n";
    $retval .= "<!-- ADD " . $name . " FORM END -->\n\n";
    return $retval;
}
开发者ID:mindfeederllc,项目名称:openemr,代码行数:34,代码来源:rte_footer.lib.php

示例2: testShowPHPDocu

 /**
  * Test for showPHPDocu
  *
  * @return void
  */
 function testShowPHPDocu()
 {
     $target = "docu";
     $lang = _pgettext('PHP documentation language', 'en');
     $expected = '<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target . '" target="documentation">' . '<img src="themes/dot.gif" title="' . __('Documentation') . '" alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';
     $this->assertEquals($expected, PMA\libraries\Util::showPHPDocu($target));
 }
开发者ID:itgsod-philip-skalander,项目名称:phpmyadmin,代码行数:12,代码来源:PMA_showPHPDocu_test.php

示例3: PMA_RTE_getFooterLinks

/**
 * Creates a fieldset for adding a new item, if the user has the privileges.
 *
 * @param string $docu String used to create a link to the MySQL docs
 * @param string $priv Privilege to check for adding a new item
 * @param string $name MySQL name of the item
 *
 * @return string An HTML snippet with the link to add a new item
 */
function PMA_RTE_getFooterLinks($docu, $priv, $name)
{
    global $db, $table, $url_query, $ajax_class;
    $icon = mb_strtolower($name) . '_add.png';
    $retval = "";
    $retval .= "<!-- ADD " . $name . " FORM START -->\n";
    $retval .= "<fieldset class='left'>\n";
    $retval .= "<legend>" . _pgettext('Create new procedure', 'New') . "</legend>\n";
    $retval .= "        <div class='wrap'>\n";
    if (PMA\libraries\Util::currentUserHasPrivilege($priv, $db, $table)) {
        $retval .= "            <a {$ajax_class['add']} ";
        $retval .= "href='db_" . mb_strtolower($name) . "s.php";
        $retval .= "{$url_query}&amp;add_item=1' ";
        $retval .= "onclick='\$.datepicker.initialized = false;'>";
        $icon = 'b_' . $icon;
        $retval .= PMA\libraries\Util::getIcon($icon);
        $retval .= PMA_RTE_getWord('add') . "</a>\n";
    } else {
        $icon = 'bd_' . $icon;
        $retval .= PMA\libraries\Util::getIcon($icon);
        $retval .= PMA_RTE_getWord('add') . "\n";
    }
    $retval .= "            " . PMA\libraries\Util::showMySQLDocu($docu) . "\n";
    $retval .= "        </div>\n";
    $retval .= "</fieldset>\n";
    $retval .= "<!-- ADD " . $name . " FORM END -->\n\n";
    return $retval;
}
开发者ID:pjiahao,项目名称:phpmyadmin,代码行数:37,代码来源:rte_footer.lib.php

示例4: testGettext

 public function testGettext()
 {
     $this->assertEquals('Typ', _gettext('Type'));
     $this->assertEquals('Typ', __('Type'));
     $this->assertEquals('%d sekundy', _ngettext('%d second', '%d seconds', 2));
     $this->assertEquals('%d seconds', _npgettext('context', '%d second', '%d seconds', 2));
     $this->assertEquals('Tabulka', _pgettext('Display format', 'Table'));
 }
开发者ID:phpmyadmin,项目名称:motranslator,代码行数:8,代码来源:FunctionsTest.php

示例5: testShwoPHPDocuNotReplaceHelpImg

 function testShwoPHPDocuNotReplaceHelpImg()
 {
     $GLOBALS['cfg']['ReplaceHelpImg'] = false;
     $target = "docu";
     $lang = _pgettext('PHP documentation language', 'en');
     $expected = '[<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang . '%2F' . $target . '&amp;server=99&amp;lang=en&amp;token=token' . '" target="documentation">' . __('Documentation') . '</a>]';
     $this->assertEquals($expected, PMA_showPHPDocu($target));
 }
开发者ID:bugyak,项目名称:phporadmin,代码行数:8,代码来源:PMA_showPHPDocu_test.php

示例6: __construct

 /**
  * Initialises the class
  *
  * @param string $name An identifier for the new node
  *
  * @return Node_Database_Container
  */
 public function __construct($name)
 {
     parent::__construct($name, Node::CONTAINER);
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new database', 'New'));
     $new->isNew = $GLOBALS['is_create_db_priv'];
     $new->icon = PMA_Util::getImage('b_newdb.png', '');
     $new->links = array('text' => 'server_databases.php?server=' . $GLOBALS['server'] . '&amp;token=' . $GLOBALS['token'], 'icon' => 'server_databases.php?server=' . $GLOBALS['server'] . '&amp;token=' . $GLOBALS['token']);
     $new->classes = 'new_database italics';
     $this->addChild($new);
 }
开发者ID:yszar,项目名称:linuxwp,代码行数:17,代码来源:Node_Database_Container.class.php

示例7: testPMAGetHtmlForChartTypeOptions

 /**
  * Tests for PMA_getHtmlForChartTypeOptions() method.
  *
  * @return void
  * @test
  */
 public function testPMAGetHtmlForChartTypeOptions()
 {
     $html = PMA_getHtmlForChartTypeOptions();
     $this->assertContains(_pgettext('Chart type', 'Bar'), $html);
     $this->assertContains(_pgettext('Chart type', 'Column'), $html);
     $this->assertContains(_pgettext('Chart type', 'Line'), $html);
     $this->assertContains(_pgettext('Chart type', 'Spline'), $html);
     $this->assertContains(_pgettext('Chart type', 'Area'), $html);
     $this->assertContains(_pgettext('Chart type', 'Pie'), $html);
     $this->assertContains(_pgettext('Chart type', 'Timeline'), $html);
 }
开发者ID:xtreme-jamil-shamy,项目名称:phpmyadmin-cf,代码行数:17,代码来源:PMA_tbl_chart_test.php

示例8: __construct

 /**
  * Initialises the class
  *
  * @param string $name An identifier for the new node
  */
 public function __construct($name)
 {
     parent::__construct($name, Node::CONTAINER);
     if ($GLOBALS['is_create_db_priv'] && $GLOBALS['cfg']['ShowCreateDb'] !== false) {
         $new = NodeFactory::getInstance('Node', _pgettext('Create new database', 'New'));
         $new->isNew = true;
         $new->icon = PMA\libraries\Util::getImage('b_newdb.png', '');
         $new->links = array('text' => 'server_databases.php?server=' . $GLOBALS['server'], 'icon' => 'server_databases.php?server=' . $GLOBALS['server']);
         $new->classes = 'new_database italics';
         $this->addChild($new);
     }
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:17,代码来源:NodeDatabaseContainer.php

示例9: __construct

 /**
  * Initialises the class
  *
  * @return Node_Column_Container
  */
 public function __construct()
 {
     parent::__construct(__('Columns'), Node::CONTAINER);
     $this->icon = PMA_Util::getImage('pause.png', '');
     $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $GLOBALS['token'], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $GLOBALS['token']);
     $this->real_name = 'columns';
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new column', 'New'));
     $new->isNew = true;
     $new->icon = PMA_Util::getImage('b_column_add.png', '');
     $new->links = array('text' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;table=%2$s' . '&amp;field_where=last&after_field=' . '&amp;token=' . $GLOBALS['token'], 'icon' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;table=%2$s' . '&amp;field_where=last&after_field=' . '&amp;token=' . $GLOBALS['token']);
     $new->classes = 'new_column italics';
     $this->addChild($new);
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:18,代码来源:Node_Column_Container.class.php

示例10: __construct

 /**
  * Initialises the class
  *
  * @return Node_Column_Container
  */
 public function __construct()
 {
     parent::__construct(__('Functions'), Node::CONTAINER);
     $this->icon = PMA_Util::getImage('b_routines.png');
     $this->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $GLOBALS['token'], 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $GLOBALS['token']);
     $this->real_name = 'functions';
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new function', 'New'));
     $new->isNew = true;
     $new->icon = PMA_Util::getImage('b_routine_add.png', '');
     $new->links = array('text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $GLOBALS['token'] . '&add_item=1&amp;item_type=FUNCTION', 'icon' => 'db_routines.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $GLOBALS['token'] . '&add_item=1&amp;item_type=FUNCTION');
     $new->classes = 'new_function italics';
     $this->addChild($new);
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:18,代码来源:Node_Function_Container.class.php

示例11: testShowPHPDocu

    function testShowPHPDocu()
    {
        $target = "docu";
        $lang = _pgettext('PHP documentation language', 'en');
        $expected = '<a href="./url.php?url=http%3A%2F%2Fphp.net%2Fmanual%2F' . $lang
            . '%2F' . $target . '&amp;server=99&amp;lang=en&amp;token=token'
            . '" target="documentation"><img src="themes/dot.gif" title="'
            . __('Documentation') . '" alt="' . __('Documentation') . '" class="icon ic_b_help" /></a>';

        $this->assertEquals(
            $expected, PMA_CommonFunctions::getInstance()->showPHPDocu($target)
        );
    }
开发者ID:rajatsinghal,项目名称:phpmyadmin,代码行数:13,代码来源:PMA_showPHPDocu_test.php

示例12: __construct

 /**
  * Initialises the class
  *
  * @return Node_Event_Container
  */
 public function __construct()
 {
     parent::__construct(__('Events'), Node::CONTAINER);
     $this->icon = PMA_Util::getImage('b_events.png', '');
     $this->links = array('text' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $_SESSION[' PMA_token '], 'icon' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $_SESSION[' PMA_token ']);
     $this->real_name = 'events';
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new event', 'New'));
     $new->isNew = true;
     $new->icon = PMA_Util::getImage('b_event_add.png', '');
     $new->links = array('text' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token '] . '&add_item=1', 'icon' => 'db_events.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $_SESSION[' PMA_token '] . '&add_item=1');
     $new->classes = 'new_event italics';
     $this->addChild($new);
 }
开发者ID:hewenhao2008,项目名称:phpmyadmin,代码行数:18,代码来源:Node_Event_Container.class.php

示例13: __construct

 /**
  * Initialises the class
  *
  * @return Node_View_Container
  */
 public function __construct()
 {
     parent::__construct(__('Views'), Node::CONTAINER);
     $this->icon = PMA_Util::getImage('b_views.png', '');
     $this->links = array('text' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $GLOBALS['token'], 'icon' => 'db_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%1$s&amp;token=' . $GLOBALS['token']);
     $this->real_name = 'views';
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new view', 'New'));
     $new->isNew = true;
     $new->icon = PMA_Util::getImage('b_view_add.png', '');
     $new->links = array('text' => 'view_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $GLOBALS['token'], 'icon' => 'view_create.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;token=' . $GLOBALS['token']);
     $new->classes = 'new_view italics';
     $this->addChild($new);
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:18,代码来源:Node_View_Container.class.php

示例14: __construct

 /**
  * Initialises the class
  *
  * @return Node_Index_Container
  */
 public function __construct()
 {
     parent::__construct(__('Indexes'), Node::CONTAINER);
     $this->icon = PMA_Util::getImage('b_index.png', '');
     $this->links = array('text' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $GLOBALS['token'], 'icon' => 'tbl_structure.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s' . '&amp;token=' . $GLOBALS['token']);
     $this->real_name = 'indexes';
     $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new index', 'New'));
     $new->isNew = true;
     $new->icon = PMA_Util::getImage('b_index_add.png', '');
     $new->links = array('text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&amp;create_index=1&amp;added_fields=2' . '&amp;db=%3$s&amp;table=%2$s&amp;token=' . $GLOBALS['token'], 'icon' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&amp;create_index=1&amp;added_fields=2' . '&amp;db=%3$s&amp;table=%2$s&amp;token=' . $GLOBALS['token']);
     $new->classes = 'new_index italics';
     $this->addChild($new);
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:18,代码来源:Node_Index_Container.class.php

示例15: __construct

 /**
  * Initialises the class
  */
 public function __construct()
 {
     parent::__construct(__('Triggers'), Node::CONTAINER);
     $this->icon = PMA\libraries\Util::getImage('b_triggers.png');
     $this->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s', 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%2$s&amp;table=%1$s');
     $this->real_name = 'triggers';
     $new = NodeFactory::getInstance('Node', _pgettext('Create new trigger', 'New'));
     $new->isNew = true;
     $new->icon = PMA\libraries\Util::getImage('b_trigger_add.png', '');
     $new->links = array('text' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;add_item=1', 'icon' => 'db_triggers.php?server=' . $GLOBALS['server'] . '&amp;db=%3$s&amp;add_item=1');
     $new->classes = 'new_trigger italics';
     $this->addChild($new);
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:16,代码来源:NodeTriggerContainer.php


注:本文中的_pgettext函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。