Browse Source

fix crash when Murmurd is not running, display running states in the admin. Update German translation.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
ff23d484e6
  1. 11
      pyweb/mumble/admin.py
  2. BIN
      pyweb/mumble/locale/de/LC_MESSAGES/django.mo
  3. 112
      pyweb/mumble/locale/de/LC_MESSAGES/django.po
  4. 16
      pyweb/mumble/models.py

11
pyweb/mumble/admin.py

@ -27,13 +27,18 @@ class MumbleServerAdmin(admin.ModelAdmin):
class MumbleAdmin(admin.ModelAdmin): class MumbleAdmin(admin.ModelAdmin):
""" Specification for the "Server administration" admin section. """ """ Specification for the "Server administration" admin section. """
list_display = [ 'name', 'srvid', 'get_addr', 'get_port', 'get_booted', 'get_is_public',
'get_users_regged', 'get_users_online', 'get_channel_count' ];
list_display = [ 'name', 'srvid', 'get_addr', 'get_port', 'get_murmur_online', 'get_booted',
'get_is_public', 'get_users_regged', 'get_users_online', 'get_channel_count' ];
list_filter = [ 'addr', 'server' ]; list_filter = [ 'addr', 'server' ];
search_fields = [ 'name', 'addr', 'port' ]; search_fields = [ 'name', 'addr', 'port' ];
ordering = [ 'name' ]; ordering = [ 'name' ];
form = MumbleAdminForm; form = MumbleAdminForm;
def get_murmur_online( self, obj ):
return obj.server.online
get_murmur_online.short_description = _('Master is running')
get_murmur_online.boolean = True
def get_addr( self, obj ): def get_addr( self, obj ):
if not obj.addr: if not obj.addr:
@ -51,7 +56,7 @@ class MumbleAdmin(admin.ModelAdmin):
def get_booted( self, obj ): def get_booted( self, obj ):
return obj.booted return obj.booted
get_booted.short_description = _('Boot Server')
get_booted.short_description = _('Instance is running')
get_booted.boolean = True get_booted.boolean = True
def get_users_regged( self, obj ): def get_users_regged( self, obj ):

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

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

