Skip to content

Changes to support weblate workflow #2210

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

Merged
merged 53 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
45e6c25
localize reformat
ikreymer Dec 4, 2024
5730e1f
Translations update from Hosted Weblate (#2206)
weblate Dec 4, 2024
165ae91
ci: add weblate-reformat action
ikreymer Dec 4, 2024
82a79a0
fix syntax error
ikreymer Dec 4, 2024
57b92fb
add repo full name
ikreymer Dec 4, 2024
7284325
update messages
ikreymer Dec 4, 2024
3b006fe
build changes
ikreymer Dec 4, 2024
2d86f7a
also commit templates
ikreymer Dec 4, 2024
ae09d19
rename
ikreymer Dec 4, 2024
39d5355
Translated using Weblate (Spanish)
Dec 4, 2024
a5f856e
Translated using Weblate (Spanish)
Dec 4, 2024
8f91d1d
Translated using Weblate (Spanish)
Dec 4, 2024
35ab225
Translated using Weblate (Spanish)
Dec 4, 2024
ba04d5a
Translated using Weblate (Spanish)
Dec 4, 2024
f7122ca
Translated using Weblate (Spanish)
missclaraitzel Dec 4, 2024
7e896e0
Translations update from Hosted Weblate (#2207)
weblate Dec 4, 2024
c908639
Merge remote-tracking branch 'weblate/weblate' into weblate
ikreymer Dec 4, 2024
9baae09
Apply `localize:extract` changes
ikreymer Dec 4, 2024
517a191
Translated using Weblate (Spanish)
Dec 4, 2024
beb0323
wrap in html``
ikreymer Dec 5, 2024
2169326
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
4089190
Apply `localize:extract` changes
ikreymer Dec 5, 2024
1bd81f8
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
4c10fc3
update es.xlf
ikreymer Dec 5, 2024
5502e92
Merge branch 'weblate' of github.com:webrecorder/browsertrix-cloud in…
ikreymer Dec 5, 2024
419ef72
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
c01457e
convert msg() that use & to use html`` to ensure unescaping
ikreymer Dec 5, 2024
7e9819c
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
bc1c0fa
undo change
ikreymer Dec 5, 2024
7cc3f6e
update
ikreymer Dec 5, 2024
f4ff2c4
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
549b151
remove & use and
ikreymer Dec 5, 2024
517c8bc
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
b1099a2
Translations update from Hosted Weblate (#2212)
weblate Dec 5, 2024
eb6b361
Merge remote-tracking branch 'weblate/weblate' into weblate
ikreymer Dec 5, 2024
a8dc067
Apply `localize:extract` changes
ikreymer Dec 5, 2024
46b4b1e
try w/o sorting attrs, may revert, testing for conflict
ikreymer Dec 5, 2024
02b5a8c
Translated using Weblate (Spanish)
Dec 5, 2024
f1e854b
Translations update from Hosted Weblate (#2216)
weblate Dec 5, 2024
f1b2563
Merge remote-tracking branch 'origin/weblate' into weblate
weblate Dec 5, 2024
35e558d
Translations update from Hosted Weblate (#2217)
weblate Dec 5, 2024
f6a7016
Merge branch 'main' into weblate
ikreymer Dec 5, 2024
71d7744
reformat
ikreymer Dec 5, 2024
0ae2a12
Merge branch 'weblate' of github.com:webrecorder/browsertrix-cloud in…
ikreymer Dec 5, 2024
7e2614d
Translations update from Hosted Weblate (#2219)
weblate Dec 5, 2024
82a5e79
Merge branch 'main' into weblate
ikreymer Dec 8, 2024
0453db4
Merge branch 'weblate' of github.com:webrecorder/browsertrix-cloud in…
ikreymer Dec 8, 2024
039e882
rename `package` to `pkg` to fix prettier error
emma-sg Dec 8, 2024
a98a9fd
revert merge conflict resolution
SuaYoo Dec 9, 2024
b16947c
Apply `localize:extract` changes
SuaYoo Dec 9, 2024
b75ed9b
Update frontend/src/features/crawl-workflows/workflow-list.ts
SuaYoo Dec 9, 2024
e2553ba
Apply `localize:extract` changes
SuaYoo Dec 9, 2024
b8b9893
remove localize:extract from frontend build workflow
SuaYoo Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/docs-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ jobs:
DOCS_SOURCE_URL: https://app.browsertrix.com
ENABLE_ANALYTICS: true

- name: Build & Deploy Docs
- name: Build Docs
run: cd frontend/docs; mkdocs gh-deploy --force
env:
SITE_URL: https://docs.browsertrix.com
ENABLE_ANALYTICS: true
16 changes: 1 addition & 15 deletions .github/workflows/frontend-build-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ on:
jobs:
setup-and-build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
# Setup:
Expand Down Expand Up @@ -78,17 +74,7 @@ jobs:
run: yarn lint:check

# Localize:
- name: Extract strings
working-directory: frontend
run: yarn localize:extract
- name: Commit extracted strings
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply `localize:extract` changes
file_pattern: '**/*.xlf'
skip_fetch: true
skip_checkout: true
- name: Check localization build
- name: Localization build dry run
working-directory: frontend
run: yarn localize:build

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/weblate-reformat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Weblate Reformat
on:
pull_request_target:
paths:
- 'frontend/xliff/**'
- '.github/workflows/weblate-reformat.yaml'

branches:
- 'weblate'

jobs:
setup-and-build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write

steps:
# Setup:
- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
- name: Install dependencies
working-directory: frontend
env:
HUSKY: 0
run: yarn install --frozen-lockfile

# Localize:
- name: Reformat XLIFF files
working-directory: frontend
run: yarn localize:extract

- name: Rebuild frontend templates
working-directory: frontend
run: yarn localize:build

- name: Commit changes to upstream branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Format Weblate Changes
file_pattern: '**/*.xlf **/__generated__/locales/*.ts'
skip_fetch: true
skip_checkout: true
1 change: 0 additions & 1 deletion frontend/docs/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
site_name: Browsertrix Docs
site_url: !ENV SITE_URL
repo_url: https://github.com/webrecorder/browsertrix-cloud/
repo_name: Browsertrix
edit_uri: edit/main/frontend/docs/docs/
Expand Down
2 changes: 1 addition & 1 deletion frontend/prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
parser: "xml",
proseWrap: "never",
printWidth: Infinity,
xmlSortAttributesByKey: true,
xmlSortAttributesByKey: false,
xmlWhitespaceSensitivity: "preserve",
xmlSelfClosingSpace: false,
},
Expand Down
5 changes: 3 additions & 2 deletions frontend/scripts/get-resolved-playwright-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ let file = fs.readFileSync("yarn.lock", "utf8");
let json = lockfile.parse(file);

console.log(
Object.entries(json.object).find(([package]) => package.startsWith("@playwright/test"))[1]
.version,
Object.entries(json.object).find(([pkg]) =>
pkg.startsWith("@playwright/test"),
)[1].version,
);
Loading
Loading