Commit f6449395 by Őry, Máté

one: remove Hungarian strings from code

parent 8fed5420
...@@ -225,11 +225,11 @@ Virtual machine instance. ...@@ -225,11 +225,11 @@ Virtual machine instance.
""" """
class Instance(models.Model): class Instance(models.Model):
name = models.CharField(max_length=100, unique=True, name = models.CharField(max_length=100, unique=True,
verbose_name=_('név'), null=True, blank=True) verbose_name=_('name'), null=True, blank=True)
ip = models.IPAddressField(blank=True, null=True, verbose_name=_('IP address')) ip = models.IPAddressField(blank=True, null=True, verbose_name=_('IP address'))
template = models.ForeignKey(Template, verbose_name=_('template')) template = models.ForeignKey(Template, verbose_name=_('template'))
owner = models.ForeignKey(User, verbose_name=_('owner')) owner = models.ForeignKey(User, verbose_name=_('owner'))
created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('created_at')) created_at = models.DateTimeField(auto_now_add=True, verbose_name=_('created at'))
state = models.CharField(max_length=20, state = models.CharField(max_length=20,
choices=[('DEPLOYABLE', _('deployable')), choices=[('DEPLOYABLE', _('deployable')),
('PENDING', _('pending')), ('PENDING', _('pending')),
......
# -*- coding: utf8 -*- # -*- coding: utf-8 -*-
from datetime import datetime from datetime import datetime
from django.conf import settings from django.conf import settings
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import login_required
...@@ -125,13 +125,13 @@ class VmPortAddView(View): ...@@ -125,13 +125,13 @@ class VmPortAddView(View):
public = int(request.POST['public']) public = int(request.POST['public'])
if public >= 22000 and public < 24000: if public >= 22000 and public < 24000:
raise ValidationError("a port nem lehet 22000 es 24000 kozott") raise ValidationError(_("Port number is in a restricted domain (22000 to 24000)."))
inst = get_object_or_404(Instance, id=iid, owner=request.user) inst = get_object_or_404(Instance, id=iid, owner=request.user)
inst.firewall_host.add_port(proto=request.POST['proto'], public=public, private=int(request.POST['private'])) inst.firewall_host.add_port(proto=request.POST['proto'], public=public, private=int(request.POST['private']))
reload_firewall_lock() reload_firewall_lock()
messages.success(request, _(u"A port hozzáadása sikerült.")) messages.success(request, _(u"Port %d successfully added.") % public)
except: except:
messages.error(request, _(u"Nem sikerült a kért művelet")) messages.error(request, _(u"Adding port failed."))
# raise # raise
return redirect('/vm/show/%d/' % int(iid)) return redirect('/vm/show/%d/' % int(iid))
...@@ -148,9 +148,9 @@ def vm_port_del(request, iid, proto, public): ...@@ -148,9 +148,9 @@ def vm_port_del(request, iid, proto, public):
try: try:
inst.firewall_host.del_port(proto=proto, public=public) inst.firewall_host.del_port(proto=proto, public=public)
reload_firewall_lock() reload_firewall_lock()
messages.success(request, _(u"A port törlése sikerült.")) messages.success(request, _(u"Port %d successfully removed.") % public)
except: except:
messages.error(request, _(u"Nem sikerült a kért művelet")) messages.error(request, _(u"Removing port failed."))
return redirect('/vm/show/%d/' % int(iid)) return redirect('/vm/show/%d/' % int(iid))
class VmDeleteView(View): class VmDeleteView(View):
......
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 sign in to comment