@ -16,51 +16,55 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Mumble-Django v0.8\n" "Project-Id-Version: Mumble-Django v0.8\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2010-03-03 08:52+0100\n"
"PO-Revision-Date: 2010-03-03 08:53\n"
"POT-Creation-Date: 2010-03-03 10:36+0100\n"
"PO-Revision-Date: 2010-03-03 10:37\n"
"Last-Translator: <de@de.de>\n" "Last-Translator: <de@de.de>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Translated-Using: django-rosetta 0.5.3\n" "X-Translated-Using: django-rosetta 0.5.3\n"
#: admin.py:42 models.py:120 templates/mumble/mumble.html:28
#: admin.py:40
msgid "Master is running"
msgstr "Serverprozess läuft"
#: admin.py:47 models.py:129 templates/mumble/mumble.html:28
msgid "Server Address" msgid "Server Address"
msgstr "Serveradresse" msgstr "Serveradresse"
#: admin.py:49 models.py:123
#: admin.py:54 models.py:132
msgid "Server Port" msgid "Server Port"
msgstr "Serverport" msgstr "Serverport"
#: admin.py:54 models.py:167
msgid "Boot Server"
msgstr "Server starten"
#: admin.py:59
msgid "Instance is running"
msgstr "Serverinstanz läuft"
#: admin.py:64
#: admin.py:69
msgid "Registered users" msgid "Registered users"
msgstr "Registrierte Benutzer" msgstr "Registrierte Benutzer"
#: admin.py:74
#: admin.py:79
msgid "Online users" msgid "Online users"
msgstr "Benutzer online" msgstr "Benutzer online"
#: admin.py:84
#: admin.py:89
msgid "Channel count" msgid "Channel count"
msgstr "Channels" msgstr "Channels"
#: admin.py:91
#: admin.py:96
msgid "Yes" msgid "Yes"
msgstr "Ja" msgstr "Ja"
#: admin.py:93
#: admin.py:98
msgid "No" msgid "No"
msgstr "Nein" msgstr "Nein"
#: admin.py:97
#: admin.py:102
msgid "Public" msgid "Public"
msgstr "Öffentlich" msgstr "Öffentlich"
#: admin.py:113 templates/mumble/mumble.html:214
#: admin.py:118 templates/mumble/mumble.html:214
msgid "Admin on root channel" msgid "Admin on root channel"
msgstr "Admin im Wurzelkanal" msgstr "Admin im Wurzelkanal"
@ -81,15 +85,15 @@ msgstr "Portnummer %(portno)d liegt nicht in %(minrange)d - %(maxrange)d"
msgid "That name is forbidden by the server." msgid "That name is forbidden by the server."
msgstr "Dieser Name wird vom Server nicht erlaubt." msgstr "Dieser Name wird vom Server nicht erlaubt."
#: forms.py:186 models.py:533
#: forms.py:186 models.py:545
msgid "Another player already registered that name." msgid "Another player already registered that name."
msgstr "Ein anderer Spieler hat sich unter diesem Namen bereits registriert." msgstr "Ein anderer Spieler hat sich unter diesem Namen bereits registriert."
#: forms.py:194 models.py:535
#: forms.py:194 models.py:547
msgid "Cannot register player without a password!" msgid "Cannot register player without a password!"
msgstr "Kann Account nicht ohne Passwort registrieren!" msgstr "Kann Account nicht ohne Passwort registrieren!"
#: forms.py:206 models.py:137
#: forms.py:206 models.py:146
msgid "Server Password" msgid "Server Password"
msgstr "Serverpasswort" msgstr "Serverpasswort"
@ -141,143 +145,147 @@ msgstr "Mumble-Server"
msgid "Mumble Servers" msgid "Mumble Servers"
msgstr "Mumble-Server" msgstr "Mumble-Server"
#: models.py:118
#: models.py:127
msgid "Server Name" msgid "Server Name"
msgstr "Servername" msgstr "Servername"
#: models.py:119
#: models.py:128
msgid "Server ID" msgid "Server ID"
msgstr "Server-ID" msgstr "Server-ID"
#: models.py:121
#: models.py:130
msgid "Hostname or IP address to bind to. You should use a hostname here, because it will appear on the global server list." msgid "Hostname or IP address to bind to. You should use a hostname here, because it will appear on the global server list."
msgstr "Hostname oder IP-Adresse unter der der Server erreichbar sein soll. Du solltest einen Hostname verwenden, da dieses Feld in der globalen Serverliste erscheint." msgstr "Hostname oder IP-Adresse unter der der Server erreichbar sein soll. Du solltest einen Hostname verwenden, da dieses Feld in der globalen Serverliste erscheint."
#: models.py:124
#: models.py:133
msgid "Port number to bind to. Leave empty to auto assign one." msgid "Port number to bind to. Leave empty to auto assign one."
msgstr "Portnummer auf die gebunden werden soll. Lasse das Feld leer um automatisch eine zuzuweisen." msgstr "Portnummer auf die gebunden werden soll. Lasse das Feld leer um automatisch eine zuzuweisen."
#: models.py:125
#: models.py:134
msgid "Server Display Address" msgid "Server Display Address"
msgstr "Angezeigte Adresse" msgstr "Angezeigte Adresse"
#: models.py:126
#: models.py:135
msgid "This field is only relevant if you are located behind a NAT, and names the Hostname or IP address to use in the Channel Viewer and for the global server list registration. If not given, the addr and port fields are used. If display and bind ports are equal, you can omit it here." msgid "This field is only relevant if you are located behind a NAT, and names the Hostname or IP address to use in the Channel Viewer and for the global server list registration. If not given, the addr and port fields are used. If display and bind ports are equal, you can omit it here."
msgstr "Dieses Feld ist nur relevant wenn der Server hinter einem NAT steht, und gibt dann den Hostnamen oder die IP-Adresse die im Channel-Viewer und für die Registrierung in der Serverliste benutzt werden soll. Ist dieses Feld leer, werden die Angaben Addresse und Port stattdessen benutzt. Wenn die Ports identisch sind, kannst du den Port hier weglassen." msgstr "Dieses Feld ist nur relevant wenn der Server hinter einem NAT steht, und gibt dann den Hostnamen oder die IP-Adresse die im Channel-Viewer und für die Registrierung in der Serverliste benutzt werden soll. Ist dieses Feld leer, werden die Angaben Addresse und Port stattdessen benutzt. Wenn die Ports identisch sind, kannst du den Port hier weglassen."
#: models.py:132
#: models.py:141
msgid "Superuser Password" msgid "Superuser Password"
msgstr "SuperUser-Passwort" msgstr "SuperUser-Passwort"
#: models.py:135
#: models.py:144
msgid "Website URL" msgid "Website URL"
msgstr "URL der Webseite" msgstr "URL der Webseite"
#: models.py:136
#: models.py:145
msgid "Welcome Message" msgid "Welcome Message"
msgstr "Willkommensnachricht" msgstr "Willkommensnachricht"
#: models.py:138
#: models.py:147
msgid "Max. Users" msgid "Max. Users"
msgstr "Max. Benutzer" msgstr "Max. Benutzer"
#: models.py:139
#: models.py:148
msgid "Bandwidth [Bps]" msgid "Bandwidth [Bps]"
msgstr "Bandbreite [Bps]" msgstr "Bandbreite [Bps]"
#: models.py:140
#: models.py:149
msgid "SSL Certificate" msgid "SSL Certificate"
msgstr "SSL-Zertifikat" msgstr "SSL-Zertifikat"
#: models.py:141
#: models.py:150
msgid "SSL Key" msgid "SSL Key"
msgstr "SSL-Schlüssel" msgstr "SSL-Schlüssel"
#: models.py:142
#: models.py:151
msgid "Player name regex" msgid "Player name regex"
msgstr "Regex für Spielernamen" msgstr "Regex für Spielernamen"
#: models.py:143
#: models.py:152
msgid "Channel name regex" msgid "Channel name regex"
msgstr "Regex für Channelnamen" msgstr "Regex für Channelnamen"
#: models.py:144
#: models.py:153
msgid "Default channel" msgid "Default channel"
msgstr "Standardchannel" msgstr "Standardchannel"
#: models.py:145
#: models.py:154
msgid "Timeout" msgid "Timeout"
msgstr "Timeout" msgstr "Timeout"
#: models.py:147
#: models.py:156
msgid "IP Obfuscation" msgid "IP Obfuscation"
msgstr "IP-Adressen anonymisieren" msgstr "IP-Adressen anonymisieren"
#: models.py:148
#: models.py:157
msgid "Require Certificate" msgid "Require Certificate"
msgstr "SSL-Zertifikat erzwingen" msgstr "SSL-Zertifikat erzwingen"
#: models.py:149
#: models.py:158
msgid "Maximum length of text messages" msgid "Maximum length of text messages"
msgstr "Maximale Länge von Textnachrichten" msgstr "Maximale Länge von Textnachrichten"
#: models.py:150
#: models.py:159
msgid "Allow HTML to be used in messages" msgid "Allow HTML to be used in messages"
msgstr "Erlaube HTML in Nachrichten" msgstr "Erlaube HTML in Nachrichten"
#: models.py:151
#: models.py:160
msgid "Publish this server via Bonjour" msgid "Publish this server via Bonjour"
msgstr "Server via Bonjour bekannt machen" msgstr "Server via Bonjour bekannt machen"
#: models.py:152
#: models.py:161
msgid "Boot Server when Murmur starts" msgid "Boot Server when Murmur starts"
msgstr "Instanz starten wenn Murmur startet" msgstr "Instanz starten wenn Murmur startet"
#: models.py:171 models.py:494
#: models.py:179
msgid "Boot Server"
msgstr "Server starten"
#: models.py:183 models.py:506
msgid "Server instance" msgid "Server instance"
msgstr "Serverinstanz" msgstr "Serverinstanz"
#: models.py:172
#: models.py:184
msgid "Server instances" msgid "Server instances"
msgstr "Serverinstanzen" msgstr "Serverinstanzen"
#: models.py:457 models.py:637
#: models.py:469 models.py:649
msgid "This field must not be updated once the record has been saved." 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." msgstr "Dieses Feld darf nicht mehr verändert werden, nachdem der Eintrag zum ersten Mal gespeichert wurde."
#: models.py:491
#: models.py:503
msgid "Mumble player_id" msgid "Mumble player_id"
msgstr "ID des Spielers in Murmur" msgstr "ID des Spielers in Murmur"
#: models.py:492
#: models.py:504
msgid "User name and Login" msgid "User name and Login"
msgstr "Benutzername und Login" msgstr "Benutzername und Login"
#: models.py:493
#: models.py:505
msgid "Login password" msgid "Login password"
msgstr "Passwort" msgstr "Passwort"
#: models.py:495 templates/mumble/mumble.html:284
#: models.py:507 templates/mumble/mumble.html:284
msgid "Account owner" msgid "Account owner"
msgstr "Accountbesitzer" msgstr "Accountbesitzer"
#: models.py:497
#: models.py:509
msgid "comment" msgid "comment"
msgstr "Benutzer-Kommentar" msgstr "Benutzer-Kommentar"
#: models.py:498
#: models.py:510
msgid "hash" msgid "hash"
msgstr "Signatur des Zertifikats" msgstr "Signatur des Zertifikats"
#: models.py:502
#: models.py:514
msgid "User account" msgid "User account"
msgstr "Benutzerkonto" msgstr "Benutzerkonto"
#: models.py:503
#: models.py:515
msgid "User accounts" msgid "User accounts"
msgstr "Benutzerkonten" msgstr "Benutzerkonten"
#: models.py:510
#: models.py:522
#, python-format #, python-format
msgid "Mumble user %(mu)s on %(srv)s owned by Django user %(du)s" 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" msgstr "Benutzeraccount %(mu)s auf %(srv)s mit Besitzer %(du)s"

16
pyweb/mumble/models.py

@ -14,7 +14,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
import socket
import socket, Ice
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User from django.contrib.auth.models import User
@ -96,6 +96,15 @@ class MumbleServer( models.Model ):
return self._conf[field] return self._conf[field]
return None return None
def isOnline( self ):
try:
self.ctl
except Ice.ConnectionRefusedException:
return False;
else:
return True;
online = property( isOnline )
defaultconf = property( getDefaultConf, doc="The default config dictionary." ) defaultconf = property( getDefaultConf, doc="The default config dictionary." )
@ -153,7 +162,10 @@ class Mumble( models.Model ):
def getBooted( self ): def getBooted( self ):
if self.id is not None: if self.id is not None:
return self.ctl.isBooted( self.srvid );
try:
return self.ctl.isBooted( self.srvid );
except Ice.ConnectionRefusedException:
return False;
else: else:
return False return False

Loading…
Cancel
Save