-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update rosetta homepages to new homepage version #266
Comments
#15 covers the background to why this wasn't initially updated. |
We've had the content parser running for a while, and it's worked fairly well (especially with the updates and tests from #247 & WordPress/wordpress.org#90). This project is not imported into GlotPress yet, that would need to happen so it could be translated— we should let #polyglots know that this is incoming first, in case there's more feedback on the strings & process. Then maybe soft-launching with the theme switcher again? So we can get feedback on it in-action? Maybe that's overkill. I tested wporg-main-2022 on my sandbox to see how it holds up, and mostly it was fine. My notes from that test (these can become issues if needed, but right now it's just a brain-dump).
|
Consolidating and updating the notes above, these are the tasks that still need to happen before this can be launched:
|
Does that mean that rosetta sites will not have localized URLs in the future? Part of the proposal is to localize or translate urls, as in es.wordpress.org/documentacion/articulo. Or is this perhaps something we can look into in the future? |
From a global mentor's perspective, it's much better to not localize URL:s. Especially in non-latin scripts the URL:s become very ugly. At least for "centrally handled content" there is certainly a value in being able to just swap out the locale subdomain and land on the same page on a different locale. |
This issue is specifically about the main rosetta sites, the content handled by Right now this is my approach to making sure the main theme works for Rosetta.
That's how this site and others like the plugin and theme directories work, so I imagine for consistency it would stay that way for other sites too. But that's a discussion for later 🙂 |
Thank you @ryelle for explaining, I didn't understand your thought process at the beginning. |
Great. Just in time for our weekly meeting! :) |
What should we do about pages that don't have translations yet? Should we add a "help translate this" prompt, wait until they are translated, or just leave it? |
Thank you for adding the switcher! I have a question. Will Rosetta admins have some controls for font size & font family, etc.? |
Looks like the block spacing isn't working properly on pages like https://de.wordpress.org/2023/07/wordpress-6-3-release-candidate-1/ |
@naokomc That wasn't planned, but if the existing typography doesn't work for a site, I think we could work with @WordPress/meta-design to add some alternatives or add better fallbacks. Is there a site you see a problem on? For one example, I see that Courier Prime on the About page doesn't work for Vietnamese, but IBM Plex Mono could.
@ocean90 Thanks for catching that, I've fixed it in WordPress/wporg-parent-2021@a93b95a. |
I was looking into using translation status as a way to roll out the new theme (so that a site could switch over when X% is translated), but I couldn't figure out how to access that info from the rosetta site side of things. So I'm not sure how we could detect whether a page is translated or not. We could add a banner across all pages for a set amount of time? This also ties into the question of how we should launch— should we flip the switch for all sites at once? let individual teams make the call? something else? |
For Japanese, @nukaga said she'd be interested in making suggestions. But because of her timing, it will happen later than mid-August. We ( Generally, I’d assume a good threshold to be 90% translation completion (currently, five locales are 99-100%). Ideally, the home page should also be in good shape. |
All pages that are synced use special wrappers to reset the block gap, but normal pages (on rosetta sites) do not. This change enables the default margin between paragraphs and other post content. See #266, WordPress/wporg-parent-2021@a93b95a
Yeah, I'm sure many locales are in that position!
That makes sense to me. I was trying to figure out automating the launch, but maybe it would be better to manually enable sites on request (with some deadline, 2-3 months?, when we flip the switch for everyone, so that it's not perpetual work for the devs).
Yes, that would be great. Let me know if I can be any help with that 🙂 |
@ryelle just like you made a "pre-view" available, you could probably add an action for locale managers and editors and GTE's to change the theme for a locale. |
If you have the ability to activate themes already, I think I would prefer this route. I just network-enabled the new theme "WordPress.org Main Block Theme, 2022" so it can be activated on sites as needed.
That sounds good. |
So, I think there's not much more for me to do here, at least until more locales are translated and we gather more feedback. There is one more PR for the translation parser to enable translating link destinations, so that links inside buttons & lists can be localized like the rest of the page content (for example, translating I also noticed a few translation issues when spot-checking some sites, asked about where to report those in slack. For now, I'll leave this issue open to collect feedback. |
Post published: Finish and Swedish are now using the new theme. |
This is an interesting discussion indeed, and it helps all of us understand design localization in the real world. If the Meta Team is comfortable to the idea, allowing certain Rosetta sites to make minimal style adjustments via the Site Editor would be a great step. This might be limited to CJK (Chinese, Japanese, Korean) languages or those who have requested it with a valid reason, to prevent any unintended issues against design integrity. |
Hi everyone. This is an interesting discussion. I created a compared image. The comparisons are https://ja.wordpress.org/?new-theme=1 and #266 (comment). About 'unintentional line break', it's difficult to understand if you don't understand Japanese. For example,
or
That's what it feels like. First of all, I think this new design is really nice. And I think it would be good if we could create the same image as much as possible in languages with alphabets such as Japanese and Other multibyte language. I am by no means denying existing designs, so let me reiterate that point. |
@miminari, @megane9988 thanks for the detailed explanation! I found that very clear! @fcoveram And thank you for trying to understand our culture. I would like to support miminari's suggestion below.
We do not want to change everything, so as @naokomc wrote,
I think it is also important. |
The think use case has been proven successfully. It isn't clear with block theming how to do this intelligently. I wonder if we can leverage style variations (or something custom but similar).... Open to ideas! |
I may not understand the problem accurately, but I would like to suggest the following as an idea for adjusting CSS for each locale. Note: This code has not been tested and is just a sample of the approach. Enable customization with CSS and PHP code for each localeFirst, create a
function enqueue_assets() {
// ...
// get the current locale.
$locale = get_locale();
// Load stylesheet and php code according to locale
if ( 'en_US' !== $locale ) {
// Path to the stylesheet for that language in the `locale` directory
$stylesheet_path = get_stylesheet_directory_uri() . '/locale/' . $locale . 'style.css';
// Load stylesheet if file exists
if ( file_exists( $stylesheet_path ) ) {
wp_enqueue_style( 'wporg-main-2022-style-' . $ja, $stylesheet_path );
}
// Path to the php file for that language in the `locale` directory
$functions_path = get_stylesheet_directory_uri() . '/locale/' . $locale . 'functions.php';
// Load php file if file exists
if ( file_exists( $functions_path ) ) {
require_once $functions_path;
}
}
// ...
} Add stylesheets for localesThis stylesheet will probably look something like this: Unfortunately, we may need to use important a lot.
.wp-block-wporg-random-heading.has-heading-cta-font-size {
font-size: 30px !important;
} Add custom PHP codePHP files can be used for various purposes, such as the following.
// Override settings in a theme's theme.json
function ja_override_theme_json() {
$new_data = array(
'version' => 2,
'styles' => array(
'typography' => array(
'fontFamily' => 'font-family-for-japanese'
),
),
'settings' => array(
"custom" => array(
"ja-something-key" => 1,
)
),
);
return $theme_json->update_with( $new_data );
}
add_filter( 'wp_theme_json_data_theme', 'ja_override_theme_json' );
function ja_override_styles() {
// Remove header and footer styles
wp_deregister_style( 'wporg-global-header-footer' );
// Enqueue a custom CSS file for that locale
wp_enqueue_style(
'wporg-global-header-footer-ja',
get_stylesheet_directory_uri() . '/locale/wporg-global-header-footer.css',
array(),
get_stylesheet_directory_uri() . '/locale/wporg-global-header-footer.css',
);
}
add_action( 'after_setup_theme', 'ja_override_styles' ); |
Thanks @megane9988 for putting the style discussion in a visual comparison. Very clear. And thanks @t-hamano for jumping in and suggesting a solution. |
I wonder if we can do it with style variations. |
I think using style variations means that what we can do is limited to what can be done within For example, this stylesheet has a large number of styles defined. To override this, we need a way to write CSS directly. Strictly speaking, CSS can also be written in {
"$schema": "https://schemas.wp.org/trunk/theme.json",
"version": 2,
"styles": {
"css": ".wporg-about-section-heading {...}, .wporg-about-section-heading .wporg-about-section-mission {...}"
}
} |
Currently, this is not possible, and I'm not sure we should change that. Once the pages are edited in the Site Editor, they'd loose the connection to the patterns/templates, and would not receive any of the English string updates (it would also disconnect the process from GlotPress, which was important to the translators). This would also allow too much customization, IMO — we do still want the localized sites to match the main site.
I think not in the UI for the same reason as above, but maybe we could do something with variations/theme.json (probably will need to custom code something, given how the parent/child theme.jsons already needed a workaround). We've defined some font settings for the parent theme, they can be found here. For example, the big "WordPress:" headline is the "CTA Heading" at 120px, but a "ja-variation" could set that to 96px. And so on for other headings & body font size, line-height, and even font family if needed. Customizing the parent theme would be the easiest and future-friendliest, because it would cascade to other pages, like the About subpages or future sections like Hosting & the theme/plugin directories. Hopefully that would fix the worst typography issues, but we could support locale/site-specific CSS if needed. I'm inclined to something like @t-hamano's suggestion here where the locale team can provide a stylesheet that lives in this repo to be loaded on that locale's site. |
I've added a method for individual sites to have custom values, and added some of the suggested font sizes for Japanese — there are some before and after screenshots on the PR WordPress/wporg-parent-2021#120. I also already merged a PR to add CSS overrides, with a few fixes for the Japanese About page (#380). So you can change things like font sizes globally (using a theme.json-ish structure), or make individual tweaks to pages (using CSS). As I mentioned in that PR, I haven't added a UI for teams to manage this, so any changes will require an issue or PR on this repo. How does that sound to everyone? |
@ryelle Thanks for the PR! Just to confirm, by merging those two PRs, the localized site will not be forced to switch to the new version, right? |
That's correct, it would still be your choice when to switch to the new design. At some point, we will want to switch everyone over, as the older theme is not getting the same updates as the new theme (for example, the State of the Word banner). But I'd like to see more locales opting-in successfully first. |
So far the theme has been activated on just 14 sites.
Is there anything meta could do to encourage more teams to opt-in? Are other teams finding issues that prevent them from using the new theme? cc @naokomc @tobifjellner |
@ryelle |
Is there any way to block accidental changes via Site Editor? |
Works for me.
I deployed a change today that removes the Site Editor links from the admin bar & admin menu. It doesn't block access entirely, but hopefully that will cut down on people trying to customize things. |
The Japanese team is working on a few minor adjustments before they are ready. |
Hello, this is the zh_CN polyglot team. We switched to new theme a few days ago. Currently, we mainly find that the spacing of multi-line titles is too small, for example: https://cn.wordpress.org/about/: https://cn.wordpress.org/download/releases/6-5/: https://wordpress.org/download/releases/6-5/: @ryelle Can you help optimize this, just adjust it like japanese? |
The rosetta site homepages are still showing the older version. They were not updated during the initial rollout of the new homepage to limit the scope. It's time to update the rest.
The text was updated successfully, but these errors were encountered: