Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions assets/src/blocks/login-button/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* @see https://developer.wordpress.org/block-editor/reference-guides/packages/packages-i18n/
*/
import { __ } from '@wordpress/i18n';
import { __, _x } from '@wordpress/i18n';

/**
* Editor styles for the block.
Expand Down Expand Up @@ -45,7 +45,7 @@ export default function Edit( { attributes, setAttributes, className } ) {
setAttributes( { buttonText: value } );
},
value: buttonText,
placeholder: __( 'Login with Google', 'login-with-google' ),
placeholder: _x( 'Login with Google', 'Login button text displayed in block.', 'login-with-google' ),
};

const forceDisplayAttributes = {
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private function markup( array $args = [] ): string {
$args,
[
'login_url' => '#',
'custom_btn_text' => '',
'custom_btn_text' => _x( 'Login with Google', 'Login button text displayed in block.', 'login-with-google' ),
Comment thread
mi5t4n marked this conversation as resolved.
Outdated
'forceDisplay' => false,
]
);
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public function whitelisted_domains(): void {
public function settings_page(): void {
add_options_page(
__( 'Login with Google settings', 'login-with-google' ),
__( 'Login with Google', 'login-with-google' ),
_x( 'Login with Google', 'Menu title', 'login-with-google' ),
'manage_options',
'login-with-google',
[ $this, 'output' ]
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function callback( $attrs = [] ): string {
$redirect_to = Helper::get_redirect_url();
$attrs = shortcode_atts(
[
'button_text' => __( 'Login with google', 'login-with-google' ),
'button_text' => _x( 'Login with Google', 'Login button text displayed in shortcode.', 'login-with-google' ),
'force_display' => 'no',
'redirect_to' => $redirect_to,
],
Expand Down
2 changes: 1 addition & 1 deletion templates/google-login-button.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
if ( isset( $custom_btn_text ) && $custom_btn_text ) {
$button_text = esc_html( $custom_btn_text );
} else {
$button_text = ( ! empty( $button_text ) ) ? $button_text : __( 'Login with Google', 'login-with-google' );
$button_text = ( ! empty( $button_text ) ) ? $button_text : _x( 'Login with Google', 'Login button text displayed in login page.', 'login-with-google' );
Comment thread
mi5t4n marked this conversation as resolved.
Outdated
}

if ( empty( $login_url ) ) {
Expand Down
Loading