clients: Update all manifest due to use updated framework

- Validate all the client data using the validation function.

- No need for enums anymore. Easier to read.

- Use the combined store URL method.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2017-12-06 16:07:37 +05:30 committed by James Valleroy
parent acd248e506
commit 44b92f12eb
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
19 changed files with 204 additions and 230 deletions

View File

@ -17,9 +17,9 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Package from plinth.clients import validate
clients = [{ clients = validate([{
'name': 'name':
_('Deluge'), _('Deluge'),
'description': 'description':
@ -29,7 +29,7 @@ clients = [{
'url': '/deluge' 'url': '/deluge'
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'deluge', 'name': 'deluge',
}] }]
}] }])

View File

@ -17,13 +17,11 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.clients import store_url, validate
from plinth.modules import diaspora from plinth.modules import diaspora
from plinth.templatetags.plinth_extras import Mobile_OS, Store from plinth.utils import format_lazy
from plinth.utils import f_droid_url, format_lazy
dandelion_package_id = 'com.github.dfa.diaspora_android' clients = validate([{
clients = [{
'name': 'name':
_('dandelion*'), _('dandelion*'),
'description': 'description':
@ -31,9 +29,9 @@ clients = [{
'community-run, distributed social network diaspora*'), 'community-run, distributed social network diaspora*'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': f_droid_url(dandelion_package_id), 'url': store_url('f-droid', 'com.github.dfa.diaspora_android'),
}] }]
}, { }, {
'name': 'name':
@ -46,4 +44,4 @@ clients = [{
host=diaspora.get_configured_domain_name() if host=diaspora.get_configured_domain_name() if
diaspora.is_setup() else "<please-setup-domain-name>") diaspora.is_setup() else "<please-setup-domain-name>")
}] }]
}] }])

View File

@ -18,22 +18,16 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.modules.jsxc import manifest as jsxc_manifest from plinth.modules.jsxc import manifest as jsxc_manifest
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
from plinth.utils import play_store_url
yaxim_package_id = 'org.yaxim.androidclient' _clients = validate([{
bruno_package_id = 'org.yaxim.bruno'
conversations_package_id = 'eu.siacs.conversations'
_clients = [{
'name': 'name':
_('yaxim'), _('yaxim'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(yaxim_package_id), 'url': store_url('google-play', 'org.yaxim.androidclient'),
}] }]
}, { }, {
'name': 'name':
@ -43,9 +37,9 @@ _clients = [{
'yaxim app.'), 'yaxim app.'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(bruno_package_id) 'url': store_url('google-play', 'org.yaxim.bruno')
}] }]
}, { }, {
'name': 'name':
@ -60,8 +54,8 @@ _clients = [{
'extra security.'), 'extra security.'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.IOS.value, 'os': 'ios',
'store_name': Store.APP_STORE.value, 'store_name': 'app-store',
'url': 'https://itunes.apple.com/us/app/chatsecure' 'url': 'https://itunes.apple.com/us/app/chatsecure'
'/id464200063 ' '/id464200063 '
}] }]
@ -70,16 +64,16 @@ _clients = [{
_('Conversations'), _('Conversations'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(conversations_package_id) 'url': store_url('google-play', 'eu.siacs.conversations')
}] }]
}, { }, {
'name': 'name':
_('Dino'), _('Dino'),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.GNU_LINUX, 'os': 'gnu-linux',
'url': 'https://github.com/dino/dino/wiki/Distribution-Packages', 'url': 'https://github.com/dino/dino/wiki/Distribution-Packages',
}] }]
}, { }, {
@ -87,14 +81,14 @@ _clients = [{
_('Gajim'), _('Gajim'),
'platforms': [{ 'platforms': [{
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'gajim' 'name': 'gajim'
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': 'https://gajim.org/downloads.php' 'url': 'https://gajim.org/downloads.php'
}] }]
}] }])
_clients.extend(jsxc_manifest.clients) _clients.extend(jsxc_manifest.clients)

View File

@ -17,10 +17,12 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
clients = [{ from plinth.clients import validate
clients = validate([{
'name': _('ikiwiki'), 'name': _('ikiwiki'),
'platforms': [{ 'platforms': [{
'type': 'web', 'type': 'web',
'url': '/ikiwiki' 'url': '/ikiwiki'
}] }]
}] }])

View File

@ -18,26 +18,26 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth import cfg from plinth import cfg
from plinth.templatetags.plinth_extras import Desktop_OS, Package from plinth.clients import validate
from plinth.utils import format_lazy from plinth.utils import format_lazy
clients = [{ clients = validate([{
'name': 'name':
_('Gobby'), _('Gobby'),
'description': 'description':
_('Gobby is a collaborative text editor'), _('Gobby is a collaborative text editor'),
'usage': 'usage':
format_lazy( format_lazy(
_('start Gobby and select "Connect to Server" and ' _('Start Gobby and select "Connect to Server" and '
'enter your {box_name}\'s domain name.'), 'enter your {box_name}\'s domain name.'),
box_name=_(cfg.box_name)), box_name=_(cfg.box_name)),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': 'https://github.com/gobby/gobby/wiki/Download' 'url': 'https://github.com/gobby/gobby/wiki/Download'
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'gobby' 'name': 'gobby'
}] }]
}] }])

View File

@ -17,17 +17,13 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Package from plinth.clients import validate
clients = [{ clients = validate([{
'name': 'name':
_('JSXC'), _('JSXC'),
'platforms': [{ 'platforms': [{
'type': 'package',
'format': Package.DEB.value,
'name': 'libjs-jsxc'
}, {
'type': 'web', 'type': 'web',
'url': '/jsxc' 'url': '/jsxc'
}] }]
}] }])

View File

@ -17,46 +17,38 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store from plinth.clients import store_url, validate
from plinth.utils import f_droid_url, play_store_url
android_package_id = 'im.vector.alpha' _android_package_id = 'im.vector.alpha'
riot_desktop_download_url = 'https://riot.im/desktop.html' _riot_desktop_download_url = 'https://riot.im/desktop.html'
clients = [{ clients = validate([{
'name': 'name':
_('Riot'), _('Riot'),
'platforms': [ 'platforms': [{
{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(android_package_id) 'url': store_url('google-play', _android_package_id)
}, }, {
{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': f_droid_url(android_package_id) 'url': store_url('f-droid', _android_package_id)
}, }, {
{
'type': 'web', 'type': 'web',
'url': 'https://riot.im/app/#/home' 'url': 'https://riot.im/app/#/home'
}, }, {
{
'type': 'download', 'type': 'download',
'os': Desktop_OS.GNU_LINUX.value, 'os': 'gnu-linux',
'url': riot_desktop_download_url, 'url': _riot_desktop_download_url,
}, }, {
{
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': riot_desktop_download_url, 'url': _riot_desktop_download_url,
}, }, {
{
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': riot_desktop_download_url, 'url': _riot_desktop_download_url,
},
]
}] }]
}])

View File

@ -17,31 +17,28 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
clients = [{ clients = validate([{
'name': 'name':
_('Minetest'), _('Minetest'),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': 'https://github.com/minetest/minetest/releases' 'url': 'https://github.com/minetest/minetest/releases'
'/download/0.4.16/minetest-0.4.16-win64.zip '
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': 'https://play.google.com/store/apps/details?id=net' 'url': store_url('google-play', 'net.minetest.minetest')
'.minetest.minetest '
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': 'https://f-droid.org/packages/net.minetest.minetest/ ' 'url': store_url('f-droid', 'net.minetest.minetest')
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'minetest' 'name': 'minetest'
}] }]
}] }])

View File

@ -17,31 +17,29 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
from plinth.utils import f_droid_url, play_store_url
plumble_package_id = 'com.morlunk.mumbleclient.free' _plumble_package_id = 'com.morlunk.mumbleclient.free'
clients = [{ clients = validate([{
'name': 'name':
_('Mumble'), _('Mumble'),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': 'https://wiki.mumble.info/wiki/Main_Page' 'url': 'https://wiki.mumble.info/wiki/Main_Page'
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': 'https://wiki.mumble.info/wiki/Main_Page' 'url': 'https://wiki.mumble.info/wiki/Main_Page'
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'mumble' 'name': 'mumble'
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.IOS.value, 'os': 'ios',
'store_name': Store.APP_STORE.value, 'store_name': 'app-store',
'url': 'https://itunes.apple.com/us/app/mumble/id443472808' 'url': 'https://itunes.apple.com/us/app/mumble/id443472808'
}] }]
}, { }, {
@ -49,22 +47,22 @@ clients = [{
_('Plumble'), _('Plumble'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(plumble_package_id) 'url': store_url('google-play', _plumble_package_id)
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': f_droid_url(plumble_package_id) 'url': store_url('f-droid', _plumble_package_id)
}] }]
}, { }, {
'name': 'name':
_('Mumblefly'), _('Mumblefly'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.IOS.value, 'os': 'ios',
'store_name': Store.APP_STORE.value, 'store_name': 'app-store',
'url': 'https://itunes.apple.com/dk/app/mumblefy/id858752232' 'url': 'https://itunes.apple.com/dk/app/mumblefy/id858752232'
}] }]
}] }])

View File

@ -17,32 +17,27 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
from plinth.utils import play_store_url
quasseldroid_package_id = 'com.iskrembilen.quasseldroid', clients = validate([{
quassel_download_url = 'http://quassel-irc.org/downloads'
clients = [{
'name': 'name':
_('Quassel'), _('Quassel'),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': quassel_download_url, 'url': 'http://quassel-irc.org/downloads'
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'quassel-client', 'name': 'quassel-client',
}] }]
}, { }, {
'name': 'name':
_('Quassseldroid'), _('Quasseldroid'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(quasseldroid_package_id), 'url': store_url('google-play', 'com.iskrembilen.quasseldroid'),
}]
}] }]
}])

View File

@ -17,12 +17,9 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Mobile_OS, Package, Store from plinth.clients import store_url, validate
from plinth.utils import play_store_url
davdroid_package_id = 'at.bitfire.davdroid' clients = validate([{
clients = [{
'name': 'name':
_('DAVDroid'), _('DAVDroid'),
'usage': 'usage':
@ -32,16 +29,16 @@ clients = [{
'create new.'), 'create new.'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(davdroid_package_id), 'url': store_url('google-play', 'at.bitfire.davdroid'),
}] }]
}, { }, {
'name': 'name':
_('GNOME Calendar'), _('GNOME Calendar'),
'platforms': [{ 'platforms': [{
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'gnome-calendar' 'name': 'gnome-calendar'
}] }]
}, { }, {
@ -59,7 +56,7 @@ clients = [{
'calendars and address books.'), 'calendars and address books.'),
'platforms': [{ 'platforms': [{
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'evolution' 'name': 'evolution'
}] }]
}] }])

View File

@ -17,16 +17,14 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
from plinth.utils import play_store_url
jitsi_package_id = 'org.jitsi.meet' _jitsi_package_id = 'org.jitsi.meet'
csipsimple_package_id = 'com.csipsimple' _csipsimple_package_id = 'com.csipsimple'
jitsi_download_url = 'https://download.jitsi.org/jitsi/' _jitsi_download_url = 'https://download.jitsi.org/jitsi/'
clients = [{ clients = validate([{
'name': 'name':
_('Jitsi Meet'), _('Jitsi Meet'),
'description': 'description':
@ -40,38 +38,38 @@ clients = [{
'and simulcasting.'), 'and simulcasting.'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(jitsi_package_id) 'url': store_url('google-play', _jitsi_package_id)
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.IOS.value, 'os': 'ios',
'store_name': Store.APP_STORE.value, 'store_name': 'app-store',
'url': 'https://itunes.apple.com/in/app/jitsi-meet/id1165103905' 'url': 'https://itunes.apple.com/in/app/jitsi-meet/id1165103905'
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.GNU_LINUX.value, 'os': 'gnu-linux',
'url': jitsi_download_url 'url': _jitsi_download_url
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'jitsi' 'name': 'jitsi'
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': jitsi_download_url 'url': _jitsi_download_url
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': jitsi_download_url 'url': _jitsi_download_url
}] }]
}, { }, {
'name': 'name':
_('CSipSimple'), _('CSipSimple'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(csipsimple_package_id) 'url': store_url('google-play', _csipsimple_package_id)
}]
}] }]
}])

View File

@ -17,10 +17,12 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
clients = [{ from plinth.clients import validate
clients = validate([{
'name': _('reStore'), 'name': _('reStore'),
'platforms': [{ 'platforms': [{
'type': 'web', 'type': 'web',
'url': '/restore' 'url': '/restore'
}] }]
}] }])

View File

@ -17,10 +17,12 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
clients = [{ from plinth.clients import validate
clients = validate([{
'name': _('Roundcube'), 'name': _('Roundcube'),
'platforms': [{ 'platforms': [{
'type': 'web', 'type': 'web',
'url': '/roundcube' 'url': '/roundcube'
}] }]
}] }])

View File

