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

Automate l10n extract/merge #5872

Open
EnTeQuAk opened this issue Aug 8, 2018 · 10 comments
Open

Automate l10n extract/merge #5872

EnTeQuAk opened this issue Aug 8, 2018 · 10 comments
Assignees
Labels
neverstale Use this to tell stalebot to not touch this issue. Should be used infrequently. repository:addons-server Issue relating to addons-server

Comments

@EnTeQuAk
Copy link
Contributor

EnTeQuAk commented Aug 8, 2018

Acceptance criteria:

  • weekly Pull request is opened with extracted localization context
  • manually approved and merged as a part of release push

Notes:

  • use the simplest approach
  • should include addons frontend and server, not linter

┆Issue is synchronized with this Jira Task

@EnTeQuAk
Copy link
Contributor Author

Just for the sake of documenting my progress, here are two temporary experiments that progress on automating l10n extraction:

@EnTeQuAk
Copy link
Contributor Author

With #6020 at least product-details updating won't be needed anymore.

@EnTeQuAk EnTeQuAk removed their assignment Mar 12, 2019
@stale

This comment has been minimized.

@stale stale bot added the state:stale Issues marked as stale. These can be re-opened should there be plans to fix them. label Sep 8, 2019
@diox
Copy link
Member

diox commented Sep 8, 2019

Still needed.

@stale stale bot removed the state:stale Issues marked as stale. These can be re-opened should there be plans to fix them. label Sep 8, 2019
@stale

This comment has been minimized.

@stale stale bot added the state:stale Issues marked as stale. These can be re-opened should there be plans to fix them. label Mar 6, 2020
@diox diox added neverstale Use this to tell stalebot to not touch this issue. Should be used infrequently. and removed state:stale Issues marked as stale. These can be re-opened should there be plans to fix them. triaged labels Mar 7, 2020
@diox diox changed the title Automate l10n extract and product-update via circleci Automate l10n extract/merge Apr 11, 2022
@diox
Copy link
Member

diox commented Apr 11, 2022

Note: we might want to consider running just the extract (generating the .pot file) on each commit / as part of the test suite. It's reasonably fast and if it runs into trouble, that should probably error out - it's likely the configuration/templates are broken in some way.

@KevinMind
Copy link
Contributor

I am even more in favor of implementing the proposal here after looking at this.

But here is a potential solution for the current manual step of extracting and merging locales using a git pre-commit hook.

Screen.Recording.2024-01-10.at.10.00.48.mov

PR: mozilla/addons-frontend#12775

@KevinMind
Copy link
Contributor

Adding this here as a WIP of how this could be solved in a scalable way that doesn't deviate too much from the current architecture.

We can utilize a github action to handle extracting and merging locales in a fully automated pipeline that can be shared between multiple repositories enabling this feature for all Addons repositories that do locale extraction.

Requirements:

  • implement a generic github action that:
    • orchestrates execution of extract and merge via expected bash scripts that should be implemented in the consuming repo.
    • executes on pushes to master (a better and more automated solution would be to execute mid merge, but this would require implementing merge queues and we 1) don't have that and 2) have mixed feelings about them.
    • checks if locale files have changed
    • if they have, commits them and pushes to master (we could also open a PR but pontoon is already committing directly so there is little benefit)

This action could be stored in the addons repo and shared with other repositories so long as they are owned by the same org. This is the happy path, but if it is overly complex, or not feasible from a security standpoint, we can always just copy the code and if it needs updating, open PRs in the repos 🤷 anything is possible.

The scripts for extracting and merging could be separate or could be just one script that should be executed on each repo. It doesn't seem possible to completely encapsulate the logic for extracting as different repos have different implementations to work with. But if there is an expected script the repo can just add their logic there and the action will do the rest.

@KevinMind
Copy link
Contributor

@KevinMind
Copy link
Contributor

@KevinMind KevinMind added repository:addons-server Issue relating to addons-server migration:2024 labels May 4, 2024
@KevinMind KevinMind transferred this issue from mozilla/addons-server May 4, 2024
@KevinMind KevinMind reopened this Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
neverstale Use this to tell stalebot to not touch this issue. Should be used infrequently. repository:addons-server Issue relating to addons-server
Projects
None yet
6 participants