Translations

This commit is contained in:
Niels 2025-06-08 20:39:57 +02:00
parent e3ca64391d
commit f4fa0b9793
11 changed files with 97 additions and 71 deletions

View File

@ -47,3 +47,4 @@ CONFIG += sailfishapp_i18n
# following TRANSLATIONS line. And also do not forget to # following TRANSLATIONS line. And also do not forget to
# modify the localized app name in the the .desktop file. # modify the localized app name in the the .desktop file.
TRANSLATIONS += translations/harbour-allradio-de.ts TRANSLATIONS += translations/harbour-allradio-de.ts
TRANSLATIONS += translations/harbour-allradio-sv.ts

View File

@ -281,25 +281,23 @@ MediaPlayer {
} }
function loadRecentPlay(){ function loadRecentPlay(){
if (playHistory.count > 0) { if (playHistory.get(0).url_resolved) {
if (playHistory.get(0).url_resolved) { _favicon = playHistory.get(0).favicon
_favicon = playHistory.get(0).favicon _name = playHistory.get(0).name
_name = playHistory.get(0).name _cc = playHistory.get(0).countrycode
_cc = playHistory.get(0).countrycode _tags = playHistory.get(0).tags
_tags = playHistory.get(0).tags _codec = playHistory.get(0).codec//getCodec(model.codec)
_codec = playHistory.get(0).codec//getCodec(model.codec) _bitrate = playHistory.get(0).bitrate //getBitrate(model.bitrate)
_bitrate = playHistory.get(0).bitrate //getBitrate(model.bitrate) _hls = playHistory.get(0).hls
_hls = playHistory.get(0).hls _url_resolved = playHistory.get(0).url_resolved
_url_resolved = playHistory.get(0).url_resolved _homepage = playHistory.get(0).homepage
_homepage = playHistory.get(0).homepage _stationuuid = playHistory.get(0).stationuuid
_stationuuid = playHistory.get(0).stationuuid _favorite = playHistory.get(0).favorite
_favorite = playHistory.get(0).favorite isPlaying = false
isPlaying = false isPaused = true
isPaused = true ///if (_favorite) playlistCount = Favorites.getSetting("playlistIndex",-1)
///if (_favorite) playlistCount = Favorites.getSetting("playlistIndex",-1) //playlistIndex = allradioSettings.value("currentFavorite",-1)
//playlistIndex = allradioSettings.value("currentFavorite",-1) // pageStack.push("RadioPlayerPage.qml")
// pageStack.push("RadioPlayerPage.qml")
}
} }
} }

View File

