]> git.mxchange.org Git - friendica-addons.git/commitdiff
Only pass string literals to l10n. Only string literals passed directly get picked...
authorvery-ape <git@verya.pe>
Mon, 17 May 2021 17:26:38 +0000 (10:26 -0700)
committervery-ape <git@verya.pe>
Mon, 17 May 2021 17:26:38 +0000 (10:26 -0700)
saml/saml.php

index bf4ffa16b8d3436657a14291f94d02ebe48ce832..e98721e573c579b84e04e761c141194c5b4e46f6 100755 (executable)
@@ -194,9 +194,9 @@ function saml_input($key, $label, $description) {
     return [
         '$' . $key => [
             $key,
-            DI::l10n()->t($label),
+            $label,
             DI::config()->get('saml', $key),
-            DI::l10n()->t($description),
+            $description,
         true, // all the fields are required
         ]
     ];
@@ -206,48 +206,48 @@ function saml_addon_admin (&$a, &$o) {
     $form = 
         saml_input(
             'settings_statement',
-            'Settings statement',
-            'A statement on the settings page explaining where the user should go to change their e-mail and password. BBCode allowed.'
+            DI::l10n()->t('Settings statement'),
+            DI::l10n()->t('A statement on the settings page explaining where the user should go to change their e-mail and password. BBCode allowed.')
         ) +
         saml_input(
             'idp_id',
-            'IdP ID',
-            'Identity provider (IdP) entity URI (e.g., https://example.com/auth/realms/user).'
+            DI::l10n()->t('IdP ID'),
+            DI::l10n()->t('Identity provider (IdP) entity URI (e.g., https://example.com/auth/realms/user).')
         ) +
         saml_input(
             'client_id',
-            'Client ID',
-            'Identifier assigned to client by the identity provider (IdP).'
+            DI::l10n()->t('Client ID'),
+            DI::l10n()->t('Identifier assigned to client by the identity provider (IdP).')
         ) +
         saml_input(
             'sso_url',
-            'IdP SSO URL',
-            'The URL for your identity provider\'s SSO endpoint.'
+            DI::l10n()->t('IdP SSO URL'),
+            DI::l10n()->t('The URL for your identity provider\'s SSO endpoint.')
         ) +
         saml_input(
             'slo_request_url',
-            'IdP SLO request URL',
-            'The URL for your identity provider\'s SLO request endpoint.'
+            DI::l10n()->t('IdP SLO request URL'),
+            DI::l10n()->t('The URL for your identity provider\'s SLO request endpoint.')
         ) +
         saml_input(
             'slo_response_url',
-            'IdP SLO response URL',
-            'The URL for your identity provider\'s SLO response endpoint.'
+            DI::l10n()->t('IdP SLO response URL'),
+            DI::l10n()->t('The URL for your identity provider\'s SLO response endpoint.')
         ) +
         saml_input(
             'sp_key',
-            'SP private key',
-            'The private key the addon should use to authenticate.'
+            DI::l10n()->t('SP private key'),
+            DI::l10n()->t('The private key the addon should use to authenticate.')
         ) +
         saml_input(
             'sp_cert',
-            'SP certificate',
-            'The certficate for the addon\'s private key.'
+            DI::l10n()->t('SP certificate'),
+            DI::l10n()->t('The certficate for the addon\'s private key.')
         ) +
         saml_input(
             'idp_cert',
-            'IdP certificate',
-            'The x509 certficate for your identity provider.'
+            DI::l10n()->t('IdP certificate'),
+            DI::l10n()->t('The x509 certficate for your identity provider.')
         ) +
         [
             '$submit'  => DI::l10n()->t('Save Settings'),