diff --git a/accounts/forms.py b/accounts/forms.py index 836435ae..f7cb7a9d 100644 --- a/accounts/forms.py +++ b/accounts/forms.py @@ -21,10 +21,9 @@ class UserInstanceForm(ModelForm): def clean_instance(self): instance = self.cleaned_data["instance"] - if app_settings.ALLOW_INSTANCE_MULTIPLE_OWNER == "False": - # the ownership being edited is not another owner - exists = UserInstance.objects.filter(instance=instance).exclude(pk=self.instance.pk) - if exists: + # a new owner only: rights of one the VM has may still be changed after the setting is turned off + if app_settings.ALLOW_INSTANCE_MULTIPLE_OWNER == "False" and self.instance.pk is None: + if UserInstance.objects.filter(instance=instance).exists(): raise ValidationError(_("Instance owned by another user")) return instance diff --git a/accounts/tests/test_views.py b/accounts/tests/test_views.py index cec60105..ef9f0b9d 100644 --- a/accounts/tests/test_views.py +++ b/accounts/tests/test_views.py @@ -329,6 +329,12 @@ class SingleOwnerEditTests(TestCase): self.assertRedirects(response, reverse("accounts:account", args=[bob.pk]), fetch_redirect_response=False) ui.refresh_from_db() self.assertTrue(ui.is_vnc) + # owners given while more were allowed: each one's rights still change + carol = UserInstance.objects.create(user=get_user_model().objects.create_user("carol"), instance=vm) + response = self.client.post(reverse("accounts:user_instance_update", args=[carol.pk]), {"is_delete": "on"}) + self.assertRedirects(response, reverse("accounts:account", args=[carol.user.pk]), fetch_redirect_response=False) + carol.refresh_from_db() + self.assertTrue(carol.is_delete) class OwnerRightsReturnTestCase(TestCase): diff --git a/admin/forms.py b/admin/forms.py index 3fd41208..a428b8e7 100644 --- a/admin/forms.py +++ b/admin/forms.py @@ -17,6 +17,15 @@ from instances.models import Instance from .models import Permission +# each permission's name in the user's language: the database keeps the English one +PERMISSION_NAMES = { + "change_password": _("Can change password"), + "clone_instances": _("Can clone instances"), + "passwordless_console": _("Can access console without password"), + "snapshot_instances": _("Can snapshot instances"), + "view_instances": _("Can view instances"), +} + # what each permission lets a user do, shown beside its switch PERMISSION_HELP = { "change_password": _("Change their own password on their profile page"), @@ -28,8 +37,13 @@ PERMISSION_HELP = { def permission_rows(field): - """Each permission's checkbox of a bound field with what it lets a user do.""" - return [(box, PERMISSION_HELP.get(box.data["value"].instance.codename, "")) for box in field] + """Each permission's checkbox of a bound field with its name and what it lets a user do.""" + rows = [] + for box in field: + permission = box.data["value"].instance + rows.append((box, PERMISSION_NAMES.get(permission.codename, permission.name), + PERMISSION_HELP.get(permission.codename, ""))) + return rows class GroupForm(forms.ModelForm): diff --git a/admin/templates/admin/group_form.html b/admin/templates/admin/group_form.html index 2880d660..8a008c93 100644 --- a/admin/templates/admin/group_form.html +++ b/admin/templates/admin/group_form.html @@ -32,12 +32,12 @@
- {% for box, help in form.permission_rows %} + {% for box, name, help in form.permission_rows %}
diff --git a/admin/templates/admin/user_form.html b/admin/templates/admin/user_form.html index fa467720..e934ce4e 100644 --- a/admin/templates/admin/user_form.html +++ b/admin/templates/admin/user_form.html @@ -137,12 +137,12 @@ {% trans "Own permissions" %}

{% trans "Off grants nothing here; it takes away nothing a group grants." %}

