refacto: handle translations for tops title with a switch
Some checks failed
repod / release (push) Waiting to run
repod / xml (push) Successful in 23s
repod / php (push) Successful in 58s
repod / nodejs (push) Has been cancelled

This commit is contained in:
Michel Roux 2024-01-15 10:11:03 +01:00
parent 5a03bf7d6e
commit d6e7c5a460
5 changed files with 42 additions and 30 deletions

View File

@ -7,8 +7,8 @@ OC.L10N.register(
"# Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n# Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "# Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n# Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !", "# Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n# Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "# Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n# Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
"Add a RSS link" : "Ajouter un lien RSS", "Add a RSS link" : "Ajouter un lien RSS",
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche", "Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
"hot podcasts" : "tendances", "Hot podcasts" : "Tendances",
"new podcasts" : "nouveautés", "New podcasts" : "Nouveautés",
"Could not fetch tops" : "Impossible de récupérer les tops", "Could not fetch tops" : "Impossible de récupérer les tops",
"Subscribe" : "S'abonner", "Subscribe" : "S'abonner",
"Error while adding the feed" : "Erreur lors de l'ajout du flux", "Error while adding the feed" : "Erreur lors de l'ajout du flux",

View File

@ -5,8 +5,8 @@
"# Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n# Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "# Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n# Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !", "# Features\n- 🔍 Browse and subscribe huge collection of podcasts\n- 🔊 Listen to episodes directly in Nextcloud\n- 🌐 Sync your activity with [AntennaPod](https://antennapod.org/)\n\n# Requirements\nYou need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installed to use this app!" : "# Fonctionnalités\n- 🔍 Parcourir et s'abonner à une grande collections de podcasts\n- 🔊 Écouter vos épisodes directement sur Nextcloud\n- 🌐 Synchroniser son activité avec [AntennaPod](https://antennapod.org/)\n\n# Pré-requis\nVous devez avoir [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) installé pour utiliser cette application !",
"Add a RSS link" : "Ajouter un lien RSS", "Add a RSS link" : "Ajouter un lien RSS",
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche", "Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
"hot podcasts" : "tendances", "Hot podcasts" : "Tendances",
"new podcasts" : "nouveautés", "New podcasts" : "Nouveautés",
"Could not fetch tops" : "Impossible de récupérer les tops", "Could not fetch tops" : "Impossible de récupérer les tops",
"Subscribe" : "S'abonner", "Subscribe" : "S'abonner",
"Error while adding the feed" : "Erreur lors de l'ajout du flux", "Error while adding the feed" : "Erreur lors de l'ajout du flux",

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<h2>{{ t('repod', `${type} podcasts`) }}</h2> <h2>{{ title }}</h2>
<Loading v-if="loading" /> <Loading v-if="loading" />
<ul v-if="!loading"> <ul v-if="!loading">
<li v-for="top in items" :key="top.link"> <li v-for="top in items" :key="top.link">
@ -36,6 +36,18 @@ export default {
loading: true, loading: true,
} }
}, },
computed: {
title() {
switch (this.type) {
case 'new':
return t('repod', 'New podcasts')
case 'hot':
return t('repod', 'Hot podcasts')
default:
return this.type
}
},
},
async mounted() { async mounted() {
this.loadList() this.loadList()
}, },
@ -62,10 +74,6 @@ export default {
margin: 1rem 0; margin: 1rem 0;
} }
h2::first-letter {
text-transform: capitalize;
}
img { img {
height: 100%; height: 100%;
width: 100%; width: 100%;

View File

@ -50,11 +50,11 @@ msgstr "Ajouter un lien RSS"
msgid "Could not fetch search results" msgid "Could not fetch search results"
msgstr "Impossible de récupérer les resultats de la recherche" msgstr "Impossible de récupérer les resultats de la recherche"
msgid "hot podcasts" msgid "Hot podcasts"
msgstr "tendances" msgstr "Tendances"
msgid "new podcasts" msgid "New podcasts"
msgstr "nouveautés" msgstr "Nouveautés"
msgid "Could not fetch tops" msgid "Could not fetch tops"
msgstr "Impossible de récupérer les tops" msgstr "Impossible de récupérer les tops"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Nextcloud 3.14159\n" "Project-Id-Version: Nextcloud 3.14159\n"
"Report-Msgid-Bugs-To: translations\\@example.com\n" "Report-Msgid-Bugs-To: translations\\@example.com\n"
"POT-Creation-Date: 2024-01-14 00:07+0000\n" "POT-Creation-Date: 2024-01-15 09:10+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -50,69 +50,73 @@ msgid "Could not fetch search results"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:3 #: /app/specialVueFakeDummyForL10nScript.js:3
msgid "Could not fetch tops" msgid "New podcasts"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:4 #: /app/specialVueFakeDummyForL10nScript.js:4
msgid "${type} podcasts" msgid "Hot podcasts"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:5 #: /app/specialVueFakeDummyForL10nScript.js:5
msgid "Subscribe" msgid "Could not fetch tops"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:6 #: /app/specialVueFakeDummyForL10nScript.js:6
msgid "Error while adding the feed" msgid "Subscribe"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:7 #: /app/specialVueFakeDummyForL10nScript.js:7
msgid "Play" msgid "Error while adding the feed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:8 #: /app/specialVueFakeDummyForL10nScript.js:8
msgid "Stop" msgid "Play"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:9 #: /app/specialVueFakeDummyForL10nScript.js:9
msgid "Could not fetch episodes" msgid "Stop"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:10 #: /app/specialVueFakeDummyForL10nScript.js:10
msgid "Download" msgid "Could not fetch episodes"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:11 #: /app/specialVueFakeDummyForL10nScript.js:11
msgid "Delete" msgid "Download"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:12 #: /app/specialVueFakeDummyForL10nScript.js:12
msgid "Are you sure you want to delete this subscription?" msgid "Delete"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:13 #: /app/specialVueFakeDummyForL10nScript.js:13
msgid "Error while removing the feed" msgid "Are you sure you want to delete this subscription?"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:14 #: /app/specialVueFakeDummyForL10nScript.js:14
msgid "Add a podcast" msgid "Error while removing the feed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:15 #: /app/specialVueFakeDummyForL10nScript.js:15
msgid "Could not fetch subscriptions" msgid "Add a podcast"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:16 #: /app/specialVueFakeDummyForL10nScript.js:16
msgid "Find a podcast" msgid "Could not fetch subscriptions"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:17 #: /app/specialVueFakeDummyForL10nScript.js:17
msgid "Error loading feed" msgid "Find a podcast"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:18 #: /app/specialVueFakeDummyForL10nScript.js:18
msgid "Missing required app" msgid "Error loading feed"
msgstr "" msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:19 #: /app/specialVueFakeDummyForL10nScript.js:19
msgid "Missing required app"
msgstr ""
#: /app/specialVueFakeDummyForL10nScript.js:20
msgid "Install GPodder Sync" msgid "Install GPodder Sync"
msgstr "" msgstr ""