Skip to content

feat: add scripts that helps inserting Google-translated content into .po file - #378

Merged
josix merged 7 commits into
python:3.11from
mattwang44:googletrans-utils
Mar 1, 2023
Merged

josix merged 7 commits into
python:3.11from
mattwang44:googletrans-utils

Conversation

@mattwang44

@mattwang44 mattwang44 commented Jan 14, 2023 •

Copy link
Copy Markdown
Collaborator

[WHY]

As a translator, I'd like to have machine-translated content as the base that I can revise, which significantly reduces the translation effort.

[HOW]

Major

  • Add .scripts directory, which is expected to be where all translation toolkits lie in. Poetry is set up here.
  • Implement script that sends all untranslated entries of the target .po file to Google translation, and inserts translated content into the .po file.

One can run the script with:

.scripts/google_translate.sh library/csv.po

Minor

  • Revise the existing from_cn.sh script and move it into .scripts.

One can run the script with:

.scripts/from_cn.sh library/csv.po

@ezio-melotti ezio-melotti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably out of the scope of this PR, but eventually I think it might be useful to have a separate translation-tools repo where to put tools that can be shared by different translation projects.
If the tools are in a separate repo, it is also not necessary to create a hidden dir that is not easily discoverable (using _scripts might be a better option, unless it interferes with something).

@josix josix left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could merge it first, and create another PR for making batch procedure.

@josix
josix merged commit a975c17 into python:3.11 Mar 1, 2023
@mattwang44
mattwang44 deleted the googletrans-utils branch March 11, 2024 05:04
beccalzh pushed a commit to beccalzh/python-docs-zh-tw that referenced this pull request Sep 4, 2024
feat: add scripts that helps inserting Google-translated content into .po file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants