Skip to content
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

SPT: Serve translated theme homepage templates #36061

Closed
5 tasks
obenland opened this issue Sep 11, 2019 · 2 comments
Closed
5 tasks

SPT: Serve translated theme homepage templates #36061

obenland opened this issue Sep 11, 2019 · 2 comments

Comments

@obenland
Copy link
Member

obenland commented Sep 11, 2019

Let's explore storing starter page templates and template-first theme's homepage templates in json files to improve parsing times in BlockPreviews and content translations.

See paYJgx-bI-p2.

  • Save json in post meta.
  • Have a script that looks up post meta and saves into json files.
  • Have a lib where these files live + code to save/load/translate.
  • Endpoint to pull json files and incorporates translations.
  • Find a way to reuse existing template translations.
@obenland
Copy link
Member Author

obenland commented Oct 4, 2019

Since opening this ticket we learned that parsing templates is not our performance bottleneck. Setting state with the parsed blocks, is. See #35713 (comment). So storing them in json files doesn't help much.

For translations, it turns out, we don't need them either. Every theme comes with Headstart annotations that get translated, so we can use those. For template-first themes, those annotations are the same as the demo site content.

Work for using those annotations rather than the demo site content itself is being tracked in D33496-code.

@obenland obenland changed the title SPT: Store templates in json files SPT: Serve translated theme homepage templates Oct 4, 2019
@obenland
Copy link
Member Author

Fixed in D33496-code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants