@@ -83,26 +83,65 @@ Feature: Generate PHP files from PO files
8383 Given an empty foo-plugin directory
8484 And a foo-plugin/foo-plugin-de_DE.po file:
8585 """
86- # Copyright (C) 2018 Foo Plugin
87- # This file is distributed under the same license as the Foo Plugin package.
86+ # Translation of 5.2.x in German
87+ # This file is distributed under the same license as the 5.2.x package.
8888 msgid ""
8989 msgstr ""
90- "Project-Id-Version: Foo Plugin\n"
91- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/foo-plugin\n"
92- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
93- "Language-Team: LANGUAGE <LL@li.org>\n"
94- "Language: de_DE\n"
90+ "PO-Revision-Date: 2019-03-28 19:42+0300\n"
9591 "MIME-Version: 1.0\n"
9692 "Content-Type: text/plain; charset=UTF-8\n"
9793 "Content-Transfer-Encoding: 8bit\n"
98- "POT-Creation-Date: 2018-05-02T22:06:24+00:00\n"
99- "PO-Revision-Date: 2018-05-02T22:06:24+00:00\n"
100- "X-Domain: foo-plugin\n"
101- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
102-
103- #: foo-plugin.js:15
104- msgid "Foo Plugin"
105- msgstr "Foo Plugin"
94+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
95+ "X-Generator: Poedit 2.2.1\n"
96+ "Project-Id-Version: Development (5.2.x)\n"
97+ "Language: de_DE\n"
98+ "POT-Creation-Date: \n"
99+ "Last-Translator: \n"
100+ "Language-Team: \n"
101+
102+ #. translators: Translate this to the correct language tag for your locale, see
103+ #. https://www.w3.org/International/articles/language-tags/ for reference. Do
104+ #. not translate into your own language.
105+ #: wp-includes/general-template.php:716
106+ msgid "html_lang_attribute"
107+ msgstr "de-DE"
108+
109+ #. translators: 'rtl' or 'ltr'. This sets the text direction for WordPress.
110+ #: wp-includes/class-wp-locale.php:223
111+ msgctxt "text direction"
112+ msgid "ltr"
113+ msgstr "ltr"
114+
115+ #. translators: $dec_point argument for https://secure.php.net/number_format,
116+ #. default is .
117+ #: wp-includes/class-wp-locale.php:215
118+ msgid "number_format_decimal_point"
119+ msgstr ","
120+
121+ #. translators: $thousands_sep argument for
122+ #. https://secure.php.net/number_format, default is ,
123+ #: wp-includes/class-wp-locale.php:202
124+ msgid "number_format_thousands_sep"
125+ msgstr "."
126+
127+ #. translators: %s: Plugin name and version
128+ #: wp-includes/script-loader.php:620
129+ msgid "Update %s now"
130+ msgstr "Jetzt %s aktualisieren"
131+
132+ #. translators: Privacy data request subject. 1: Site name, 2: Name of the action
133+ #: wp-includes/user.php:3445
134+ msgid "[%1$s] Confirm Action: %2$s"
135+ msgstr "[%1$s] Aktion bestätigen: %2$s"
136+
137+ #. translators: %s: Site name.
138+ #: wp-includes/user.php:3175
139+ msgid "[%s] Erasure Request Fulfilled"
140+ msgstr "[%s] Löschauftrag ausgeführt"
141+
142+ #: wp-admin/includes/file.php:2415
143+ msgid "[%s] Personal Data Export"
144+ msgstr "[%s] Export personenbezogener Daten"
106145 """
107146
108147 When I run `wp i18n make-php foo-plugin`
@@ -114,19 +153,8 @@ Feature: Generate PHP files from PO files
114153 And STDERR should be empty
115154 And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain:
116155 """
117- 'language'=>'de_DE'
118- """
119- And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain:
120- """
121- 'domain'=>'foo-plugin'
122- """
123- And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain:
124- """
125- 'plural-forms'=>'nplurals=2; plural=(n != 1);'
126- """
127- And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain:
128- """
129- 'messages'=>['Foo Plugin'=>'Foo Plugin']
156+ <?php
157+ return ['domain'=>NULL,'plural-forms'=>'nplurals=2; plural=n != 1;','language'=>'de_DE','project-id-version'=>'Development (5.2.x)','pot-creation-date'=>'','po-revision-date'=>'2019-03-28 19:42+0300','x-generator'=>'Poedit 2.2.1','messages'=>['html_lang_attribute'=>'de-DE','text directionltr'=>'ltr','number_format_decimal_point'=>',','number_format_thousands_sep'=>'.','Update %s now'=>'Jetzt %s aktualisieren','[%1$s] Confirm Action: %2$s'=>'[%1$s] Aktion bestätigen: %2$s','[%s] Erasure Request Fulfilled'=>'[%s] Löschauftrag ausgeführt','[%s] Personal Data Export'=>'[%s] Export personenbezogener Daten']];
130158 """
131159
132160 Scenario : Does include translations
@@ -174,5 +202,5 @@ Feature: Generate PHP files from PO files
174202 And the return code should be 0
175203 And the foo-plugin/foo-plugin-de_DE.l10n.php file should contain:
176204 """
177- return ['domain'=>'foo-plugin','plural-forms'=>'nplurals=2; plural=(n != 1);','messages'=>['Plugin NameFoo Plugin (EN)'=>'Foo Plugin (DE)','Foo Plugin'=>'Bar Plugin','You have %d new message'=>'Sie haben %d neue Nachricht' . "\0" . 'Sie haben %d neue Nachrichten'],'language'=>'de_DE' ];
205+ return ['domain'=>'foo-plugin','plural-forms'=>'nplurals=2; plural=(n != 1);','language'=>'de_DE','project-id-version'=>'Foo Plugin','pot-creation-date'=>'2018-05-02T22:06:24+00:00','po-revision-date'=>'2018-05-02T22:06:24+00:00',' messages'=>['Plugin NameFoo Plugin (EN)'=>'Foo Plugin (DE)','Foo Plugin'=>'Bar Plugin','You have %d new message'=>'Sie haben %d neue Nachricht' . "\0" . 'Sie haben %d neue Nachrichten']];
178206 """
0 commit comments