Skip to content

Automating Translations #742

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

Closed
wants to merge 3 commits into from
Closed

Automating Translations #742

wants to merge 3 commits into from

Conversation

roblarsen
Copy link
Member

@roblarsen roblarsen commented Jul 18, 2022

Workflow?

  1. Questions are edited in English
  2. There are no translations in development or PR branches
  3. development a new (soon to be) protected branch, is the target for PRs and ongoing development.
  4. We create an Action for merges into main (monthly?) that
    1. Runs tranlsate.mjs (not the garbage version in this PR as of this writing, but a good version) which uses Azure translator api to translate to our target languages. We can add as many languages as we can translate for less than 2,000,000 characters a month.
    2. Creates a GitHub release (because why not)
    3. Build eleventy and pushes to gh-pages

Questions:

  1. Still use eleventy and link to translations?
  2. Would we want to copy the same multiple md file structure of the root for the translated folders?
  3. What would we have to do to make sure we can still use eleventy on the automated translated markdown files.
  4. Would it be better to serve the users preferred language?

@roblarsen roblarsen linked an issue Jul 18, 2022 that may be closed by this pull request
@roblarsen roblarsen marked this pull request as draft July 18, 2022 19:51
@roblarsen roblarsen self-assigned this Jul 18, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jul 20, 2022

This pull request introduces 1 alert when merging d24a070 into 0a43c7a - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@roblarsen
Copy link
Member Author

roblarsen commented Jul 20, 2022

@coliff (with an appropriate Azure translate API key) this code successfully reads markdown and writes a translated file. We can do 2,000,000 characters a month with the free tier or $10/1,000,000 characters for the pay as you go. The free tier should be fine as long as we aren't translating every file every time we do everything, so we just need to figure out a workflow where we call Azure appropriately alongside the site build process.

I think running an action on:release would make the most sense. That will definitely keep us under the limit, because we probably won't release all that often. If we do, we'll just have to deal with that going forward.

@lgtm-com
Copy link

lgtm-com bot commented Jul 25, 2022

This pull request introduces 2 alerts when merging 88e41ed into c62f285 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@roblarsen
Copy link
Member Author

This code is complete, at least in terms of translating from Azure. 300,000 characters to translate the whole project.

There's plenty to-do here, but this is blocked by #743

@roblarsen roblarsen closed this Sep 6, 2023
@roblarsen roblarsen reopened this Sep 6, 2023
@roblarsen roblarsen closed this Sep 8, 2023
@roblarsen roblarsen deleted the 449-automate-translations branch September 8, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

automate translations
1 participant