Skip to content

Commit 25f75f3

Browse files
authored
Merge pull request #6 from dev-nis/master
Bump version to 1.0.7
2 parents 9940d8c + 5bd71e0 commit 25f75f3

13 files changed

+419
-29
lines changed

.github/workflows/makefile.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: SailfishOS App CI (aarch64, armv7hl, i486)
2+
env:
3+
sfos_target: 4.5.0.16
4+
5+
on:
6+
push:
7+
# tags:
8+
# - 'v*-sfos4.2'
9+
branches:
10+
- 'master'
11+
#pull_request:
12+
# branches:
13+
# - sfos4.2
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-20.04
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Prepare
23+
run: mkdir RPMS
24+
25+
- name: Build armv7hl
26+
uses: coderus/github-sfos-build@master
27+
with:
28+
release: ${{ env.sfos_target }}
29+
arch: armv7hl
30+
31+
- name: Build i486
32+
uses: coderus/github-sfos-build@master
33+
with:
34+
release: ${{ env.sfos_target }}
35+
arch: i486
36+
37+
- name: Build aarch64
38+
uses: coderus/github-sfos-build@master
39+
with:
40+
release: ${{ env.sfos_target }}
41+
arch: aarch64
42+
43+
- name: Upload build result
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: rpm-build-result
47+
path: RPMS
48+
- name: Checkout
49+
uses: actions/checkout@v4
50+
- name: Release
51+
uses: softprops/action-gh-release@v2
52+
#if: startsWith(github.ref, 'refs/tags/')
53+
with:
54+
files: |
55+
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.aarch64
56+
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.armv7hl
57+
/workspace/RPMS/jolla-settings-screenmonitor-${{ github.ref_name }}-1.i486
58+
jolla-settings-screenmonitor.changes

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
jolla-settings-screenmonitor.pro.user
2+
jolla-settings-screenmonitor.pro.user.*
23
jolla-settings-screenmonitor.pro.autosave
4+
jolla-settings-screenmonitor.pro.user.0a580b9
5+
6+
service/ScreenMonitor
37

48
RPMS/

jolla-settings-screenmonitor.pro

+47-15
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ TEMPLATE = aux
1212

1313
TARGET = jolla-settings-screenmonitor
1414
jolla-settings-screenmonitor.depends += ScreenMonitor
15+
screenmonitor-executable.CONFIG += no_check_exist
1516

1617
#CONFIG += sailfishapp
1718

@@ -30,7 +31,7 @@ screenmonitor-dbus-configuration.files = service/dbus/eu.medesimo.ScreenMonitor.
3031
screenmonitor-dbus-service.path = /usr/share/dbus-1/system-services
3132
screenmonitor-dbus-service.files = service/dbus/eu.medesimo.ScreenMonitor.service
3233

33-
screenmonitor-systemd.path = /lib/systemd/system
34+
screenmonitor-systemd.path = /usr/lib/systemd/system
3435
screenmonitor-systemd.files = service/dbus/ScreenMonitor.service
3536

3637
INSTALLS += \
@@ -39,29 +40,60 @@ INSTALLS += \
3940
screenmonitor-executable \
4041
screenmonitor-dbus-configuration \
4142
screenmonitor-dbus-service \
42-
screenmonitor-systemd
43+
screenmonitor-systemd
4344

4445
OTHER_FILES += \
4546
rpm/jolla-settings-screenmonitor.spec \
4647
rpm/jolla-settings-screenmonitor.yaml \
47-
service/dbus_interface.vala \
48-
service/ScreenMonitor.vala \
49-
service/ScreenMonitor \
50-
service/UnixTimer.vala \
51-
service/service.vala \
52-
service/Makefile \
53-
service/dbus/eu.medesimo.ScreenMonitor.service \
54-
service/dbus/eu.medesimo.ScreenMonitor.conf \
55-
service/dbus/Makefile \
48+
service/dbus_interface.vala \
49+
service/ScreenMonitor.vala \
50+
service/ScreenMonitor \
51+
service/UnixTimer.vala \
52+
service/service.vala \
53+
service/Makefile \
54+
service/dbus/eu.medesimo.ScreenMonitor.service \
55+
service/dbus/eu.medesimo.ScreenMonitor.conf \
56+
service/dbus/Makefile \
5657
service/UnixTimer.vala \
5758
settings/DetailItem.qml \
5859
rpm/jolla-settings-screenmonitor.changes \
5960
service/FileWatcher.vala
6061

