Make remaining uses of brand name customizable

This commit is contained in:
Sunil Mohan Adapa 2016-01-24 00:50:14 +05:30
parent 4602c5bfce
commit 572e68dc36
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971
10 changed files with 41 additions and 35 deletions

View File

@ -29,7 +29,7 @@
If your internet provider changes your IP address periodic If your internet provider changes your IP address periodic
(i.e. every 24h) it may be hard for others to find you in the (i.e. every 24h) it may be hard for others to find you in the
WEB. And for this reason nobody may find the services which are WEB. And for this reason nobody may find the services which are
provided by FreedomBox (like your ownCloud). provided by {{ box_name }}, such as ownCloud.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
@ -59,9 +59,9 @@
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
If your freedombox is connected behind some NAT router, don't forget If your {{ box_name }} is connected behind some NAT router, don't forget
to add portforwarding (i.e. forward some standard ports like 80 and 443) to add port forwarding (i.e. forward some standard ports like 80 and
to your freedombox device. 443).
{% endblocktrans %} {% endblocktrans %}
</p> </p>
{% endblock %} {% endblock %}

View File

@ -35,7 +35,7 @@ def init():
'glyphicon-book', 'help:index', 101) 'glyphicon-book', 'help:index', 101)
menu.add_urlname(ugettext_lazy('Where to Get Help'), 'glyphicon-search', menu.add_urlname(ugettext_lazy('Where to Get Help'), 'glyphicon-search',
'help:index_explicit', 5) 'help:index_explicit', 5)
menu.add_urlname(ugettext_lazy('FreedomBox Manual'), 'glyphicon-info-sign', menu.add_urlname(ugettext_lazy('Manual'), 'glyphicon-info-sign',
'help:manual', 10) 'help:manual', 10)
menu.add_urlname(ugettext_lazy('About'), 'glyphicon-star', 'help:about', menu.add_urlname(ugettext_lazy('About'), 'glyphicon-star', 'help:about',
100) 100)
@ -52,7 +52,7 @@ def index(request):
def about(request): def about(request):
"""Serve the about page""" """Serve the about page"""
context = { context = {
'title': _('About {box_name}').format(box_name=cfg.box_name), 'title': _('About {box_name}').format(box_name=_(cfg.box_name)),
'version': __version__ 'version': __version__
} }
return TemplateResponse(request, 'help_about.html', context) return TemplateResponse(request, 'help_about.html', context)
@ -68,6 +68,7 @@ def manual(request):
except IOError: except IOError:
raise Http404 raise Http404
return TemplateResponse(request, 'help_manual.html', return TemplateResponse(
{'title': _('FreedomBox Manual'), request, 'help_manual.html',
'content': content}) {'title': _('{box_name} Manual').format(box_name=_(cfg.box_name)),
'content': content})

View File

@ -55,15 +55,16 @@
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
There are a number of projects working to realize a future of There are a number of projects working to realize a future of
distributed services; FreedomBox aims to bring them all together distributed services; {{ box_name }} aims to bring them all
in a convenient package. together in a convenient package.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
For more information about the FreedomBox project, see the For more information about the {{ box_name }} project, see the
<a href="https://wiki.debian.org/FreedomBox">FreedomBox Wiki</a>. <a href="https://wiki.debian.org/FreedomBox">{{ box_name }}
Wiki</a>.
{% endblocktrans %} {% endblocktrans %}
</p> </p>

View File

@ -33,9 +33,7 @@
<img src="{% static 'theme/img/freedombox-logo-32px.png' %}" <img src="{% static 'theme/img/freedombox-logo-32px.png' %}"
alt="{{ cfg.box_name }}" /> alt="{{ cfg.box_name }}" />
<a href="{% url 'index' %}"> <a href="{% url 'index' %}">
{% blocktrans trimmed with box_name=cfg.box_name %} {% blocktrans trimmed %}{{ box_name }} Setup{% endblocktrans %}
{{ box_name }} Setup
{% endblocktrans %}
</a> </a>
</span> </span>

View File

@ -26,8 +26,8 @@
<p> <p>
{% url 'help:manual' as manual_url %} {% url 'help:manual' as manual_url %}
{% blocktrans trimmed with box_name=cfg.box_name %} {% blocktrans trimmed %}
The <a href="{{ manual_url }}">FreedomBox Manual</a> is the The <a href="{{ manual_url }}">{{ box_name }} Manual</a> is the
best place to start for information regarding {{ box_name }}. best place to start for information regarding {{ box_name }}.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
@ -35,13 +35,13 @@
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
<a href="http://wiki.debian.org/FreedomBox" target="_blank"> <a href="http://wiki.debian.org/FreedomBox" target="_blank">
FreedomBox project wiki </a> contains further information. {{ box_name }} project wiki </a> contains further information.
{% endblocktrans %} {% endblocktrans %}
</p> </p>
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
To seek help from FreedomBox community, queries may be posted on To seek help from {{ box_name }} community, queries may be posted on
the the
<a href="https://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss"> <a href="https://lists.alioth.debian.org/mailman/listinfo/freedombox-discuss">
mailing list</a>. The list archives also contain information mailing list</a>. The list archives also contain information
@ -51,8 +51,8 @@
<p> <p>
{% blocktrans trimmed %} {% blocktrans trimmed %}
Many FreedomBox contributors and users are also available on the irc.oftc.net IRC network. Many {{ box_name }} contributors and users are also available on
Join and request help on the the irc.oftc.net IRC network. Join and request help on the
<a href="https://webchat.oftc.net/?randomnick=1&channels=freedombox&prompt=1"> <a href="https://webchat.oftc.net/?randomnick=1&channels=freedombox&prompt=1">
#freedombox</a> channel using the IRC web interface. #freedombox</a> channel using the IRC web interface.
{% endblocktrans %} {% endblocktrans %}

