-
Notifications
You must be signed in to change notification settings - Fork 23
Show list of things to be restarted on the "Restart Services" dialog #136
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
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c75f45b
[ui] add display of services to be restarted
5294e23
implement getting list of services to be toggled
nephros 3a973c3
fixup! [ui] add display of services to be restarted
nephros b95ffeb
fixup! [ui] add display of services to be restarted
nephros c87bf43
Merge branch 'master' into issue-23
nephros 56f6242
fixup! Merge branch 'master' into issue-23
nephros 87fc535
Merge remote-tracking branch 'upstream/master' into issue-23
nephros 2aacf83
cleanup: remove dead code
nephros f4c017d
Merge remote-tracking branch 'upstream/master' into issue-23
nephros ce498ad
translate category strings
nephros e63cc87
move dbus call to getter
nephros 8a79db3
update translation source
nephros d4bf66a
fixup! translate category strings
nephros 3d0c166
Add warning icon and message to apply/unapply notification
nephros 1ddbba8
update translations
nephros 5a5d238
add missing noop source string for "keyboard"
nephros bf09db9
Merge branch 'master' into pr/issue-23
nephros 04d24e4
Fix wording
nephros 9e67717
Merge remote-tracking branch 'upstream/master' into pr/issue-23
nephros 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,6 +1,10 @@ | ||
| /* | ||
| * Copyright (C) 2013 Lucien XU <[email protected]> | ||
| * Copyright (C) 2016 Andrey Kozhevnikov <[email protected]> | ||
| * Copyright (c) 2021, Patchmanger for SailfishOS contributors: | ||
| * - olf "Olf0" <https://github.com/Olf0> | ||
| * - Peter G. "nephros" <[email protected]> | ||
| * - Vlad G. "b100dian" <https://github.com/b100dian> | ||
| * | ||
| * You may use this file under the terms of the BSD license as follows: | ||
| * | ||
|
|
@@ -39,21 +43,46 @@ Dialog { | |
| id: container | ||
| onAccepted: PatchManager.restartServices() | ||
|
|
||
| SilicaFlickable { | ||
| anchors.fill: parent | ||
| Column { | ||
| spacing: Theme.paddingMedium | ||
| anchors.left: parent.left; anchors.right: parent.right | ||
| DialogHeader { | ||
| acceptText: qsTranslate("", "Restart services") | ||
| } | ||
| Component.onCompleted: console.info("Will restart " + PatchManager.appsToRestart); | ||
|
|
||
| Label { | ||
| anchors.left: parent.left; anchors.leftMargin: Theme.paddingMedium | ||
| anchors.right: parent.right; anchors.rightMargin: Theme.paddingMedium | ||
| wrapMode: Text.WordWrap | ||
| color: Theme.highlightColor | ||
| text: qsTranslate("", "Some services will be restarted now. Reloading the homescreen of the device might take a little time.") | ||
| Column { | ||
| spacing: Theme.paddingSmall | ||
| width: parent.width | ||
| DialogHeader { | ||
| acceptText: qsTranslate("", "Restart") | ||
| } | ||
| Label { | ||
| anchors.horizontalCenter: parent.horizontalCenter | ||
| width: parent.width - Theme.horizontalPageMargin * 2 | ||
| color: Theme.highlightColor | ||
| text: qsTranslate("", "Some services will be restarted now. Reloading the homescreen of the device might take a little time.") | ||
| wrapMode: Text.WordWrap | ||
| horizontalAlignment: Text.AlignJustify | ||
| } | ||
| SectionHeader { text: qsTranslate("", "List of services:" ); color: Theme.secondaryHighlightColor } | ||
| Column { | ||
| id: col | ||
| anchors.horizontalCenter: parent.horizontalCenter | ||
| width: parent.width - Theme.horizontalPageMargin * 2 | ||
| Repeater { | ||
| model: PatchManager.appsToRestart | ||
| delegate: Component { TextSwitch { | ||
| text: qsTranslate("Sections", modelData) | ||
| automaticCheck: false | ||
| checked: true | ||
| enabled: true | ||
| description: { | ||
| if ((modelData == "homescreen") | ||
| || (modelData == "silica")) | ||
| { return qsTranslate("","Note: this will close all apps."); } | ||
| else if (modelData == "settings") { return qsTranslate("","Note: this will close %1.").arg(qsTranslate("", "Patchmanager")); } | ||
| else if (modelData == "keyboard") { return "" } | ||
| else if (modelData == "other") { return "" } | ||
| else { return qsTranslate("","Note: this will close the %1 app.").arg(text); } | ||
| } | ||
| TouchBlocker { anchors.fill: parent} | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
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.
This works for all languages but English, because English doesn't have a dedicated translation and so uses the (lowercase) original strings.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is that a serious issue from your POV? I.e., serious enough to resurrect and maintain the English TS file?My first thought was: So what, then it just uses lower case strings.Or maybe this dialog (its textual context) can phrased in a way, that this is fine without having these strings starting with a capital letter?
But as you seem to have looked at it in "real life", just decide how to proceed.
Resolved per #153
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.
Nah, totally minor issue that just came up along the way.
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.
Thanks for fixing this!
Uh oh!
There was an error while loading. Please reload this page.
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.
Just to document that Transifex uses "translated" strings from the source file as source strings, when the are available (which makes sense IMO).
Side note: Thus this change changed the source strings of all 14 PM-categories for all 14 translations. And because Transifex does not allow programmatic changes at Transifex (e.g., per RegEx), I manually adapted these 14 terms for 13 translations (all, but zh). Maybe scripted downloading, programmatic changing the strings locally and scripted uploading would have been easier, but that would have required learning how to use Transifex's web API, which I wanted to avid this time.
Uh oh!
There was an error while loading. Please reload this page.
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.
@nephros, please use the exclamation mark only if something went wrong.
Unfortunately the classic conventions for writing dialogues are less obeyed than in the early 2000s, but I still would like to stick to them.
The dialogues in MS-Windows and most of KDE and Gnome are adhering to these conventions, so people are used to them (even most not consciously).