Skip to content

Automate en.json change detection and PR creation #1747

@shuuji3

Description

@shuuji3

Describe the feature

I come up with a meta file format and workflows that can track changes and is ML-translatable:

1. update en.meta.json

we'll update this file during PR autocheck when en.json is changed (so current text change workflow should be same). it records the latest commit for each updated key. (I guess Lunaria has some helper function to find change detection in en.json (before/after pr))

before:

{ "tagline": { "text": "old text", "commit": "sha-a" } }

after (by autocheck):

{ "tagline": { "text": "new text", "commit": "sha-b" } }

2. ml translation PR with ja.meta.json

in a separate github actions, we'll compare en.meta.json and other [lang].meta.json. when a change is detected, apply ml translation as a draft translation.

before (outdated):

{
  "tagline": {
    "translation": "old japanese text",
    "en_text": "old text",
    "en_commit": "sha-a"
  }
}

after (ML generated draft):

{
  "tagline": {
    "translation": "new translated text", // updated by ML
    "en_text": "new text", 
    "en_commit": "sha-b"
  }
}

I think this allows reviewers to see the source text and the translation in a single github pr diff view, and can modify translations as needed in pr review.

Originally posted at https://discord.com/channels/1464542801676206113/1465734070817259601/1477234340688564308

See also #1689

Based on the above idea, I'm going to try implementing a script to generate, en.meta.json genearaion as a first step.

Tasks

Additional information

  • Would you be willing to help implement this feature?

Final checks

Metadata

Metadata

Assignees

Labels

i18nRelated to internationalization

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions