Commit 2e64f1eb authored by Michal Čihař's avatar Michal Čihař

Add setting for providing hosting

This is mostly focused on hosted.weblate.org to allow translate messages
used on that, but still you are welcome to offer hosted Weblate instance
as well.
parent b29aeb35
......@@ -14,6 +14,14 @@
<p>{% blocktrans %}If you are looking for support for Weblate or want to file bug reports check its website at <a href="{{ weblate_url }}">weblate.org</a>.{% endblocktrans %}</p>
{% if offer_hosting %}
<p>
{% trans "This Weblate instance hosts translations for various free software projects." %}
{% blocktrans %}We can host your project as well, if you are interested, please <a href="{{ contact_url }}?subject=Project hosting">contact us</a>.{% endblocktrans %}
</p>
{% endif %}
<p>{% blocktrans %}Weblate is free software created by volunteers, but you can still support them financially:{% endblocktrans %}</p>
<p>
......
......@@ -49,6 +49,10 @@
{% endfor %}
</tbody>
</table>
{% if offer_hosting %}
<p>{% blocktrans %}We can host your project as well, if you are interested, please <a href="{{ contact_url }}?subject=Project hosting">contact us</a>.{% endblocktrans %}</p>
{% endif %}
</div>
<h2>{% trans "Summaries" %}</h2>
......
......@@ -279,6 +279,9 @@ GIT_ROOT = '%s/repos/' % WEB_ROOT
# Title of site to use
SITE_TITLE = 'Weblate'
# Whether to offer hosting
OFFER_HOSTING = False
# URL of login
LOGIN_URL = '%s/accounts/login/' % URL_PREFIX
......
......@@ -47,6 +47,9 @@ GIT_ROOT = get('GIT_ROOT', '%s/repos/' % WEB_ROOT)
# Title of site to use
SITE_TITLE = get('SITE_TITLE', 'Weblate')
# Whether to offer hosting
OFFER_HOSTING = get('OFFER_HOSTING', False)
# Enable remote hooks
ENABLE_HOOKS = get('ENABLE_HOOKS', True)
......
......@@ -37,7 +37,10 @@ def weblate_url(request):
def title(request):
return {'site_title': appsettings.SITE_TITLE}
return {
'site_title': appsettings.SITE_TITLE,
'offer_hosting': appsettings.OFFER_HOSTING,
}
def date(request):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment