Skip to content
Snippets Groups Projects
Commit a95a095e authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'develop-cherry-pick' into 'master'

Develop cherry pick

See merge request funkwhale/funkwhale!774
parents de9fc806 59a3be14
No related branches found
No related tags found
No related merge requests found
Translating Funkwhale 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, Thank you for reading this! If you want to help translate Funkwhale,
you found the proper place :) you found the proper place :)
...@@ -21,8 +23,41 @@ Respecting those guidelines is mandatory if you want your translation to be incl ...@@ -21,8 +23,41 @@ Respecting those guidelines is mandatory if you want your translation to be incl
- Use gender-neutral language and wording - 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 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 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 <https://translate.funkwhale.audio/projects/funkwhale/front/#repository>`_ (``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 <https://translate.funkwhale.audio/projects/funkwhale/front/#repository>`_ (``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 <https://translate.funkwhale.audio/projects/funkwhale/front/#repository>`_ (``Unlock`` button in the sidebar).
import django_filters
from funkwhale_api.moderation import filters as moderation_filters from funkwhale_api.moderation import filters as moderation_filters
from . import models from . import models
class ListeningFilter(moderation_filters.HiddenContentFilterSet): class ListeningFilter(moderation_filters.HiddenContentFilterSet):
username = django_filters.CharFilter("user__username")
domain = django_filters.CharFilter("user__actor__domain_id")
class Meta: class Meta:
model = models.Listening model = models.Listening
hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG[ hidden_content_fields_mapping = moderation_filters.USER_FILTER_CONFIG[
......
Fixed issue with player changing height when hovering over the volume slider (#838)
Fixed issue with French translation for "Start radio" (#849)
...@@ -64,11 +64,6 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ...@@ -64,11 +64,6 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
Allow from all Allow from all
</Proxy> </Proxy>
# Activating WebSockets
<Location "/api/v1/activity">
ProxyPass ${funkwhale-api-ws}/api/v1/activity
</Location>
<Location "/"> <Location "/">
# similar to nginx 'client_max_body_size 100M;' # similar to nginx 'client_max_body_size 100M;'
LimitRequestBody 104857600 LimitRequestBody 104857600
...@@ -107,6 +102,11 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music ...@@ -107,6 +102,11 @@ Define MUSIC_DIRECTORY_PATH /srv/funkwhale/data/music
</Location> </Location>
Alias /staticfiles /srv/funkwhale/data/static Alias /staticfiles /srv/funkwhale/data/static
# Activating WebSockets
<Location "/api/v1/activity">
ProxyPass ${funkwhale-api-ws}/api/v1/activity
</Location>
# Setting appropriate access levels to serve frontend # Setting appropriate access levels to serve frontend
<Directory "/srv/funkwhale/data/static"> <Directory "/srv/funkwhale/data/static">
Options FollowSymLinks Options FollowSymLinks
......
...@@ -115,3 +115,29 @@ If you are using ``awscli``, you can store this policy in a ``/tmp/policy`` file ...@@ -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:: apply it using the following command::
aws s3api put-bucket-policy --bucket <yourbucketname> --policy file:///tmp/policy aws s3api put-bucket-policy --bucket <yourbucketname> --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;
}
...@@ -3986,7 +3986,7 @@ msgstr "Membre de l'équipe" ...@@ -3986,7 +3986,7 @@ msgstr "Membre de l'équipe"
#: src/components/radios/Button.vue:4 #: src/components/radios/Button.vue:4
msgctxt "*/Queue/Button.Label/Short, Verb" msgctxt "*/Queue/Button.Label/Short, Verb"
msgid "Start radio" msgid "Start radio"
msgstr "Arrêter la radio" msgstr "Démarrer la radio"
#: front/src/views/admin/Settings.vue:86 #: front/src/views/admin/Settings.vue:86
msgctxt "Content/Admin/Menu" msgctxt "Content/Admin/Menu"
......
...@@ -199,7 +199,6 @@ ...@@ -199,7 +199,6 @@
@click.prevent.stop="clean()" @click.prevent.stop="clean()"
class="two wide column control"> class="two wide column control">
<i class="icons"> <i class="icons">
<i :class="['ui', 'trash', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i> <i :class="['ui', 'trash', 'secondary', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
<i :class="['ui corner large inverted', 'list', {'disabled': queue.tracks.length === 0}, 'icon']" ></i> <i :class="['ui corner large inverted', 'list', {'disabled': queue.tracks.length === 0}, 'icon']" ></i>
</i> </i>
...@@ -926,6 +925,11 @@ export default { ...@@ -926,6 +925,11 @@ export default {
animation-timing-function: linear; animation-timing-function: linear;
animation-iteration-count: infinite; animation-iteration-count: infinite;
} }
.icons {
position: absolute;
}
i.icons .corner.icon { i.icons .corner.icon {
font-size: 1em; font-size: 1em;
right: -0.3em; right: -0.3em;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment