-
Notifications
You must be signed in to change notification settings - Fork 34
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
internationalize new header/footer #46
Comments
I expected something like this to work, but it doesn't at first glance: <!-- wp:navigation-link {"label":"<?php esc_html_x( 'Privacy Policy', 'Page title', 'wporg' ); ?>","url":"https://wordpress.org/about/privacy/","kind":"custom","isTopLevelLink":true} /--> The We'll need to dig in more to find out why. Note that the mockup actually calls for |
Doh, nevermind, that does work, I was just confusing
<!-- wp:navigation-link {"label":"<?php echo esc_html_x( 'Privacy Policy', 'Page title', 'wporg' ); ?>","url":"https://wordpress.org/about/privacy/","kind":"custom","isTopLevelLink":true} /--> |
@ocean90 , @dd32: I'm trying to get strings from this repo imported into GlotPress. does the diff below look correct? should this go in it's own GP project, or the main Index: generate-pot.sh
===================================================================
--- generate-pot.sh (revision 18316)
+++ generate-pot.sh (working copy)
@@ -66,6 +66,7 @@
wpclimakepot $CO/learn-wordpress $CO/learn-wordpress/wporg-learn.pot --exclude=wp-content/mu-plugins
wpclimakepot $CO/pattern-directory $CO/pattern-directory/wporg-patterns.pot --exclude=public_html/wp-content/mu-plugins --exclude=public_html/wp-content/tests --exclude=node_modules
+ wpclimakepot $CO/wporg-mu-plugins $CO/wporg-mu-plugins/wporg-mu-plugins.pot
# Download the Openverse file. Additional check to ensure it's at least 100 lines.
curl -so "$CO/openverse-frontend.pot" https://raw.githubusercontent.com/WordPress/openverse-frontend/main/src/locales/po-files/openverse.pot
Index: init-repos.sh
===================================================================
--- init-repos.sh (revision 18316)
+++ init-repos.sh (working copy)
@@ -36,6 +36,12 @@
cd $CO/pattern-directory && git fetch origin --quiet && git reset --hard origin/build --quiet
fi
+if [ ! -d $CO/wporg-mu-plugins ]; then
+ git clone --branch trunk https://github.com/WordPress/wporg-mu-plugins.git $CO/wporg-mu-plugins
+else
+ cd $CO/wporg-mu-plugins && git fetch origin --quiet && git reset --hard origin/trunk --quiet
+fi
+
cd $CO
svn co https://i18n.svn.wordpress.org/tools/trunk i18n-tools
Index: update-originals-wp.sh
===================================================================
--- update-originals-wp.sh (revision 18316)
+++ update-originals-wp.sh (working copy)
@@ -91,6 +91,9 @@
if [ -d "$CO/pattern-directory" ]; then
import_po meta/pattern-directory $CO/pattern-directory/wporg-patterns.pot
fi
+if [ -d "$CO/wporg-mu-plugins" ]; then
+ import_po meta/wporg-mu-plugins $CO/wporg-mu-plugins/wporg-mu-plugins.pot
+fi
if [ -d "$CO/browsehappy" ]; then
import_po meta/browsehappy $CO/browsehappy/languages/browsehappy.pot
fi |
@iandunn I'm assuming you want continue to use the |
Agreed. I've added this in r18321-dotorg and an incoming Meta commit will update the file references dynamically to point to the right location. |
…erent repo. See WordPress/wporg-mu-plugins#46 See r18321-dotorg. git-svn-id: https://meta.svn.wordpress.org/sites/trunk@11457 74240141-8908-4e6f-9713-ba540dce6ec7
@iandunn FYI; yes you'd have to also manually create the GP project, the CLI tools don't do that automatically (Other than the custom Plugin/Theme import scripts) |
Yup, those commits look good, thanks! |
This is working on Rosetta sites. It doesn't work on things like https://learn.wordpress.org/?locale=es_MX, but the old header/footer isn't translated there either, so I think that's something for another day. |
it needs to work in other locales. not just on the rosetta sites, but also sites like Learn that have locale switchers, and the homepage (which has an automatic switch
Basic string internationalization
alt
tags, etcmu-plugins/pub-sync/
The text was updated successfully, but these errors were encountered: