Skip to content

Commit

Permalink
Merge pull request #8 from natbienetre/ci/i18n
Browse files Browse the repository at this point in the history
ci(language-files-up-to-date) Bump dependency
  • Loading branch information
holyhope authored Apr 4, 2024
2 parents d8be859 + 7075b73 commit f9fa6db
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 5 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/wordpress-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: natbienetre/test-wordpress-languages-github-action@v1.0.1
- uses: natbienetre/test-wordpress-languages-github-action@v3.0.0
id: languages
with:
plugin_slug: cloudflare-zero-trust-login
exclude: |-
.github
- uses: actions/upload-artifact@v4
if: always()
with:
name: language-patch
path: ${{ steps.languages.outputs.patch_path }}
2 changes: 1 addition & 1 deletion classes/CF0TLAdminPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static function register_hooks() {
}

function plugin_settings( array $links ): array {
array_unshift( $links, '<a href="' . esc_url( $this->get_url() ) . '&amp;sub=options">' . __( 'Settings', 'redirection' ) . '</a>' );
array_unshift( $links, '<a href="' . esc_url( $this->get_url() ) . '&amp;sub=options">' . __( 'Settings', 'cf0tl' ) . '</a>' );
return $links;
}

Expand Down
7 changes: 6 additions & 1 deletion classes/CF0TLUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ public function user_profile_update_errors( WP_Error $errors, bool $update_user,
$previous_email = $this->get_registered_email( $user->ID );

if ( $previous_email != $email && false === update_user_meta( $user->ID, self::EMAIL_METADATA_KEY, $email ) ) {
$errors->add( 'cf0tl_email', '<img src="' . esc_url( plugin_dir_url( CF0TL_PLUGIN_FILE ) . 'images/cloudflare-logo.png' ) . '" alt="' . esc_attr__( 'CloudFlare Zero Trust', 'cft0l' ) . '" class="cf0tl-logo" />' . sprintf( __( 'Failed to update the email to <span class="%s">%s<span>.', 'cf0tl' ), 'email', $email ) );
$errors->add(
'cf0tl_email',
'<img src="' . esc_url( plugin_dir_url( CF0TL_PLUGIN_FILE ) . 'images/cloudflare-logo.png' ) . '" alt="' . esc_attr__( 'CloudFlare Zero Trust', 'cft0l' ) . '" class="cf0tl-logo" />' .
/* translators: %1$s is the class name, %2$s is the email */
sprintf( __( 'Failed to update the email to <span class="%1$s">%2$s<span>.', 'cf0tl' ), 'email', $email )
);
return;
}
}
Expand Down
1 change: 1 addition & 0 deletions cloudflare-zero-trust-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Author: Pierre PÉRONNET <pierre.peronnet@gmail.com>
* Description: Configure login for Cloudflare Zero Trust users.
* Funding URI: https://github.com/sponsors/holyhope
* Text Domain: cf0tl
*/

require 'autoload.php';
Expand Down
146 changes: 146 additions & 0 deletions languages/cloudflare-zero-trust-login-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ msgstr ""

#. Plugin Name of the plugin
#: cloudflare-zero-trust-login.php
#: classes/CF0TLAdminPage.php:32
#: classes/CF0TLAdminPage.php:33
#: classes/CF0TLUser.php:150
msgid "Cloudflare Zero Trust Login"
msgstr "Cloudflare Zero Trust Login"

Expand All @@ -27,3 +30,146 @@ msgstr "Pierre PÉRONNET <pierre.peronnet@gmail.com>"
#: cloudflare-zero-trust-login.php
msgid "Configure login for Cloudflare Zero Trust users."
msgstr "Configurer la connexion pour les utilisateurs de Cloudflare Zero Trust."

#: classes/CF0TLAdminPage.php:20
msgid "Settings"
msgstr ""

#: classes/CF0TLAdminPage.php:60
msgid "Team is required"
msgstr ""

#: classes/CF0TLAdminPage.php:65
msgid "Invalid team"
msgstr ""

#: classes/CF0TLAdminPage.php:99
msgctxt "Header for the setting section"
msgid "General"
msgstr ""

#: classes/CF0TLAdminPage.php:106
msgctxt "Label for the setting field"
msgid "Check to require zero trust authentication"
msgstr ""

