Skip to content

Commit

Permalink
Tests for CLI and autocomplete, updated translations, improved playli…
Browse files Browse the repository at this point in the history
…st info
  • Loading branch information
tocsinde committed Jul 3, 2018
1 parent a4edf4b commit da2d5cb
Show file tree
Hide file tree
Showing 15 changed files with 419 additions and 289 deletions.
6 changes: 3 additions & 3 deletions newsic/functions.py
Expand Up @@ -6,7 +6,7 @@
current_app as app, g, request, render_template, url_for
)
from time import perf_counter
from click import echo as click_echo
from click import echo
from flask_babel import Babel, gettext

"""
Expand Down Expand Up @@ -118,10 +118,10 @@ def flushcache():
"""

if read_config("CACHE"):
click_echo("Cache successfully flushed")
echo("Cache successfully flushed")
CACHE.clear()
else:
click_echo("Cache inactive, unable to flush")
echo("Cache inactive, unable to flush")


"""
Expand Down
161 changes: 93 additions & 68 deletions newsic/messages.pot
Expand Up @@ -8,101 +8,107 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2018-01-10 14:03+0100\n"
"POT-Creation-Date: 2018-07-03 14:58+0200\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.5.1\n"
"Generated-By: Babel 2.5.3\n"

#: newsic.py:355
msgid "Home"
msgstr ""

#: newsic.py:449 newsic.py:451 newsic.py:519 newsic.py:521
#: custom.py:48 custom.py:50 index.py:116 index.py:118 youtube.py:320
#: youtube.py:322
msgid "No music found"
msgstr ""

#: newsic.py:589 newsic.py:593
#: custom.py:119 custom.py:123
msgid "Custom playlist"
msgstr ""

#: newsic.py:590
#: custom.py:120
msgid "Anonymous"
msgstr ""

#: newsic.py:634 newsic.py:650
msgid "No mix available for this video"
#: functions.py:58 functions.py:60 functions.py:195 functions.py:197
#: vimeo.py:43 vimeo.py:45
msgid "URL not found"
msgstr ""

#: newsic.py:636 newsic.py:652
msgid "No mix available"
#: index.py:29
msgid "Home"
msgstr ""

#: newsic.py:669
msgid "This playlist is either empty, private or non-existing"
#: vimeo.py:56
msgid "This album/channel is either empty, private or non-existing"
msgstr ""

#: newsic.py:671
msgid "Invalid playlist"
#: vimeo.py:58
msgid "Can't handle album/channel"
msgstr ""

#: newsic.py:701 newsic.py:703 newsic.py:813 newsic.py:815
msgid "URL not found"
#: vimeo.py:135 vimeo.py:138
msgid "Vimeo mix"
msgstr ""

#: newsic.py:714
msgid "This album/channel is either empty, private or non-existing"
#: youtube.py:229 youtube.py:247
msgid "No mix available for this video"
msgstr ""

#: newsic.py:716
msgid "Can't handle album/channel"
#: youtube.py:231 youtube.py:249
msgid "No mix available"
msgstr ""

#: newsic.py:795 newsic.py:798
msgid "Vimeo mix"
#: youtube.py:267
msgid "This playlist is either empty, private or non-existing"
msgstr ""

#: templates/base.html:45 templates/base.html:46 templates/index.html:12
#: youtube.py:269
msgid "Invalid playlist"
msgstr ""

#: templates/base.html:47 templates/base.html:48 templates/index.html:12
msgid "Explore music from YouTube and Vimeo snippet by snippet"
msgstr ""

#: templates/base.html:56
#: templates/base.html:58
msgid "Go to start page"
msgstr ""

#: templates/base.html:57 templates/base.html:58 templates/index.html:9
#: templates/base.html:59 templates/base.html:60 templates/index.html:9
msgid "Suddenly a wild newsic logo appears. Hey look, it's a SVG!"
msgstr ""

#: templates/base.html:63 templates/index.html:23
#: templates/base.html:65 templates/index.html:23
msgid "Start typing or paste a playlist URL"
msgstr ""

#: templates/base.html:68 templates/index.html:29
#: templates/base.html:70 templates/index.html:29
msgid "start"
msgstr ""

#: templates/base.html:77
msgid "Visit tocsin.de, the portfolio of the newsic creator"
#: templates/base.html:83
msgid "Go to newsic's project page"
msgstr ""

#: templates/base.html:78
msgid "Made with <i class=\"fas fa-heart\"></i> by tocsin"
#: templates/base.html:84
msgid "About newsic"
msgstr ""

#: templates/base.html:80
#: templates/base.html:87
msgid "Feel free to fork or review the Code on GitHub"
msgstr ""

#: templates/base.html:81
#: templates/base.html:88
msgid "Source code on GitHub"
msgstr ""

#: templates/base.html:90
msgid "runtime"
#: templates/base.html:92
msgid "Visit tocsin.de, the portfolio of the newsic creator"
msgstr ""

#: templates/base.html:92
msgid "Made with <i class=\"fas fa-heart\"></i> by tocsin"
msgstr ""

#: templates/index.html:35
Expand Down Expand Up @@ -152,126 +158,145 @@ msgstr ""
msgid "Attention: The support for Vimeo playlists is still in beta status"
msgstr ""

#: templates/index.html:78 templates/play.html:143
#: templates/index.html:79 templates/play.html:158
msgid "No results :("
msgstr ""

#: templates/index.html:79 templates/play.html:144
#: templates/index.html:80 templates/play.html:159
msgid "videos"
msgstr ""

#: templates/play.html:39
#: templates/play.html:36
msgid ""
"Vimeo support is still beta, sorry. <!-- <br/>Please <a "
"href=\"https://github.com/newsic/newsic/issues\" target=\"_blank\" "
"title=\"Report bugs about the Vimeo support via GitHub\">feel free to "
"take a look at the bug</a> :) -->"
msgstr ""

#: templates/play.html:46
#: templates/play.html:43
msgid ""
"Vimeo support is still beta, sorry. The order of videos isn't correct "
"yet, this is caused by the Vimeo API."
msgstr ""

#: templates/play.html:54
#: templates/play.html:52
msgid ""
"Either your browser is a disastrous piece of old crap or you should stop "
"blocking JavaScript.\n"
"\t\t\tWe kindly ask you to make a decision: Either activate JavaScript "
" We kindly ask you to make a decision: Either activate JavaScript "
"(or whitelist newsic on your content blocker) or install/use a fresh "
"version of Firefox, Chromium/Chrome, Safari, Vivaldi, Opera or something "
"else instead.\n"
"\t\t\tPSA: Using Edge isn't as cutting-edge as it sounds; but hey, that's"
" entirely up to you :)"
" PSA: Using Edge isn't as cutting-edge as it sounds; but hey, "
"that's entirely up to you :)"
msgstr ""

#: templates/play.html:71
#: templates/play.html:70
msgid "Previous snippet (shortcuts: A or left arrow key)"
msgstr ""

#: templates/play.html:74
#: templates/play.html:73
msgid "Play/pause (shortcuts: S, K or space bar)"
msgstr ""

#: templates/play.html:77
#: templates/play.html:76
msgid "Next snippet (shortcuts: D or right arrow key)"
msgstr ""

#: templates/play.html:82
#: templates/play.html:81
msgid "Play complete song (shortcut: C)"
msgstr ""

#: templates/play.html:83
#: templates/play.html:82
msgid "Complete"
msgstr ""

#: templates/play.html:85
#: templates/play.html:84
msgid "Play mix based on current video (shortcut: X)"
msgstr ""

#: templates/play.html:86 templates/play.html:136
#: templates/play.html:85 templates/play.html:149
msgid "Mix"
msgstr ""

#: templates/play.html:88
#: templates/play.html:87
msgid "Search lyrics on Genius.com (shortcut: L)"
msgstr ""

#: templates/play.html:89 templates/play.html:137
#: templates/play.html:88 templates/play.html:150
msgid "Lyrics"
msgstr ""

#: templates/play.html:100
#: templates/play.html:101
#, python-format
msgid "Playlist by %(creator)s"
msgstr ""

#: templates/play.html:104
#, python-format
msgid "%(amount)s snippets"
msgstr ""

#: templates/play.html:104
#, python-format
msgid "%(min)s min"
msgstr ""

#: templates/play.html:109
#, python-format
msgid "Go directly to %(link)s"
msgstr ""

#: templates/play.html:128
#: templates/play.html:138
msgid "Next snippet"
msgstr ""

#: templates/play.html:129
#: templates/play.html:139
msgid "Play"
msgstr ""

#: templates/play.html:130
#: templates/play.html:140
msgid "Pause"
msgstr ""

#: templates/play.html:131
#: templates/play.html:141
msgid "Previous snippet"
msgstr ""

#: templates/play.html:132
#: templates/play.html:144
msgid "Toggle mute"
msgstr ""

#: templates/play.html:133
#: templates/play.html:145
msgid "Volume"
msgstr ""

#: templates/play.html:134
#: templates/play.html:146
msgid "buffered"
msgstr ""

#: templates/play.html:135
#: templates/play.html:147
msgid "Seek"
msgstr ""

#: templates/play.html:148
msgid "Complete snippet"
msgstr ""

#: templates/play.html:138
#: templates/play.html:153
msgid "Toggle fullscreen"
msgstr ""

#: templates/play.html:139
#: templates/play.html:154
msgid "Embedding forbidden or blocked in your country"
msgstr ""

#: templates/play.html:140
#: templates/play.html:155
msgid "Sorry, not available in your country"
msgstr ""

#: templates/play.html:141
#: templates/play.html:156
msgid "Video skipped"
msgstr ""

10 changes: 7 additions & 3 deletions newsic/static/css/style.css
Expand Up @@ -193,7 +193,7 @@ footer a:hover .fa-heart, footer a:visited:hover .fa-heart {
border: 1px solid #616161;
}

.snippetinfo span, .featured span {
.featured span, #snippets .main span {
border: 1px solid #7B7B7B;
border-radius: 2px;
padding: 5px 10px 5px 10px;
Expand Down Expand Up @@ -227,8 +227,12 @@ h1 {

#snippets .main {
background: #3d3d3d;
padding: 2vw 1vw;
text-align: justify;
padding: 2vw;
}

#snippets .main p {
margin-top: 1.5vw;
font-size: .9em;
}

#snippets .main h2 {
Expand Down

0 comments on commit da2d5cb

Please sign in to comment.