feat: Add i18n support and remove hardcoded strings - #112
Conversation
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoLoad plugin textdomain on init and avoid pre-init translations in Bricks categories
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
f9e0f8c to
8335269
Compare
Code Review by Qodo
Context used✅ Compliance rules (platform):
1 rule 1. Untranslatable Bricks category names
|
…notice WordPress 6.7 raises a notice when _load_textdomain_just_in_time fires before init. The root cause: build_categories() in Slashed_Bricks_Classes is called via the option_bricks_global_classes_categories filter, which Bricks triggers during theme load — before init fires. Two changes: - Move load_plugin_textdomain() to plugins_loaded (priority 1), before the Bricks integration registers its option filters at priority 20. This ensures the domain is already loaded when __() is called through the Bricks option filter, so WP never falls back to the JIT loader. - Restore __() in build_categories() now that the domain is guaranteed to be present before Bricks reads bricks_global_classes_categories. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Z5h8eoEndwcxFWhcLVejw
8335269 to
c25ca27
Compare
Summary
Adds internationalization (i18n) support to the SLASHED plugin by:
inithook to enable translation loadingThis enables the plugin to be properly translated while maintaining backward compatibility.
Type
Checklist
feat:,fix:,docs:, …)npm testpassesnpm run lintpasses (stylelint +php -l)npm run verifypasses (version metadata in sync)dist/,data/inventory.json,data/classes-hints.jsoncome fromupdate-framework/build:data)CHANGELOG.mdupdated under## [Unreleased](for user-facing changes)editor-app/admin-appsource changedNotes
The category name strings in
integrations/bricks/includes/class-classes.phpwere changed from translatable strings (__()) to plain strings. This is intentional—the strings are now hardcoded in the UI layer, which is appropriate for Bricks Builder integration where these are internal category identifiers rather than user-facing labels that require translation at this point.The
load_plugin_textdomain()call in the main plugin file enables translation infrastructure for any future user-facing strings throughout the plugin.https://claude.ai/code/session_016Z5h8eoEndwcxFWhcLVejw