-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Onboarding: some copy isn't appearing in the list of strings to be translated #47884
Comments
Just wanted to note that we have the translations for all of these strings and they were appearing translated earlier last week, when the first reviewers reviewed the content (on November 23-25). It looks like they only started appearing in English the last few days starting on the 27th... |
@yuliyan would you be able to take a look into this? Even if its just to educate me on where translations for ETK are coming from? These strings are translated on translate.wordpress.com but not present for translate.wordpress.org. Is this down to creating plugin releases perhaps? |
@lsl, ETK translations are coming from translate.wordpress.org. Our internal i18n-deploy tool downloads the translations, builds language packs and commits them to WPcom i18n svn. The problem with the missing translation seems to be that the originals for the mentioned strings have disappeared from https://translate.wordpress.org/projects/wp-plugins/full-site-editing/stable/. I found that this have happened with https://plugins.trac.wordpress.org/changeset?old_path=%2Ffull-site-editing&old=2424109&new_path=%2Ffull-site-editing&new=2424109&sfp_email=&sfph_mail=#file8. I tried downloading that version of the plugin and extracting translatable strings manually with The reason why those strings are not being extracted is that Looking closely at the For a quick fix workaround, I'd suggested to temporary replace destructing the result of the |
I thought of another option - maybe we can exclude translation function names from terser's mangle options, e.g.:
Though, I'm not very experienced with terser and I'm not sure if it's ok to use it like that. @scinos, do you see any problem in that approach? |
Somehow I remember doing tests long ago where the extractor could read mangled code just fine. How do __() calls in Jetpack bundles look like, for example? |
@simison I believe the extractor has been written to deal with a few different ways the code can be mangled: IMO I think excluding translation functions from minification is the best approach, I think too much of our toolchain assumes it will be able to find |
I think this has been done already for something in the past, maybe i18n-calypso's translation function? I wonder if we need to do the same. |
Gotcha, thanks for explaining @p-jackson. Let's treat this as a priority so that it doesn't block AB testing. |
Ideally, we'd be extracting the strings from the source files, and not the compiled files, which would make it less dependant on the build tools we use and give better source references in GP. However, it looks like Peast doesn't plan on adding TypeScript support for now, so unless |
FYI @Automattic/team-calypso this thread might interest you. |
I agree that preventing mangling of mangle: {
reserved: [ '__', '_n', '_nx', '_x' ]
} We want to prevent mangling local variables initialized with |
I wanted to note that this process will fail to pick up I also have TS code that needs to be translated, and I've been trying out running It only works when Terser is configured to retain the translators comments, and also |
Steps to reproduce
What I expected
All copy translated :)
What happened instead
Copy like "Site launch steps" isn't translated
Also on translate.wordpress.org you see that even the English strings are missing
Screenshot / Video
Ignore the red box, this bug is just about what the copy the arrows are pointing to.
Context / Source
pbAok1-1II-p2#comment-3455
The text was updated successfully, but these errors were encountered: