Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork45
New CI for wrapping all po files#31
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
9 commits Select commitHold shift + click to select a range
aca1acd Update and rename wrap.yml to wrap_pr.yml
egeakman7c83494 Create wrap_branch.yml
egeakman2dbf2cc Update wrap_branch.yml
egeakman3167714 Merge pull request #1 from egeakman/CI
egeakmanc6828ea Update workflows (#2)
egeakman1a95685 Update workflows (#3)
egeakman4f53f25 Update wrap_branch.yml
egeakmand167249 Update wrap_branch.yml
egeakmanaad9089 Wrap translations
github-actions[bot]File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
71 changes: 71 additions & 0 deletions.github/workflows/wrap_branch.yml
This file contains hidden or 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,71 @@ | ||
| name: "Wrap all po files in branch" | ||
| on: workflow_dispatch | ||
| jobs: | ||
| wrap: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| # Run in all these versions of Python | ||
| python-version: ["3.10"] | ||
| steps: | ||
| # Checkout the latest code from the repo | ||
| - name: Checkout repo | ||
| uses: actions/checkout@v2 | ||
| # Setup which version of Python to use | ||
| - name: Set Up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| # Display the Python version being used | ||
| - name: Display Python version | ||
| run: python -c "import sys; print(sys.version)" | ||
| # Update pip | ||
| - name: Update pip | ||
| run: python -m pip install --upgrade pip | ||
| # Install requirements. | ||
| - name: Install requirements | ||
| run: python -m pip install --upgrade -r requirements.txt | ||
| # Install dependencies | ||
| - name: Install dependencies | ||
| run: sudo apt install gettext | ||
| # Wrap all po files | ||
| - name: Wrap | ||
| run: powrap *.po **/*.po | ||
| # Detect changed files | ||
| - name: Detect changed files | ||
| run: echo "WRAPPED=$(git diff --name-only | tr '\n' ' ')" >> $GITHUB_ENV | ||
| # Commit changes | ||
| - name: Commit changes | ||
| run: | | ||
| array=($WRAPPED) | ||
| len=${#array[@]} | ||
| if [[ $len -eq 0 ]]; then | ||
| echo "No files to commit" | ||
| echo "WRAPPED=False" >> $GITHUB_ENV | ||
| else | ||
| echo "Committing changes" | ||
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git config --local user.name "github-actions[bot]" | ||
| git add ${WRAPPED} | ||
| git commit -m "Wrap translations" | ||
| echo "WRAPPED=True" >> $GITHUB_ENV | ||
| fi | ||
| # Push changes | ||
| - name: Push changes | ||
| if: env.WRAPPED == 'True' | ||
| uses: ad-m/github-push-action@master | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| branch: ${{ github.ref_name }} |
5 changes: 2 additions & 3 deletions.github/workflows/wrap.yml → .github/workflows/wrap_pr.yml
This file contains hidden or 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
6 changes: 2 additions & 4 deletionscopyright.po
This file contains hidden or 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
22 changes: 15 additions & 7 deletionssphinx.po
This file contains hidden or 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
58 changes: 29 additions & 29 deletionstutorial/appendix.po
This file contains hidden or 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
28 changes: 14 additions & 14 deletionstutorial/appetite.po
This file contains hidden or 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.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.