Skip to content

Commit 47ee985

Browse files
committed
ci: stop updating .pot file, rely on Weblate doing it
1 parent a8395c2 commit 47ee985

5 files changed

Lines changed: 18 additions & 100 deletions

File tree

.github/actions/pull-request/action.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ jobs:
408408
run: ninja -j1 potfiles
409409
working-directory: build
410410

411+
- name: Diff POTFILES
412+
run: |
413+
git diff --color --exit-code po/POTFILES.in
414+
411415
- name: Update .pot file
412416
run: ninja -j1 pot
413417
working-directory: build
@@ -416,26 +420,14 @@ jobs:
416420
run: ninja -j1 msgmerge
417421
working-directory: build
418422

419-
- name: Diff
420-
id: diff
421-
# Note: git diff --name-only ignores --ignore-matching-lines arg
422-
run: |
423-
git diff --color '--ignore-matching-lines=^"POT-Creation-Date: ' 'po/*.po' 'po/*.pot' 'po/POTFILES.in' | tee "$RUNNER_TEMP/po.diff"
424-
size="$(stat --printf=%s "$RUNNER_TEMP/po.diff")"
425-
echo "size=$size" | tee -a "$GITHUB_OUTPUT"
426-
427-
- name: Create pull request
428-
if: vars.APP_ID && fromJSON(steps.diff.outputs.size) && inputs.push
429-
uses: ./.github/actions/pull-request
430-
with:
431-
app-id: ${{ vars.APP_ID }}
432-
private-key: ${{ secrets.APP_KEY }}
433-
title: 'translations: update translation files'
434-
description: 'Update translation files. Before merging this, make sure there are no unmerged changes from Weblate.'
435-
files: |
436-
po/*.po
437-
po/*.pot
438-
po/POTFILES.in
423+
- name: Diff translations
424+
run: >-
425+
git diff
426+
--color
427+
'--ignore-matching-lines=^"POT-Creation-Date: '
428+
'--ignore-matching-lines=^"Report-Msgid-Bugs-To: '
429+
'po/*.po'
430+
'po/*.pot'
439431
440432
test:
441433
needs:

po/POTFILES.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-FileCopyrightText: NONE
22
# SPDX-License-Identifier: CC0-1.0
3-
# SPDX-FileComment: This file is generated by gen-potfiles.py, do not edit
3+
# Generated by gen-potfiles.py, run "ninja potfiles" to update
44
data/com.github.amezin.ddterm.desktop.in.in
55
ddterm/app/about.js
66
ddterm/app/application.js

po/gen-potfiles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def gen(
5858
print('# SPDX-FileCopyrightText: NONE', file=output)
5959
print('# SPDX-License-Identifier: CC0-1.0', file=output)
6060
print(
61-
f'# SPDX-FileComment: This file is generated by {os.path.basename(__file__)}, do not edit',
61+
f'# Generated by {os.path.basename(__file__)}, run "ninja potfiles" to update',
6262
file=output
6363
)
6464
# REUSE-IgnoreEnd

po/meson.build

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,10 @@
22
#
33
# SPDX-License-Identifier: GPL-3.0-or-later
44

5-
# REUSE-IgnoreStart
6-
gettext_copyright = '\n'.join(
7-
[
8-
'ddterm contributors <https://github.com/ddterm/gnome-shell-extension-ddterm/>',
9-
'SPDX-License-Identifier: GPL-3.0-or-later',
10-
],
11-
)
12-
# REUSE-IgnoreEnd
5+
gettext_copyright = fs.read(f'@gettext_domain@.pot.license').replace(
6+
'SPDX-FileCopyrightText:',
7+
'',
8+
).strip()
139

1410
gettext_args = [
1511
'--from-code=UTF-8',

0 commit comments

Comments
 (0)