Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances internationalization (i18n) by adding translation contexts to "Login with Google" text strings throughout the plugin, ensuring translators understand the usage context for each instance. It also corrects a capitalization inconsistency in the shortcode module.
- Adds contextual information to translation strings using
_x()instead of__()for four different use cases (shortcode, block, login page, and menu title) - Fixes capitalization from "Login with google" to "Login with Google" in the shortcode module
- Updates the block editor placeholder to use the same contextual translation approach
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/google-login-button.php | Updates fallback button text with translation context for login page usage |
| src/Modules/Shortcode.php | Fixes capitalization and adds translation context for shortcode button text |
| src/Modules/Settings.php | Adds translation context for the admin menu title |
| src/Modules/Block.php | Adds translation context for block button text default value |
| assets/src/blocks/login-button/edit.js | Imports _x function and adds translation context for block editor placeholder |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR adds translation context to multiple instances of the
Login with Googletext to improve translation accuracy. Context has been added separately for theshortcode,block,login page, andmenu titleto ensure each is translated appropriately.This PR also updates the shortcode login text from
Login with googletoLogin with Googleto ensure consistency with the block and login page, where the correct capitalisation is already used.How to Test?
Login With Google, you should be able to see the different context.Screenshots
Before
After
Closes - #283