From c046787cb34f964c2fb3014a4c46581d58c74350 Mon Sep 17 00:00:00 2001 From: ealgase Date: Sun, 9 Jun 2019 21:54:18 +0200 Subject: [PATCH 1/6] Fix websockets reverse proxy --- deploy/apache.conf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/deploy/apache.conf b/deploy/apache.conf index e1409a627..3b34dcdba 100644 --- a/deploy/apache.conf +++ b/deploy/apache.conf @@ -64,11 +64,6 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music Allow from all - # Activating WebSockets - - ProxyPass ${funkwhale-api-ws}/api/v1/activity - - # similar to nginx 'client_max_body_size 100M;' LimitRequestBody 104857600 @@ -107,6 +102,11 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music Alias /staticfiles /srv/funkwhale/data/static + # Activating WebSockets + + ProxyPass ${funkwhale-api-ws}/api/v1/activity + + # Setting appropriate access levels to serve frontend Options FollowSymLinks From bad39e0974763724319511fc78a4d8e4edb68739 Mon Sep 17 00:00:00 2001 From: Creak Date: Sat, 8 Jun 2019 21:03:18 +0200 Subject: [PATCH 2/6] Fix French translation for "Start radio" --- changes/changelog.d/849.bugfix | 1 + front/locales/fr_FR/LC_MESSAGES/app.po | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/849.bugfix diff --git a/changes/changelog.d/849.bugfix b/changes/changelog.d/849.bugfix new file mode 100644 index 000000000..61f1c2a2e --- /dev/null +++ b/changes/changelog.d/849.bugfix @@ -0,0 +1 @@ +Fixed issue with French translation for "Start radio" (#849) diff --git a/front/locales/fr_FR/LC_MESSAGES/app.po b/front/locales/fr_FR/LC_MESSAGES/app.po index c93e5d43f..bb9db8d34 100644 --- a/front/locales/fr_FR/LC_MESSAGES/app.po +++ b/front/locales/fr_FR/LC_MESSAGES/app.po @@ -3986,7 +3986,7 @@ msgstr "Membre de l'équipe" #: src/components/radios/Button.vue:4 msgctxt "*/Queue/Button.Label/Short, Verb" msgid "Start radio" -msgstr "Arrêter la radio" +msgstr "Démarrer la radio" #: front/src/views/admin/Settings.vue:86 msgctxt "Content/Admin/Menu" From 024addfb4b73c9b492614e33eaeff832387051e8 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Fri, 7 Jun 2019 16:41:50 +0200 Subject: [PATCH 3/6] Added username and domain filter on /history/listenings endpoint --- api/funkwhale_api/history/filters.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/funkwhale_api/history/filters.py b/api/funkwhale_api/history/filters.py index 30bc78f6a..02549b3b1 100644 --- a/api/funkwhale_api/history/filters.py +++ b/api/funkwhale_api/history/filters.py @@ -1,9 +1,14 @@ +import django_filters + from funkwhale_api.moderation import filters as moderation_filters from . import models class ListeningFilter(moderation_filters.HiddenContentFilterSet): + username = django_filters.CharFilter("user__username") + domain = django_filters.CharFilter("user__actor__domain_id") + class Meta: model = models.Listening hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG[ From ae8df9b03ebdfd5eb4e6dded61aa67e7838371b7 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Thu, 6 Jun 2019 13:53:05 +0200 Subject: [PATCH 4/6] Added some documentation about translations lifecycle --- TRANSLATORS.rst | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/TRANSLATORS.rst b/TRANSLATORS.rst index 5e2cf51f7..7fea7e399 100644 --- a/TRANSLATORS.rst +++ b/TRANSLATORS.rst @@ -1,6 +1,8 @@ Translating Funkwhale ===================== +A step-by-step, beginner friendly guide is available at https://contribute.funkwhale.audio/guides/translate/ + Thank you for reading this! If you want to help translate Funkwhale, you found the proper place :) @@ -21,8 +23,41 @@ Respecting those guidelines is mandatory if you want your translation to be incl - Use gender-neutral language and wording +Submitting a new language +------------------------- + +1. Pull the latest version of ``develop`` +2. Create a new branch, e.g ``git checkout -b translations-new-fr-ca`` +3. Add your new language code and name in ``front/src/locales.js``. Use the native language name, as it is what appears in the UI selector. +4. Create the ``po`` file from template: + +.. code-block:: shell + + export LOCALE=fr_CA # replace with your actual locale code + mkdir -p front/locales/$LOCALE/LC_MESSAGES + msginit --no-wrap --no-translator --locale=$LOCALE --input=front/locales/app.pot --output-file=front/locales/$LOCALE/LC_MESSAGES/app.po + +5. Then commit your changes, push, and submit a pull request on the ``develop`` branch + Requesting a new language ------------------------- -If you'd like to see a new language in Funkwhale, please open an issue here: +If you cannot submit a new language yourself, you can request it by opening an issue here: https://dev.funkwhale.audio/funkwhale/funkwhale/issues + +Extracting messages from source +------------------------------- + +We offer a script to update existing ``po`` and ``pot`` files with new translations +from the source code. This action should be run regularly, and in particular before +lots of translation work is expected (e.g a few weeks before a new release), or when +the UI code changes a lot. Otherwise, translators end up translating some obsolete messages, +or not translationg new messages. + +1. `Lock the translations on weblate `_ (``Lock`` button in the sidebar). This will prevent translators from working, and help prevent potential conflicts in the source code +2. `Commit and push changes from weblate `_ (``Commit`` and ``Push`` buttons in the sidebar) +3. Pull ``develop`` in your local git repository to ensure you have the latest version of the translations +4. Create a dedicated branch with ``git checkout -b translations-integration`` +5. Extract the translations with ``cd front && ./scripts/i18n-extract.sh``. This will update all ``po`` files as necessary +6. Review, commit and push the changes, then open a merge request on the ``develop`` branch +7. When the MR is merged, `Unlock the translations on weblate `_ (``Unlock`` button in the sidebar). From 3ce247763c12a67efbe0510b2e236af7d730ce83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 23 May 2019 19:18:37 +0100 Subject: [PATCH 5/6] Added fix + changelog fragment for #838 --- changes/changelog.d/838.bugfix | 1 + front/src/components/audio/Player.vue | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/838.bugfix diff --git a/changes/changelog.d/838.bugfix b/changes/changelog.d/838.bugfix new file mode 100644 index 000000000..339489756 --- /dev/null +++ b/changes/changelog.d/838.bugfix @@ -0,0 +1 @@ +Fixed issue with player changing height when hovering over the volume slider (#838) diff --git a/front/src/components/audio/Player.vue b/front/src/components/audio/Player.vue index ea15ebc87..8faaf670c 100644 --- a/front/src/components/audio/Player.vue +++ b/front/src/components/audio/Player.vue @@ -199,7 +199,6 @@ @click.prevent.stop="clean()" class="two wide column control"> - @@ -926,6 +925,11 @@ export default { animation-timing-function: linear; animation-iteration-count: infinite; } + +.icons { + position: absolute; +} + i.icons .corner.icon { font-size: 1em; right: -0.3em; From 59a3be1411d432d44cb21576d92824791e0aa10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 23 May 2019 10:37:16 +0200 Subject: [PATCH 6/6] Resolve "Add documentation for resolver conf" --- docs/admin/external-storages.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/admin/external-storages.rst b/docs/admin/external-storages.rst index c8dbbe963..bd136df62 100644 --- a/docs/admin/external-storages.rst +++ b/docs/admin/external-storages.rst @@ -115,3 +115,29 @@ If you are using ``awscli``, you can store this policy in a ``/tmp/policy`` file apply it using the following command:: aws s3api put-bucket-policy --bucket --policy file:///tmp/policy + +Troubleshooting +*************** + +No Resolver Found +^^^^^^^^^^^^^^^^^ + +Depending on your setup, you may experience the following issue when trying to stream +music directly from your S3-compatible store. + +.. code-block:: shell + + [error] 2832#2832: *1 no resolver defined to resolve [address] client: [IP], server: [servername], request: "GET API request", host: "[your_domain]", referrer: "[your_domain/library]" + +This happpens when the nginx config is unable to use your server's DNS resolver. This issue +is still under investigation, but in the meantime can be worked around by specifying a resolver +in your ``funkwhale.template`` under the ``location ~/_protected/media/(.+)`` section. + +.. code-block:: shell + + location ~ /_protected/media/(.+) { + resolver 1.1.1.1; + internal; + proxy_pass $1; + } +