View File

@ -317,8 +317,8 @@
<div class="alert alert-danger"> <div class="alert alert-danger">
<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
{% blocktrans trimmed %} {% blocktrans trimmed %}
This interface is not maintained by FreedomBox. Its This interface is not maintained by {{ box_name }}. Its
security status is unknown to FreedomBox. Many FreedomBox security status is unknown to {{ box_name }}. Many {{ box_name }}
services may not be available on this interface. It is services may not be available on this interface. It is
recommended that you deactivate/delete this connection and recommended that you deactivate/delete this connection and
re-configure it. re-configure it.

View File

@ -57,7 +57,7 @@
desktop machine. OpenVPN Clients are available for most desktop machine. OpenVPN Clients are available for most
platforms. See platforms. See
<a href="https://wiki.debian.org/FreedomBox/Manual/OpenVPN" <a href="https://wiki.debian.org/FreedomBox/Manual/OpenVPN"
title="FreedomBox Manual - OpenVPN">documentation</a> on title="{{ box_name }} Manual - OpenVPN">documentation</a> on
recommended clients and instructions on how to configure them. recommended clients and instructions on how to configure them.
{% endblocktrans %} {% endblocktrans %}
</p> </p>

View File

@ -34,6 +34,7 @@ from plinth import package
from plinth.errors import ActionError from plinth.errors import ActionError
from plinth.modules.names import SERVICES from plinth.modules.names import SERVICES
from plinth.signals import domain_added, domain_removed from plinth.signals import domain_added, domain_removed
from plinth.utils import format_lazy
APT_SOURCES_URI_PATHS = ('/files/etc/apt/sources.list/*/uri', APT_SOURCES_URI_PATHS = ('/files/etc/apt/sources.list/*/uri',
'/files/etc/apt/sources.list.d/*/*/uri') '/files/etc/apt/sources.list.d/*/*/uri')
@ -48,9 +49,10 @@ class TorForm(forms.Form): # pylint: disable=W0232
hs_enabled = forms.BooleanField( hs_enabled = forms.BooleanField(
label=_('Enable Tor Hidden Service'), label=_('Enable Tor Hidden Service'),
required=False, required=False,
help_text=_('A hidden service will allow FreedomBox to provide ' help_text=format_lazy(_(
'selected services (such as ownCloud or Chat) without ' 'A hidden service will allow {box_name} to provide selected '
'revealing its location.')) 'services (such as ownCloud or Chat) without revealing its '
'location.'), box_name=_(cfg.box_name)))
apt_transport_tor_enabled = forms.BooleanField( apt_transport_tor_enabled = forms.BooleanField(
label=_('Download software packages over Tor'), label=_('Download software packages over Tor'),
required=False, required=False,

View File

@ -19,12 +19,12 @@
Framework for working with servers and their services. Framework for working with servers and their services.
""" """
import collections
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
import collections from plinth import cfg
from plinth.signals import service_enabled from plinth.signals import service_enabled
from plinth.utils import format_lazy
services = {} services = {}
@ -75,5 +75,7 @@ def init():
is_external=True, enabled=True) is_external=True, enabled=True)
Service('ssh', _('Secure Shell (SSH) Server'), ['ssh'], is_external=True, Service('ssh', _('Secure Shell (SSH) Server'), ['ssh'], is_external=True,
enabled=True) enabled=True)
Service('plinth', _('FreedomBox Web Interface (Plinth)'), ['https'], Service('plinth',
is_external=True, enabled=True) format_lazy(_('{box_name} Web Interface (Plinth)'),
box_name=_(cfg.box_name)),
['https'], is_external=True, enabled=True)

View File

@ -46,10 +46,12 @@
<meta name="msnbot" content="noindex, nofollow, noarchive, noodp" /> <meta name="msnbot" content="noindex, nofollow, noarchive, noodp" />
<meta name="slurp" content="noindex, nofollow, noarchive, noodp, noydir" /> <meta name="slurp" content="noindex, nofollow, noarchive, noodp, noydir" />
<meta name="description" <meta name="description"
content="{% trans "Plinth administrative interface for the FreedomBox" %}" /> content="{% blocktrans trimmed %}
Plinth administrative interface for the {{ box_name }}
{% endblocktrans %}" />
{% block title %} {% block title %}
<title> <title>
{% if title %} {{ title }} {% else %} {% trans "FreedomBox" %} {% endif %} {% if title %} {{ title }} {% else %} {{ box_name }} {% endif %}
</title> </title>
{% endblock %} {% endblock %}