Skip to content

Updating a translation page shouldn't overwrite the existing translation #171

@tomasciccola

Description

@tomasciccola

This is a follow up to #169

When updating a page content in english, we should have a way of not overwriting the existing translated content in portuguese and spanish. This means that, when generating translations we should:

  • check that there's already a translated page
  • if that's the case, we shouldn't skip the translation, we should create a new page in the same group in notion, with original-translated-title-{date-of-new-translation}.md push to the content branch repo, and push that version to notion with the language label language-automated (taking care that we put that page having the same parent that every language)
  • we should allow content creators to freely delete this newly generated content so that we don't pollute notion with a lot of generated translation pages

Additionally, we should have scripts that allows testing this locally.

  • scripts/run-single-page-translation.ts could test that when we run the translation flow again, we don't overwrite the original page, and create a new one in the i18n tree of the repo
  • another script scripts/push-new-translation-to-notion that pushes that newly translated content to notion, to test that it puts the new translated page with the right language label and in the correct spot

A page that we can use to test this is ending a project. We could:

  • run the run-single-page-translation script, and check that its correctly translated
  • edit the english content, run the script again and test that it creates a copy
  • run scripts/push-new-translation-to-notion and see that it puts the new translated page with the correct label and location in the notion ui.

We still need to decide if hooking all this up as a workflow should live on this issue, or should be a follow up

Metadata

Metadata

Assignees

Labels

High PriorityShould have priority in solving

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions