Repository navigation
Help/About: Translate /random slug displayed in graphic.
#16278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
peterwilsoncc
wants to merge
9
commits into
WordPress:trunk
from
peterwilsoncc:try/66202-i18n-random-image-svg
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c725795
SVG Experiment 1.
peterwilsoncc dcc09af
Random with actual slug.
peterwilsoncc 893169e
default slug.
peterwilsoncc 0b3cea6
RTL considerations.
peterwilsoncc c04fda0
Drop a bit of uneeded CSS.
peterwilsoncc 113f3f5
Prevent line breaks after /.
peterwilsoncc 4f29697
Fix PHPStan warning for `$wp_rewrite`.
peterwilsoncc e85e100
Add translater comment mirroring that in WP_Rewrite.
peterwilsoncc 3293cb9
[maybe] Udate text to use link. aria-hide “image”.
peterwilsoncc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Caution While this file is included in the PR, it is not merge ready. The image will be published on w.org's CDN. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The displayed path uses
_x()in the current user's locale, while$random_urlusesget_random_base(), which returns the customwp_random_baseoption if set, and otherwise the default translated into the site locale. With a different user locale or a custom base, the pill and link text can show/randomwhile the link points to another slug. Using the base for both keeps them in sync:The translator comment above would then no longer be needed, since the string is already translated in
WP_Rewrite::get_random_base().