- {% for box, help in user_form.permission_rows %} + {% for box, name, help in user_form.permission_rows %}
diff --git a/admin/tests/test_user_create.py b/admin/tests/test_user_create.py index de1d41c5..d6258d3b 100644 --- a/admin/tests/test_user_create.py +++ b/admin/tests/test_user_create.py @@ -44,6 +44,14 @@ class UserCreateTests(TestCase): ticked = set(re.findall(r']*name="user_permissions"[^>]*value="(\d+)"[^>]*checked', page)) self.assertEqual(ticked, {str(self.change_password.pk), str(Permission.objects.get(codename="passwordless_console").pk)}) + def test_permissions_are_named_in_the_users_language(self): + # the database keeps each permission's English name + page = self.client.get(reverse("admin:user_create"), HTTP_ACCEPT_LANGUAGE="tr").content.decode() + for name in ("Parola değiştirebilir", "Sanal makineleri klonlayabilir", "Parolasız konsol erişimi yapabilir", + "Sanal makinelerin anlık görüntüsünü alabilir", "Sanal makineleri görebilir"): + self.assertIn(name, page) + self.assertNotIn("Can clone instances", page) + def test_groups_and_permissions_are_saved(self): group = Group.objects.create(name="uc-group") self.create(groups=[group.pk], user_permissions=[self.change_password.pk]) diff --git a/locale/tr/LC_MESSAGES/django.mo b/locale/tr/LC_MESSAGES/django.mo index cf10d395..7770d904 100644 Binary files a/locale/tr/LC_MESSAGES/django.mo and b/locale/tr/LC_MESSAGES/django.mo differ diff --git a/locale/tr/LC_MESSAGES/django.po b/locale/tr/LC_MESSAGES/django.po index de603e72..d389cb2e 100644 --- a/locale/tr/LC_MESSAGES/django.po +++ b/locale/tr/LC_MESSAGES/django.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-11-13 11:26+0000\n" +"POT-Creation-Date: 2026-11-13 11:27+0000\n" "PO-Revision-Date: 2020-11-04 12:00+0000\n" "Last-Translator: catborise , 2020\n" "Language-Team: Turkish (https://www.transifex.com/catborise/teams/110663/tr/)\n" @@ -25,46 +25,46 @@ msgstr "" msgid "Change your password before using the API." msgstr "API'yi kullanmadan önce parolanızı değiştirin." -#: accounts/forms.py:28 +#: accounts/forms.py:27 msgid "Instance owned by another user" msgstr "Diğer kullanıcıya ait sanal makineler" -#: accounts/forms.py:36 accounts/templates/account.html:72 +#: accounts/forms.py:35 accounts/templates/account.html:72 #: instances/templates/instances/settings_tab.html:676 msgid "Change settings" msgstr "Ayarları değiştir" -#: accounts/forms.py:36 accounts/templates/account.html:73 +#: accounts/forms.py:35 accounts/templates/account.html:73 #: instances/templates/instances/settings_tab.html:676 msgid "Delete the VM" msgstr "Sanal makineyi sil" -#: accounts/forms.py:37 accounts/templates/account.html:74 +#: accounts/forms.py:36 accounts/templates/account.html:74 #: instances/templates/instances/settings_tab.html:676 msgid "Change console settings" msgstr "Konsol ayarlarını değiştir" -#: accounts/forms.py:38 +#: accounts/forms.py:37 msgid "Only together with Change settings" msgstr "Yalnızca Ayarları değiştirme ile birlikte" -#: accounts/forms.py:50 +#: accounts/forms.py:49 msgid "Another user has this email address" msgstr "Bu e-posta adresi başka bir kullanıcıya ait" -#: accounts/forms.py:69 +#: accounts/forms.py:68 msgid "Key name already exist" msgstr "Anahtar adı zaten mevcut" -#: accounts/forms.py:77 +#: accounts/forms.py:76 msgid "Public key already exist" msgstr "Açık anahtar zaten mevcut" -#: accounts/forms.py:80 +#: accounts/forms.py:79 msgid "Invalid key" msgstr "Geçersiz anahtar" -#: accounts/forms.py:96 computes/templates/computes/instances.html:45 +#: accounts/forms.py:95 computes/templates/computes/instances.html:45 #: instances/templates/add_instance_volume.html:39 #: instances/templates/allinstances_index_grouped.html:11 #: instances/templates/allinstances_index_nongrouped.html:6 @@ -76,27 +76,27 @@ msgstr "Geçersiz anahtar" msgid "Name" msgstr "Ad" -#: accounts/forms.py:96 +#: accounts/forms.py:95 msgid "What uses it, such as a script or a host" msgstr "Onu ne kullanıyor, örneğin bir betik ya da bir sunucu" -#: accounts/forms.py:98 accounts/templates/api_token_list.html:19 +#: accounts/forms.py:97 accounts/templates/api_token_list.html:19 msgid "Expires" msgstr "Sona erme" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in 30 days" msgstr "30 gün içinde" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in 90 days" msgstr "90 gün içinde" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in a year" msgstr "bir yıl içinde" -#: accounts/forms.py:99 accounts/templates/account.html:29 +#: accounts/forms.py:98 accounts/templates/account.html:29 #: accounts/templates/api_token_list.html:19 #: accounts/templates/api_token_list.html:20 accounts/templates/profile.html:25 #: admin/templates/admin/user_form.html:21 @@ -106,7 +106,7 @@ msgstr "bir yıl içinde" msgid "never" msgstr "hiçbir zaman" -#: accounts/forms.py:104 +#: accounts/forms.py:103 msgid "Email" msgstr "E-posta" @@ -144,7 +144,7 @@ msgstr "en fazla bellek (MiB)" msgid "max disk size (GiB)" msgstr "en fazla disk boyutu (GiB)" -#: accounts/models.py:82 +#: accounts/models.py:82 admin/forms.py:22 msgid "Can change password" msgstr "Parola değiştirebilir" @@ -162,13 +162,13 @@ msgid "User Profile" msgstr "Kullanıcı Profili" #: accounts/templates/account.html:17 accounts/templates/profile.html:18 -#: admin/forms.py:75 admin/templates/admin/user_list.html:24 +#: admin/forms.py:89 admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:30 msgid "Superuser" msgstr "Süperkullanıcı" #: accounts/templates/account.html:19 accounts/templates/profile.html:20 -#: admin/forms.py:75 admin/templates/admin/user_list.html:24 +#: admin/forms.py:89 admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:32 msgid "Template editor" msgstr "Şablon düzenleyici" @@ -214,7 +214,7 @@ msgid "User sections" msgstr "Kullanıcı bölümleri" #: accounts/templates/account.html:50 accounts/templates/account.html:58 -#: admin/forms.py:193 computes/templates/computes/list.html:30 +#: admin/forms.py:207 computes/templates/computes/list.html:30 #: computes/templates/computes/list.html:57 computes/templates/overview.html:46 msgid "VMs" msgstr "Sanal makineler" @@ -677,11 +677,27 @@ msgid "OTP of %(user)s was reset: a new QR code can be mailed." msgstr "" "%(user)s kullanıcısının OTP'si sıfırlandı: yeni bir QR kodu gönderilebilir." -#: admin/forms.py:22 +#: admin/forms.py:23 +msgid "Can clone instances" +msgstr "Sanal makineleri klonlayabilir" + +#: admin/forms.py:24 instances/models.py:436 +msgid "Can access console without password" +msgstr "Parolasız konsol erişimi yapabilir" + +#: admin/forms.py:25 +msgid "Can snapshot instances" +msgstr "Sanal makinelerin anlık görüntüsünü alabilir" + +#: admin/forms.py:26 +msgid "Can view instances" +msgstr "Sanal makineleri görebilir" + +#: admin/forms.py:31 msgid "Change their own password on their profile page" msgstr "Profil sayfasında kendi parolasını değiştirme" -#: admin/forms.py:23 +#: admin/forms.py:32 msgid "" "Clone the VMs they may change and the templates they may view, within their " "quota" @@ -689,21 +705,21 @@ msgstr "" "Kotası dahilinde, değiştirebildiği sanal makineleri ve görebildiği şablonları" " klonlama" -#: admin/forms.py:24 +#: admin/forms.py:33 msgid "Open a console without the VM's console password" msgstr "Sanal makinenin konsol parolası olmadan konsol aç" -#: admin/forms.py:25 +#: admin/forms.py:34 msgid "Take, revert and delete snapshots of the VMs they may change" msgstr "" "Değiştirebildiği sanal makinelerin anlık görüntülerini alma, geri yükleme ve " "silme" -#: admin/forms.py:26 +#: admin/forms.py:35 msgid "See every VM and host in the lists, read-only" msgstr "Listelerde tüm sanal makineleri ve sunucuları salt okunur görme" -#: admin/forms.py:75 admin/templates/admin/logs.html:39 +#: admin/forms.py:89 admin/templates/admin/logs.html:39 #: admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:34 #: computes/templates/computes/instances.html:46 @@ -715,24 +731,24 @@ msgstr "Listelerde tüm sanal makineleri ve sunucuları salt okunur görme" msgid "User" msgstr "Kullanıcı" -#: admin/forms.py:82 admin/templates/admin/group_form.html:30 +#: admin/forms.py:96 admin/templates/admin/group_form.html:30 msgid "Permissions" msgstr "İzinler" -#: admin/forms.py:89 admin/templates/admin/group_list.html:6 +#: admin/forms.py:103 admin/templates/admin/group_list.html:6 #: admin/templates/admin/group_list.html:8 #: admin/templates/admin/group_list.html:24 #: admin/templates/admin/user_form.html:123 templates/navbar.html:33 msgid "Groups" msgstr "Gruplar" -#: admin/forms.py:143 +#: admin/forms.py:157 #, python-format msgid "NEW_USER_DEFAULT_INSTANCES: %(name)s is not exactly one VM" msgstr "" "NEW_USER_DEFAULT_INSTANCES: %(name)s tam olarak tek bir sanal makine değil" -#: admin/forms.py:146 +#: admin/forms.py:160 #, python-format msgid "" "NEW_USER_DEFAULT_INSTANCES: %(name)s has an owner, and only one is allowed" @@ -740,7 +756,7 @@ msgstr "" "NEW_USER_DEFAULT_INSTANCES: %(name)s sanal makinesinin bir sahibi var ve " "yalnızca bir sahibe izin veriliyor" -#: admin/forms.py:194 computes/templates/computes/list.html:58 +#: admin/forms.py:208 computes/templates/computes/list.html:58 #: computes/templates/overview.html:58 instances/forms.py:14 #: instances/templates/allinstances_index_grouped.html:16 #: instances/templates/allinstances_index_nongrouped.html:14 @@ -750,7 +766,7 @@ msgstr "" msgid "vCPUs" msgstr "vCPU" -#: admin/forms.py:195 computes/templates/computes/instances.html:49 +#: admin/forms.py:209 computes/templates/computes/instances.html:49 #: computes/templates/computes/list.html:59 computes/templates/overview.html:66 #: computes/templates/overview.html:150 #: instances/templates/allinstances_index_grouped.html:17 @@ -762,34 +778,34 @@ msgstr "vCPU" msgid "Memory" msgstr "Bellek" -#: admin/forms.py:196 instances/models.py:240 +#: admin/forms.py:210 instances/models.py:240 #: instances/templates/create_instance_w2.html:118 #: instances/templates/instances/settings_tab.html:25 #: instances/templates/instances/stats_tab.html:53 msgid "Disk" msgstr "Disk" -#: admin/forms.py:206 +#: admin/forms.py:220 msgid "No limit" msgstr "Sınır yok" -#: admin/forms.py:222 +#: admin/forms.py:236 msgid "Enter a limit or choose No limit." msgstr "Bir sınır girin ya da Sınır yok'u seçin." -#: admin/forms.py:234 +#: admin/forms.py:248 msgid "The user must change it at their next login" msgstr "Kullanıcı bir sonraki girişinde onu değiştirmek zorundadır" -#: admin/forms.py:240 +#: admin/forms.py:254 msgid "With a password" msgstr "Parolayla" -#: admin/forms.py:240 +#: admin/forms.py:254 msgid "Without a password" msgstr "Parolasız" -#: admin/forms.py:246 +#: admin/forms.py:260 msgid "A user without a password cannot be made to change it" msgstr "Parolası olmayan bir kullanıcıya parola değiştirme zorunluluğu konamaz" @@ -3360,10 +3376,6 @@ msgstr "CD-ROM" msgid "NIC" msgstr "NIC" -#: instances/models.py:436 -msgid "Can access console without password" -msgstr "Parolasız konsol erişimi yapabilir" - #: instances/states.py:10 msgid "No state" msgstr "Durum yok" diff --git a/locale/zh/LC_MESSAGES/django.mo b/locale/zh/LC_MESSAGES/django.mo index f394748d..8d8d6be5 100644 Binary files a/locale/zh/LC_MESSAGES/django.mo and b/locale/zh/LC_MESSAGES/django.mo differ diff --git a/locale/zh/LC_MESSAGES/django.po b/locale/zh/LC_MESSAGES/django.po index 0b2c07f9..5a3ca63d 100644 --- a/locale/zh/LC_MESSAGES/django.po +++ b/locale/zh/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-11-13 11:26+0000\n" +"POT-Creation-Date: 2026-11-13 11:27+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -22,46 +22,46 @@ msgstr "" msgid "Change your password before using the API." msgstr "使用 API 前请先修改密码。" -#: accounts/forms.py:28 +#: accounts/forms.py:27 msgid "Instance owned by another user" msgstr "该虚拟机属于其他用户" -#: accounts/forms.py:36 accounts/templates/account.html:72 +#: accounts/forms.py:35 accounts/templates/account.html:72 #: instances/templates/instances/settings_tab.html:676 msgid "Change settings" msgstr "修改设置" -#: accounts/forms.py:36 accounts/templates/account.html:73 +#: accounts/forms.py:35 accounts/templates/account.html:73 #: instances/templates/instances/settings_tab.html:676 msgid "Delete the VM" msgstr "删除虚拟机" -#: accounts/forms.py:37 accounts/templates/account.html:74 +#: accounts/forms.py:36 accounts/templates/account.html:74 #: instances/templates/instances/settings_tab.html:676 msgid "Change console settings" msgstr "修改控制台设置" -#: accounts/forms.py:38 +#: accounts/forms.py:37 msgid "Only together with Change settings" msgstr "仅可与“修改设置”一起使用" -#: accounts/forms.py:50 +#: accounts/forms.py:49 msgid "Another user has this email address" msgstr "其他用户已使用此邮箱地址" -#: accounts/forms.py:69 +#: accounts/forms.py:68 msgid "Key name already exist" msgstr "密钥名称已存在" -#: accounts/forms.py:77 +#: accounts/forms.py:76 msgid "Public key already exist" msgstr "公钥已存在" -#: accounts/forms.py:80 +#: accounts/forms.py:79 msgid "Invalid key" msgstr "无效的密钥" -#: accounts/forms.py:96 computes/templates/computes/instances.html:45 +#: accounts/forms.py:95 computes/templates/computes/instances.html:45 #: instances/templates/add_instance_volume.html:39 #: instances/templates/allinstances_index_grouped.html:11 #: instances/templates/allinstances_index_nongrouped.html:6 @@ -73,27 +73,27 @@ msgstr "无效的密钥" msgid "Name" msgstr "名称" -#: accounts/forms.py:96 +#: accounts/forms.py:95 msgid "What uses it, such as a script or a host" msgstr "用途,例如某个脚本或主机" -#: accounts/forms.py:98 accounts/templates/api_token_list.html:19 +#: accounts/forms.py:97 accounts/templates/api_token_list.html:19 msgid "Expires" msgstr "有效期" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in 30 days" msgstr "30 天后" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in 90 days" msgstr "90 天后" -#: accounts/forms.py:99 +#: accounts/forms.py:98 msgid "in a year" msgstr "一年后" -#: accounts/forms.py:99 accounts/templates/account.html:29 +#: accounts/forms.py:98 accounts/templates/account.html:29 #: accounts/templates/api_token_list.html:19 #: accounts/templates/api_token_list.html:20 accounts/templates/profile.html:25 #: admin/templates/admin/user_form.html:21 @@ -103,7 +103,7 @@ msgstr "一年后" msgid "never" msgstr "永不" -#: accounts/forms.py:104 +#: accounts/forms.py:103 msgid "Email" msgstr "邮箱" @@ -141,7 +141,7 @@ msgstr "最大内存(MiB)" msgid "max disk size (GiB)" msgstr "最大磁盘大小(GiB)" -#: accounts/models.py:82 +#: accounts/models.py:82 admin/forms.py:22 msgid "Can change password" msgstr "可修改密码" @@ -159,13 +159,13 @@ msgid "User Profile" msgstr "用户资料" #: accounts/templates/account.html:17 accounts/templates/profile.html:18 -#: admin/forms.py:75 admin/templates/admin/user_list.html:24 +#: admin/forms.py:89 admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:30 msgid "Superuser" msgstr "超级用户" #: accounts/templates/account.html:19 accounts/templates/profile.html:20 -#: admin/forms.py:75 admin/templates/admin/user_list.html:24 +#: admin/forms.py:89 admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:32 msgid "Template editor" msgstr "模板编辑者" @@ -209,7 +209,7 @@ msgid "User sections" msgstr "用户页面导航" #: accounts/templates/account.html:50 accounts/templates/account.html:58 -#: admin/forms.py:193 computes/templates/computes/list.html:30 +#: admin/forms.py:207 computes/templates/computes/list.html:30 #: computes/templates/computes/list.html:57 computes/templates/overview.html:46 msgid "VMs" msgstr "虚拟机" @@ -661,29 +661,45 @@ msgstr "未设置用户邮箱,无法发送二维码" msgid "OTP of %(user)s was reset: a new QR code can be mailed." msgstr "%(user)s 的 OTP 已重置:可以邮寄新的二维码。" -#: admin/forms.py:22 +#: admin/forms.py:23 +msgid "Can clone instances" +msgstr "可克隆虚拟机" + +#: admin/forms.py:24 instances/models.py:436 +msgid "Can access console without password" +msgstr "可无密码访问控制台" + +#: admin/forms.py:25 +msgid "Can snapshot instances" +msgstr "可为虚拟机创建快照" + +#: admin/forms.py:26 +msgid "Can view instances" +msgstr "可查看虚拟机" + +#: admin/forms.py:31 msgid "Change their own password on their profile page" msgstr "在个人资料页修改自己的密码" -#: admin/forms.py:23 +#: admin/forms.py:32 msgid "" "Clone the VMs they may change and the templates they may view, within their " "quota" msgstr "在配额范围内克隆其可修改的虚拟机和可查看的模板" -#: admin/forms.py:24 +#: admin/forms.py:33 msgid "Open a console without the VM's console password" msgstr "无需虚拟机的控制台密码即可打开控制台" -#: admin/forms.py:25 +#: admin/forms.py:34 msgid "Take, revert and delete snapshots of the VMs they may change" msgstr "为其可修改的虚拟机创建、恢复和删除快照" -#: admin/forms.py:26 +#: admin/forms.py:35 msgid "See every VM and host in the lists, read-only" msgstr "在列表中查看所有虚拟机和主机(只读)" -#: admin/forms.py:75 admin/templates/admin/logs.html:39 +#: admin/forms.py:89 admin/templates/admin/logs.html:39 #: admin/templates/admin/user_list.html:24 #: admin/templates/admin/user_list.html:34 #: computes/templates/computes/instances.html:46 @@ -695,29 +711,29 @@ msgstr "在列表中查看所有虚拟机和主机(只读)" msgid "User" msgstr "用户" -#: admin/forms.py:82 admin/templates/admin/group_form.html:30 +#: admin/forms.py:96 admin/templates/admin/group_form.html:30 msgid "Permissions" msgstr "权限" -#: admin/forms.py:89 admin/templates/admin/group_list.html:6 +#: admin/forms.py:103 admin/templates/admin/group_list.html:6 #: admin/templates/admin/group_list.html:8 #: admin/templates/admin/group_list.html:24 #: admin/templates/admin/user_form.html:123 templates/navbar.html:33 msgid "Groups" msgstr "用户组" -#: admin/forms.py:143 +#: admin/forms.py:157 #, python-format msgid "NEW_USER_DEFAULT_INSTANCES: %(name)s is not exactly one VM" msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 不是唯一的一台虚拟机" -#: admin/forms.py:146 +#: admin/forms.py:160 #, python-format msgid "" "NEW_USER_DEFAULT_INSTANCES: %(name)s has an owner, and only one is allowed" msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 已有所有者,且只允许一个所有者" -#: admin/forms.py:194 computes/templates/computes/list.html:58 +#: admin/forms.py:208 computes/templates/computes/list.html:58 #: computes/templates/overview.html:58 instances/forms.py:14 #: instances/templates/allinstances_index_grouped.html:16 #: instances/templates/allinstances_index_nongrouped.html:14 @@ -727,7 +743,7 @@ msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 已有所有者,且只允许一 msgid "vCPUs" msgstr "vCPU" -#: admin/forms.py:195 computes/templates/computes/instances.html:49 +#: admin/forms.py:209 computes/templates/computes/instances.html:49 #: computes/templates/computes/list.html:59 computes/templates/overview.html:66 #: computes/templates/overview.html:150 #: instances/templates/allinstances_index_grouped.html:17 @@ -739,34 +755,34 @@ msgstr "vCPU" msgid "Memory" msgstr "内存" -#: admin/forms.py:196 instances/models.py:240 +#: admin/forms.py:210 instances/models.py:240 #: instances/templates/create_instance_w2.html:118 #: instances/templates/instances/settings_tab.html:25 #: instances/templates/instances/stats_tab.html:53 msgid "Disk" msgstr "磁盘" -#: admin/forms.py:206 +#: admin/forms.py:220 msgid "No limit" msgstr "不限" -#: admin/forms.py:222 +#: admin/forms.py:236 msgid "Enter a limit or choose No limit." msgstr "请输入限制值,或选择“不限”。" -#: admin/forms.py:234 +#: admin/forms.py:248 msgid "The user must change it at their next login" msgstr "用户必须在下次登录时修改密码" -#: admin/forms.py:240 +#: admin/forms.py:254 msgid "With a password" msgstr "使用密码" -#: admin/forms.py:240 +#: admin/forms.py:254 msgid "Without a password" msgstr "不使用密码" -#: admin/forms.py:246 +#: admin/forms.py:260 msgid "A user without a password cannot be made to change it" msgstr "没有密码的用户无法被要求修改密码" @@ -3209,10 +3225,6 @@ msgstr "CD-ROM" msgid "NIC" msgstr "网卡" -#: instances/models.py:436 -msgid "Can access console without password" -msgstr "可无密码访问控制台" - #: instances/states.py:10 msgid "No state" msgstr "无状态"