#: classes/CF0TLAdminPage.php:114
msgctxt "Label for the setting field"
msgid "Check to require login input"
msgstr ""

#: classes/CF0TLAdminPage.php:122
msgctxt "Label for the setting field"
msgid "Check to disable WordPress authentication"
msgstr ""

#: classes/CF0TLAdminPage.php:130
msgctxt "Label for the setting field"
msgid "Check to disable logout"
msgstr ""

#: classes/CF0TLAdminPage.php:138
msgctxt "Label for the setting field"
msgid "Check to disable self email edition"
msgstr ""

#: classes/CF0TLAdminPage.php:146
msgctxt "Label for the setting field"
msgid "Check to use custom email field"
msgstr ""

#: classes/CF0TLAdminPage.php:154
msgctxt "Label for the setting field"
msgid "Automatically create user if not found"
msgstr ""

#: classes/CF0TLAdminPage.php:162
msgctxt "Label for the setting field"
msgid "Cloudflare Zero Trust team"
msgstr ""

#: classes/CF0TLAdminPage.php:170
msgctxt "Label for the setting field"
msgid "Algorithm"
msgstr ""

#: classes/CF0TLAdminPage.php:178
msgctxt "Label for the setting field"
msgid "Application Audience (AUD) Tag"
msgstr ""

#: classes/CF0TLAdminPage.php:187
msgctxt "Header for the setting section"
msgid "Cloudflare"
msgstr ""

#: classes/CF0TLAdminPage.php:194
msgctxt "Label for the setting field"
msgid "Certificates key"
msgstr ""

#: classes/CF0TLAdminPage.php:255
msgid "Automatically detect algorithm."
msgstr ""

#: classes/CF0TLAdminPage.php:269
msgid "These settings are fetched from your Cloudflare team."
msgstr ""

#: classes/CF0TLAdminPage.php:270
msgid "View certificates"
msgstr ""

#: classes/CF0TLAuthentication.php:71
msgid "WordPress user does not match cloudflare user"
msgstr ""

#: classes/CF0TLAuthentication.php:99
msgid "Failed to automatically create user"
msgstr ""

#: classes/CF0TLAuthentication.php:148
msgid "No Cloudflare JWT found"
msgstr ""

#: classes/CF0TLAuthentication.php:161
msgid "Invalid JWT, unexpected Application Audience (AUD) Tag"
msgstr ""

#: classes/CF0TLUser.php:24
msgid "CloudFlare Zero Trust email"
msgstr ""

#: classes/CF0TLUser.php:75
msgid "Failed to delete the email."
msgstr ""

#: classes/CF0TLUser.php:81
msgid "Please enter a valid email address."
msgstr ""

#: classes/CF0TLUser.php:97
msgid "Email already in use."
msgstr ""

#: classes/CF0TLUser.php:118
#: classes/CF0TLUser.php:129
msgid "User not found"
msgstr ""

#: classes/CF0TLUser.php:133
msgid "Multiple users found"
msgstr ""

#: classes/CF0TLUser.php:152
msgid "Authenticated via <a href=\"https://dash.cloudflare.com\" target=\"_blank\">Cloudflare Zero Trust</a>."
msgstr ""

#: classes/CF0TLUser.php:155
msgid "Email"
msgstr ""

#. translators: %1$s is the class name, %2$s is the email
#: classes/CF0TLUser.php:108
msgid "Failed to update the email to <span class=\"%1$s\">%2$s<span>."
msgstr ""
150 changes: 148 additions & 2 deletions languages/cloudflare-zero-trust-login.pot
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-04-02T10:34:07+00:00\n"
"POT-Creation-Date: 2024-04-04T11:08:09+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.10.0\n"
"X-Domain: cloudflare-zero-trust-login\n"
"X-Domain: cf0tl\n"

#. Plugin Name of the plugin
#: cloudflare-zero-trust-login.php
#: classes/CF0TLAdminPage.php:32
#: classes/CF0TLAdminPage.php:33
#: classes/CF0TLUser.php:150
msgid "Cloudflare Zero Trust Login"
msgstr ""

