-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Make strings in theme.json translatable #66675
Changes from 3 commits
42f4f5d
7505e51
a03c3aa
6e9964b
215a790
8b1c87a
76ce9ee
29e08a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
lib/theme.json | ||
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. I'd actually move the file instead of adding a symlink 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. The cc @oandregal 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. This is explained in #66027 WP-CLI assumes that The Gutenberg plugin is an exception because it holds the "source of truth" for 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. I need to catch up a bit on this, but last I checked (3 years ago) it was working fine (it extracted strings from core, Gutenberg, and themes). 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. Yes please test it again. But the way WP-CLI works hasn't changed: https://github.com/wp-cli/i18n-command/blob/0133eb1326e7e0613315dd94c347a2a03ee6f2d4/src/ThemeJsonExtractor.php#L19-L25 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.
This comment was marked as outdated.
Sorry, something went wrong. 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. More context: for testing, avoid using color gradients, palette, or font sizes. Some of these are also defined in the client (see) so it can give you false positives. 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.
With that current logic in WP-CLI that would be expected. As I said, it only looks for a specific location at the moment. That change was made with the assumption that I suppose we didn't realize at the time that
Yes, you're right. Hmm we need to make some changes to WP-CLI then and to Meta ( 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. Closing the loop here: we're continuing the conversation at wp-cli/i18n-command#423 |
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.
Let's match the naming pattern
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.
Can we perhaps use
Shadow name
instead? That's inline with what other presets do: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.
Also: these changes need to be backported to wordpress-develop so that the wp-cli uses them (see). Until then, these strings won't be picked up from anywhere.
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.
@oandregal , I created a diff for wordpress-develop, but it instructs that the description should have a trac number. Do we have one, or do I create one?
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.
You can use https://meta.trac.wordpress.org/ticket/7866 I've left a comment linking to this PR and the issue.
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.
@oandregal I had created https://core.trac.wordpress.org/ticket/62728. I hope it isn't an issue.
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.
That's good as well 👍