Imperial-EE-Microsoft / co_op_translator

Easily automate multilingual translations for your projects with co_op_translator, powered by advanced LLM technology.
https://techcommunity.microsoft.com/t5/educator-developer-blog/localizing-github-repositories-with-llms/ba-p/4216434
MIT License
1 stars 2 forks source link

Translating all languages at once takes too much time #21

Closed skytin1004 closed 1 month ago

skytin1004 commented 2 months ago

Problem

Currently, translating all languages at once takes too much time, and every time the translation process is run, all folders are deleted and re-created. This results in inefficiencies, especially if we only need to work on a single language at a time.

Solution

  1. Distribute Translation Tasks: Instead of having one person handle all the translations, encourage team members to each translate one language and then upload their contributions.

  2. Granular Translation Commands:

    • translate -add -l "ko": This command adds a new Korean translation without deleting any existing translations. If the translation already exists, it skips those files.
    • translate -update -l "ko": This command deletes the current Korean translation and re-translates everything for that language.

    When specifying a language code, only the corresponding language folder should be deleted, not all language folders.

Example Implementation

Adding a Translation

The following command will add a new Korean translation without affecting any other existing translations:

translate -add -l "ko"

Updating a Translation

The following command will delete all existing Korean translations and regenerate them:

translate -update -l "ko"

Only Image Translation

The following commands will add a new Korean translation without creating markdowm

translate -add -images -l "ko"

This command checks for existing images with the language code ("ko" in this case). If they exist, it skips those files and does not re-translate them.

translate -update -images -l "ko"

This command deletes all existing images with the language code("ko") and regenerates the translated images.

Only Markdown Translation

The following commands will add a new Korean translation without creating image

translate -add -md -l "ko"

This command checks for existing markdown with the language code ("ko" in this case). If they exist, it skips those files and does not re-translate them.

translate -update -images -l "ko"

This command deletes all existing markdowns with the language code("ko") and regenerates the translated images.

Description

  1. The -add command will only translate files that haven't been translated in the specified language.
  2. The -update command will delete and re-translate files only for the specified language, without affecting other translations.
  3. The -images command will only translate image files.
  4. The -md command will only translate markdown files.
leestott commented 1 month ago

Closing issue as we have migrated to a Microsoft Repo