Skip to content

Commit

Permalink
Added plugin language translation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joan López committed May 23, 2018
1 parent a804003 commit c7063e6
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 0 deletions.
1 change: 1 addition & 0 deletions core-standards.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function classloader($class) {
add_action('wp_upgrade', __NAMESPACE__ . '\Schema::ensureUploadsHtaccess');

add_action('widgets_init', __NAMESPACE__ . '\Widgets\UserLoginFormWidget::init');
add_action('plugins_loaded', __NAMESPACE__ . '\Plugin::loadTextdomain');
add_action('init', __NAMESPACE__ . '\Plugin::init', 20);
add_action('admin_init', __NAMESPACE__ . '\Admin::init');
// Adds settings fields to 'Reading' settings page, after 'Search Engine visibility'.
Expand Down
Binary file added languages/core-standards-de_DE_formal.mo
Binary file not shown.
126 changes: 126 additions & 0 deletions languages/core-standards-de_DE_formal.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
msgid ""
msgstr ""
"Project-Id-Version: core-standards\n"
"POT-Creation-Date: 2018-05-10 15:49+0200\n"
"PO-Revision-Date: 2018-05-11 15:19+0200\n"
"Last-Translator: Joan Lopez <[email protected]>\n"
"Language-Team: Joan Lopez <[email protected]>\n"
"Language: de_DE@formal\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.7\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: core-standards.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"

#: src/OptOut.php:114 templates/settings.php:10
msgid "WordPress Core Standards Settings"
msgstr ""

#: src/OptOut.php:114
msgid "WordPress Core Standards"
msgstr ""

#: src/OptOut.php:130
msgid "Google Analytics tracking has been disabled."
msgstr "Google Analytics-Tracking wurde deaktiviert."

#: src/UserFrontend.php:125
msgid "Register"
msgstr ""

#: src/UserFrontend.php:136
msgid "Register For This Site"
msgstr ""

#: src/UserLoginForm.php:75
msgid "Log in"
msgstr ""

#: src/UserLoginForm.php:104
msgid "Log out"
msgstr ""

#: src/UserLoginForm.php:116
msgid "Reset Password"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:19
msgid "User Login Form"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:53
msgid "Login redirect"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:55
msgid "Leave empty to redirect to current page."
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:58
msgid "User profile path"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:60
msgid "Defaults to \"user\"."
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:65
msgid "Show login link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:71
msgid "Show reset link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:77
msgid "Show profile link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:83
msgid "Show logout link"
msgstr ""

#: templates/settings.php:11
msgid "Google Analytics Opt-Out"
msgstr ""

#: templates/settings.php:17
msgid "Google Analytics IDs"
msgstr ""

#: templates/settings.php:23
msgid "Google Analytics Opt-Out script"
msgstr ""

#: templates/settings.php:27
msgid "Restore default script"
msgstr "Standardskript wiederherstellen"

#: templates/settings.php:32
msgid "Activate Opt-Out"
msgstr "Aktivieren Opt-Out"

#. Plugin Name of the plugin/theme
msgid "Core Standards"
msgstr ""

#. Description of the plugin/theme
msgid "Standard refinements."
msgstr ""

#. Author of the plugin/theme
msgid "netzstrategen"
msgstr ""

#. Author URI of the plugin/theme
msgid "http://www.netzstrategen.com"
msgstr ""
127 changes: 127 additions & 0 deletions languages/core-standards.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
#, fuzzy
msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: core-standards\n"
"POT-Creation-Date: 2018-05-11 15:18+0200\n"
"PO-Revision-Date: 2018-05-10 10:20+0200\n"
"Last-Translator: Joan Lopez <[email protected]>\n"
"Language-Team: Joan Lopez <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.7\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: core-standards.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;"
"_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.js\n"

#: src/TrackingOptOut.php:55 src/TrackingOptOut.php:160
#: templates/settings.php:10
msgid "WordPress Core Standards Settings"
msgstr ""

#: src/TrackingOptOut.php:62 templates/settings.php:17
msgid "Google Analytics IDs"
msgstr ""

#: src/TrackingOptOut.php:70 templates/settings.php:32
msgid "Activate Opt-Out"
msgstr ""

#: src/TrackingOptOut.php:160
msgid "WordPress Core Standards"
msgstr ""

#: src/TrackingOptOut.php:176
msgid "Google Analytics tracking has been disabled."
msgstr ""

#: src/UserFrontend.php:125
msgid "Register"
msgstr ""

#: src/UserFrontend.php:136
msgid "Register For This Site"
msgstr ""

#: src/UserLoginForm.php:75
msgid "Log in"
msgstr ""

#: src/UserLoginForm.php:104
msgid "Log out"
msgstr ""

#: src/UserLoginForm.php:116
msgid "Reset Password"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:19
msgid "User Login Form"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:53
msgid "Login redirect"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:55
msgid "Leave empty to redirect to current page."
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:58
msgid "User profile path"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:60
msgid "Defaults to \"user\"."
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:65
msgid "Show login link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:71
msgid "Show reset link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:77
msgid "Show profile link"
msgstr ""

#: src/Widgets/UserLoginFormWidget.php:83
msgid "Show logout link"
msgstr ""

#: templates/settings.php:11
msgid "Google Analytics Opt-Out"
msgstr ""

#: templates/settings.php:23
msgid "Google Analytics Opt-Out script"
msgstr ""

#: templates/settings.php:27
msgid "Restore default script"
msgstr ""

#. Plugin Name of the plugin/theme
msgid "Core Standards"
msgstr ""

#. Description of the plugin/theme
msgid "Standard refinements."
msgstr ""

#. Author of the plugin/theme
msgid "netzstrategen"
msgstr ""

#. Author URI of the plugin/theme
msgid "http://www.netzstrategen.com"
msgstr ""
7 changes: 7 additions & 0 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,13 @@ public static function wp_insert_post_data($data) {
return $data;
}

/**
* Loads the plugin textdomain.
*/
public static function loadTextdomain() {
load_plugin_textdomain(static::L10N, FALSE, static::L10N . '/languages/');
}

/**
* Renders a given plugin template, optionally overridden by the theme.
*
Expand Down

0 comments on commit c7063e6

Please sign in to comment.