Expand All @@ -28,3 +31,146 @@ msgstr ""
#: cloudflare-zero-trust-login.php
msgid "Pierre PÉRONNET <pierre.peronnet@gmail.com>"
msgstr ""

#: classes/CF0TLAdminPage.php:20
msgid "Settings"
msgstr ""

#: classes/CF0TLAdminPage.php:60
msgid "Team is required"
msgstr ""

#: classes/CF0TLAdminPage.php:65
msgid "Invalid team"
msgstr ""

#: classes/CF0TLAdminPage.php:99
msgctxt "Header for the setting section"
msgid "General"
msgstr ""

#: classes/CF0TLAdminPage.php:106
msgctxt "Label for the setting field"
msgid "Check to require zero trust authentication"
msgstr ""

#: classes/CF0TLAdminPage.php:114
msgctxt "Label for the setting field"
msgid "Check to require login input"
msgstr ""

#: classes/CF0TLAdminPage.php:122
msgctxt "Label for the setting field"
msgid "Check to disable WordPress authentication"
msgstr ""

#: classes/CF0TLAdminPage.php:130
msgctxt "Label for the setting field"
msgid "Check to disable logout"
msgstr ""

#: classes/CF0TLAdminPage.php:138
msgctxt "Label for the setting field"
msgid "Check to disable self email edition"
msgstr ""

#: classes/CF0TLAdminPage.php:146
msgctxt "Label for the setting field"
msgid "Check to use custom email field"
msgstr ""

#: classes/CF0TLAdminPage.php:154
msgctxt "Label for the setting field"
msgid "Automatically create user if not found"
msgstr ""

#: classes/CF0TLAdminPage.php:162
msgctxt "Label for the setting field"
msgid "Cloudflare Zero Trust team"
msgstr ""

#: classes/CF0TLAdminPage.php:170
msgctxt "Label for the setting field"
msgid "Algorithm"
msgstr ""

#: classes/CF0TLAdminPage.php:178
msgctxt "Label for the setting field"
msgid "Application Audience (AUD) Tag"
msgstr ""

#: classes/CF0TLAdminPage.php:187
msgctxt "Header for the setting section"
msgid "Cloudflare"
msgstr ""

#: classes/CF0TLAdminPage.php:194
msgctxt "Label for the setting field"
msgid "Certificates key"
msgstr ""

#: classes/CF0TLAdminPage.php:255
msgid "Automatically detect algorithm."
msgstr ""

#: classes/CF0TLAdminPage.php:269
msgid "These settings are fetched from your Cloudflare team."
msgstr ""

#: classes/CF0TLAdminPage.php:270
msgid "View certificates"
msgstr ""

#: classes/CF0TLAuthentication.php:71
msgid "WordPress user does not match cloudflare user"
msgstr ""

#: classes/CF0TLAuthentication.php:99
msgid "Failed to automatically create user"
msgstr ""

#: classes/CF0TLAuthentication.php:148
msgid "No Cloudflare JWT found"
msgstr ""

#: classes/CF0TLAuthentication.php:161
msgid "Invalid JWT, unexpected Application Audience (AUD) Tag"
msgstr ""

#: classes/CF0TLUser.php:24
msgid "CloudFlare Zero Trust email"
msgstr ""

#: classes/CF0TLUser.php:75
msgid "Failed to delete the email."
msgstr ""

#: classes/CF0TLUser.php:81
msgid "Please enter a valid email address."
msgstr ""

#: classes/CF0TLUser.php:97
msgid "Email already in use."
msgstr ""

#. translators: %1$s is the class name, %2$s is the email
#: classes/CF0TLUser.php:108
msgid "Failed to update the email to <span class=\"%1$s\">%2$s<span>."
msgstr ""

#: classes/CF0TLUser.php:118
#: classes/CF0TLUser.php:129
msgid "User not found"
msgstr ""

#: classes/CF0TLUser.php:133
msgid "Multiple users found"
msgstr ""

#: classes/CF0TLUser.php:152
msgid "Authenticated via <a href=\"https://dash.cloudflare.com\" target=\"_blank\">Cloudflare Zero Trust</a>."
msgstr ""

#: classes/CF0TLUser.php:155
msgid "Email"
msgstr ""

0 comments on commit f9fa6db

Please sign in to comment.