Skip to content

Commit 4f6220f

Browse files
authored
Define the language suggest strings in the lang-suggest endpoints. (#693)
* Define the language strings in the language-suggest block. * Move strings to REST API endpoint. * Add a note that the plugins locale banner isn't actually used.
1 parent 61aee1f commit 4f6220f

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

mu-plugins/rest-api/endpoints/class-wporg-base-locale-banner-controller.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,17 @@ public function send_plain_text( $result ) {
6363

6464
return null;
6565
}
66+
67+
/**
68+
* The strings used within the Language Suggest endpoint.
69+
*
70+
* These are used by the wordpress.org/lang-suggest/ endpoint,
71+
* and are included here for translation purposes.
72+
*/
73+
private function _strings_for_glotpress() {
74+
__( 'WordPress is also available in %s.', 'wporg' );
75+
__( 'Learn WordPress is also available in %s.', 'wporg' );
76+
__( 'WordPress support forums are also available in %s.', 'wporg' );
77+
}
78+
6679
}

mu-plugins/rest-api/endpoints/class-wporg-plugins-locale-banner-controller.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
/**
99
* Plugins_Locale_Banner_Controller
10+
*
11+
* NOTE: This is not used. Please see the below file.
12+
* @see https://github.com/WordPress/wordpress.org/blob/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-locale-banner.php
1013
*/
1114
class Plugins_Locale_Banner_Controller extends Base_Locale_Banner_Controller {
1215
/**

0 commit comments

Comments
 (0)