Cleaning, fixing and translation

This commit is contained in:
Niels 2025-06-09 16:24:42 +02:00
parent 61b8e89c31
commit 7113a16dd6
12 changed files with 85 additions and 168 deletions

View File

@ -27,9 +27,7 @@ DISTFILES += qml/harbour-allradio.qml \
qml/pages/FavoritesPage.qml \
qml/pages/HistoryPage.qml \
qml/pages/SearchStationsPage.qml \
qml/pages/SecondPage.qml \
qml/pages/SettingsPage.qml \
qml/pages/SettingsPage__.qml \
qml/pages/TagListPage.qml \
rpm/harbour-allradio.spec \
translations/*.ts \

View File

@ -82,16 +82,17 @@ DockedPanel {
font.bold: true
text: radioPlayer._name
}
Row {
spacing: Theme.paddingMedium
Image {
// Row {
// spacing: Theme.paddingMedium
/* Image {
id: headerLogo
anchors.bottom: rcountry.bottom
height: rcountry.height * 0.8
fillMode: Image.PreserveAspectFit
smooth: true
source: radioPlayer._countrycode === "" ? radioPlayer._countrycode ? "../images/bycountry_t.png" : "" : "../flags/"+radioPlayer._countrycode.toLowerCase()+".png"
}
// source: radioPlayer._cc === "" ? radioPlayer._cc ? "../images/bycountry_t.png" : "" : "../flags/"+radioPlayer._cc.toLowerCase()+".png"
source: "../flags/"+radioPlayer._cc.toLowerCase()+".png"
} */
Label {
id: rcountry
color: Theme.secondaryColor
@ -99,7 +100,7 @@ DockedPanel {
width: parent.width
elide: Text.ElideRight
text: radioPlayer.radioCountryName
}
// }
}
}
}

View File

