Opened 7 weeks ago
Last modified 7 weeks ago
#8213 new defect (bug)
Some meta/wordpress-org strings are not meant to be translated, therefore preparing them for localization is not necessary
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Component: | WordPress.org Site | Keywords: | has-patch has-unit-tests |
| Cc: |
Description
Some meta/wordpress-org strings are not meant to be translated, therefore preparing them for localization is not necessary
Issues with numbers,
1) they are subject to change (therefore will be fuzzied on string update)
2) there are almost no variations on how they can be localized
strings:
https://github.com/WordPress/wporg-main-2022/blob/trunk/source/wp-content/themes/wporg-main-2022/patterns/education-campus-connect.php#L92
Issues with cookie names,
while "wp-postpass_{hash}" may have partial translation (for word 'hash'), the other cookie names like _ga or devicePixelRatio shall remain unchanged. Perhaps its also a better idea to remove them from translateable strings. Only descriptions need to be translated.
wp-postpass_{hash}
wp-settings-{user}
wp-settings-time-{user}
tix_view_token
jetpackState
jpp_math_pass
stnojs
wordpress_logged_in_{hash}
comment_author_email_{hash}
comment_author_url_{hash}
codexUserName
codex_session
camptix_client_stats
wp-saving-post
comment_author_{hash}
wporg_logged_in
wporg_sec
wporg_locale
welcome-{blog_id}
showComments
trac_form_token
trac_session
codexToken
codexUserId
devicePixelRatio
wordpress_test_cookie
_ga
_gid
tk_ai
tk_lr
tk_or
wp-settings-{user_id}
Change History (1)
This ticket was mentioned in PR #665 on WordPress/wporg-main-2022 by @dd32.
7 weeks ago
#1
- Keywords has-patch has-unit-tests added
## Summary
notranslateCSS class on blocks to prevent their content from being wrapped inesc_html_e()/_e()during pattern exportnotranslatein its "Additional CSS class(es)" field, the block and all its inner blocks are skipped during string extraction — content stays as plain HTMLnotranslateclass was chosen for compatibility with Google Translate and other browser translation tools. In future, the HTMLtranslate="no"attribute could also be supported.Note: After merging, the WordPress editor content for the affected pages (cookie policy, education campus connect) will need the
notranslateclass added to the relevant blocks, then patterns regenerated.Fixes https://meta.trac.wordpress.org/ticket/8213
## Test plan
notranslateclass to a block in the editor, runyarn build:patterns, verify the block content is not wrapped in translation functions🤖 Generated with Claude Code