[app] Added settings UI for keepDisplayOn option

New strings are only translated to English, Finnish and Russian.
Help is needed to translate them to other languages.
This commit is contained in:
Slava Monich 2018-05-17 11:52:04 +03:00
parent 3ccc36e335
commit 6c62bad2a7
9 changed files with 128 additions and 31 deletions

View file

@ -1,6 +1,6 @@
/*
Copyright (C) 2016-2017 Jolla Ltd.
Contact: Slava Monich <slava.monich@jolla.com>
Copyright (C) 2015-2018 Jolla Ltd.
Copyright (C) 2015-2018 Slava Monich <slava.monich@jolla.com>
You may use this file under the terms of BSD license as follows:
@ -167,6 +167,24 @@ Page {
}
}
TextSwitch {
automaticCheck: false
checked: keepDisplayOn.value
//: Text switch label
//% "Keep display on while reading"
text: qsTrId("harbour-books-settings-page-keep_display_on")
//: Text switch description
//% "Prevent the display from blanking while reading the book."
description: qsTrId("harbour-books-settings-page-keep_display_on_description")
onClicked: keepDisplayOn.value = !checked
ConfigurationValue {
id: keepDisplayOn
key: rootPath + "keepDisplayOn"
defaultValue: false
}
}
SectionHeader {
//: Section header for media keys
//% "Media keys"
@ -242,7 +260,6 @@ Page {
color: Theme.secondaryColor
wrapMode: Text.Wrap
}
}
}
}

View file

@ -164,6 +164,21 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Querformat</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Medienschlüssel</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
<extracomment>Combo box value for no action</extracomment>
@ -179,11 +194,6 @@
<extracomment>Combo box value for next page action</extracomment>
<translation type="unfinished">Folge Seite</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Medienschlüssel</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
<extracomment>Combo box label</extracomment>

View file

@ -164,6 +164,16 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Vertical</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>

View file

@ -164,6 +164,21 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Vaaka</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation>Pidä näyttö päällä lukemisen aikana</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation>Estä näytön sammuminen kirjaa lukiessa.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Media näppäimet</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
<extracomment>Combo box value for no action</extracomment>
@ -179,11 +194,6 @@
<extracomment>Combo box value for next page action</extracomment>
<translation type="unfinished">Seuraavalle sivulle</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Media näppäimet</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
<extracomment>Combo box label</extracomment>

View file

@ -162,6 +162,16 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Fekvő</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>

View file

@ -164,6 +164,16 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Landschap</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>

View file

@ -166,20 +166,15 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Альбомная</translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>
<translation>Карта памяти</translation>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation>Держать дисплей включённым во время чтения</translation>
</message>
<message id="harbour-books-settings-page-removable_root-label">
<source>Books folder</source>
<extracomment>Settings field label</extracomment>
<translation>Книжная папка</translation>
</message>
<message id="harbour-books-settings-page-removable_root-description">
<source>Leave the folder name empty to scan the entire memory card for books.</source>
<extracomment>Settings field description</extracomment>
<translation>Если оставить имя папки пустым, то можно будет найти книгу в любой папке на карте памяти. Особого смысла в этой настройке нет, просто так исторически сложилось, что по умолчанию книги искались только в папке Books, а теперь можно вообще где угодно.</translation>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation>Не гасить экран, пока открыта книга. Это не очень хорошо для батареи, зато удобно для чтения. Главное - не уснуть.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
@ -211,5 +206,20 @@
<extracomment>Combo box label</extracomment>
<translation>Громкость вниз</translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>
<translation>Карта памяти</translation>
</message>
<message id="harbour-books-settings-page-removable_root-label">
<source>Books folder</source>
<extracomment>Settings field label</extracomment>
<translation>Книжная папка</translation>
</message>
<message id="harbour-books-settings-page-removable_root-description">
<source>Leave the folder name empty to scan the entire memory card for books.</source>
<extracomment>Settings field description</extracomment>
<translation>Если оставить имя папки пустым, то можно будет найти книгу в любой папке на карте памяти. Особого смысла в этой настройке нет, просто так исторически сложилось, что по умолчанию книги искались только в папке Books, а теперь можно вообще где угодно.</translation>
</message>
</context>
</TS>

View file

@ -164,6 +164,21 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Liggande</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished">Håll skärmen när läsning</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Mediaknappar</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
<extracomment>Combo box value for no action</extracomment>
@ -179,11 +194,6 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Nästa sida</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Mediaknappar</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
<extracomment>Combo box label</extracomment>

View file

@ -164,6 +164,16 @@
<extracomment>Combo box value for landscape orientation</extracomment>
<translation>Landscape</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on">
<source>Keep display on while reading</source>
<extracomment>Text switch label</extracomment>
<translation>Keep display on while reading</translation>
</message>
<message id="harbour-books-settings-page-keep_display_on_description">
<source>Prevent the display from blanking while reading the book.</source>
<extracomment>Text switch description</extracomment>
<translation>Prevent the display from blanking while reading the book.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<extracomment>Section header for media keys</extracomment>