@ -17,10 +17,12 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
clients = [{ from plinth.clients import validate
clients = validate([{
'name': _('Shaarli'), 'name': _('Shaarli'),
'platforms': [{ 'platforms': [{
'type': 'web', 'type': 'web',
'url': '/shaarli' 'url': '/shaarli'
}] }]
}] }])

View File

@ -17,48 +17,46 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import (Desktop_OS, Mobile_OS, Package, from plinth.clients import store_url, validate
Store)
from plinth.utils import f_droid_url, play_store_url
syncthing_package_id = 'com.nutomic.syncthingandroid' _package_id = 'com.nutomic.syncthingandroid'
syncthing_download_url = 'https://syncthing.net/' _download_url = 'https://syncthing.net/'
clients = [{ clients = validate([{
'name': 'name':
_('Syncthing'), _('Syncthing'),
'platforms': [{ 'platforms': [{
'type': 'package', 'type': 'package',
'format': Package.DEB.value, 'format': 'deb',
'name': 'syncthing', 'name': 'syncthing',
}, { }, {
'type': 'package', 'type': 'package',
'format': Package.HOMEBREW.value, 'format': 'brew',
'name': 'syncthing', 'name': 'syncthing',
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.GNU_LINUX.value, 'os': 'gnu-linux',
'url': syncthing_download_url, 'url': _download_url,
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': syncthing_download_url, 'url': _download_url,
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': syncthing_download_url, 'url': _download_url,
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(syncthing_package_id) 'url': store_url('google-play', _package_id)
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': f_droid_url(syncthing_package_id) 'url': store_url('f-droid', _package_id)
}, { }, {
'type': 'web', 'type': 'web',
'url': '/syncthing' 'url': '/syncthing'
}] }]
}] }])

View File

@ -17,40 +17,40 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Desktop_OS, Mobile_OS, Store from plinth.clients import store_url, validate
from plinth.utils import f_droid_url, play_store_url
orbot_package_id = 'org.torproject.android' _orbot_package_id = 'org.torproject.android'
tor_browser_download_url = 'https://www.torproject.org/download/download-easy.html' _tor_browser_download_url = \
'https://www.torproject.org/download/download-easy.html'
clients = [{ clients = validate([{
'name': 'name':
_('Tor Browser'), _('Tor Browser'),
'platforms': [{ 'platforms': [{
'type': 'download', 'type': 'download',
'os': Desktop_OS.WINDOWS.value, 'os': 'windows',
'url': tor_browser_download_url, 'url': _tor_browser_download_url,
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.GNU_LINUX.value, 'os': 'gnu-linux',
'url': tor_browser_download_url, 'url': _tor_browser_download_url,
}, { }, {
'type': 'download', 'type': 'download',
'os': Desktop_OS.MAC_OS.value, 'os': 'macos',
'url': tor_browser_download_url, 'url': _tor_browser_download_url,
}] }]
}, { }, {
'name': 'name':
_('Orbot: Proxy with Tor'), _('Orbot: Proxy with Tor'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': play_store_url(orbot_package_id) 'url': store_url('google-play', _orbot_package_id)
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': f_droid_url(orbot_package_id) 'url': store_url('f-droid', _orbot_package_id)
}]
}] }]
}])

View File

@ -17,10 +17,12 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
clients = [{ from plinth.clients import validate
clients = validate([{
'name': _('Transmission'), 'name': _('Transmission'),
'platforms': [{ 'platforms': [{
'type': 'web', 'type': 'web',
'url': '/transmission' 'url': '/transmission'
}] }]
}] }])

View File

@ -17,24 +17,25 @@
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from plinth.templatetags.plinth_extras import Mobile_OS, Store from plinth.clients import store_url, validate
clients = [{ _package_id = 'org.ttrssreader'
clients = validate([{
'name': 'name':
_('TT-RSS Reader'), _('TT-RSS Reader'),
'platforms': [{ 'platforms': [{
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.GOOGLE_PLAY.value, 'store_name': 'google-play',
'url': 'https://play.google.com/store/apps/details?id=org' 'url': store_url('google-play', _package_id),
'.ttrssreader',
}, { }, {
'type': 'store', 'type': 'store',
'os': Mobile_OS.ANDROID.value, 'os': 'android',
'store_name': Store.F_DROID.value, 'store_name': 'f-droid',
'url': 'https://f-droid.org/packages/org.ttrssreader/', 'url': store_url('f-droid', _package_id),
}, { }, {
'type': 'web', 'type': 'web',
'url': '/tt-rss' 'url': '/tt-rss'
}] }]
}] }])