-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add
atlas pull --expand-glob
to expand bash glob file patterns
Example: 'atlas pull translations/*/done' pulls 'atlas pull translations/DoneXBlock/done' if it exists.
- Loading branch information
1 parent
dd55d89
commit cdd49a6
Showing
8 changed files
with
194 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Establishing a Repository for Translations Management | ||
##################################################### | ||
|
||
Description | ||
*********** | ||
Glob pattern support has been added to ``atlas``. | ||
|
||
Example | ||
******* | ||
|
||
``atlas pull --expand-glob translations/*/done`` pulls | ||
``atlas pull translations/DoneXBlock/done`` if it exists. | ||
|
||
This is useful for instance to pull XBlocks in which the directory name | ||
isn't known but the module name is. | ||
|
||
This is an alternative to the `edx-platform-links`_ strategy because | ||
``git sparse-checkout --no-cone`` don't support glob patterns across links. | ||
|
||
|
||
Dismissed alternatives | ||
********************** | ||
|
||
1. Support links again: | ||
----------------------- | ||
|
||
Previous tests on unknown git version showed to support links in April 2023, | ||
but it had no automated tests and broke somewhere during the | ||
`git v2.25.1 version support`_ we've added. | ||
|
||
The sparse-checkout part is already complex, so we'll not touch it. | ||
|
||
2. Make complete copies of the translations in `edx-platform-links`_ | ||
--------------------------------------------------------------------- | ||
This is the most viable and simple alternative to glob patterns. | ||
|
||
If it turns out the ``--expand-glob`` option is flaky to work with, we'll | ||
fallback to this. | ||
|
||
This _may_ complicate the GitHub Transifex App sync process which we prefer | ||
to keep simple and avoid adding additional step to ensure the | ||
`edx-platform-links`_ have full copies of the XBlock and plugins translations | ||
instead of symbolic links. | ||
|
||
3. Use the `edx-platform-links`_ to store the original files | ||
------------------------------------------------------------ | ||
|
||
This is a viable option as well but needs to refactor the Transifex | ||
configuration which could reset the translations. | ||
|
||
Therefore, we'll only fallback to this if the glob patterns has problems. | ||
|
||
.. _edx-platform-links: https://github.com/openedx/openedx-translations/blob/8a01424fd8f42e9e76aed34e235c82ab654cdfc5/translations/edx-platform-links/README.rst | ||
.. _git v2.25.1 version support: https://github.com/openedx/openedx-atlas/pull/23 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ pull: | |
directory: example_directory | ||
repository: example_repository | ||
filter: example_filter | ||
expand_glob: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.