@ -7,6 +7,10 @@ Column {
id: column
spacing: Theme.paddingMedium
anchors.centerIn: parent
property QDtimer timer: QDtimer {
id: spTimer
interval: 5000; running: true; repeat: false
}
Image {
id: logo
@ -30,7 +34,7 @@ Column {
BusyLabel {
visible: radioBrowser.serversModel.count > 0
running: visible
text: qsTr("Connecting to:")
text: qsTr("Connecting:")
anchors.horizontalCenter: parent.horizontalCenter
}
Label {
@ -41,9 +45,9 @@ Column {
anchors.horizontalCenter: parent.horizontalCenter
}
Button {
visible: radioBrowser.serversModel.count > 1
visible: radioBrowser.serversModel.count > 1 && !spTimer.running
anchors.topMargin: Theme.paddingLarge
text: "Try another server"
text: qsTr("Try another server")
onClicked: radioBrowser.getRandom()
anchors.horizontalCenter: parent.horizontalCenter
}

View File

@ -33,8 +33,8 @@ Page {
on_LoadingChanged: {
if (!_loading) {
appAutoPlay()
console.log(" *** AUTOPLAY")
} else console.log(" *** INTE AUTOPLAY")
//console.log(" *** AUTOPLAY")
} //else console.log(" *** INTE AUTOPLAY")
}
Splash {

View File

@ -20,7 +20,7 @@ Page {
header: Column {
width: parent.width
PageHeader {title: "Community Radio Browser";description: qsTr("Found ")+view.count + qsTr(" countries")}
PageHeader {title: "Community Radio Browser";description: qsTr("Found")+" "+view.count + " " +qsTr("countries")}
SearchField {
id: sfield

View File

@ -21,10 +21,10 @@ Page {
onSearchbyChanged: {
switch (searchby){
case "name": sortedby = "Sorted by Name";break;
case "votes": sortedby = "Most likes";break;
case "clicktrend": sortedby = "Trending right now";break;
case "clickcount": sortedby = "Most played";
case "name": sortedby = qsTr("Sorted by Name");break;
case "votes": sortedby = qsTr("Most likes");break;
case "clicktrend": sortedby = qsTr("Trending right now");break;
case "clickcount": sortedby = qsTr("Most played");
}
}

View File

@ -21,10 +21,10 @@ Page {
onSearchbyChanged: {
// console.log("SEARCHBY: "+searchby)
switch (searchby){
case "name": sortedby = "Sorted by Name";break;
case "votes": sortedby = "Most likes";break;
case "clicktrend": sortedby = "Trending right now";break;
case "clickcount": sortedby = "Most played";
case "name": sortedby = qsTr("By Name");break;
case "votes": sortedby = qsTr("Most likes");break;
case "clicktrend": sortedby = qsTr("Trending right now");break;
case "clickcount": sortedby = qsTr("Most played");
}
}
@ -114,7 +114,7 @@ Page {
width: parent.width
SearchField {
id: sfield
placeholderText: "Search"
placeholderText: qsTr("Search")
inputMethodHints: Qt.ImhNoAutoUppercase //| Qt.ImhNoPredictiveText
EnterKey.iconSource: "image://theme/icon-m-enter-close"
EnterKey.onClicked: focus = false

View File

@ -1,30 +0,0 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
id: page
// The effective value will be restricted by ApplicationWindow.allowedOrientations
allowedOrientations: Orientation.All
SilicaListView {
id: listView
model: 20
anchors.fill: parent
header: PageHeader {
title: qsTr("Nested Page")
}
delegate: BackgroundItem {
id: delegate
Label {
x: Theme.horizontalPageMargin
text: qsTr("Item") + " " + index
anchors.verticalCenter: parent.verticalCenter
color: delegate.highlighted ? Theme.highlightColor : Theme.primaryColor
}
onClicked: console.log("Clicked " + index)
}
VerticalScrollDecorator {}
}
}

View File

@ -1,59 +0,0 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
import QtQuick.LocalStorage 2.0
import QtGraphicalEffects 1.0
import "../helpers/db.js" as Favorites
Page {
PageHeader {
id: pheader
title: "Settings"
}
Flickable {
id: flick
width:parent.width
height: parent.height - Theme.paddingLarge * 3
anchors.fill: parent
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingLarge
anchors.topMargin: pheader.height + Theme.paddingLarge
//contentHeight: column1.height
TextSwitch {
id: activationSwitch
text: "Auto play"
description: "Play radio station on start"
onCheckedChanged: {
device.setStatus(checked ? DeviceState.Armed : DeviceState.Disarmed)
}
}
ComboBox {
width: parent.widht
label: "What to play"
menu: ContextMenu {
MenuItem { text: "Last played" }
MenuItem { text: "Random favorite" }
}
}
/* Label {
width: parent.width-70
font.pixelSize: Theme.fontSizeLarge
text: qsTr("WARNING! THis is for debugging or corrupt database. Only delete db if it is not working!!!")
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
}
Button {
text: qsTr("Delete DB")
onClicked: Favorites.dropTable()
anchors.horizontalCenter: parent.horizontalCenter
} */
}
}

View File

@ -53,6 +53,10 @@
</context>
<context>
<name>CountryListPage</name>
<message>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Found</source>
<translation type="unfinished"></translation>
@ -61,10 +65,6 @@
<source>countries</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>CountryNameModel</name>
@ -1119,6 +1119,10 @@
<source>Search by:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorted by Name</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FavoriteStations</name>
@ -1227,16 +1231,9 @@
<source>Trending right now</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SecondPage</name>
<message>
<source>Nested Page</source>
<translation>Unterseite</translation>
</message>
<message>
<source>Item</source>
<translation>Element</translation>
<source>By Name</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
@ -1319,7 +1316,11 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Connecting to:</source>
<source>Connecting:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Try another server</source>
<translation type="unfinished"></translation>
</message>
</context>

View File

@ -53,6 +53,10 @@
</context>
<context>
<name>CountryListPage</name>
<message>
<source>Search</source>
<translation>Sök</translation>
</message>
<message>
<source>Found</source>
<translation>Hittade</translation>
@ -61,10 +65,6 @@
<source>countries</source>
<translation>länder</translation>
</message>
<message>
<source>Search</source>
<translation>Sök</translation>
</message>
</context>
<context>
<name>CountryNameModel</name>
@ -1119,6 +1119,10 @@
<source>Search by:</source>
<translation>Sök efter:</translation>
</message>
<message>
<source>Sorted by Name</source>
<translation>Sortera efter namn</translation>
</message>
</context>
<context>
<name>FavoriteStations</name>
@ -1227,16 +1231,9 @@
<source>Trending right now</source>
<translation>Trender just nu</translation>
</message>
</context>
<context>
<name>SecondPage</name>
<message>
<source>Nested Page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Item</source>
<translation type="unfinished"></translation>
<source>By Name</source>
<translation>Vid Namn</translation>
</message>
</context>
<context>
@ -1314,14 +1311,18 @@
<source>servers</source>
<translation>servrar</translation>
</message>
<message>
<source>Connecting to:</source>
<translation>Anslutar till:</translation>
</message>
<message>
<source>Searching servers</source>
<translation>Söker efter servrar</translation>
</message>
<message>
<source>Connecting:</source>
<translation>Ansluter:</translation>
</message>
<message>
<source>Try another server</source>
<translation>Prova en annan server</translation>
</message>
</context>
<context>
<name>StationsDelegate</name>

View File

@ -53,6 +53,10 @@
</context>
<context>
<name>CountryListPage</name>
<message>
<source>Search</source>
<translation type="unfinished">Sök</translation>
</message>
<message>
<source>Found</source>
<translation type="unfinished"></translation>
@ -61,10 +65,6 @@
<source>countries</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished">Sök</translation>
</message>
</context>
<context>
<name>CountryNameModel</name>
@ -1119,6 +1119,10 @@
<source>Search by:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Sorted by Name</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>FavoriteStations</name>
@ -1227,15 +1231,8 @@
<source>Trending right now</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SecondPage</name>
<message>
<source>Nested Page</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Item</source>
<source>By Name</source>
<translation type="unfinished"></translation>
</message>
</context>
@ -1319,7 +1316,11 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>Connecting to:</source>
<source>Connecting:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Try another server</source>
<translation type="unfinished"></translation>
</message>
</context>