@ -20,12 +20,12 @@ Page {
header: Column { header: Column {
width: parent.width width: parent.width
PageHeader {title: "Community Radio Browser";description: "Found "+view.count + " countries"} PageHeader {title: "Community Radio Browser";description: qsTr("Found ")+view.count + qsTr(" countries")}
SearchField { SearchField {
id: sfield id: sfield
width: parent.width width: parent.width
placeholderText: "Search" placeholderText: qsTr("Search")
text: "" text: ""
inputMethodHints: Qt.ImhNoAutoUppercase inputMethodHints: Qt.ImhNoAutoUppercase
EnterKey.iconSource: "image://theme/icon-m-enter-close" EnterKey.iconSource: "image://theme/icon-m-enter-close"

View File

@ -145,7 +145,7 @@ Page {
ComboBox { ComboBox {
id: searchCombo id: searchCombo
label: "Search by:" label: qsTr("Search by:")
currentIndex: comboIndex currentIndex: comboIndex
menu: ContextMenu { menu: ContextMenu {
MenuItem { text: qsTr("Name") } MenuItem { text: qsTr("Name") }

View File

@ -24,8 +24,8 @@ Page {
width: parent.width width: parent.width
spacing: Theme.paddingLarge spacing: Theme.paddingLarge
PageHeader{ PageHeader{
title: "Favorites" title: qsTr("Favorites")
description: "Radio stations: "+view.count description: qsTr("Radio stations: ")+view.count
} }
Row { Row {
@ -43,7 +43,7 @@ Page {
fontColor: down ? Theme.secondaryColor : Theme.secondaryColor fontColor: down ? Theme.secondaryColor : Theme.secondaryColor
iconVisible: false iconVisible: false
// icon: "image://theme/icon-m-home" //"image://theme/icon-m-video" // icon: "image://theme/icon-m-home" //"image://theme/icon-m-video"
text: "By name" text: qsTr("By name")
onButtonClick: {showP=0.0;tab = 0;Favorites.getFavorites(favorites,"name",10000)} onButtonClick: {showP=0.0;tab = 0;Favorites.getFavorites(favorites,"name",10000)}
} }
TabButton { TabButton {
@ -55,7 +55,7 @@ Page {
fontColor: down ? Theme.secondaryColor : Theme.secondaryColor fontColor: down ? Theme.secondaryColor : Theme.secondaryColor
iconVisible: false iconVisible: false
// icon: "image://theme/icon-m-search" // icon: "image://theme/icon-m-search"
text: "Most played" text: qsTr("Most played")
onButtonClick: {showP=0.0;tab = 1;Favorites.getFavorites(favorites,"myclickcount",10000)} onButtonClick: {showP=0.0;tab = 1;Favorites.getFavorites(favorites,"myclickcount",10000)}
} }
TabButton { TabButton {
@ -67,7 +67,7 @@ Page {
fontColor: down ? Theme.secondaryColor : Theme.secondaryColor fontColor: down ? Theme.secondaryColor : Theme.secondaryColor
iconVisible: false iconVisible: false
// icon: "image://theme/icon-m-favorite" // icon: "image://theme/icon-m-favorite"
text: "Last played" text: qsTr("Last played")
onButtonClick: {showP=0.0;tab = 2;Favorites.getFavorites(favorites,"myclicktimestamp",10000);console.log("CLICK")} onButtonClick: {showP=0.0;tab = 2;Favorites.getFavorites(favorites,"myclicktimestamp",10000);console.log("CLICK")}
} }
} }
@ -78,8 +78,8 @@ Page {
ViewPlaceholder { ViewPlaceholder {
anchors.centerIn: allRadio.center anchors.centerIn: allRadio.center
enabled: view.count == 0 enabled: view.count == 0
text: "Favorites" text: qsTr("Favorites")
hintText: "add favorites here" hintText: qsTr("add favorites here")
} }
VerticalScrollDecorator {} VerticalScrollDecorator {}

View File

@ -19,12 +19,12 @@ Page {
ViewPlaceholder { ViewPlaceholder {
anchors.centerIn: allRadio.center anchors.centerIn: allRadio.center
enabled: view.count == 0 enabled: view.count == 0
text: "History" text: qsTr("History")
hintText: "see you play history here" hintText: qsTr("see you play history here")
} }
VerticalScrollDecorator {} VerticalScrollDecorator {}
header: PageHeader{title: "Play history";description: "Radio stations: "+view.count} header: PageHeader{title: qsTr("Play history");description: qsTr("Radio stations: ")+view.count}
/* onAtYEndChanged: { /* onAtYEndChanged: {

View File

@ -48,8 +48,8 @@ Page {
ViewPlaceholder { ViewPlaceholder {
anchors.centerIn: parent anchors.centerIn: parent
enabled: view.count == 0 enabled: view.count == 0
text: getCountryStations.finished && view.count === 0 ? "Search" : "Please wait" text: getCountryStations.finished && view.count === 0 ? qsTr("Search") : qsTr("Please wait")
hintText: getCountryStations.finished && view.count === 0 ? "radio stations" : "getting radio stations" hintText: getCountryStations.finished && view.count === 0 ? qsTr("radio stations") : qsTr("getting radio stations")
} }
VerticalScrollDecorator {} VerticalScrollDecorator {}
@ -150,11 +150,11 @@ Page {
ComboBox { ComboBox {
id: searchCombo id: searchCombo
label: "Search by:" label: qsTr("Search by:")
currentIndex: 0 currentIndex: 0
menu: ContextMenu { menu: ContextMenu {
MenuItem { text: "Name" } MenuItem { text: qsTr("Name") }
MenuItem { text: "Tag" } MenuItem { text: qsTr("Tag") }
} }
onValueChanged: { onValueChanged: {
switch(currentIndex) { switch(currentIndex) {
@ -173,20 +173,20 @@ Page {
PullDownMenu { PullDownMenu {
MenuItem { MenuItem {
text: "Name" text: qsTr("Name")
onClicked: {getCountryStations.order = "name";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//;xmlModel.running = true} onClicked: {getCountryStations.order = "name";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//;xmlModel.running = true}
} }
MenuItem { MenuItem {
text: "Most likes" text: qsTr("Most likes")
onClicked: {getCountryStations.order = "votes";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//;xmlModel.running = true} onClicked: {getCountryStations.order = "votes";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//;xmlModel.running = true}
} }
MenuItem { MenuItem {
text: "Most played" text: qsTr("Most played")
onClicked: {getCountryStations.order = "clickcount";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//xmlModel.running = true} onClicked: {getCountryStations.order = "clickcount";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//xmlModel.running = true}
} }
MenuItem { MenuItem {
text: "Trending right now" text: qsTr("Trending right now")
onClicked: {getCountryStations.order = "clicktrend";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//xmlModel.running = true} onClicked: {getCountryStations.order = "clicktrend";if (view.count > 0) {getCountryStations.clear=true;getCountryStations.getStations()}}//xmlModel.running = true}
} }
} }

View File

@ -6,12 +6,8 @@ import "../helpers/db.js" as Favorites
Dialog { Dialog {
id: settingsDialog id: settingsDialog
// property bool aComp
// property bool aMag
// property int aR: anchorRadius
Column { Column {
//id: col1
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
spacing: Theme.paddingMedium spacing: Theme.paddingMedium
@ -23,7 +19,7 @@ Dialog {
anchors.rightMargin: Theme.paddingLarge anchors.rightMargin: Theme.paddingLarge
color: Theme.highlightColor color: Theme.highlightColor
font.pixelSize: Theme.fontSizeLarge font.pixelSize: Theme.fontSizeLarge
text: qsTr("App settings") text: qsTr("Player settings")
} }
Separator { Separator {
@ -36,27 +32,19 @@ Dialog {
ComboBox { ComboBox {
id: appStart id: appStart
width: parent.width width: parent.width
label: "Auto play" label: qsTr("Auto play")
anchors.margins: Theme.paddingLarge anchors.margins: Theme.paddingLarge
description: "What to do when AllRadio2 starts" description: qsTr("What to do when AllRadio2 starts")
currentIndex: Favorites.getSetting("appStart",0) currentIndex: Favorites.getSetting("appStart",0)
menu: ContextMenu { menu: ContextMenu {
MenuItem { text: "Off" } MenuItem { text: qsTr("Off") }
MenuItem { text: "Last played" } MenuItem { text: qsTr("Last played") }
MenuItem { text: "Random favorite" } MenuItem { text: qsTr("Random favorite") }
} }
} }
} }
onAccepted: { onAccepted: Favorites.setSetting("appStart",appStart.currentIndex)
//console.log(" *** APPSTART: "+appStart.currentIndex)
Favorites.setSetting("appStart",appStart.currentIndex)
/* activateNumbers.checked ? showCompasNumbers = 1 : showCompasNumbers = 0
var scron
keepSon.checked ? scron = 1 : scron = 0
keepScreenOn = keepSon.checked
settings.setSettingSetting(aComp,aMag,aR,showCompasNumbers,scron)
anchorRadius = aR */
}
} }

View File

@ -15,7 +15,7 @@ Page {
clip: true clip: true
anchors.bottomMargin: mediaPlayerPanel.visibleSize anchors.bottomMargin: mediaPlayerPanel.visibleSize
VerticalScrollDecorator {} VerticalScrollDecorator {}
PageHeader {title: "Sleep timer";description: ((sleepTime > 0) ? (qsTr("Remaning time: ") + (sleepTime) + qsTr(" minutes")) : qsTr("choose time: ") + minutes.value )} PageHeader {title: qsTr("Sleep timer");description: ((sleepTime > 0) ? (qsTr("Remaning time: ") + (sleepTime) + qsTr(" minutes")) : qsTr("choose time: ") + minutes.value )}
ValuePicker { ValuePicker {
id: minutes id: minutes

View File

@ -36,8 +36,8 @@ Page {
width: parent.width width: parent.width
PageHeader { PageHeader {
title: "Played tags" title: qsTr("Played tags")
description: "Found "+playedTags.count description: qsTr("Found ")+playedTags.count
} }
} }

View File

@ -3,10 +3,6 @@
<TS version="2.1" language="sv_SE" sourcelanguage="en"> <TS version="2.1" language="sv_SE" sourcelanguage="en">
<context> <context>
<name>AboutPage</name> <name>AboutPage</name>
<message>
<source>AllRadio is an internet radio station player</source>
<translation>AllRadio är en internet radio spelare</translation>
</message>
<message> <message>
<source>License: GPLv2</source> <source>License: GPLv2</source>
<translation>Licens: GPLv2</translation> <translation>Licens: GPLv2</translation>
@ -1062,6 +1058,49 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
<context>
<name>CountryStationsPage</name>
<message>
<source>Oh no...</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Please wait</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>No radio stations!?!</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>getting radio stations</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Search</source>
<translation type="unfinished">Sök</translation>
</message>
<message>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Tag</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Most likes</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Most played</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Trending right now</source>
<translation type="unfinished"></translation>
</message>
</context>
<context> <context>
<name>FavoriteStations</name> <name>FavoriteStations</name>
<message> <message>
@ -1095,7 +1134,7 @@
<context> <context>
<name>SettingsPage</name> <name>SettingsPage</name>
<message> <message>
<source>Working on it.....</source> <source>App settings</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>
@ -1144,11 +1183,11 @@
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Searching for servers...</source> <source>Connecting to:</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<source>Connecting to:</source> <source>Searching servers</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
</context> </context>