[app] Added settings UI for "Turn page by tap" option

This commit is contained in:
Slava Monich 2018-07-24 00:29:52 +03:00
parent 278baef519
commit 4af6dfe06f
11 changed files with 157 additions and 33 deletions

View file

@ -78,6 +78,8 @@ Page {
title: qsTrId("harbour-books-settings-page-header")
}
// =============== Display ===============
SectionHeader {
//: Section header for display settings
//% "Display"
@ -251,7 +253,7 @@ Page {
//: 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
onClicked: keepDisplayOn.value = !keepDisplayOn.value
ConfigurationValue {
id: keepDisplayOn
@ -260,10 +262,12 @@ Page {
}
}
// =============== Navigation ===============
SectionHeader {
//: Section header for media keys
//% "Media keys"
text: qsTrId("harbour-books-settings-page-media-keys-section_header")
//% "Navigation"
text: qsTrId("harbour-books-settings-page-navigation-section_header")
}
BooksActionSelector {
@ -282,6 +286,26 @@ Page {
defaultValue: 1 // BooksSettings.ActionPreviousPage
}
TextSwitch {
automaticCheck: false
checked: turnPageByTap.value
//: Text switch label
//% "Turn pages by tapping the screen"
text: qsTrId("harbour-books-settings-page-turn_pages_by_tap")
//: Text switch description
//% "Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page."
description: qsTrId("harbour-books-settings-page-turn_pages_by_tap-description")
onClicked: turnPageByTap.value = !turnPageByTap.value
ConfigurationValue {
id: turnPageByTap
key: rootPath + "turnPageByTap"
defaultValue: false
}
}
// =============== Memory card ===============
SectionHeader {
//: Section header for memory card settings
//% "Memory card"

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Medienschlüssel</translation>
<translation type="unfinished">Navigation</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment>
<translation type="unfinished">Lautstärke runter</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Teclas multimedia</translation>
<translation type="unfinished">Navegación</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Página posterior</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<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>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation type="unfinished">Media näppäimet</translation>
<translation type="unfinished">Navigointi</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment>
<translation type="unfinished">Äänenvoimakkuus alas</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -227,10 +227,10 @@
<extracomment>Text switch description</extracomment>
<translation>Megakadályozza, hogy a kijelző elsötétüljön olvasás közben.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Média gombok</translation>
<translation type="unfinished">Navigáció</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -257,6 +257,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Következő oldal</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Mediatoetsen</translation>
<translation type="unfinished">Navigatie</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Volgende pagina</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -231,10 +231,10 @@
<extracomment>Text switch description</extracomment>
<translation>Zapobiegaj wygaszaniu wyświetlacza podczas czytania książki.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Przyciski multimedialne</translation>
<translation type="unfinished">Nawigacja</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -261,6 +261,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Następna strona</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment>
<translation>Evita que a tela apague durante a leitura.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Teclas de mídia</translation>
<translation type="unfinished">Navegação</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Próxima página</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -231,10 +231,20 @@
<extracomment>Text switch description</extracomment>
<translation>Не гасить экран, пока открыта книга. Это не очень хорошо для батареи, зато удобно для чтения. Главное - не уснуть.</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Кнопки</translation>
<translation>Навигация</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation>Листать страницы касанием экрана</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation>Касание ближе к левому краю экрана вызывает переход на предыдущую страницу, ближе к правому краю - на следующую.</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>

View file

@ -229,10 +229,10 @@
<extracomment>Text switch description</extracomment>
<translation>Förhindra att skärmen slocknar vid läsning</translation>
</message>
<message id="harbour-books-settings-page-media-keys-section_header">
<source>Media keys</source>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Mediaknappar</translation>
<translation type="unfinished">Navigering</translation>
</message>
<message id="harbour-books-settings-page-action-none">
<source>No action</source>
@ -259,6 +259,16 @@
<extracomment>Combo box label</extracomment>
<translation>Sänk volymen</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation type="unfinished"></translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>

View file

@ -229,10 +229,10 @@
<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>
<message id="harbour-books-settings-page-navigation-section_header">
<source>Navigation</source>
<extracomment>Section header for media keys</extracomment>
<translation>Media keys</translation>
<translation>Navigation</translation>
</message>
<message id="harbour-books-settings-page-volume_up-label">
<source>Volume up</source>
@ -259,6 +259,16 @@
<extracomment>Combo box value for next page action</extracomment>
<translation>Next page</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap">
<source>Turn pages by tapping the screen</source>
<extracomment>Text switch label</extracomment>
<translation>Turn pages by tapping the screen</translation>
</message>
<message id="harbour-books-settings-page-turn_pages_by_tap-description">
<source>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</source>
<extracomment>Text switch description</extracomment>
<translation>Tapping near the left edge of the screen returns to the previous page, tapping near the right edge gets you to the next page.</translation>
</message>
<message id="harbour-books-settings-page-removable-section_header">
<source>Memory card</source>
<extracomment>Section header for memory card settings</extracomment>