Skip to content

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

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

Merged
merged 7 commits into from
Mar 1, 2023

Conversation

mattwang44
Copy link
Collaborator

@mattwang44 mattwang44 commented Jan 14, 2023

[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

Copy link
Member

@ezio-melotti ezio-melotti left a comment

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).

Copy link
Collaborator

@josix josix left a comment

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