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

Set page titles from translation document #1973

Closed
bahmutov opened this issue Aug 7, 2019 · 1 comment
Closed

Set page titles from translation document #1973

bahmutov opened this issue Aug 7, 2019 · 1 comment

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Aug 7, 2019

Currently, our markdown files have the title of the page in the metadata above it. For example "Why Cypress" page comes from why-cypress.md with the title

---
title: Why Cypress?
---

Screen Shot 2019-08-07 at 10 59 01 AM

When we translate this page, the metadata is also translated, for example the Chinese translation has which is correctly displayed

---
title: 为什么选择Cypress?
---

Screen Shot 2019-08-07 at 11 00 34 AM

But for untranslated pages, the English title is displayed. Here is the Japanese translation

Screen Shot 2019-08-07 at 11 01 21 AM

Note that we actually have Japanese translation for this title in file themes/cypress/languages/ja.yml

sidebar:
  guides:
    overview: 概要
    why-cypress: なぜCypress?

We should pull these titles for untranslated documents and use them instead of the metadata (if there is no metadata)

@jennifer-shehane
Copy link
Member

Part of #1686

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

3 participants