Skip to content
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

Consolidate latest translation efforts #384

Open
rousik opened this issue Apr 30, 2020 · 1 comment
Open

Consolidate latest translation efforts #384

rousik opened this issue Apr 30, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@rousik
Copy link
Collaborator

rousik commented Apr 30, 2020

Looks like both me and @bcardiff were working on improving the same process.

Brian has hooked Lokalise webhook to preview-translations workflow via https://ftc-lokalise-github.manas.dev/lokalise which is a black box as of now to me.

I have built cron-based latest-translations workflow using different branch naming scheme.

We should consolidate efforts and keep only one of the two. I think that direct integration with Lokalise is better (faster integration of new content) but we should document/explain how is the intermediate step implemented and how to manage it (afaik the code is not part of the github repo and the deployment of this webservice is a mystery).

Phase 2 of my efforts were exploring whether we could deploy preview to some stable domain names (e.g. $lang.preview.flattenthecurve.com) so that we don't have to muck around with pseudo-random now.sh domain names that are created whenever new content is published. Having stable domain name would allow us to navigate to known address whenever we want to check the new content.

This might also be a good chance to consider how we track our contributions to reduce the chance that we are working on the same thing without knowing about each other. I suspect neither of us really created a tracking issue for this. I have outlined my thoughts about this on Slack but I don't think we are all on it.

@rousik rousik added the enhancement New feature or request label Apr 30, 2020
@bcardiff
Copy link
Collaborator

bcardiff commented May 4, 2020

Until now there are a couple of pieces to make the translations work.

Getting English content from Github to Lokalise

On every build on master a i18n-en.json file is generated and uploaded to Lokalise. In https://github.com/flattenthecurve/guide/blob/master/.github/workflows/publish.yml#L35-L48 .

This is using a forked version of a GitHub Action to tweak some upload configuration needed for this project, and to upload the English content only. The commit history of manastech/lokalise-file-push@ftc should be self-explanatory.

Getting translations from lokalise to github

The https://ftc-lokalise-github.manas.dev/ service source code is configured as a webhook in lokalize. Its role is to debounce/throttle during 15min the callbacks per language. It also allows to manually trigger the workflow for a specific language if needed.

So, on every change of a translation on language X, it will wait during 15min for more changes. Once that time passed it will trigger the preview-translations workflow that will pull the new content for the language X and leave it in a branch with preview url.

The repository_dispatch: in the preview-translations is to allow triggering the workflow on demand.

The goal was that people without a git working copy could, via github, view the updates of lokalise and merge them into master for publishing.


If you are migrating the code to a cron and the waiting time for that is ok, then the external service can be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants