This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acad48e
commit 3a985e0
Showing
29 changed files
with
1,288 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
--- | ||
name: localize | ||
|
||
on: | ||
push: | ||
branches: [nightly] | ||
paths: # prevents workflow from running unless these files change | ||
- '.github/workflows/localize.yml' | ||
- 'Contents/Strings/Themerr-plex.po' | ||
- 'Contents/Code/**.py' | ||
- 'Contents/Resources/web/templates/**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
localize: | ||
name: Update Localization | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Python 2.7 | ||
uses: LizardByte/.github/actions/setup_python2@nightly | ||
|
||
- name: Set up Python Dependencies | ||
run: | | ||
python -m pip install --upgrade pip setuptools | ||
python -m pip install -r requirements.txt | ||
- name: Update Strings | ||
run: | | ||
python ./scripts/_locale.py --extract | ||
- name: git diff | ||
run: | | ||
# disable the pager | ||
git config --global pager.diff false | ||
# print the git diff | ||
git diff Contents/Scripts/plugger.po | ||
# set the variable with minimal output, replacing `\t` with ` ` | ||
OUTPUT=$(git diff --numstat Contents/Strings/themerr-plex.po | sed -e "s#\t# #g") | ||
echo "git_diff=${OUTPUT}" >> $GITHUB_ENV | ||
- name: git reset | ||
if: ${{ env.git_diff == '1 1 Contents/Scripts/plugger.po' }} # only run if more than 1 line changed | ||
run: | | ||
git reset --hard | ||
- name: Get current date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
|
||
- name: Create/Update Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
add-paths: | | ||
Contents/Scripts/*.po | ||
token: ${{ secrets.GH_BOT_TOKEN }} # must trigger PR tests | ||
commit-message: New localization template | ||
branch: localize/update | ||
delete-branch: true | ||
base: nightly | ||
title: New Babel Updates | ||
body: | | ||
Update report | ||
- Updated ${{ steps.date.outputs.date }} | ||
- Auto-generated by [create-pull-request][1] | ||
[1]: https://github.com/peter-evans/create-pull-request | ||
labels: | | ||
babel | ||
l10n |
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 |
---|---|---|
|
@@ -168,3 +168,7 @@ plexhints-temp | |
|
||
# Remove python modules | ||
Contents/Libraries/Shared/ | ||
|
||
# npm | ||
node_modules/ | ||
package-lock.json |
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
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.