[CORE] Plugin API now extends a new Module API

This commit is contained in:
Diogo Cordeiro
2019-08-12 15:03:30 +01:00
committed by Diogo Peralta Cordeiro
parent 3821d2317e
commit 20a6f1d4f4
397 changed files with 3093 additions and 1450 deletions

View File

@@ -596,7 +596,7 @@ class OpenIDPlugin extends Plugin
*
* @return boolean hook value
*/
function onPluginVersion(array &$versions)
public function onPluginVersion(array &$versions): bool
{
$versions[] = array('name' => 'OpenID',
'version' => self::PLUGIN_VERSION,

View File

@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-08-14 14:44+0100\n"
"POT-Creation-Date: 2019-08-14 14:50+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,6 +17,144 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#. TRANS: Client exception thrown when an action is not available.
#: OpenIDPlugin.php:143
msgid "Unavailable action."
msgstr ""
#. TRANS: Tooltip for main menu option "Login"
#: OpenIDPlugin.php:192
msgctxt "TOOLTIP"
msgid "Login to the site."
msgstr ""
#. TRANS: Main menu option when not logged in to log in
#: OpenIDPlugin.php:195
msgctxt "MENU"
msgid "Login"
msgstr ""
#. TRANS: Tooltip for main menu option "Help"
#: OpenIDPlugin.php:200
msgctxt "TOOLTIP"
msgid "Help me!"
msgstr ""
#. TRANS: Main menu option for help on the StatusNet site
#: OpenIDPlugin.php:203
msgctxt "MENU"
msgid "Help"
msgstr ""
#. TRANS: Tooltip for main menu option "Search"
#: OpenIDPlugin.php:209
msgctxt "TOOLTIP"
msgid "Search for people or text."
msgstr ""
#. TRANS: Main menu option when logged in or when the StatusNet instance is not private
#: OpenIDPlugin.php:212
msgctxt "MENU"
msgid "Search"
msgstr ""
#. TRANS: OpenID plugin menu item on site logon page.
#. TRANS: OpenID plugin menu item on user settings page.
#. TRANS: OpenID configuration menu item.
#: OpenIDPlugin.php:269 OpenIDPlugin.php:305 OpenIDPlugin.php:479
#: OpenIDPlugin.php:559
msgctxt "MENU"
msgid "OpenID"
msgstr ""
#. TRANS: OpenID plugin tooltip for logon menu item.
#: OpenIDPlugin.php:271
msgid "Login or register with OpenID."
msgstr ""
#. TRANS: OpenID plugin tooltip for user settings menu item.
#: OpenIDPlugin.php:307
msgid "Add or remove OpenIDs."
msgstr ""
#. TRANS: Page notice for logged in users to try and get them to add an OpenID account to their StatusNet account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:421
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? [Add an OpenID to your account]"
"(%%action.openidsettings%%)!"
msgstr ""
#. TRANS: Page notice for anonymous users to try and get them to register with an OpenID account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:426
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? Try our [OpenID registration]"
"(%%action.openidlogin%%)!)"
msgstr ""
#. TRANS: Page notice on the login page to try and get them to log on with an OpenID account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:434
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? Try our [OpenID login](%%action."
"openidlogin%%)!)"
msgstr ""
#. TRANS: Tooltip for OpenID configuration menu item.
#: OpenIDPlugin.php:561
msgid "OpenID configuration."
msgstr ""
#. TRANS: Plugin description.
#: OpenIDPlugin.php:607
msgid "Use <a href=\"http://openid.net/\">OpenID</a> to login to the site."
msgstr ""
#. TRANS: button label for OAuth authorization page when needing OpenID authentication first.
#. TRANS: Button text to continue OpenID identity verification.
#: OpenIDPlugin.php:617 actions/openidtrust.php:136
msgctxt "BUTTON"
msgid "Continue"
msgstr ""
#. TRANS: OpenID plugin logon form legend.
#: OpenIDPlugin.php:634 actions/openidlogin.php:132
msgctxt "LEGEND"
msgid "OpenID login"
msgstr ""
#. TRANS: Field label.
#: OpenIDPlugin.php:642
msgid "OpenID provider"
msgstr ""
#. TRANS: Form guide.
#: OpenIDPlugin.php:651 actions/openidlogin.php:149
msgid "Enter your username."
msgstr ""
#. TRANS: Form guide.
#: OpenIDPlugin.php:653 actions/openidlogin.php:151
msgid "You will be sent to the provider's site for authentication."
msgstr ""
#. TRANS: OpenID plugin logon form field label.
#. TRANS: Field label.
#: OpenIDPlugin.php:657 actions/openidlogin.php:155
#: actions/openidsettings.php:103
msgid "OpenID URL"
msgstr ""
#. TRANS: OpenID plugin logon form field instructions.
#. TRANS: OpenID plugin logon form field title.
#: OpenIDPlugin.php:660 actions/openidlogin.php:158
msgid "Your OpenID URL."
msgstr ""
#. TRANS: Client error message trying to log on with OpenID while already logged on.
#: actions/openidlogin.php:33 actions/finishopenidlogin.php:37
msgid "Already logged in."
@@ -44,42 +182,12 @@ msgctxt "TITLE"
msgid "OpenID Login"
msgstr ""
#. TRANS: OpenID plugin logon form legend.
#: actions/openidlogin.php:132 OpenIDPlugin.php:634
msgctxt "LEGEND"
msgid "OpenID login"
msgstr ""
#. TRANS: Field label.
#: actions/openidlogin.php:140
msgctxt "LABEL"
msgid "OpenID provider"
msgstr ""
#. TRANS: Form guide.
#: actions/openidlogin.php:149 OpenIDPlugin.php:651
msgid "Enter your username."
msgstr ""
#. TRANS: Form guide.
#: actions/openidlogin.php:151 OpenIDPlugin.php:653
msgid "You will be sent to the provider's site for authentication."
msgstr ""
#. TRANS: OpenID plugin logon form field label.
#. TRANS: Field label.
#. TRANS: OpenID plugin logon form field label.
#: actions/openidlogin.php:155 actions/openidsettings.php:103
#: OpenIDPlugin.php:657
msgid "OpenID URL"
msgstr ""
#. TRANS: OpenID plugin logon form field title.
#. TRANS: OpenID plugin logon form field instructions.
#: actions/openidlogin.php:158 OpenIDPlugin.php:660
msgid "Your OpenID URL."
msgstr ""
#. TRANS: OpenID plugin logon form checkbox label for setting to put the OpenID information in a cookie.
#: actions/openidlogin.php:163
msgid "Remember me"
@@ -318,13 +426,6 @@ msgid ""
"and login without creating a new password."
msgstr ""
#. TRANS: Button text to continue OpenID identity verification.
#. TRANS: button label for OAuth authorization page when needing OpenID authentication first.
#: actions/openidtrust.php:136 OpenIDPlugin.php:617
msgctxt "BUTTON"
msgid "Continue"
msgstr ""
#. TRANS: Button text to cancel OpenID identity verification.
#: actions/openidtrust.php:138
msgctxt "BUTTON"
@@ -568,108 +669,6 @@ msgstr ""
msgid "Error connecting user to OpenID."
msgstr ""
#. TRANS: Client exception thrown when an action is not available.
#: OpenIDPlugin.php:143
msgid "Unavailable action."
msgstr ""
#. TRANS: Tooltip for main menu option "Login"
#: OpenIDPlugin.php:192
msgctxt "TOOLTIP"
msgid "Login to the site."
msgstr ""
#. TRANS: Main menu option when not logged in to log in
#: OpenIDPlugin.php:195
msgctxt "MENU"
msgid "Login"
msgstr ""
#. TRANS: Tooltip for main menu option "Help"
#: OpenIDPlugin.php:200
msgctxt "TOOLTIP"
msgid "Help me!"
msgstr ""
#. TRANS: Main menu option for help on the StatusNet site
#: OpenIDPlugin.php:203
msgctxt "MENU"
msgid "Help"
msgstr ""
#. TRANS: Tooltip for main menu option "Search"
#: OpenIDPlugin.php:209
msgctxt "TOOLTIP"
msgid "Search for people or text."
msgstr ""
#. TRANS: Main menu option when logged in or when the StatusNet instance is not private
#: OpenIDPlugin.php:212
msgctxt "MENU"
msgid "Search"
msgstr ""
#. TRANS: OpenID plugin menu item on site logon page.
#. TRANS: OpenID plugin menu item on user settings page.
#. TRANS: OpenID configuration menu item.
#: OpenIDPlugin.php:269 OpenIDPlugin.php:305 OpenIDPlugin.php:479
#: OpenIDPlugin.php:559
msgctxt "MENU"
msgid "OpenID"
msgstr ""
#. TRANS: OpenID plugin tooltip for logon menu item.
#: OpenIDPlugin.php:271
msgid "Login or register with OpenID."
msgstr ""
#. TRANS: OpenID plugin tooltip for user settings menu item.
#: OpenIDPlugin.php:307
msgid "Add or remove OpenIDs."
msgstr ""
#. TRANS: Page notice for logged in users to try and get them to add an OpenID account to their StatusNet account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:421
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? [Add an OpenID to your account]"
"(%%action.openidsettings%%)!"
msgstr ""
#. TRANS: Page notice for anonymous users to try and get them to register with an OpenID account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:426
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? Try our [OpenID registration]"
"(%%action.openidlogin%%)!)"
msgstr ""
#. TRANS: Page notice on the login page to try and get them to log on with an OpenID account.
#. TRANS: This message contains Markdown links in the form (description)[link].
#: OpenIDPlugin.php:434
#, php-format
msgid ""
"(Have an [OpenID](http://openid.net/)? Try our [OpenID login](%%action."
"openidlogin%%)!)"
msgstr ""
#. TRANS: Tooltip for OpenID configuration menu item.
#: OpenIDPlugin.php:561
msgid "OpenID configuration."
msgstr ""
#. TRANS: Plugin description.
#: OpenIDPlugin.php:607
msgid "Use <a href=\"http://openid.net/\">OpenID</a> to login to the site."
msgstr ""
#. TRANS: Field label.
#: OpenIDPlugin.php:642
msgid "OpenID provider"
msgstr ""
#: openid.php:64
msgid "Unknown DB type for OpenID."
msgstr ""

View File

@@ -262,7 +262,7 @@ function oid_authenticate($openid_url, $returnto, $immediate=false)
*/
}
// Half-assed attempt at a module-private function
// Half-assed attempt at a Plugin-private function
function _oid_print_instructions()
{