1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 07:05:56 +00:00

pluginhost: remove plugin gettext helpers (moved to plugin base class)

This commit is contained in:
Andrew Dolgov
2019-03-05 10:26:23 +03:00
parent c1175070a2
commit 614a4b3b4a
2 changed files with 18 additions and 23 deletions

View File

@@ -1,26 +1,4 @@
<?php
/* gettext helpers for plugins */
function P__($plugin, $msgid) {
return P_gettext($plugin, $msgid);
}
function P_gettext($plugin, $msgid) {
return _dgettext(PLuginHost::object_to_domain($plugin), $msgid);
}
function P_ngettext($plugin, $singular, $plural, $number) {
return _dngettext(PLuginHost::object_to_domain($plugin), $singular, $plural, $number);
}
function P_sprintf() {
$args = func_get_args();
$plugin = array_shift($args);
$msgid = array_shift($args);
return vsprintf(P__($plugin, $msgid), $args);
}
class PluginHost {
private $pdo;
private $hooks = array();