Browse Source

added i18n to the code and wrote a German translation file. doesn't cover *everything* yet, but it's a start.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
0900db9664
  1. 27
      pyweb/mumble/admin.py
  2. 2
      pyweb/mumble/forms.py
  3. BIN
      pyweb/mumble/locale/de/LC_MESSAGES/django.mo
  4. 350
      pyweb/mumble/locale/de/LC_MESSAGES/django.po
  5. 74
      pyweb/mumble/models.py
  6. 1
      pyweb/settings.py
  7. 75
      template/mumble/mumble.htm

27
pyweb/mumble/admin.py

@ -14,14 +14,35 @@
* GNU General Public License for more details.
"""
from models import *
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from models import *
class MumbleAdmin(admin.ModelAdmin):
list_display = [ 'name', 'addr', 'port', 'booted' ];
list_filter = [ 'booted' ];
list_display = [ 'name', 'addr', 'port', 'booted', 'getIsPublic', 'getUsersRegged', 'getUsersOnline', 'getChannelCnt' ];
list_filter = [ 'booted', 'addr' ];
search_fields = [ 'name', 'addr' ];
ordering = [ 'name' ];
def getUsersRegged( self, obj ):
return obj.users_regged;
getUsersRegged.short_description = _( 'Registered users' );
def getUsersOnline( self, obj ):
return obj.users_online;
getUsersOnline.short_description = _( 'Online users' );
def getChannelCnt( self, obj ):
return obj.channel_cnt;
getChannelCnt.short_description = _( 'Channel count' );
def getIsPublic( self, obj ):
if obj.is_public:
return _( 'Yes' );
return _( 'No' );
getIsPublic.short_description = _( 'Public' );
class MumbleUserAdmin(admin.ModelAdmin):
list_display = [ 'owner', 'server', 'name' ];

2
pyweb/mumble/forms.py

@ -16,6 +16,8 @@
from django import forms
from django.forms import Form, ModelForm
from django.utils.translation import ugettext_lazy as _
from models import *

BIN
pyweb/mumble/locale/de/LC_MESSAGES/django.mo

350
pyweb/mumble/locale/de/LC_MESSAGES/django.po

@ -0,0 +1,350 @@
# German translation file for Mumble-Django.
#
# Copyright (C) 2009, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net>
#
# Mumble-Django is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This package is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
msgid ""
msgstr ""
"Project-Id-Version: Mumble-Django v0.8\n"
"Report-Msgid-Bugs-To: Michael Ziegler\n"
"POT-Creation-Date: 2009-07-18 17:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Michael Ziegler <diese-addy@funzt-halt.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: admin.py:30
msgid "Registered users"
msgstr "Registrierte Benutzer"
#: admin.py:34
msgid "Online users"
msgstr "Benutzer online"
#: admin.py:38
msgid "Channel count"
msgstr "Channels"
#: admin.py:42
msgid "Yes"
msgstr "Ja"
#: admin.py:43
msgid "No"
msgstr "Nein"
#: admin.py:44
msgid "Public"
msgstr "Öffentlich"
#: models.py:47
msgid "Server Name"
msgstr "Servername"
#: models.py:48
msgid "DBus or ICE base"
msgstr "DBus- oder ICE-String"
#: models.py:49
msgid "Server ID"
msgstr "Server-ID"
#: models.py:50
msgid "Server Address"
msgstr "Serveradresse"
#: models.py:51
msgid "Server Port"
msgstr "Serverport"
#: models.py:52
msgid "Website URL"
msgstr "URL der Webseite"
#: models.py:53
msgid "Welcome Message"
msgstr "Willkommensnachricht"
#: models.py:54
msgid "Server Password"
msgstr "Serverpasswort"
#: models.py:55
msgid "Superuser Password"
msgstr "SuperUser-Passwort"
#: models.py:56
msgid "Max. Users"
msgstr "Max. Benutzer"
#: models.py:57
msgid "Bandwidth [Bps]"
msgstr "Bandbreite [Bps]"
#: models.py:58
msgid "SSL Certificate"
msgstr "SSL-Zertifikat"
#: models.py:59
msgid "SSL Key"
msgstr "SSL-Schlüssel"
#: models.py:60
msgid "IP Obfuscation"
msgstr "IP-Adressen anonymisieren"
#: models.py:61
msgid "Player name regex"
msgstr "Regex für Spielernamen"
#: models.py:62
msgid "Channel name regex"
msgstr "Regex für Channelnamen"
#: models.py:63
msgid "Default channel"
msgstr "Standardchannel"
#: models.py:64
msgid "Boot Server"
msgstr "Server starten"
#: models.py:68 models.py:282
msgid "Server instance"
msgstr "Serverinstanz"
#: models.py:69
msgid "Server instances"
msgstr "Serverinstanzen"
#: models.py:279
msgid "Mumble player_id"
msgstr "ID des Spielers in Murmur"
#: models.py:280
msgid "User name and Login"
msgstr "Benutzername und Login"
#: models.py:281
msgid "Login password"
msgstr "Passwort"
#: models.py:283
msgid "Account owner"
msgstr "Accountbesitzer"
#: models.py:284
msgid "Admin on root channel"
msgstr "Admin im Wurzelkanal"
#: models.py:288
msgid "User account"
msgstr "Benutzerkonto"
#: models.py:289
msgid "User accounts"
msgstr "Benutzerkonten"
#: models.py:296
#, python-format
msgid "Mumble user %(mu)s on %(srv)s owned by Django user %(du)s"
msgstr "Benutzeraccount %(mu)s auf %(srv)s mit Besitzer %(du)s"
#: models.py:315
msgid "Another player already registered that name."
msgstr "Ein anderer Spieler hat sich unter diesem Namen bereits registriert."
#: models.py:317
msgid "Cannot register player without a password!"
msgstr "Kann Account nicht ohne Passwort registrieren!"
#: models.py:347 models.py:356
msgid "The admin group was not found in the ACL's groups list!"
msgstr "Die Admin-Gruppe wurde in der Gruppenliste der ACL nicht gefunden."
#: models.py:396
msgid "This field must not be updated once the record has been saved."
msgstr "Dieses Feld darf nicht mehr verändert werden, nachdem der Eintrag zum ersten Mal gespeichert wurde."
#: mumble.htm:13
msgid ""
"\n"
" <b>Hint:</b><br />\n"
" This area is used to display additional information for each channel "
"and player, but requires JavaScript to be\n"
" displayed correctly. You will not see the detail pages, but you can "
"use all links and forms\n"
" that are displayed.\n"
"\t "
msgstr ""
"\n"
" <b>Hinweis:</b><br />\n"
" Dieser Bereich wird genutzt um zusätzliche Informationen über jeden Channel "
"und Spieler anzuzeigen, erfordert aber JavaScript um\n"
" richtig angezeigt zu werden. Du wirst zwar die Detailseiten nicht sehen, "
"kannst aber alle sichtbaren Formulare benutzen.\n"
"\t "
#: mumble.htm:26
msgid "Website"
msgstr "Webseite"
#: mumble.htm:28
msgid "Server version"
msgstr "Serverversion"
#: mumble.htm:31
msgid "Welcome message"
msgstr "Willkommensnachricht"
#: mumble.htm:37
msgid "Server registration"
msgstr "Benutzerregistrierung"
#: mumble.htm:40
msgid "You are registered on this server"
msgstr "Du bist auf diesem Server registriert"
#: mumble.htm:42
msgid "You do not have an account on this server"
msgstr "Du bist auf diesem Server nicht registriert"
#: mumble.htm:51
msgid ""
"\n"
" <p>You need to be <a href=\"/accounts/login?next=%2Fmumble%2F%"
"(serverid)s\">logged in</a> to be able to register an account on this Mumble "
"server.</p>\n"
"\t"
msgstr ""
"\n"
" <p>Du musst <a href=\"/accounts/login?next=%2Fmumble%2F%"
"(serverid)s\">eingeloggt</a> sein um auf diesem Mumble-Server einen Account "
"registrieren zu können.</p>\n"
"\t"
#: mumble.htm:59 mumble.htm.py:161
msgid "User Texture"
msgstr "Benutzertextur"
#: mumble.htm:61
#, python-format
msgid ""
"\n"
" You can upload an image that you would like to use as your user "
"texture here.<br />\n"
" Your current texture is:<br />\n"
" <img src=\"/mumble/%(serverid)s/texture.png\" alt=\"user texture"
"\" /><br />\n"
" Hint: The texture image <b>needs</b> to be 600x60 in size. If you "
"upload an image with\n"
" a different size, it will be resized accordingly.<br />\n"
"\t\t"
msgstr ""
"\n"
" Du kannst hier ein Bild hochladen, das als deine Benutzertextur "
"angezeigt werden soll.<br />\n"
" Deine momentane Textur ist diese:<br />\n"
" <img src=\"/mumble/%(serverid)s/texture.png\" alt=\"user texture"
"\" /><br />\n"
" Hinweis: Das Texturbild <b>muss</b> die Größe 600x60 haben. Wenn du "
"ein Bild mit einer anderen Größe hochlädst, wird es automatisch zurecht "
"geschnitten.<br />\n"
"\t\t"
#: mumble.htm:81
msgid "Server administration"
msgstr "Server-Administration"
#: mumble.htm:95
msgid "Player"
msgstr "Spieler"
#: mumble.htm:97
msgid "Online since"
msgstr "Online seit"
#: mumble.htm:98 mumble.htm.py:99 mumble.htm.py:100 mumble.htm.py:101
#: mumble.htm:102 mumble.htm.py:103
msgid "yes,no"
msgstr "ja,nein"
#: mumble.htm:98
#, python-format
msgid "Authenticated: %(authed)s"
msgstr "Authentifiziert: %(authed)s"
#: mumble.htm:99
#, python-format
msgid "Admin: %(admin)s"
msgstr "Administrator: %(admin)s"
#: mumble.htm:100
#, python-format
msgid "Muted: %(muted)s"
msgstr "Stummgestellt: %(muted)s"
#: mumble.htm:101
#, python-format
msgid "Deafened: %(deafened)s"
msgstr "Taubgestellt: %(deafened)s"
#: mumble.htm:102
#, python-format
msgid "Muted by self: %(selfmuted)s"
msgstr "Selbst stummgestellt: %(selfmuted)s"
#: mumble.htm:103
#, python-format
msgid "Deafened by self: %(selfdeafened)s"
msgstr "Selbst taubgestellt: %(selfdeafened)s"
#: mumble.htm:106
msgid "User"
msgstr "Benutzer"
#: mumble.htm:109
msgid "Full Name"
msgstr "Vollständiger Name"
#: mumble.htm:111
msgid "Admin"
msgstr "Administrator"
#: mumble.htm:112
msgid "Sign-up date"
msgstr "Datum der Registrierung"
#: mumble.htm:118
msgid "Channel"
msgstr "Kanal"
#: mumble.htm:119
msgid "Connect"
msgstr "Verbinden"
#: mumble.htm:122
msgid "Channel description"
msgstr "Beschreibung des Kanals"
#: mumble.htm:155
msgid "Server Info"
msgstr "Server-Infos"
#: mumble.htm:156
msgid "Registration"
msgstr "Registrierung"
#: mumble.htm:158
msgid "Administration"
msgstr "Administration"

74
pyweb/mumble/models.py

@ -19,6 +19,7 @@ from PIL import Image
from struct import pack, unpack
from zlib import compress, decompress
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from django.db import models
@ -43,27 +44,29 @@ class Mumble( models.Model ):
deleted as well.
"""
name = models.CharField( 'Server Name', max_length = 200 );
dbus = models.CharField( 'DBus or ICE base', max_length = 200, default = settings.DEFAULT_CONN );
srvid = models.IntegerField( 'Server ID', editable = False );
addr = models.CharField( 'Server Address', max_length = 200 );
port = models.IntegerField( 'Server Port', blank = True, null = True );
url = models.CharField( 'Website URL', max_length = 200, blank = True );
motd = models.TextField( 'Welcome Message', blank = True );
passwd = models.CharField( 'Server Password', max_length = 200, blank = True );
supw = models.CharField( 'Superuser Password', max_length = 200, blank = True );
users = models.IntegerField( 'Max. Users', blank = True, null = True );
bwidth = models.IntegerField( 'Bandwidth [Bps]', blank = True, null = True );
sslcrt = models.TextField( 'SSL Certificate', blank = True );
sslkey = models.TextField( 'SSL Key', blank = True );
obfsc = models.BooleanField( 'IP Obfuscation', default = False );
player = models.CharField( 'Player name regex', max_length=200, default=r'[-=\w\[\]\{\}\(\)\@\|\.]+' );
channel= models.CharField( 'Channel name regex', max_length=200, default=r'[ \-=\w\#\[\]\{\}\(\)\@\|]+' );
defchan= models.IntegerField( 'Default channel', default=0 );
booted = models.BooleanField( 'Boot Server', default = True );
name = models.CharField( _('Server Name'), max_length = 200 );
dbus = models.CharField( _('DBus or ICE base'), max_length = 200, default = settings.DEFAULT_CONN );
srvid = models.IntegerField( _('Server ID'), editable = False );
addr = models.CharField( _('Server Address'), max_length = 200 );
port = models.IntegerField( _('Server Port'), blank = True, null = True );
url = models.CharField( _('Website URL'), max_length = 200, blank = True );
motd = models.TextField( _('Welcome Message'), blank = True );
passwd = models.CharField( _('Server Password'), max_length = 200, blank = True );
supw = models.CharField( _('Superuser Password'), max_length = 200, blank = True );
users = models.IntegerField( _('Max. Users'), blank = True, null = True );
bwidth = models.IntegerField( _('Bandwidth [Bps]'), blank = True, null = True );
sslcrt = models.TextField( _('SSL Certificate'), blank = True );
sslkey = models.TextField( _('SSL Key'), blank = True );
obfsc = models.BooleanField( _('IP Obfuscation'), default = False );
player = models.CharField( _('Player name regex'), max_length=200, default=r'[-=\w\[\]\{\}\(\)\@\|\.]+' );
channel = models.CharField( _('Channel name regex'), max_length=200, default=r'[ \-=\w\#\[\]\{\}\(\)\@\|]+' );
defchan = models.IntegerField( _('Default channel'), default=0 );
booted = models.BooleanField( _('Boot Server'), default = True );
class Meta:
unique_together = ( ( 'dbus', 'srvid' ), ( 'addr', 'port' ), );
unique_together = ( ( 'dbus', 'srvid' ), ( 'addr', 'port' ), );
verbose_name = _('Server instance');
verbose_name_plural = _('Server instances');
def __init__( self, *args, **kwargs ):
models.Model.__init__( self, *args, **kwargs );
@ -77,6 +80,11 @@ class Mumble( models.Model ):
return u'Murmur "%s" (%d)' % ( self.name, self.srvid );
users_regged = property( lambda self: self.mumbleuser_set.count(), None );
users_online = property( lambda self: len(self.ctl.getPlayers(self.srvid)), None );
channel_cnt = property( lambda self: len(self.ctl.getChannels(self.srvid)), None );
is_public = property( lambda self: self.passwd == '', None );
is_server = True;
is_channel = False;
is_player = False;
@ -268,22 +276,24 @@ class MumbleUser( models.Model ):
in Murmur as well, after revoking the user's admin privileges.
"""
mumbleid = models.IntegerField( 'Mumble player_id', editable = False, default = -1 );
name = models.CharField( 'User name and Login', max_length = 200 );
password = models.CharField( 'Login password', max_length = 200, blank=True );
server = models.ForeignKey( Mumble );
owner = models.ForeignKey( User, null=True, blank=True );
isAdmin = models.BooleanField( 'Admin on root channel', default = False );
mumbleid = models.IntegerField( _('Mumble player_id'), editable = False, default = -1 );
name = models.CharField( _('User name and Login'), max_length = 200 );
password = models.CharField( _('Login password'), max_length = 200, blank=True );
server = models.ForeignKey( Mumble, verbose_name=_('Server instance') );
owner = models.ForeignKey( User, verbose_name=_('Account owner'), null=True, blank=True );
isAdmin = models.BooleanField( _('Admin on root channel'), default = False );
class Meta:
unique_together = ( ( 'server', 'owner' ), );
unique_together = ( ( 'server', 'owner' ), );
verbose_name = _( 'User account' );
verbose_name_plural = _( 'User accounts' );
is_server = False;
is_channel = False;
is_player = True;
def __unicode__( self ):
return u"Mumble user %s on %s owned by Django user %s" % ( self.name, self.server, self.owner );
return _("Mumble user %(mu)s on %(srv)s owned by Django user %(du)s") % { 'mu': self.name, 'srv': self.server, 'du': self.owner };
def save( self, dontConfigureMurmur=False ):
"""Save the settings in this model to Murmur."""
@ -302,9 +312,9 @@ class MumbleUser( models.Model ):
if self.id is None:
# This is a new user record, so Murmur doesn't know about it yet
if len( ctl.getRegisteredPlayers( self.server.srvid, self.name ) ) > 0:
raise ValueError( "Another player already registered that name." );
raise ValueError( _( "Another player already registered that name." ) );
if not self.password:
raise ValueError( "Cannot register player without a password!" );
raise ValueError( _( "Cannot register player without a password!" ) );
self.mumbleid = ctl.registerPlayer( self.server.srvid, self.name, email, self.password );
@ -334,7 +344,7 @@ class MumbleUser( models.Model ):
acl = mmACL( 0, self.server.ctl.getACL(self.server.srvid, 0) );
if not hasattr( acl, "admingroup" ):
raise ReferenceError( "The admin group was not found in the ACL's groups list!" );
raise ReferenceError( _( "The admin group was not found in the ACL's groups list!" ) );
return self.mumbleid in acl.admingroup['add'];
def setAdmin( self, value ):
@ -343,7 +353,7 @@ class MumbleUser( models.Model ):
acl = mmACL( 0, ctl.getACL(self.server.srvid, 0) );
if not hasattr( acl, "admingroup" ):
raise ReferenceError( "The admin group was not found in the ACL's groups list!" );
raise ReferenceError( _( "The admin group was not found in the ACL's groups list!" ) );
if value != ( self.mumbleid in acl.admingroup['add'] ):
if value:
@ -383,7 +393,7 @@ class MumbleUser( models.Model ):
def __setattr__( self, name, value ):
if name == 'server':
if self.id is not None and self.server != value:
raise AttributeError( "This field must not be updated once the Record has been saved." );
raise AttributeError( _( "This field must not be updated once the record has been saved." ) );
models.Model.__setattr__( self, name, value );

1
pyweb/settings.py

@ -135,6 +135,7 @@ TEMPLATE_LOADERS = (
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
)

75
template/mumble/mumble.htm

@ -1,5 +1,6 @@
{% extends "index.htm" %}
{% load mumble_extras %}
{% load i18n %}
{% block Headline %}
{{ DBaseObject.name }}
{% endblock %}
@ -9,34 +10,36 @@
{% block Content %}
<noscript>
<p>
{% blocktrans %}
<b>Hint:</b><br />
This area is used to display additional information for each channel and player, but requires JavaScript to be
displayed correctly. You will not see the detail pages, but you can use all links and forms
that are displayed.
{% endblocktrans %}
</p>
</noscript>
<div id="mumble_ext_container"></div>
<div id="mumble_motd" class="mumble-ext x-hide-display">
<ul>
<li>Server address: <a href="{{ DBaseObject.connecturl }}">{{ DBaseObject.connecturl }}</a></li>
<li>{% trans "Server Address" %}: <a href="{{ DBaseObject.connecturl }}">{{ DBaseObject.connecturl }}</a></li>
{% if DBaseObject.url %}
<li>Website: {{ DBaseObject.url|urlize }}</li>
<li>{% trans "Website" %}: {{ DBaseObject.url|urlize }}</li>
{% endif %}
<li>Server version: {{ DBaseObject.version.0 }}.{{ DBaseObject.version.1 }}.{{ DBaseObject.version.2 }}</li>
<li>{% trans "Server version" %}: {{ DBaseObject.version.0 }}.{{ DBaseObject.version.1 }}.{{ DBaseObject.version.2 }}</li>
</ul>
<fieldset>
<legend>Welcome message</legend>
<legend>{% trans "Welcome message" %}</legend>
{{ DBaseObject.motd|safe }}
</fieldset>
</div>
<div id="mumble_registration" class="mumble-ext">
{% if user.is_authenticated %}
<h2>Server registration</h2>
<h2>{% trans "Server registration" %}</h2>
<form action="" method="post">
{% if Registered %}
You are registered on this server.<br />
{% trans "You are registered on this server" %}.<br />
{% else %}
You do not have an account on this server.<br />
{% trans "You do not have an account on this server" %}.<br />
{% endif %}
<table>
{{ RegForm }}
@ -45,19 +48,23 @@
<input type="submit" />
</form>
{% else %}
<p>You need to be <a href="/accounts/login?next=%2Fmumble%2F{{ DBaseObject.id }}">logged in</a> to be able to register an account on this Mumble server.</p>
{% blocktrans with DBaseObject.id as serverid %}
<p>You need to be <a href="/accounts/login?next=%2Fmumble%2F{{ serverid }}">logged in</a> to be able to register an account on this Mumble server.</p>
{% endblocktrans %}
{% endif %}
</div>
{% if Registered %}
<div id="mumble_texture" class="mumble-ext">
<h2>User Texture</h2>
<h2>{% trans "User Texture" %}</h2>
<p>
You can upload an image that you would like to use as your user texture here.<br />
Your current texture is:<br />
<img src="/mumble/{{DBaseObject.id}}/texture.png" alt="user texture" /><br />
Hint: The texture image <b>needs</b> to be 600x60 in size. If you upload an image with
a different size, it will be resized accordingly.<br />
{% blocktrans with DBaseObject.id as serverid %}
You can upload an image that you would like to use as your user texture here.<br />
Your current texture is:<br />
<img src="/mumble/{{serverid}}/texture.png" alt="user texture" /><br />
Hint: The texture image <b>needs</b> to be 600x60 in size. If you upload an image with
a different size, it will be resized accordingly.<br />
{% endblocktrans %}
</p>
<form action="" method="post" enctype="multipart/form-data">
<table>
@ -71,7 +78,7 @@
{% if CurrentUserIsAdmin %}
<div id="mumble_admin" class="mumble-ext">
<h2>Server administration</h2>
<h2>{% trans "Server administration" %}</h2>
<form action="" method="post">
<table>
{{ AdminForm }}
@ -85,34 +92,34 @@
{% for item in ChannelTable %}
{% if item.is_player %}
<div id="mumble_{{ item.id }}" class="mumble-ext x-hide-display">
<h2>Player {{ item.name }}</h2>
<h2>{% trans "Player" %} {{ item.name }}</h2>
<ul>
<li>Online since {{item.onlinesince|time:"H:i"}}</li>
<li>Authenticated: {% if item.isAuthed %}Yes{% else %}No{% endif %}</li>
<li>Admin: {% if item.isAdmin %}Yes{% else %}No{% endif %}</li>
<li>Muted: {% if item.muted %}Yes{% else %}No{% endif %}</li>
<li>Deafened: {% if item.deafened %}Yes{% else %}No{% endif %}</li>
<li>Self-Muted: {% if item.selfmuted %}Yes{% else %}No{% endif %}</li>
<li>Self-Deafened: {% if item.selfdeafened %}Yes{% else %}No{% endif %}</li>
<li>{% trans "Online since" %} {{item.onlinesince|time:"H:i"}}</li>
<li>{% blocktrans with item.isAuthed|yesno:_("yes,no") as authed %}Authenticated: {{ authed }}{% endblocktrans %}</li>
<li>{% blocktrans with item.isAdmin|yesno:_("yes,no") as admin %}Admin: {{ admin }}{% endblocktrans %}</li>
<li>{% blocktrans with item.muted|yesno:_("yes,no") as muted %}Muted: {{ muted }}{% endblocktrans %}</li>
<li>{% blocktrans with item.deafened|yesno:_("yes,no") as deafened %}Deafened: {{ deafened }}{% endblocktrans %}</li>
<li>{% blocktrans with item.selfmuted|yesno:_("yes,no") as selfmuted %}Muted by self: {{ selfmuted }}{% endblocktrans %}</li>
<li>{% blocktrans with item.selfdeafened|yesno:_("yes,no") as selfdeafened %}Deafened by self: {{ selfdeafened }}{% endblocktrans %}</li>
</ul>
{% if item.mumbleuser and item.mumbleuser.owner %}
<h2>User {{ item.mumbleuser.owner.username|capfirst }}</h2>
<h2>{% trans "User" %} {{ item.mumbleuser.owner.username|capfirst }}</h2>
<ul>
{% if item.mumbleuser.owner.first_name and item.mumbleuser.owner.last_name %}
<li>Full Name: {{ item.mumbleuser.owner.first_name }} {{ item.mumbleuser.owner.last_name }}</li>
<li>{% trans "Full Name" %}: {{ item.mumbleuser.owner.first_name }} {{ item.mumbleuser.owner.last_name }}</li>
{% endif %}
<li>Admin: {% if item.mumbleuser.owner.is_staff %}Yes{% else %}No{% endif %}</li>
<li>Sign-up date: {{ item.mumbleuser.owner.date_joined }}</li>
<li>{% trans "Admin" %}: {% if item.mumbleuser.owner.is_staff %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}</li>
<li>{% trans "Sign-up date" %}: {{ item.mumbleuser.owner.date_joined }}</li>
</ul>
{% endif %}
</div>
{% else %}
<div id="mumble_{{ item.id }}" class="mumble-ext x-hide-display">
<h2>Channel {{ item.name }}</h2>
<a href="{{ item|chanurl:MumbleAccount }}" class="mumble">Connect</a>
<h2>{% trans "Channel" %} {{ item.name }}</h2>
<a href="{{ item|chanurl:MumbleAccount }}" class="mumble">{% trans "Connect" %}</a>
{% if item.description %}
<fieldset>
<legend>Channel description</legend>
<legend>{% trans "Channel description" %}</legend>
{{ item.description|safe }}
</fieldset>
{% endif %}
@ -145,13 +152,13 @@
defaults: { autoheight: true },
activeTab: {{ DisplayTab }},
items: [
{ contentEl: 'mumble_motd', title: 'Server Info', autoScroll: true },
{ contentEl: 'mumble_registration', title: 'Registration', autoScroll: true },
{ contentEl: 'mumble_motd', title: '{% trans "Server Info" %}', autoScroll: true },
{ contentEl: 'mumble_registration', title: '{% trans "Registration" %}', autoScroll: true },
{% if CurrentUserIsAdmin %}
{ contentEl: 'mumble_admin', title: 'Administration', autoScroll: true },
{ contentEl: 'mumble_admin', title: '{% trans "Administration" %}', autoScroll: true },
{% endif %}
{% if Registered %}
{ contentEl: 'mumble_texture', title: 'User Texture', autoScroll: true },
{ contentEl: 'mumble_texture', title: '{% trans "User Texture" %}', autoScroll: true },
{% endif %}
]
},

Loading…
Cancel
Save