61-
# to disable building translations every time, comment out the
62-
# following CONFIG line
63-
#CONFIG += sailfishapp_i18n
64-
#TRANSLATIONS += translations/jolla-settings-screenmonitor-de.ts
62+
TRANSLATIONS += $$files(translations/$${TARGET}-*.ts)
63+
TS_FILE = $${_PRO_FILE_PWD_}/translations/$${TARGET}*.ts
64+
HAVE_TRANSLATIONS = 0
65+
66+
TRANSLATION_SOURCES += $$_PRO_FILE_PWD_/settings/
67+
68+
# prefix all TRANSLATIONS with the src dir
69+
# the qm files are generated from the ts files copied to out dir
70+
for(t, TRANSLATIONS) {
71+
TRANSLATIONS_IN += $${_PRO_FILE_PWD_}/$$t
72+
TRANSLATIONS_OUT += $${OUT_PWD}/$$t
73+
HAVE_TRANSLATIONS = 1
74+
}
75+
76+
qm.files = $$replace(TRANSLATIONS_OUT, \.ts, .qm)
77+
qm.path = /usr/share/translations
78+
qm.CONFIG += no_check_exist
79+
80+
# update the ts files in the src dir and then copy them to the out dir
81+
qm.commands += lupdate -noobsolete $${TRANSLATION_SOURCES} -ts $${TS_FILE} && \
82+
mkdir -p translations && \
83+
[ \"$${OUT_PWD}\" != \"$${_PRO_FILE_PWD_}\" -a $$HAVE_TRANSLATIONS -eq 1 ] && \
84+
cp -af $${TRANSLATIONS_IN} $${OUT_PWD}/translations || :
85+
86+
# create the qm files
87+
qm.commands += ; [ $$HAVE_TRANSLATIONS -eq 1 ] && lrelease -nounfinished $${TRANSLATIONS_OUT} || :
88+
89+
# special case: as TS_FILE serves as both source file as well as
90+
# the English translation source, create the en qm file from it:
91+
qm.files += $$replace(TS_FILE, \.ts, -en.qm)
92+
qm.commands += lrelease -nounfinished $$TS_FILE -qm $$replace(TS_FILE, \.ts, -en.qm)
93+
94+
INSTALLS += qm
95+
96+
OTHER_FILES += $$TRANSLATIONS
6597

6698
# This is needed to compile the DBus service
6799
screenmonitor-service.target = ScreenMonitor

rpm/jolla-settings-screenmonitor.changes

+14
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@
88
# * date Author's Name <author's email> version-release
99
# - Summary of changes
1010

11+
* Sat May 04 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.8-1
12+
- Add Swedish translation (thanks to https://github.com/eson57 )
13+
14+
* Thu Apr 04 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.7-1
15+
- Fix Icon size (thanks to https://github.com/carmenfdezb )
16+
- Add Spanish translation (thanks to https://github.com/carmenfdezb )
17+
- Add German translation
18+
19+
* Fri Mar 29 2024 NSC IT Solutions (NIS) <[email protected]> 1.0.6-1
20+
- Fix the build for aarch64 on modern SailfishOS-versions:
21+
- Changed call to systemd to new path
22+
- Fixed inclusion of systemd-service in RPM packaging
23+
24+
1125
* Sun Jun 14 2020 Juanro49 <[email protected]> 1.0.4-1
1226
- jolla-settings-screenmonitor.qml: Fix show percentages in DetailItems
1327
- jolla-settings-screenmonitor.yaml: Add nemo-qml-plugin-contextkit-qt5 dependency to fix compatibility with Sailfish OS 3.0.3 (Rokua)+

rpm/jolla-settings-screenmonitor.spec

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# Do NOT Edit the Auto-generated Part!
3-
# Generated by: spectacle version 0.27
3+
# Generated by: spectacle version 0.32
44
#
55

66
Name: jolla-settings-screenmonitor
@@ -13,7 +13,7 @@ Name: jolla-settings-screenmonitor
1313
%{!?qtc_make:%define qtc_make make}
1414
%{?qtc_builddir:%define _builddir %qtc_builddir}
1515
Summary: jolla-settings-screenmonitor
16-
Version: 1.0.4
16+
Version: 1.0.8
1717
Release: 1
1818
Group: Applications/System
1919
License: GPL2
@@ -61,20 +61,21 @@ rm -rf %{buildroot}
6161

6262
%preun
6363
# >> preun
64-
/bin/systemctl disable ScreenMonitor.service
64+
/usr/bin/systemctl disable ScreenMonitor.service
6565
# << preun
6666

6767
%post
6868
# >> post
69-
/bin/systemctl enable ScreenMonitor.service
69+
/usr/bin/systemctl enable ScreenMonitor.service
7070
# << post
7171

7272
%files
7373
%defattr(-,root,root,-)
74-
%{_bindir}
74+
%{_bindir}/ScreenMonitor
7575
%{_sysconfdir}/dbus-1
7676
%{_datadir}/dbus-1
7777
%{_datadir}/jolla-settings
78-
/lib/systemd/system
78+
%{_datadir}/translations/%{name}-*.qm
79+
%{_unitdir}/ScreenMonitor.service
7980
# >> files
8081
# << files

rpm/jolla-settings-screenmonitor.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: jolla-settings-screenmonitor
22
Summary: jolla-settings-screenmonitor
3-
Version: 1.0.4
3+
Version: 1.0.8
44
Release: 1
55
# The contents of the Group field should be one of the groups listed here:
66
# http://gitorious.org/meego-developer-tools/spectacle/blobs/master/data/GROUPS
@@ -38,11 +38,12 @@ Requires:
3838

3939
# All installed files
4040
Files:
41-
- '%{_bindir}'
41+
- '%{_bindir}/ScreenMonitor'
4242
- '%{_sysconfdir}/dbus-1'
4343
- '%{_datadir}/dbus-1'
4444
- '%{_datadir}/jolla-settings'
45-
- '/lib/systemd/system'
45+
- '%{_datadir}/translations/%{name}-*.qm'
46+
- '%{_unitdir}/ScreenMonitor.service'
4647

4748
# For more information about yaml and what's supported in Sailfish OS
4849
# build system, please see https://wiki.merproject.org/wiki/Spectacle

settings/icon.png

1.06 KB
Loading

settings/jolla-settings-screenmonitor.qml

+3-3
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Page {
160160
font.pixelSize: Theme.fontSizeHuge
161161
horizontalAlignment: Text.AlignHCenter
162162
verticalAlignment: Text.AlignVCenter
163-
text: qsTrId("%1%").arg(percentage)
163+
text: qsTrId("%1%").arg(percentage)
164164
}
165165
}
166166

@@ -186,13 +186,13 @@ Page {
186186
DetailItem {
187187
width: parent.width
188188
label: qsTr("Battery")
189-
value: qsTrId("%1%").arg(batteryPercentage.value)
189+
value: qsTrId("%1%").arg(batteryPercentage.value)
190190
}
191191

192192
DetailItem {
193193
width: parent.width
194194
label: qsTr("Brightness")
195-
value: qsTrId("%1%").arg(brightness)
195+
value: qsTrId("%1%").arg(brightness)
196196
}
197197

198198
}

settings/screenmonitor.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"translation_catalog": "settings-system",
2+
"translation_catalog": "jolla-settings-screenmonitor",
33
"entries": [
44
{
55
"path": "system_settings/info",
@@ -9,7 +9,7 @@
99
"order": 600
1010
},
1111
{
12-
"path": "system_settings/info/screenmonitor",
12+
"path": "system_settings/info/screenmonitor",
1313
"title": "Screen usage",
1414
"translation_id": "settings_system-screenmonitor",
1515
"type": "page",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!DOCTYPE TS>
3+
<TS version="2.1" language="de">
4+
<context>
5+
<name></name>
6+
<message id="%1%">
7+
<source></source>
8+
<translation type="unfinished"></translation>
9+
</message>
10+
</context>
11+
<context>
12+
<name>jolla-settings-screenmonitor</name>
13+
<message>
14+
<source>No data</source>
15+
<translation>Keine Daten</translation>
16+
</message>
17+
<message>
18+
<source>Since last reset</source>
19+
<translation>Seit dem letzten Zurücksetzen</translation>
20+
</message>
21+
<message>
22+
<source>Since the phone start-up</source>
23+
<translation>Seit dem Starten des Geräts</translation>
24+
</message>
25+
<message>
26+
<source>Since the disconnection from the charger</source>
27+
<translation>Seit dem Trennen des Ladegeräts</translation>
28+
</message>
29+
<message>
30+
<source>%1 day, </source>
31+
<translation>%1 Tag, </translation>
32+
</message>
33+
<message>
34+
<source>%1 days, </source>
35+
<translation>%1 Tage, </translation>
36+
</message>
37+
<message>
38+
<source>%1 hour, </source>
39+
<translation>%1 Stunde, </translation>
40+
</message>
41+
<message>
42+
<source>%1 hours, </source>
43+
<translation>%1 Stunden, </translation>
44+
</message>
45+
<message>
46+
<source>%1 minute</source>
47+
<translation>%1 Minute, </translation>
48+
</message>
49+
<message>
50+
<source>%1 minutes</source>
51+
<translation>%1 Minuten</translation>
52+
</message>
53+
<message>
54+
<source>Reset</source>
55+
<translation>Zurücksetzen</translation>
56+
</message>
57+
<message>
58+
<source>Screen usage</source>
59+
<translation>Bildschirmnutzung</translation>
60+
</message>
61+
<message>
62+
<source>Battery</source>
63+
<translation>Akku</translation>
64+
</message>
65+
<message>
66+
<source>Brightness</source>
67+
<translation>Helligkeit</translation>
68+
</message>
69+
</context>
70+
</TS>

0 commit comments

Comments
 (0)