Fix filters & add l10n
This commit is contained in:
parent
7af1548624
commit
310a2b28f1
@ -1,7 +1,8 @@
|
||||
.idea
|
||||
*.iml
|
||||
/vendor/
|
||||
/build/
|
||||
node_modules/
|
||||
.idea
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/build/
|
||||
/vendor/
|
||||
js/
|
||||
node_modules/
|
||||
|
9
.eslintignore
Normal file
9
.eslintignore
Normal file
@ -0,0 +1,9 @@
|
||||
*.iml
|
||||
.idea
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
/build/
|
||||
/vendor/
|
||||
js/
|
||||
node_modules/
|
||||
l10n/
|
8
.l10nignore
Normal file
8
.l10nignore
Normal file
@ -0,0 +1,8 @@
|
||||
*.iml
|
||||
.idea
|
||||
/.php-cs-fixer.cache
|
||||
/.php_cs.cache
|
||||
build/
|
||||
vendor/
|
||||
js/
|
||||
node_modules/
|
16
Makefile
16
Makefile
@ -155,10 +155,24 @@ appstore:
|
||||
../$(app_name)
|
||||
|
||||
# Start a nextcloud server on Docker to kickstart developement
|
||||
.PHONY: appstore
|
||||
.PHONY: dev
|
||||
dev: build
|
||||
docker stop repod || true
|
||||
docker rm repod || true
|
||||
docker build -t repod .
|
||||
docker run -itd --name repod -v $(CURDIR):/var/www/html/apps/repod -p 80:80 repod
|
||||
npm run watch
|
||||
|
||||
# Generate translations
|
||||
.PHONY: l10n
|
||||
l10n:
|
||||
docker run \
|
||||
-v $(CURDIR):/app \
|
||||
--entrypoint php \
|
||||
nextcloudci/translations \
|
||||
/translationtool.phar create-pot-files
|
||||
docker run \
|
||||
-v $(CURDIR):/app \
|
||||
--entrypoint php \
|
||||
nextcloudci/translations \
|
||||
/translationtool.phar convert-po-files
|
||||
|
23
l10n/fr.js
Normal file
23
l10n/fr.js
Normal file
@ -0,0 +1,23 @@
|
||||
OC.L10N.register(
|
||||
"repod",
|
||||
{
|
||||
"Add a RSS link" : "Ajouter un lien RSS",
|
||||
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
||||
"Suggests by fyyd" : "Suggestions via fyyd",
|
||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||
"Subscribe" : "S'abonner",
|
||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
||||
"Play" : "Lecture",
|
||||
"Stop" : "Arrêter",
|
||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||
"Download" : "Télécharger",
|
||||
"Delete" : "Supprimer",
|
||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||
"Add a podcast" : "Ajouter un podcast",
|
||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||
"Find a podcast" : "Chercher un podcast",
|
||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||
"Missing required app" : "Une application requise est manquante",
|
||||
"Install GPodder Sync" : "Installer GPodder Sync"
|
||||
},
|
||||
"");
|
21
l10n/fr.json
Normal file
21
l10n/fr.json
Normal file
@ -0,0 +1,21 @@
|
||||
{ "translations": {
|
||||
"Add a RSS link" : "Ajouter un lien RSS",
|
||||
"Could not fetch search results" : "Impossible de récupérer les resultats de la recherche",
|
||||
"Suggests by fyyd" : "Suggestions via fyyd",
|
||||
"Could not fetch tops" : "Impossible de récupérer les tops",
|
||||
"Subscribe" : "S'abonner",
|
||||
"Error while adding the feed" : "Erreur lors de l'ajout du flux",
|
||||
"Play" : "Lecture",
|
||||
"Stop" : "Arrêter",
|
||||
"Could not fetch episodes" : "Impossible de récuprer les épisodes",
|
||||
"Download" : "Télécharger",
|
||||
"Delete" : "Supprimer",
|
||||
"Error while removing the feed" : "Erreur lors de la suppression du flux",
|
||||
"Add a podcast" : "Ajouter un podcast",
|
||||
"Could not fetch subscriptions" : "Impossible de récupérer les flux",
|
||||
"Find a podcast" : "Chercher un podcast",
|
||||
"Error loading feed" : "Erreur lors du chargement du flux",
|
||||
"Missing required app" : "Une application requise est manquante",
|
||||
"Install GPodder Sync" : "Installer GPodder Sync"
|
||||
},"pluralForm" :""
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<ul>
|
||||
<NcAppNavigationNewItem :name="t('Add a RSS link')"
|
||||
<NcAppNavigationNewItem :name="t('repod', 'Add a RSS link')"
|
||||
@new-item="addSubscription">
|
||||
<template #icon>
|
||||
<Plus :size="20" />
|
||||
|
@ -67,7 +67,7 @@ export default {
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Could not fetch search results'))
|
||||
showError(t('repod', 'Could not fetch search results'))
|
||||
} finally {
|
||||
if (this.feeds) {
|
||||
this.loading = false
|
||||
|
@ -10,7 +10,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="!loading" class="caption">
|
||||
{{ t('Suggests by fyyd') }}
|
||||
{{ t('repod', 'Suggests by fyyd') }}
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
@ -41,7 +41,7 @@ export default {
|
||||
this.tops = toplist.data
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Could not fetch tops'))
|
||||
showError(t('repod', 'Could not fetch tops'))
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
@ -15,11 +15,11 @@
|
||||
</a>
|
||||
<br><br>
|
||||
<p>
|
||||
<small>{{ description | stripHTML }}</small>
|
||||
<small>{{ strippedDescription }}</small>
|
||||
</p>
|
||||
</div>
|
||||
<NcAppNavigationNew v-if="!isSubscribed"
|
||||
:text="t('Subscribe')"
|
||||
:text="t('repod', 'Subscribe')"
|
||||
@click="addSubscription">
|
||||
<template #icon>
|
||||
<Plus :size="20" />
|
||||
@ -73,6 +73,11 @@ export default {
|
||||
isSubscribed() {
|
||||
return this.$store.state.subscriptions.subscriptions.includes(this.url)
|
||||
},
|
||||
strippedDescription() {
|
||||
const pre = document.createElement('pre')
|
||||
pre.innerHTML = this.description
|
||||
return pre.textContent || pre.innerText || ''
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async addSubscription() {
|
||||
@ -80,7 +85,7 @@ export default {
|
||||
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [this.url], remove: [] })
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Error while adding the feed'))
|
||||
showError(t('repod', 'Error while adding the feed'))
|
||||
}
|
||||
|
||||
this.$store.dispatch('subscriptions/fetch')
|
||||
|
@ -24,13 +24,13 @@
|
||||
<template #icon>
|
||||
<PlayButton :size="20" />
|
||||
</template>
|
||||
{{ t('Play') }}
|
||||
{{ t('repod', 'Play') }}
|
||||
</NcActionButton>
|
||||
<NcActionButton v-if="isCurrentEpisode(episode)" @click="load(null)">
|
||||
<template #icon>
|
||||
<StopButton :size="20" />
|
||||
</template>
|
||||
{{ t('Stop') }}
|
||||
{{ t('repod', 'Stop') }}
|
||||
</NcActionButton>
|
||||
</template>
|
||||
</NcListItem>
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
this.episodes = [...episodes.data].sort((a, b) => a.episodePubDate.date < b.episodePubDate.date)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Could not fetch episodes'))
|
||||
showError(t('repod', 'Could not fetch episodes'))
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
<template #icon>
|
||||
<Download :size="20" />
|
||||
</template>
|
||||
{{ t('Download') }}
|
||||
{{ t('repod', 'Download') }}
|
||||
</NcButton>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<a :href="player.episode.episodeLink" target="_blank">
|
||||
<strong>{{ player.episode.episodeName }}</strong>
|
||||
</a>
|
||||
<router-link :to="player.podcastUrl">
|
||||
<router-link :to="toUrl(player.podcastUrl)">
|
||||
<i>{{ player.episode.podcastName }}</i>
|
||||
</router-link>
|
||||
</div>
|
||||
@ -17,6 +17,11 @@ export default {
|
||||
return this.$store.state.player
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
toUrl(url) {
|
||||
return `/${btoa(url)}`
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<template #icon>
|
||||
<Delete :size="20" />
|
||||
</template>
|
||||
{{ t('Delete') }}
|
||||
{{ t('repod', 'Delete') }}
|
||||
</NcActionButton>
|
||||
</template>
|
||||
</NcAppNavigationItem>
|
||||
@ -73,7 +73,7 @@ export default {
|
||||
await axios.post(generateUrl('/apps/gpoddersync/subscription_change/create'), { add: [], remove: [this.url] })
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Error while removing the feed'))
|
||||
showError(t('repod', 'Error while removing the feed'))
|
||||
} finally {
|
||||
this.loading = false
|
||||
this.$store.dispatch('subscriptions/fetch')
|
||||
|
@ -2,7 +2,7 @@
|
||||
<NcAppNavigation>
|
||||
<NcAppContentList>
|
||||
<router-link to="/">
|
||||
<NcAppNavigationNew :text="t('Add a podcast')">
|
||||
<NcAppNavigationNew :text="t('repod', 'Add a podcast')">
|
||||
<template #icon>
|
||||
<Plus :size="20" />
|
||||
</template>
|
||||
@ -55,7 +55,7 @@ export default {
|
||||
await this.$store.dispatch('subscriptions/fetch')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
showError(t('Could not fetch subscriptions'))
|
||||
showError(t('repod', 'Could not fetch subscriptions'))
|
||||
} finally {
|
||||
this.loading = false
|
||||
}
|
||||
|
11
src/main.js
11
src/main.js
@ -1,4 +1,4 @@
|
||||
import { translate, translatePlural } from '@nextcloud/l10n'
|
||||
import { translatePlural as n, translate as t } from '@nextcloud/l10n'
|
||||
import App from './App.vue'
|
||||
import Vue from 'vue'
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
@ -8,17 +8,8 @@ import store from './store/main.js'
|
||||
// eslint-disable-next-line
|
||||
__webpack_public_path__ = generateFilePath(appName, '', 'js/')
|
||||
|
||||
const t = (...args) => translate('repod', ...args)
|
||||
const n = (...args) => translatePlural('repod', ...args)
|
||||
|
||||
Vue.mixin({ methods: { t, n } })
|
||||
|
||||
Vue.filter('stripHTML', (value) => {
|
||||
const div = document.createElement('div')
|
||||
div.innerHTML = value
|
||||
return div.textContent || div.innerText || ''
|
||||
})
|
||||
|
||||
export default new Vue({
|
||||
el: '#content',
|
||||
router,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<NcAppContent class="main">
|
||||
<NcTextField class="search"
|
||||
:label="t('Find a podcast')"
|
||||
:label="t('repod', 'Find a podcast')"
|
||||
:value.sync="search">
|
||||
<Magnify :size="20" />
|
||||
</NcTextField>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<NcAppContent>
|
||||
<Loading v-if="loading" />
|
||||
<NcEmptyContent v-if="failed" :name="t('Error loading feed')">
|
||||
<NcEmptyContent v-if="failed" :name="t('repod', 'Error loading feed')">
|
||||
<template #icon>
|
||||
<Alert />
|
||||
</template>
|
||||
|
@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<NcAppContent>
|
||||
<NcEmptyContent :name="t('Missing required app')">
|
||||
<NcEmptyContent :name="t('repod', 'Missing required app')">
|
||||
<template #icon>
|
||||
<Alert />
|
||||
</template>
|
||||
<template #action>
|
||||
<NcButton :href="gPodderSyncUrl">
|
||||
{{ t('Install GPodder Sync') }}
|
||||
{{ t('repod', 'Install GPodder Sync') }}
|
||||
</NcButton>
|
||||
</template>
|
||||
</NcEmptyContent>
|
||||
|
72
translationfiles/fr/repod.po
Normal file
72
translationfiles/fr/repod.po
Normal file
@ -0,0 +1,72 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the Nextcloud package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
||||
"POT-Creation-Date: 2024-01-10 08:48+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
msgid "Add a RSS link"
|
||||
msgstr "Ajouter un lien RSS"
|
||||
|
||||
msgid "Could not fetch search results"
|
||||
msgstr "Impossible de récupérer les resultats de la recherche"
|
||||
|
||||
msgid "Suggests by fyyd"
|
||||
msgstr "Suggestions via fyyd"
|
||||
|
||||
msgid "Could not fetch tops"
|
||||
msgstr "Impossible de récupérer les tops"
|
||||
|
||||
msgid "Subscribe"
|
||||
msgstr "S'abonner"
|
||||
|
||||
msgid "Error while adding the feed"
|
||||
msgstr "Erreur lors de l'ajout du flux"
|
||||
|
||||
msgid "Play"
|
||||
msgstr "Lecture"
|
||||
|
||||
msgid "Stop"
|
||||
msgstr "Arrêter"
|
||||
|
||||
msgid "Could not fetch episodes"
|
||||
msgstr "Impossible de récuprer les épisodes"
|
||||
|
||||
msgid "Download"
|
||||
msgstr "Télécharger"
|
||||
|
||||
msgid "Delete"
|
||||
msgstr "Supprimer"
|
||||
|
||||
msgid "Error while removing the feed"
|
||||
msgstr "Erreur lors de la suppression du flux"
|
||||
|
||||
msgid "Add a podcast"
|
||||
msgstr "Ajouter un podcast"
|
||||
|
||||
msgid "Could not fetch subscriptions"
|
||||
msgstr "Impossible de récupérer les flux"
|
||||
|
||||
msgid "Find a podcast"
|
||||
msgstr "Chercher un podcast"
|
||||
|
||||
msgid "Error loading feed"
|
||||
msgstr "Erreur lors du chargement du flux"
|
||||
|
||||
msgid "Missing required app"
|
||||
msgstr "Une application requise est manquante"
|
||||
|
||||
msgid "Install GPodder Sync"
|
||||
msgstr "Installer GPodder Sync"
|
110
translationfiles/templates/repod.pot
Normal file
110
translationfiles/templates/repod.pot
Normal file
@ -0,0 +1,110 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the Nextcloud package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Nextcloud 3.14159\n"
|
||||
"Report-Msgid-Bugs-To: translations\\@example.com\n"
|
||||
"POT-Creation-Date: 2024-01-10 14:22+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: /app/specialAppInfoFakeDummyForL10nScript.php:2
|
||||
msgid "RePod"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialAppInfoFakeDummyForL10nScript.php:3
|
||||
msgid "🔊 Browse, manage and listen to podcasts"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialAppInfoFakeDummyForL10nScript.php:4
|
||||
msgid ""
|
||||
"# 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\n"
|
||||
"You need to have [GPodderSync](https://apps.nextcloud.com/apps/gpoddersync) "
|
||||
"installed to use this app!"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:1
|
||||
msgid "Add a RSS link"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:2
|
||||
msgid "Could not fetch search results"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:3
|
||||
msgid "Suggests by fyyd"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:4
|
||||
msgid "Could not fetch tops"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:5
|
||||
msgid "Subscribe"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:6
|
||||
msgid "Error while adding the feed"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:7
|
||||
msgid "Play"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:8
|
||||
msgid "Stop"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:9
|
||||
msgid "Could not fetch episodes"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:10
|
||||
msgid "Download"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:11
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:12
|
||||
msgid "Error while removing the feed"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:13
|
||||
msgid "Add a podcast"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:14
|
||||
msgid "Could not fetch subscriptions"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:15
|
||||
msgid "Find a podcast"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:16
|
||||
msgid "Error loading feed"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:17
|
||||
msgid "Missing required app"
|
||||
msgstr ""
|
||||
|
||||
#: /app/specialVueFakeDummyForL10nScript.js:18
|
||||
msgid "Install GPodder Sync"
|
||||
msgstr ""
|
Loading…
Reference in New Issue
Block a user