-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Upload translations on builds of master
#4002
Merged
jfdoming
merged 5 commits into
actualbudget:master
from
jfdoming:jfdoming/translation-exports
Dec 24, 2024
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bf7a400
fix: translations were not being loaded properly
jfdoming 4ae4c8c
fix: support running GitHub actions locally with `act`
jfdoming a7e0875
feat: upload new strings on master build
jfdoming 2e9a3df
Add release notes
jfdoming c68d90b
PR feedback: security
jfdoming File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,36 @@ | ||
name: Extract and upload i18n strings | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
extract-and-upload-i18n-strings: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up environment | ||
uses: ./.github/actions/setup | ||
- name: Configure i18n client | ||
run: | | ||
pip install wlc | ||
- name: Generate i18n strings | ||
run: yarn generate:i18n | ||
- name: Upload i18n strings | ||
run: | | ||
if [[ ! -f packages/desktop-client/locale/en.json ]]; then | ||
echo "File packages/desktop-client/locale/en.json not found. Ensure the file was generated correctly." | ||
exit 1 | ||
fi | ||
wlc \ | ||
--url https://hosted.weblate.org/api/ \ | ||
--key "${{ secrets.WEBLATE_API_KEY_CI_STRINGS }}" \ | ||
upload \ | ||
--author-name "Actual Budget" \ | ||
--author-email "[email protected]" \ | ||
--method add \ | ||
--input packages/desktop-client/locale/en.json \ | ||
actualbudget/actual/en | ||
echo "Translations uploaded" | ||
jfdoming marked this conversation as resolved.
Show resolved
Hide resolved
|
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 |
---|---|---|
|
@@ -25,3 +25,6 @@ public/kcab | |
public/data | ||
public/data-file-index.txt | ||
public/*.wasm | ||
|
||
# translations | ||
locale/ |
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,6 @@ | ||
--- | ||
category: Maintenance | ||
authors: [jfdoming] | ||
--- | ||
|
||
Upload translations after changes are merged |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a seprate step?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean like having a step just for the validation? My thinking is this was just a simple prereq check for the
wlc
command below, but open to refactoring if you think they should be separate