mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
I18N: Remove the requirement to call load_plugin_textdomain() / load_theme_textdomain().
By initially scanning the `wp-content/languages` directory and loading available MO files just-in-time, plugins and themes do not need to manually load text domains anymore. Props swissspidy, ocean90. Fixes #34114 git-svn-id: https://develop.svn.wordpress.org/trunk@37415 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2015-12-31 16:31+0100\n"
|
||||
"PO-Revision-Date: 2016-04-28 18:50+0200\n"
|
||||
"Last-Translator: Pascal Birchler <pascal@required.ch>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.4\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
||||
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
||||
"esc_html_x:1,2c\n"
|
||||
"X-Textdomain-Support: yes\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: internationalized-plugin.php:11
|
||||
msgid "This is a dummy plugin"
|
||||
msgstr "Das ist ein Dummy Plugin"
|
||||
Binary file not shown.
@@ -0,0 +1,23 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2015-12-31 16:38+0100\n"
|
||||
"PO-Revision-Date: 2016-04-28 18:50+0200\n"
|
||||
"Last-Translator: Pascal Birchler <pascal@required.ch>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: de_DE\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 1.8.4\n"
|
||||
"X-Poedit-Basepath: .\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Poedit-KeywordsList: __;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;"
|
||||
"_nx_noop:1,2,3c;esc_attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;"
|
||||
"esc_html_x:1,2c\n"
|
||||
"X-Textdomain-Support: yes\n"
|
||||
"X-Poedit-SearchPath-0: .\n"
|
||||
|
||||
#: functions.php:7
|
||||
msgid "This is a dummy theme"
|
||||
msgstr "Das ist ein Dummy Theme"
|
||||
12
tests/phpunit/data/plugins/internationalized-plugin.php
Normal file
12
tests/phpunit/data/plugins/internationalized-plugin.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/*
|
||||
Plugin Name: Dummy Plugin
|
||||
Plugin URI: https://wordpress.org/
|
||||
Description: For testing purposes only.
|
||||
Version: 1.0.0
|
||||
Text Domain: internationalized-plugin
|
||||
*/
|
||||
|
||||
function i18n_plugin_test() {
|
||||
return __( 'This is a dummy plugin', 'internationalized-plugin' );
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
/**
|
||||
* Dummy theme.
|
||||
*/
|
||||
|
||||
function i18n_theme_test() {
|
||||
return __( 'This is a dummy theme', 'internationalized-theme' );
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Dummy theme.
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
/*
|
||||
Theme Name: Internationalized Theme
|
||||
Theme URI: https://wordpress.org/
|
||||
Description: For testing purposes only.
|
||||
Version: 1.0.0
|
||||
Text Domain: internationalized-theme
|
||||
*/
|
||||
Reference in New Issue
Block a user