Support i18n
This commit is contained in:
parent
8dcacbd823
commit
30a6e01e44
|
|
@ -134,7 +134,7 @@ class PucGitHubChecker_2_3 extends PluginUpdateChecker_2_3 {
|
|||
if ( empty($info->sections['changelog']) ) {
|
||||
$info->sections['changelog'] = $this->getRemoteChangelog($ref);
|
||||
if ( empty($info->sections['changelog']) ) {
|
||||
$info->sections['changelog'] = 'There is no changelog available.';
|
||||
$info->sections['changelog'] = __('There is no changelog available.', 'plugin-update-checker');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,41 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: plugin-update-checker\n"
|
||||
"POT-Creation-Date: 2016-01-11 21:23+0100\n"
|
||||
"PO-Revision-Date: 2016-01-11 21:25+0100\n"
|
||||
"Last-Translator: Tamás András Horváth <htomy92@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: hu_HU\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.6\n"
|
||||
"X-Poedit-Basepath: ..\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: github-checker.php:137
|
||||
msgid "There is no changelog available."
|
||||
msgstr "Nem érhető el a changelog."
|
||||
|
||||
#: plugin-update-checker.php:852
|
||||
msgid "Check for updates"
|
||||
msgstr "Frissítés ellenőrzése"
|
||||
|
||||
#: plugin-update-checker.php:896
|
||||
msgid "This plugin is up to date."
|
||||
msgstr "Ez a plugin naprakész."
|
||||
|
||||
#: plugin-update-checker.php:898
|
||||
msgid "A new version of this plugin is available."
|
||||
msgstr "Új verzió érhető el a kiegészítőhöz"
|
||||
|
||||
#: plugin-update-checker.php:900
|
||||
#, php-format
|
||||
msgid "Unknown update checker status \"%s\""
|
||||
msgstr "Ismeretlen a frissítés ellenőrző státusza \"%s\""
|
||||
|
||||
#~ msgid "Every %d hours"
|
||||
#~ msgstr "Minden %d órában"
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: plugin-update-checker\n"
|
||||
"POT-Creation-Date: 2016-01-11 21:22+0100\n"
|
||||
"PO-Revision-Date: 2016-01-10 20:59+0100\n"
|
||||
"Last-Translator: Tamás András Horváth <htomy92@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: en_US\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.6\n"
|
||||
"X-Poedit-Basepath: ..\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
"X-Poedit-KeywordsList: __;_e\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: github-checker.php:137
|
||||
msgid "There is no changelog available."
|
||||
msgstr ""
|
||||
|
||||
#: plugin-update-checker.php:852
|
||||
msgid "Check for updates"
|
||||
msgstr ""
|
||||
|
||||
#: plugin-update-checker.php:896
|
||||
msgid "This plugin is up to date."
|
||||
msgstr ""
|
||||
|
||||
#: plugin-update-checker.php:898
|
||||
msgid "A new version of this plugin is available."
|
||||
msgstr ""
|
||||
|
||||
#: plugin-update-checker.php:900
|
||||
#, php-format
|
||||
msgid "Unknown update checker status \"%s\""
|
||||
msgstr ""
|
||||
|
|
@ -159,6 +159,9 @@ class PluginUpdateChecker_2_3 {
|
|||
add_filter('upgrader_package_options', array($this, 'setUpgradedPluginFromOptions'), 10, 1);
|
||||
add_filter('upgrader_post_install', array($this, 'clearUpgradedPlugin'), 10, 1);
|
||||
add_action('upgrader_process_complete', array($this, 'clearUpgradedPlugin'), 10, 1);
|
||||
|
||||
//Adding language support (i18n)
|
||||
load_plugin_textdomain( 'plugin-update-checker', false, plugin_basename( dirname( __FILE__ ) ) . '/languages' );
|
||||
|
||||
//Allow HTTP requests to the metadata URL even if it's on a local host.
|
||||
$this->metadataHost = @parse_url($this->metadataUrl, PHP_URL_HOST);
|
||||
|
|
@ -846,7 +849,7 @@ class PluginUpdateChecker_2_3 {
|
|||
'puc_check_for_updates'
|
||||
);
|
||||
|
||||
$linkText = apply_filters('puc_manual_check_link-' . $this->slug, 'Check for updates');
|
||||
$linkText = apply_filters('puc_manual_check_link-' . $this->slug, __('Check for updates', 'plugin-update-checker'));
|
||||
if ( !empty($linkText) ) {
|
||||
$pluginMeta[] = sprintf('<a href="%s">%s</a>', esc_attr($linkUrl), $linkText);
|
||||
}
|
||||
|
|
@ -890,11 +893,11 @@ class PluginUpdateChecker_2_3 {
|
|||
if ( isset($_GET['puc_update_check_result'], $_GET['puc_slug']) && ($_GET['puc_slug'] == $this->slug) ) {
|
||||
$status = strval($_GET['puc_update_check_result']);
|
||||
if ( $status == 'no_update' ) {
|
||||
$message = 'This plugin is up to date.';
|
||||
$message = __('This plugin is up to date.', 'plugin-update-checker');
|
||||
} else if ( $status == 'update_available' ) {
|
||||
$message = 'A new version of this plugin is available.';
|
||||
$message = __('A new version of this plugin is available.', 'plugin-update-checker');
|
||||
} else {
|
||||
$message = sprintf('Unknown update checker status "%s"', htmlentities($status));
|
||||
$message = sprintf( __('Unknown update checker status "%s"', 'plugin-update-checker'), htmlentities($status));
|
||||
}
|
||||
printf(
|
||||
'<div class="updated notice is-dismissible"><p>%s</p></div>',
|
||||
|
|
|
|||
Loading…
Reference in New Issue