diff --git a/instances/templates/allinstances.html b/instances/templates/allinstances.html index 9833e354..fbc6f014 100644 --- a/instances/templates/allinstances.html +++ b/instances/templates/allinstances.html @@ -71,6 +71,15 @@ + {% if request.user.is_superuser %} + {# tags are a superuser's, as on the VM's Settings tab #} +
+ + {% for tag in tag_names %} + + +
+ {% endif %} {% endif %}
diff --git a/instances/tests/test_bulk_power.py b/instances/tests/test_bulk_power.py index 1da93540..5c23e19f 100644 --- a/instances/tests/test_bulk_power.py +++ b/instances/tests/test_bulk_power.py @@ -197,7 +197,7 @@ class BulkPowerTestCase(TransactionTestCase): self.assertEqual(sorted(int(box.get("value")) for box in boxes), [vm.pk for vm in self.vms]) (form,) = page.xpath("//form[@id='bulk-power']") self.assertEqual(form.get("action"), reverse("instances:bulk_power")) - self.assertEqual(form.xpath(".//button[@name='action']/@value"), ["start", "shutdown", "force_off"]) + self.assertEqual(form.xpath(".//button[@name='action'][not(@formaction)]/@value"), ["start", "shutdown", "force_off"]) # an owner: a box on their own VM only owner = get_user_model().objects.create_user("bp-lister", password="pw") UserInstance.objects.create(instance=self.vms[1], user=owner) diff --git a/instances/tests/test_bulk_tag.py b/instances/tests/test_bulk_tag.py new file mode 100644 index 00000000..f3a53669 --- /dev/null +++ b/instances/tests/test_bulk_tag.py @@ -0,0 +1,80 @@ +"""A superuser adds a tag to, or removes it from, the VMs chosen on the VM +list, with a log row for each VM it changes; owners have no such buttons.""" +from unittest.mock import MagicMock, patch + +from django.contrib.auth import get_user_model +from django.contrib.messages import get_messages +from django.test import TestCase +from django.urls import reverse +from lxml import html + +from accounts.models import UserInstance +from computes.models import Compute, Tag +from instances.models import Instance +from logs.models import Logs + + +class BulkTagTestCase(TestCase): + def setUp(self): + self.client.force_login(get_user_model().objects.create_superuser("bt-admin", "bt@example.com", "pw")) + compute = Compute.objects.create(name="bt-host", hostname="127.0.0.1", login="", password="", type=4) + self.vms = [Instance.objects.create(compute=compute, name=f"bt-vm{n}", uuid=f"00000000-0000-4000-8000-00000000010{n}") + for n in (1, 2)] + # the list page asks each VM's host: not this machine's libvirt, whose last error would reach other tests + patch.object(Instance, "proxy", property(lambda vm: MagicMock(**{"get_status.return_value": 5}))).start() + self.addCleanup(patch.stopall) + + def post(self, action, tag, vms): + self.client.cookies.pop("messages", None) + response = self.client.post(reverse("instances:bulk_tag"), {"action": action, "tag": tag, + "vm": [vm.pk for vm in vms]}) + return [str(m) for m in get_messages(response.wsgi_request)] + + def vm_tags(self): + return [sorted(vm.tags.values_list("name", flat=True)) for vm in self.vms] + + def test_added_and_removed_with_a_row_for_each_vm_changed(self): + self.vms[0].tags.add(Tag.objects.create(name="web")) + self.assertEqual(self.post("tag_add", " Web ", self.vms), ["Tag web added to 1 VM"]) # vm1 had it + self.assertEqual(self.vm_tags(), [["web"], ["web"]]) + self.assertEqual(self.post("tag_remove", "web", self.vms), ["Tag web removed from 2 VMs"]) + self.assertEqual(self.vm_tags(), [[], []]) + rows = list(Logs.objects.filter(instance__startswith="bt-vm").order_by("pk").values_list("instance", "message")) + self.assertEqual([(vm, message.split(": ")[-1]) for vm, message in rows], + [("bt-vm2", "tag web"), ("bt-vm1", "untag web"), ("bt-vm2", "untag web")]) + + def test_a_wrong_name_or_unknown_tag_is_refused(self): + self.assertEqual(self.post("tag_add", "", self.vms), ["Choose the VMs and write the tag"]) + self.assertIn("A tag is letters a-z", self.post("tag_add", "no spaces", self.vms)[0]) + self.assertEqual(self.post("tag_remvoe", "web", self.vms), ["Choose the VMs and write the tag"]) # no add + self.assertEqual(self.post("tag_remove", "none", self.vms), ["There is no tag none"]) + self.assertEqual(self.vm_tags(), [[], []]) + Instance.objects.filter(pk__in=[vm.pk for vm in self.vms]).delete() + self.assertEqual(self.post("tag_add", "fresh", self.vms), ["Choose the VMs and write the tag"]) # VMs gone + self.assertFalse(Tag.objects.exists()) # none made by a refusal + + def test_owners_may_not(self): + owner = get_user_model().objects.create_user("bt-owner", password="pw") + UserInstance.objects.create(instance=self.vms[0], user=owner) + self.client.force_login(owner) + response = self.client.post(reverse("instances:bulk_tag"), {"action": "tag_add", "tag": "web", "vm": [self.vms[0].pk]}) + self.assertEqual(response.status_code, 403) + with patch("instances.views.utils.vm_states", return_value={}), \ + patch("instances.views.refresh_instance_database"), patch("instances.views.utils.read_list_rows"): + page = html.fromstring(self.client.get(reverse("instances:index")).content) + self.assertFalse(page.xpath("//button[@formaction]")) + + def test_the_list_offers_them_to_a_superuser(self): + with patch("instances.views.utils.vm_states", return_value={}), \ + patch("instances.views.refresh_instance_database"), patch("instances.views.utils.read_list_rows"): + page = html.fromstring(self.client.get(reverse("instances:index")).content) + (form,) = page.xpath("//form[@id='bulk-power']") + self.assertEqual(form.xpath(".//button[@formaction]/@value"), ["tag_add", "tag_remove"]) + self.assertEqual(set(form.xpath(".//button[@formaction]/@formaction")), {reverse("instances:bulk_tag")}) + self.assertTrue(form.xpath(".//input[@name='tag']")) + # every tag offered, also one no VM has + Tag.objects.create(name="hosts-only") + with patch("instances.views.utils.vm_states", return_value={}), \ + patch("instances.views.refresh_instance_database"), patch("instances.views.utils.read_list_rows"): + page = html.fromstring(self.client.get(reverse("instances:index")).content) + self.assertEqual(page.xpath("//datalist[@id='bulk-tag-names']/option/@value"), ["hosts-only"]) diff --git a/instances/urls.py b/instances/urls.py index 1758c090..acc023d1 100755 --- a/instances/urls.py +++ b/instances/urls.py @@ -13,6 +13,7 @@ urlpatterns = [ path("flavor//delete/", views.flavor_delete, name="flavor_delete"), path("/", views.instance, name="instance"), path("bulk_power/", views.bulk_power, name="bulk_power"), + path("bulk_tag/", views.bulk_tag, name="bulk_tag"), path("/poweron/", views.poweron, name="poweron"), path("/powercycle/", views.powercycle, name="powercycle"), path("/poweroff/", views.poweroff, name="poweroff"), diff --git a/instances/views.py b/instances/views.py index 581a042e..84798417 100755 --- a/instances/views.py +++ b/instances/views.py @@ -133,6 +133,8 @@ def index(request): "tags": Tag.counts(instances), "states_url": reverse("instances:states"), "vm_states": vm_states, # the VMs this user may power (_power_instance): theirs, or every one for a superuser + # a superuser's bulk tag box offers every tag, as the Settings tab's picker + "tag_names": list(Tag.objects.order_by("name").values_list("name", flat=True)) if request.user.is_superuser else [], "powerable": {i.pk for i in instances} if request.user.is_superuser else set(UserInstance.objects.filter(user=request.user).values_list("instance_id", flat=True))}, ) @@ -703,6 +705,45 @@ def _power_instance(user, pk): BULK_POWER_MAX = 500 +def _chosen_vms(request): + """The VMs chosen on the VM list (its bulk form's boxes), as ids, each once.""" + return list(dict.fromkeys(int(pk) for pk in request.POST.getlist("vm") if pk.isascii() and pk.isdigit() and len(pk) <= 10)) + + +@require_POST +@superuser_only +def bulk_tag(request): + """Adds a tag to, or removes it from, the VMs chosen on the VM list, as each VM's Settings tab + does: a log row for each VM changed, not while the VM's tags are kept or given back (forget) + nor while a tag is renamed or deleted (the tag checked under the same lock).""" + action, vms = request.POST.get("action"), _chosen_vms(request) + if action not in ("tag_add", "tag_remove") or not vms: + messages.error(request, _("Choose the VMs and write the tag")) + return redirect("instances:index") + remove, changed = action == "tag_remove", 0 + with transaction.atomic(): + lock_ownership() + form = TagsForm({"tags": [request.POST.get("tag", "")]}) + instances = Instance.objects.filter(pk__in=vms).select_related("compute") + if not form.is_valid() or not form.cleaned_data["tags"] or not instances.exists(): + messages.error(request, " ".join(form.errors.get("tags", [])) or _("Choose the VMs and write the tag")) + return redirect("instances:index") + (name,) = form.cleaned_data["tags"] + tag = Tag.objects.filter(name=name).first() if remove else Tag.named([name])[0] + if tag is None: + messages.error(request, _("There is no tag %(tag)s") % {"tag": name}) + return redirect("instances:index") + # those it changes: with the tag to remove it from, without it to add it + for instance in instances.filter(tags=tag) if remove else instances.exclude(tags=tag): + with audit_vm(request, instance, f"{'untag' if remove else 'tag'} {name}"): + (instance.tags.remove if remove else instance.tags.add)(tag) + changed += 1 + text = (ngettext("Tag %(tag)s removed from %(count)s VM", "Tag %(tag)s removed from %(count)s VMs", changed) if remove + else ngettext("Tag %(tag)s added to %(count)s VM", "Tag %(tag)s added to %(count)s VMs", changed)) + messages.success(request, text % {"tag": name, "count": changed}) + return redirect("instances:index") + + @require_POST def bulk_power(request): """Starts, shuts down or forces off the VMs chosen on the VM list: a job each @@ -712,7 +753,7 @@ def bulk_power(request): from instances.jobs import POWER # instances.jobs imports this module action, key = request.POST.get("action", ""), request.POST.get("submission_key", "") - vms = list(dict.fromkeys(int(pk) for pk in request.POST.getlist("vm") if pk.isascii() and pk.isdigit() and len(pk) <= 10)) + vms = _chosen_vms(request) if action not in POWER or not vms or not KEY_RE.fullmatch(key) or len(key) > 50: messages.error(request, _("Choose the VMs you may power, and Start, Shut down or Force off")) return redirect("instances:index") diff --git a/locale/tr/LC_MESSAGES/django.mo b/locale/tr/LC_MESSAGES/django.mo index feee90f1..86eb4967 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 587148b9..55f5e49e 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-20 09:40+0000\n" +"POT-Creation-Date: 2026-11-20 10:00+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" @@ -226,7 +226,7 @@ msgstr "Kullanıcı bölümleri" #: admin/forms.py:221 admin/templates/admin/tag_list.html:25 #: computes/templates/computes/list.html:34 #: computes/templates/computes/list.html:62 computes/templates/overview.html:90 -#: instances/views.py:271 vmbackups/templates/vmbackups/policies.html:17 +#: instances/views.py:273 vmbackups/templates/vmbackups/policies.html:17 msgid "VMs" msgstr "Sanal makineler" @@ -247,10 +247,10 @@ msgstr "Sanal makine ekle" #: accounts/templates/account.html:68 admin/templates/admin/logs.html:40 #: computes/templates/computes/balance.html:109 #: computes/templates/computes/list.html:61 -#: instances/templates/allinstances.html:127 +#: instances/templates/allinstances.html:136 #: instances/templates/allinstances_index_nongrouped.html:9 #: instances/templates/create_steps.html:6 -#: instances/templates/create_steps.html:8 instances/views.py:247 +#: instances/templates/create_steps.html:8 instances/views.py:249 #: operations/templates/operations/jobs.html:24 msgid "Host" msgstr "Sunucu" @@ -798,7 +798,7 @@ msgstr "" #: instances/templates/allinstances_index_nongrouped.html:15 #: instances/templates/create_instance_w2.html:63 #: instances/templates/instances/resize_tab.html:30 -#: instances/templates/instances/settings_tab.html:878 instances/views.py:247 +#: instances/templates/instances/settings_tab.html:878 instances/views.py:249 msgid "vCPUs" msgstr "vCPU" @@ -1014,7 +1014,7 @@ msgid "IP" msgstr "IP" #: admin/templates/admin/logs.html:56 admin/views.py:398 instances/states.py:19 -#: instances/views.py:495 logs/views.py:18 +#: instances/views.py:497 logs/views.py:18 msgid "Unknown" msgstr "Bilinmeyen" @@ -1032,7 +1032,7 @@ msgstr "Başarısız" #: admin/templates/admin/tag_list.html:6 admin/templates/admin/tag_list.html:8 #: admin/templates/admin/tag_list.html:17 computes/forms.py:55 -#: instances/templates/instances/settings_tab.html:958 instances/views.py:248 +#: instances/templates/instances/settings_tab.html:958 instances/views.py:250 #: templates/common/tag_filter.html:6 templates/navbar.html:39 msgid "Tags" msgstr "Etiketler" @@ -1055,6 +1055,7 @@ msgid "Search tags" msgstr "Etiket ara" #: admin/templates/admin/tag_list.html:24 +#: instances/templates/allinstances.html:77 msgid "Tag" msgstr "Etiket" @@ -1123,7 +1124,7 @@ msgstr "Korumalı" msgid "Left" msgstr "Ayrıldığı sunucu" -#: admin/templates/admin/tombstone_list.html:36 instances/views.py:248 +#: admin/templates/admin/tombstone_list.html:36 instances/views.py:250 msgid "Owners" msgstr "Sahipler" @@ -2598,7 +2599,7 @@ msgstr "Sunucu, sanal makineleri taşınmadan bakıma alınsın mı?" msgid "Put in maintenance without migrating" msgstr "Taşımadan bakıma al" -#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:388 +#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:390 msgid "There is no other host to migrate to." msgstr "Taşınacak başka bir sunucu yok." @@ -2978,7 +2979,7 @@ msgid "No host matches the filters." msgstr "Filtrelerle eşleşen sunucu yok." #: computes/templates/computes/list.html:128 -#: instances/templates/allinstances.html:89 +#: instances/templates/allinstances.html:98 msgid "Clear the filters" msgstr "Filtreleri temizle" @@ -3437,7 +3438,7 @@ msgstr "Bağlan" #: instances/templates/add_instance_owner_block.html:11 #: instances/templates/add_instance_volume.html:15 #: instances/templates/allinstances.html:33 -#: instances/templates/allinstances.html:109 +#: instances/templates/allinstances.html:118 #: instances/templates/create_inst_block.html:12 #: instances/templates/create_instance_w2.html:367 #: instances/templates/instances/edit_instance_volume.html:13 @@ -3545,13 +3546,13 @@ msgstr "" "VNC olarak değiştirin." #: instances/api/viewsets.py:160 instances/api/viewsets.py:178 -#: instances/jobs.py:1602 instances/views.py:916 instances/views.py:938 -#: instances/views.py:1928 +#: instances/jobs.py:1602 instances/views.py:957 instances/views.py:979 +#: instances/views.py:1969 msgid "Templates cannot be started." msgstr "Şablon makineler başlatılamaz." #: instances/forms.py:14 instances/templates/create_instance_w2.html:69 -#: instances/templates/instances/settings_tab.html:882 instances/views.py:247 +#: instances/templates/instances/settings_tab.html:882 instances/views.py:249 msgid "Memory (MiB)" msgstr "Bellek (MiB)" @@ -3950,7 +3951,7 @@ msgstr "" msgid "Create VM" msgstr "Sanal makine oluştur" -#: instances/jobs.py:937 instances/jobs.py:984 instances/views.py:2724 +#: instances/jobs.py:937 instances/jobs.py:984 instances/views.py:2765 msgid "A virtual machine with this name already exists" msgstr "Bu isimde bir sanal makine mevcut" @@ -4300,7 +4301,7 @@ msgid "Add instance network form" msgstr "Sanal makine ağı ekleme formu" #: instances/templates/add_instance_network_block.html:16 -#: instances/templates/allinstances.html:126 +#: instances/templates/allinstances.html:135 #: instances/templates/instances/edit_instance_volume.html:21 #: instances/templates/instances/settings_tab.html:225 #: instances/templates/instances/settings_tab.html:396 @@ -4318,7 +4319,7 @@ msgid "NWFilter" msgstr "AğFiltresi" #: instances/templates/add_instance_network_block.html:48 -#: instances/templates/allinstances.html:125 +#: instances/templates/allinstances.html:134 #: instances/templates/instances/settings_tab.html:430 #: interfaces/templates/interface.html:60 #: interfaces/templates/interface.html:121 @@ -4356,7 +4357,7 @@ msgid "Disk source" msgstr "Disk kaynağı" #: instances/templates/add_instance_volume.html:21 -#: instances/templates/create_instance_w2.html:134 instances/views.py:2754 +#: instances/templates/create_instance_w2.html:134 instances/views.py:2795 msgid "New disk" msgstr "Yeni disk" @@ -4475,45 +4476,53 @@ msgstr "" "Seçilen sanal makineler zorla kapatılsın mı? Fişi çekilmiş gibi hemen " "dururlar ve kaydedilmemiş veriler kaybolabilir." -#: instances/templates/allinstances.html:76 +#: instances/templates/allinstances.html:79 +msgid "Add tag" +msgstr "Etiket ekle" + +#: instances/templates/allinstances.html:80 +msgid "Remove tag" +msgstr "Etiketi kaldır" + +#: instances/templates/allinstances.html:85 #, python-format msgid "%%(shown)s of %%(all)s VMs match" msgstr "%%(all)s sanal makineden %%(shown)s eşleşiyor" -#: instances/templates/allinstances.html:79 +#: instances/templates/allinstances.html:88 msgid "There are no VMs here yet." msgstr "Burada henüz sanal makine yok." -#: instances/templates/allinstances.html:88 +#: instances/templates/allinstances.html:97 msgid "No VM matches the filters." msgstr "Filtrelerle eşleşen sanal makine yok." -#: instances/templates/allinstances.html:94 +#: instances/templates/allinstances.html:103 msgid "The search did not go through. Try again." msgstr "Arama tamamlanamadı. Yeniden deneyin." -#: instances/templates/allinstances.html:95 +#: instances/templates/allinstances.html:104 msgid "No running VM reports this address." msgstr "Bu adresi bildiren çalışan sanal makine yok." -#: instances/templates/allinstances.html:96 +#: instances/templates/allinstances.html:105 msgid "No VM has a network card with this MAC address." msgstr "Bu MAC adresine sahip ağ kartı olan sanal makine yok." -#: instances/templates/allinstances.html:97 +#: instances/templates/allinstances.html:106 msgid "(not registered in the panel)" msgstr "(panelde kayıtlı değil)" -#: instances/templates/allinstances.html:97 +#: instances/templates/allinstances.html:106 msgid "possible conflict" msgstr "olası çakışma" -#: instances/templates/allinstances.html:98 +#: instances/templates/allinstances.html:107 #, python-format msgid "Running VMs checked: %%(n)s." msgstr "Denetlenen çalışan sanal makine: %%(n)s." -#: instances/templates/allinstances.html:99 +#: instances/templates/allinstances.html:108 #, python-format msgid "" "%%(n)s had no connected guest agent; a static address on them cannot be seen." @@ -4521,7 +4530,7 @@ msgstr "" "%%(n)s sanal makinede bağlı konuk ajanı yoktu; bunlardaki statik adresler " "görülemez." -#: instances/templates/allinstances.html:100 +#: instances/templates/allinstances.html:109 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %%(n)s." @@ -4529,49 +4538,49 @@ msgstr "" "Okunamayan konuk ajanları (duraklatılmış sanal makine, zamanında yanıt yok ya" " da hata): %%(n)s." -#: instances/templates/allinstances.html:101 +#: instances/templates/allinstances.html:110 #, python-format msgid "Not reached: %%(hosts)s." msgstr "Ulaşılamadı: %%(hosts)s." -#: instances/templates/allinstances.html:102 +#: instances/templates/allinstances.html:111 #, python-format msgid "Not finished in time: %%(hosts)s." msgstr "Zamanında bitmedi: %%(hosts)s." -#: instances/templates/allinstances.html:103 +#: instances/templates/allinstances.html:112 #, python-format msgid "Read at %%(time)s." msgstr "Okunma zamanı: %%(time)s." -#: instances/templates/allinstances.html:104 +#: instances/templates/allinstances.html:113 msgid "Some of your VMs could not be checked." msgstr "Sanal makinelerinizin bazıları denetlenemedi." -#: instances/templates/allinstances.html:108 +#: instances/templates/allinstances.html:117 msgid "Find the VMs using an IP or MAC address" msgstr "Bir IP veya MAC adresini kullanan sanal makineleri bul" -#: instances/templates/allinstances.html:113 +#: instances/templates/allinstances.html:122 msgid "IP address, network or MAC address" msgstr "IP adresi, ağ veya MAC adresi" -#: instances/templates/allinstances.html:115 +#: instances/templates/allinstances.html:124 msgid "or" msgstr "veya" -#: instances/templates/allinstances.html:116 +#: instances/templates/allinstances.html:125 msgid "Find" msgstr "Bul" -#: instances/templates/allinstances.html:123 +#: instances/templates/allinstances.html:132 #: interfaces/templates/interface.html:101 networks/templates/network.html:143 #: networks/templates/network.html:199 networks/templates/network.html:364 #: nodedevs/templates/nodedevs.html:32 msgid "Address" msgstr "Adres" -#: instances/templates/allinstances.html:124 instances/views.py:247 +#: instances/templates/allinstances.html:133 instances/views.py:249 #: interfaces/templates/interface.html:153 networks/templates/network.html:202 #: vmbackups/templates/vmbackups/index.html:18 #: vmbackups/templates/vmbackups/index.html:50 @@ -4784,7 +4793,7 @@ msgstr "Özel CPU modelleri" msgid "Size (GiB)" msgstr "Boyut (GiB)" -#: instances/templates/create_instance_w2.html:161 instances/views.py:2755 +#: instances/templates/create_instance_w2.html:161 instances/views.py:2796 msgid "Existing volumes" msgstr "Mevcut birimler" @@ -4821,7 +4830,7 @@ msgstr "Aygıt" msgid "Remove" msgstr "Kaldır" -#: instances/templates/create_instance_w2.html:194 instances/views.py:2756 +#: instances/templates/create_instance_w2.html:194 instances/views.py:2797 msgid "Clone from template" msgstr "Şablondan klonla" @@ -7128,15 +7137,15 @@ msgstr "Geçersiz MAC adresi" msgid "More MAC addresses than networks" msgstr "Ağlardan daha fazla MAC adresi" -#: instances/views.py:198 +#: instances/views.py:200 msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address." msgstr "Bir IP adresi, 192.0.2.0/24 gibi bir ağ ya da bir MAC adresi girin." -#: instances/views.py:204 instances/views.py:238 +#: instances/views.py:206 instances/views.py:240 msgid "Too many searches are still running; try again shortly." msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin." -#: instances/views.py:247 interfaces/templates/interface.html:46 +#: instances/views.py:249 interfaces/templates/interface.html:46 #: networks/templates/network.html:51 #: operations/templates/operations/jobs.html:38 #: operations/templates/operations/jobs.html:62 @@ -7148,54 +7157,54 @@ msgstr "Çok fazla arama hâlâ çalışıyor; birazdan yeniden deneyin." msgid "State" msgstr "Durum" -#: instances/views.py:247 +#: instances/views.py:249 msgid "OS" msgstr "İşletim sistemi" -#: instances/views.py:247 +#: instances/views.py:249 msgid "OS family" msgstr "İşletim sistemi ailesi" -#: instances/views.py:247 +#: instances/views.py:249 msgid "IP addresses" msgstr "IP adresleri" -#: instances/views.py:248 +#: instances/views.py:250 msgid "Address sources" msgstr "Adres kaynakları" -#: instances/views.py:248 +#: instances/views.py:250 msgid "MAC addresses" msgstr "MAC adresleri" -#: instances/views.py:248 +#: instances/views.py:250 msgid "In the panel" msgstr "Panelde" -#: instances/views.py:260 +#: instances/views.py:262 msgid "yes" msgstr "evet" -#: instances/views.py:260 +#: instances/views.py:262 msgid "no" msgstr "hayır" -#: instances/views.py:262 +#: instances/views.py:264 #, python-format msgid "Created: %(time)s" msgstr "Oluşturulma: %(time)s" -#: instances/views.py:263 +#: instances/views.py:265 #, python-format msgid "VMs listed: %(n)s" msgstr "Listelenen sanal makineler: %(n)s" -#: instances/views.py:264 +#: instances/views.py:266 #, python-format msgid "Running VMs read: %(n)s" msgstr "Okunan çalışan sanal makineler: %(n)s" -#: instances/views.py:265 +#: instances/views.py:267 #, python-format msgid "" "Without a connected guest agent (a static address on them cannot be seen): " @@ -7203,7 +7212,7 @@ msgid "" msgstr "" "Bağlı konuk ajanı olmayanlar (üzerlerindeki statik adres görülemez): %(n)s" -#: instances/views.py:266 +#: instances/views.py:268 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %(n)s" @@ -7211,45 +7220,45 @@ msgstr "" "Okunamayan konuk ajanları (duraklatılmış VM, zamanında yanıt yok ya da hata):" " %(n)s" -#: instances/views.py:268 +#: instances/views.py:270 #, python-format msgid "Hosts not reached: %(hosts)s" msgstr "Ulaşılamayan sunucular: %(hosts)s" -#: instances/views.py:270 +#: instances/views.py:272 #, python-format msgid "Hosts not finished in time: %(hosts)s" msgstr "Zamanında bitmeyen sunucular: %(hosts)s" -#: instances/views.py:271 +#: instances/views.py:273 msgid "Coverage" msgstr "Kapsam" -#: instances/views.py:286 +#: instances/views.py:288 #, python-format msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s" msgstr "'%(name)s' sanal makinesinin sunucusu %(host)s erişilemiyor: %(error)s" -#: instances/views.py:292 +#: instances/views.py:294 #, python-format msgid "The host of '%(name)s' cannot be reached right now." msgstr "'%(name)s' sanal makinesinin sunucusuna şu anda erişilemiyor." -#: instances/views.py:293 +#: instances/views.py:295 msgid " Jobs on it can be followed under Jobs in the menu." msgstr " Üzerindeki işler menüdeki İşler bölümünden izlenebilir." -#: instances/views.py:301 +#: instances/views.py:303 #, python-format msgid "'%(name)s' is no longer on its host." msgstr "'%(name)s' artık sunucusunda yok." -#: instances/views.py:390 +#: instances/views.py:392 msgid "A VM migrates when it is running, paused or shut off." msgstr "" "Sanal makine çalışırken, duraklatılmışken ya da kapalıyken taşınabilir." -#: instances/views.py:392 +#: instances/views.py:394 msgid "" "A VM with snapshots cannot be migrated: its snapshots stay on this host. " "Delete them first." @@ -7257,7 +7266,7 @@ msgstr "" "Anlık görüntüsü olan bir sanal makine taşınamaz: anlık görüntüleri bu " "sunucuda kalır. Önce onları silin." -#: instances/views.py:394 +#: instances/views.py:396 msgid "" "A VM with host devices cannot be migrated: the destination may not have them." " Remove them first." @@ -7265,32 +7274,55 @@ msgstr "" "Sunucu aygıtları olan bir sanal makine taşınamaz: hedefte bu aygıtlar " "olmayabilir. Önce onları kaldırın." -#: instances/views.py:644 +#: instances/views.py:646 #, python-format msgid "Disk %(dev)s has changed since the page was loaded; reload the page" msgstr "%(dev)s diski sayfa yüklendikten sonra değişti; sayfayı yenileyin" -#: instances/views.py:717 +#: instances/views.py:721 instances/views.py:729 +msgid "Choose the VMs and write the tag" +msgstr "Sanal makineleri seçin ve etiketi yazın" + +#: instances/views.py:734 +#, python-format +msgid "There is no tag %(tag)s" +msgstr "%(tag)s etiketi yok" + +#: instances/views.py:741 +#, python-format +msgid "Tag %(tag)s removed from %(count)s VM" +msgid_plural "Tag %(tag)s removed from %(count)s VMs" +msgstr[0] "%(tag)s etiketi %(count)s sanal makineden kaldırıldı" +msgstr[1] "%(tag)s etiketi %(count)s sanal makineden kaldırıldı" + +#: instances/views.py:742 +#, python-format +msgid "Tag %(tag)s added to %(count)s VM" +msgid_plural "Tag %(tag)s added to %(count)s VMs" +msgstr[0] "%(tag)s etiketi %(count)s sanal makineye eklendi" +msgstr[1] "%(tag)s etiketi %(count)s sanal makineye eklendi" + +#: instances/views.py:758 msgid "Choose the VMs you may power, and Start, Shut down or Force off" msgstr "" "Güç işlemi yapabileceğiniz sanal makineleri seçin; ardından Başlat, Kapat ya " "da Zorla kapat" -#: instances/views.py:720 +#: instances/views.py:761 #, python-format msgid "Choose at most %(count)s VMs at once" msgstr "En fazla %(count)s sanal makine seçin" -#: instances/views.py:727 +#: instances/views.py:768 msgid "a chosen VM" msgstr "seçilen bir sanal makine" -#: instances/views.py:735 +#: instances/views.py:776 #, python-format msgid "%(vm)s: you may not power it now" msgstr "%(vm)s: şu anda güç işlemi yapamazsınız" -#: instances/views.py:740 +#: instances/views.py:781 #, python-format msgid "%(count)s VM is queued; the Jobs page follows it." msgid_plural "%(count)s VMs are queued; the Jobs page follows them." @@ -7298,11 +7330,11 @@ msgstr[0] "%(count)s sanal makine kuyruğa alındı; İşler sayfası onu izliyo msgstr[1] "" "%(count)s sanal makine kuyruğa alındı; İşler sayfası onları izliyor." -#: instances/views.py:762 instances/views.py:763 +#: instances/views.py:803 instances/views.py:804 msgid "The VM was moved meanwhile; try again." msgstr "Sanal makine bu arada taşındı; yeniden deneyin." -#: instances/views.py:879 +#: instances/views.py:920 msgid "" "The running VM has no free PCI slot for another disk on this bus: choose the " "scsi bus if the VM has a SCSI controller, or shut the VM down and add the " @@ -7315,7 +7347,7 @@ msgstr "" "yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni bir " "birim havuzunda kalır, mevcut birim olarak eklenebilir." -#: instances/views.py:883 +#: instances/views.py:924 msgid "" "The running VM has no free PCI slot for the SCSI controller the disk needs: " "shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives" @@ -7327,195 +7359,195 @@ msgstr "" "PCIe yuvaları ekle, sonraki başlatmadan itibaren ona boş yuvalar verir. Yeni " "bir birim havuzunda kalır, mevcut birim olarak eklenebilir." -#: instances/views.py:901 +#: instances/views.py:942 #, python-format msgid "Invalid disk options: %(options)s" msgstr "Geçersiz disk seçenekleri: %(options)s" -#: instances/views.py:913 instances/views.py:1008 +#: instances/views.py:954 instances/views.py:1049 #, python-format msgid "Invalid options: %(options)s" msgstr "Geçersiz seçenekler: %(options)s" -#: instances/views.py:948 +#: instances/views.py:989 msgid "The VM was forced off but did not start again: it stays off." msgstr "Sanal makine zorla kapatıldı ancak yeniden başlamadı: kapalı kalıyor." -#: instances/views.py:1136 +#: instances/views.py:1177 #, python-format msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)" msgstr "" "Önce %(compute)s sunucusunun gstfsd anahtarını ayarlayın (Sunucular, sunucuyu" " düzenle)" -#: instances/views.py:1143 instances/views.py:1161 instances/views.py:1170 +#: instances/views.py:1184 instances/views.py:1202 instances/views.py:1211 #, python-format msgid "gstfsd error: %(err)s" msgstr "gstfsd hatası: %(err)s" -#: instances/views.py:1171 +#: instances/views.py:1212 msgid "the reply is not signed with the key" msgstr "yanıt anahtarla imzalanmamış" -#: instances/views.py:1179 +#: instances/views.py:1220 msgid "Shut the VM down, or start its QEMU guest agent, and try again" msgstr "" "Sanal makineyi kapatın ya da QEMU konuk ajanını başlatın ve yeniden deneyin" -#: instances/views.py:1187 +#: instances/views.py:1228 msgid "The change may still be made when the agent answers again." msgstr "Ajan yeniden yanıt verdiğinde değişiklik yine de yapılabilir." -#: instances/views.py:1202 +#: instances/views.py:1243 msgid "Enter a password" msgstr "Bir parola girin" -#: instances/views.py:1207 +#: instances/views.py:1248 msgid "Enter a password of at most 4096 characters, without NUL characters" msgstr "En fazla 4096 karakterlik, NUL karakteri içermeyen bir parola girin" -#: instances/views.py:1223 +#: instances/views.py:1264 msgid "Reset root password" msgstr "Root parolasını sıfırla" -#: instances/views.py:1239 +#: instances/views.py:1280 msgid "Select an SSH public key" msgstr "Bir SSH açık anahtarı seçin" -#: instances/views.py:1261 +#: instances/views.py:1302 #, python-format msgid "Installed new SSH public key %(keyname)s" msgstr "Yeni %(keyname)s SSH açık anahtarı yüklendi" -#: instances/views.py:1281 +#: instances/views.py:1322 msgid "Enter a whole number of vCPUs" msgstr "vCPU sayısı için bir tam sayı girin" -#: instances/views.py:1285 +#: instances/views.py:1326 msgid "Shut off the VM to change its vCPUs" msgstr "vCPU'larını değiştirmek için sanal makineyi kapatın" -#: instances/views.py:1288 +#: instances/views.py:1329 msgid "The current vCPUs cannot be more than the maximum" msgstr "Geçerli vCPU sayısı en fazla değerden büyük olamaz" -#: instances/views.py:1295 +#: instances/views.py:1336 #, python-format msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' CPU'su yeniden boyutlandırılamıyor." -#: instances/views.py:1303 +#: instances/views.py:1344 #, python-format msgid "vCPUs set to %(cur)s (maximum %(max)s)" msgstr "vCPU sayısı %(cur)s olarak ayarlandı (en fazla %(max)s)" -#: instances/views.py:1322 +#: instances/views.py:1363 msgid "Enter a whole number for memory" msgstr "Bellek için bir tam sayı girin" -#: instances/views.py:1325 +#: instances/views.py:1366 msgid "The current memory cannot be more than the maximum" msgstr "Geçerli bellek en fazla değerden büyük olamaz" -#: instances/views.py:1329 +#: instances/views.py:1370 #, python-format msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' belleği yeniden boyutlandırılamıyor." -#: instances/views.py:1335 +#: instances/views.py:1376 #, python-format msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)" msgstr "Bellek %(cur)s MiB olarak ayarlandı (en fazla %(max)s MiB)" -#: instances/views.py:1355 +#: instances/views.py:1396 msgid "Enter disk sizes as whole GiB" msgstr "Disk boyutlarını tam GiB olarak girin" -#: instances/views.py:1359 +#: instances/views.py:1400 #, python-format msgid "Disk %(dev)s was changed meanwhile; reload the page" msgstr "%(dev)s diski bu arada değişti; sayfayı yeniden yükleyin" -#: instances/views.py:1363 +#: instances/views.py:1404 #, python-format msgid "%(dev)s is %(size)s: a disk cannot shrink" msgstr "%(dev)s boyutu %(size)s: disk küçültülemez" -#: instances/views.py:1371 +#: instances/views.py:1412 msgid "No disks were selected or valid for resizing." msgstr "Boyutlandırma için seçilmiş ya da geçerli disk yok." -#: instances/views.py:1380 +#: instances/views.py:1421 #, python-format msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'." msgstr "%(quota)s: '%(instance_name)s' diskleri yeniden boyutlandırılamıyor." -#: instances/views.py:1392 +#: instances/views.py:1433 #, python-format msgid "The storage pool of %(dev)s cannot resize its volumes" msgstr "%(dev)s diskinin depolama havuzu birimlerini boyutlandıramaz" -#: instances/views.py:1394 +#: instances/views.py:1435 #, python-format msgid "Disk is resized: %(dev)s" msgstr "Disk boyutu değiştirildi: %(dev)s" -#: instances/views.py:1488 +#: instances/views.py:1529 msgid "The VM's machine has no PCIe slots to add" msgstr "Sanal makinenin makine tipinde eklenecek PCIe yuvası yok" -#: instances/views.py:1493 +#: instances/views.py:1534 #, python-format msgid "%(count)s PCIe slots added" msgstr "%(count)s PCIe yuvası eklendi" -#: instances/views.py:1495 +#: instances/views.py:1536 #, python-format msgid "%(count)s PCIe slots added: the VM gets them at its next start" msgstr "" "%(count)s PCIe yuvası eklendi: sanal makine bunları sonraki başlatmasında " "alır" -#: instances/views.py:1546 +#: instances/views.py:1587 #, python-format msgid "%(volume)s is already a disk of this VM" msgstr "%(volume)s zaten bu sanal makinenin bir diski" -#: instances/views.py:1636 +#: instances/views.py:1677 msgid "Volume changes are applied. But it will be activated after shutdown" msgstr "" "Birim değişiklikleri uygulandı. Ama yeniden başlatıldıktan sonra uygulanacak" -#: instances/views.py:1641 +#: instances/views.py:1682 msgid "Volume is changed successfully." msgstr "Birim başarıyla değiştirildi." -#: instances/views.py:1661 +#: instances/views.py:1702 #, python-format msgid "Disk %(dev)s is not a storage volume of this instance" msgstr "%(dev)s diski bu sanal makinenin bir depolama birimi değil" -#: instances/views.py:1666 vrtManager/instance.py:2594 +#: instances/views.py:1707 vrtManager/instance.py:2594 msgid "The VM has a saved state; start it or remove the saved state first" msgstr "" "Sanal makinenin kaydedilmiş durumu var; önce başlatın veya kaydedilmiş durumu" " kaldırın" -#: instances/views.py:1672 +#: instances/views.py:1713 #, python-format msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down" msgstr "" "%(dev)s diskinin bekleyen bir değişikliği var; sanal makine kapatıldığında " "silin" -#: instances/views.py:1687 +#: instances/views.py:1728 #, python-format msgid "Volume %(vol)s is used by another VM; detach it instead" msgstr "" "%(vol)s birimi başka bir sanal makine tarafından kullanılıyor; onun yerine " "ayırın" -#: instances/views.py:1705 +#: instances/views.py:1746 #, python-format msgid "" "The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete " @@ -7524,66 +7556,66 @@ msgstr "" "Konuk sistem %(dev)s diskini henüz bırakmadı; %(vol)s birimi korundu. Sanal " "makine kapatıldığında depolama havuzundan silin." -#: instances/views.py:1716 +#: instances/views.py:1757 #, python-format msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s" msgstr "%(dev)s diski ayrıldı, ancak birimi korundu: %(err)s" -#: instances/views.py:1744 +#: instances/views.py:1785 #, python-format msgid "This VM cannot take a CD-ROM on the %(bus)s bus now" msgstr "Bu sanal makineye şu anda %(bus)s veri yolunda CD-ROM eklenemez" -#: instances/views.py:1747 +#: instances/views.py:1788 msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive" msgstr "USB CD-ROM bir ISO imajı ister: libvirt boş USB sürücü desteklemiyor" -#: instances/views.py:1752 +#: instances/views.py:1793 #, python-format msgid "%(image)s is already in a CD-ROM of this VM" msgstr "%(image)s bu sanal makinenin bir CD-ROM'unda zaten takılı" -#: instances/views.py:1833 +#: instances/views.py:1874 #, python-format msgid "Pool %(pool)s was not read again: %(err)s" msgstr "%(pool)s havuzu yeniden okunamadı: %(err)s" -#: instances/views.py:1854 +#: instances/views.py:1895 #, python-format msgid "Snapshot was not deleted: %(err)s" msgstr "Anlık görüntü silinmedi: %(err)s" -#: instances/views.py:1973 +#: instances/views.py:2014 msgid "Add at least one device to the boot order." msgstr "Ön yükleme sırasına en az bir aygıt ekleyin." -#: instances/views.py:1979 vrtManager/instance.py:1364 +#: instances/views.py:2020 vrtManager/instance.py:1364 msgid "Invalid Device Type for boot order" msgstr "Ön yükleme sırası için geçersiz aygıt türü" -#: instances/views.py:1990 +#: instances/views.py:2031 msgid "Boot order changed. It applies at the next start." msgstr "Ön yükleme sırası değiştirildi. Sonraki başlatmada uygulanır." -#: instances/views.py:1992 +#: instances/views.py:2033 msgid "Boot order changed successfully." msgstr "Ön yükleme sırası başarıyla değiştirildi." -#: instances/views.py:2012 +#: instances/views.py:2053 msgid "The XML is empty" msgstr "XML boş" -#: instances/views.py:2016 instances/views.py:2736 +#: instances/views.py:2057 instances/views.py:2777 #, python-format msgid "The XML is not well-formed: %(error)s" msgstr "XML düzgün biçimlendirilmemiş: %(error)s" -#: instances/views.py:2018 +#: instances/views.py:2059 #, python-format msgid "The XML must keep the VM's UUID %(uuid)s." msgstr "XML, sanal makinenin %(uuid)s UUID'sini korumalıdır." -#: instances/views.py:2022 +#: instances/views.py:2063 msgid "" "The definition has changed since the editor was opened. Reload the page to " "edit the current one." @@ -7591,45 +7623,45 @@ msgstr "" "Düzenleyici açıldığından beri tanım değişti. Geçerli tanımı düzenlemek için " "sayfayı yeniden yükleyin." -#: instances/views.py:2038 +#: instances/views.py:2079 msgid "The XML definition was saved." msgstr "XML tanımı kaydedildi." -#: instances/views.py:2040 +#: instances/views.py:2081 msgid "The XML definition was saved; the VM uses it from its next start." msgstr "" "XML tanımı kaydedildi; sanal makine onu sonraki başlatmasından itibaren " "kullanır." -#: instances/views.py:2121 +#: instances/views.py:2162 msgid "Select one network interface to change" msgstr "Değiştirilecek bir ağ arabirimi seçin" -#: instances/views.py:2135 +#: instances/views.py:2176 #, python-format msgid "Network interface %(mac)s was changed meanwhile; reload the page" msgstr "%(mac)s ağ arayüzü bu arada değişti; sayfayı yeniden yükleyin" -#: instances/views.py:2165 +#: instances/views.py:2206 msgid "Network Device Config is changed. Please shutdown instance to activate." msgstr "" "Ağ aygıtı yapılandırması değiştirildi. Aktifleştirmek için lütfen sanal " "makineyi kapatın." -#: instances/views.py:2167 +#: instances/views.py:2208 msgid "Network device changed" msgstr "Ağ aygıtı değiştirildi" -#: instances/views.py:2179 +#: instances/views.py:2220 msgid "No network selected" msgstr "Ağ seçilmedi" -#: instances/views.py:2184 +#: instances/views.py:2225 #, python-format msgid "The VM already has a network device with MAC %(mac)s" msgstr "Sanal makinede %(mac)s MAC adresli bir ağ aygıtı zaten var" -#: instances/views.py:2203 +#: instances/views.py:2244 msgid "" "The running VM has no free PCI slot for another network device: shut it down " "and add the device then; Add PCIe slots on the Disks tab gives it free ones " @@ -7639,21 +7671,21 @@ msgstr "" "aygıtı sonra ekleyin; Diskler sekmesindeki PCIe yuvaları ekle, sonraki " "başlatmadan itibaren ona boş yuvalar verir." -#: instances/views.py:2249 instances/views.py:2255 +#: instances/views.py:2290 instances/views.py:2296 msgid "The VM has it" msgstr "Sanal makinede var" -#: instances/views.py:2290 +#: instances/views.py:2331 #, python-format msgid "The host has no USB device %(device)s; reload the page" msgstr "Sunucuda %(device)s USB aygıtı yok; sayfayı yeniden yükleyin" -#: instances/views.py:2311 +#: instances/views.py:2352 #, python-format msgid "The host has no PCI device %(device)s" msgstr "Sunucuda %(device)s PCI aygıtı yok" -#: instances/views.py:2329 +#: instances/views.py:2370 #, python-format msgid "" "Removal of PCI device %(address)s requested: the guest has not let it go yet;" @@ -7663,20 +7695,20 @@ msgstr "" "bırakmadı; bırakana ya da sanal makine durana kadar çalışan sanal makinede " "kalır." -#: instances/views.py:2374 instances/views.py:2404 +#: instances/views.py:2415 instances/views.py:2445 msgid "Select a network interface and a QoS direction" msgstr "Bir ağ arabirimi ve bir QoS yönü seçin" -#: instances/views.py:2377 vrtManager/network.py:470 +#: instances/views.py:2418 vrtManager/network.py:470 msgid "QoS rates must be whole numbers" msgstr "QoS hızları tam sayı olmalıdır" -#: instances/views.py:2384 networks/views.py:235 +#: instances/views.py:2425 networks/views.py:235 #, python-format msgid "%(qos_dir)s QoS is set" msgstr "%(qos_dir)s QoS ayarlandı" -#: instances/views.py:2389 +#: instances/views.py:2430 #, python-format msgid "" "%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on." @@ -7684,12 +7716,12 @@ msgstr "" "%(qos_dir)s QoS ayarlandı. Çalışan bir sanal makine, kapatılıp açıldıktan " "sonra bunu alır." -#: instances/views.py:2411 networks/views.py:261 +#: instances/views.py:2452 networks/views.py:261 #, python-format msgid "%(qos_dir)s QoS is deleted" msgstr "%(qos_dir)s QoS silindi" -#: instances/views.py:2416 +#: instances/views.py:2457 #, python-format msgid "" "%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is " @@ -7698,21 +7730,21 @@ msgstr "" "%(qos_dir)s QoS silindi. Çalışan bir sanal makine, kapatılıp açılana kadar " "eski sınırı korur." -#: instances/views.py:2444 +#: instances/views.py:2485 msgid "Only one owner is allowed and the one already added" msgstr "Sadece bir sahibe izin verilmiştir ve bir sahip zaten eklenmiş" -#: instances/views.py:2446 +#: instances/views.py:2487 #, python-format msgid "%(user)s is already an owner" msgstr "%(user)s zaten bir sahip" -#: instances/views.py:2511 +#: instances/views.py:2552 #, python-format msgid "Console settings were not saved: %(errors)s" msgstr "Konsol ayarları kaydedilmedi: %(errors)s" -#: instances/views.py:2533 +#: instances/views.py:2574 msgid "" "Error setting console password. You should check that your instance have an " "graphic device." @@ -7720,41 +7752,41 @@ msgstr "" "Konsol parolası ayarlanırken hata oluştu. Sanal makinenin bir grafik aygıtına" " sahip olduğundan emin olunuz." -#: instances/views.py:2580 +#: instances/views.py:2621 msgid "Shut the VM down to change whether it is a template." msgstr "Şablon olup olmadığını değiştirmek için sanal makineyi kapatın." -#: instances/views.py:2586 +#: instances/views.py:2627 #, python-format msgid "%(quota)s: '%(instance_name)s' stays a template." msgstr "%(quota)s: '%(instance_name)s' şablon olarak kalıyor." -#: instances/views.py:2608 +#: instances/views.py:2649 msgid "An I/O limit is whole numbers of IOPS and MiB/s, 0 for none" msgstr "G/Ç sınırı, IOPS ve MiB/s için tam sayılardır; 0: sınır yok" -#: instances/views.py:2722 +#: instances/views.py:2763 msgid "The XML has no name" msgstr "XML'de ad yok" -#: instances/views.py:2740 webvirtcloud/middleware.py:157 +#: instances/views.py:2781 webvirtcloud/middleware.py:157 #, python-format msgid "libvirt Error - %(exception)s" msgstr "libvirt Hatası - %(exception)s" -#: instances/views.py:2754 +#: instances/views.py:2795 msgid "An empty disk of the size you set" msgstr "Belirlediğiniz boyutta boş bir disk" -#: instances/views.py:2755 +#: instances/views.py:2796 msgid "Volumes already in a pool" msgstr "Bir havuzda zaten bulunan birimler" -#: instances/views.py:2756 +#: instances/views.py:2797 msgid "A copy of a template volume" msgstr "Bir şablon biriminin kopyası" -#: instances/views.py:2846 +#: instances/views.py:2887 msgid "" "This host has no running storage pool for the VM's disks: add or start one on" " its Storage page." @@ -7762,29 +7794,29 @@ msgstr "" "Bu sunucuda sanal makinenin diskleri için çalışan bir depolama havuzu yok: " "Depolama sayfasından bir tane ekleyin ya da başlatın." -#: instances/views.py:2848 +#: instances/views.py:2889 msgid "This host has no network for the VM: add one on its Networks page." msgstr "" "Bu sunucuda sanal makine için ağ yok: Ağlar sayfasından bir tane ekleyin." -#: instances/views.py:2880 +#: instances/views.py:2921 #, python-format msgid "The machine type is q35, not %(machine)s: UEFI Secure Boot needs it" msgstr "Makine türü %(machine)s değil q35: UEFI Secure Boot bunu gerektiriyor" -#: instances/views.py:2909 +#: instances/views.py:2950 msgid "Flavor Created" msgstr "Flavor Oluşturuldu" -#: instances/views.py:2917 +#: instances/views.py:2958 msgid "Create Flavor" msgstr "Kullanıcı Oluştur" -#: instances/views.py:2929 +#: instances/views.py:2970 msgid "Flavor Deleted" msgstr "Flavor Silindi" -#: instances/views.py:2935 +#: instances/views.py:2976 msgid "Only the size template goes; VMs made from it keep their size." msgstr "" "Yalnızca boyut şablonu silinir; ondan oluşturulan sanal makineler boyutlarını" diff --git a/locale/zh/LC_MESSAGES/django.mo b/locale/zh/LC_MESSAGES/django.mo index 65049a71..018e0518 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 beee78ff..fad83dca 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-20 09:40+0000\n" +"POT-Creation-Date: 2026-11-20 10:00+0000\n" "PO-Revision-Date: \n" "Last-Translator: \n" "Language-Team: \n" @@ -221,7 +221,7 @@ msgstr "用户页面导航" #: admin/forms.py:221 admin/templates/admin/tag_list.html:25 #: computes/templates/computes/list.html:34 #: computes/templates/computes/list.html:62 computes/templates/overview.html:90 -#: instances/views.py:271 vmbackups/templates/vmbackups/policies.html:17 +#: instances/views.py:273 vmbackups/templates/vmbackups/policies.html:17 msgid "VMs" msgstr "虚拟机" @@ -242,10 +242,10 @@ msgstr "添加虚拟机" #: accounts/templates/account.html:68 admin/templates/admin/logs.html:40 #: computes/templates/computes/balance.html:109 #: computes/templates/computes/list.html:61 -#: instances/templates/allinstances.html:127 +#: instances/templates/allinstances.html:136 #: instances/templates/allinstances_index_nongrouped.html:9 #: instances/templates/create_steps.html:6 -#: instances/templates/create_steps.html:8 instances/views.py:247 +#: instances/templates/create_steps.html:8 instances/views.py:249 #: operations/templates/operations/jobs.html:24 msgid "Host" msgstr "主机" @@ -772,7 +772,7 @@ msgstr "NEW_USER_DEFAULT_INSTANCES:%(name)s 已有所有者,且只允许一 #: instances/templates/allinstances_index_nongrouped.html:15 #: instances/templates/create_instance_w2.html:63 #: instances/templates/instances/resize_tab.html:30 -#: instances/templates/instances/settings_tab.html:878 instances/views.py:247 +#: instances/templates/instances/settings_tab.html:878 instances/views.py:249 msgid "vCPUs" msgstr "vCPU" @@ -986,7 +986,7 @@ msgid "IP" msgstr "IP" #: admin/templates/admin/logs.html:56 admin/views.py:398 instances/states.py:19 -#: instances/views.py:495 logs/views.py:18 +#: instances/views.py:497 logs/views.py:18 msgid "Unknown" msgstr "未知" @@ -1004,7 +1004,7 @@ msgstr "失败" #: admin/templates/admin/tag_list.html:6 admin/templates/admin/tag_list.html:8 #: admin/templates/admin/tag_list.html:17 computes/forms.py:55 -#: instances/templates/instances/settings_tab.html:958 instances/views.py:248 +#: instances/templates/instances/settings_tab.html:958 instances/views.py:250 #: templates/common/tag_filter.html:6 templates/navbar.html:39 msgid "Tags" msgstr "标签" @@ -1024,6 +1024,7 @@ msgid "Search tags" msgstr "搜索标签" #: admin/templates/admin/tag_list.html:24 +#: instances/templates/allinstances.html:77 msgid "Tag" msgstr "标签" @@ -1089,7 +1090,7 @@ msgstr "受保护" msgid "Left" msgstr "已离开" -#: admin/templates/admin/tombstone_list.html:36 instances/views.py:248 +#: admin/templates/admin/tombstone_list.html:36 instances/views.py:250 msgid "Owners" msgstr "所有者" @@ -2472,7 +2473,7 @@ msgstr "不迁移其虚拟机,直接将主机置于维护状态?" msgid "Put in maintenance without migrating" msgstr "不迁移,直接进入维护" -#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:388 +#: computes/templates/computes/bulk_migrate.html:26 instances/views.py:390 msgid "There is no other host to migrate to." msgstr "没有其他可迁移到的主机。" @@ -2836,7 +2837,7 @@ msgid "No host matches the filters." msgstr "没有主机匹配这些筛选条件。" #: computes/templates/computes/list.html:128 -#: instances/templates/allinstances.html:89 +#: instances/templates/allinstances.html:98 msgid "Clear the filters" msgstr "清除筛选" @@ -3267,7 +3268,7 @@ msgstr "连接" #: instances/templates/add_instance_owner_block.html:11 #: instances/templates/add_instance_volume.html:15 #: instances/templates/allinstances.html:33 -#: instances/templates/allinstances.html:109 +#: instances/templates/allinstances.html:118 #: instances/templates/create_inst_block.html:12 #: instances/templates/create_instance_w2.html:367 #: instances/templates/instances/edit_instance_volume.html:13 @@ -3362,13 +3363,13 @@ msgid "" msgstr "不支持控制台类型 '%(type)s'。请将虚拟机图形切换为 VNC。" #: instances/api/viewsets.py:160 instances/api/viewsets.py:178 -#: instances/jobs.py:1602 instances/views.py:916 instances/views.py:938 -#: instances/views.py:1928 +#: instances/jobs.py:1602 instances/views.py:957 instances/views.py:979 +#: instances/views.py:1969 msgid "Templates cannot be started." msgstr "模板无法启动。" #: instances/forms.py:14 instances/templates/create_instance_w2.html:69 -#: instances/templates/instances/settings_tab.html:882 instances/views.py:247 +#: instances/templates/instances/settings_tab.html:882 instances/views.py:249 msgid "Memory (MiB)" msgstr "内存(MiB)" @@ -3727,7 +3728,7 @@ msgstr "磁盘缓存 %(cache)s 与设置中的原生 (native) 磁盘 I/O 不兼 msgid "Create VM" msgstr "创建虚拟机" -#: instances/jobs.py:937 instances/jobs.py:984 instances/views.py:2724 +#: instances/jobs.py:937 instances/jobs.py:984 instances/views.py:2765 msgid "A virtual machine with this name already exists" msgstr "同名虚拟机已存在" @@ -4064,7 +4065,7 @@ msgid "Add instance network form" msgstr "添加虚拟机网络表单" #: instances/templates/add_instance_network_block.html:16 -#: instances/templates/allinstances.html:126 +#: instances/templates/allinstances.html:135 #: instances/templates/instances/edit_instance_volume.html:21 #: instances/templates/instances/settings_tab.html:225 #: instances/templates/instances/settings_tab.html:396 @@ -4082,7 +4083,7 @@ msgid "NWFilter" msgstr "网络过滤器" #: instances/templates/add_instance_network_block.html:48 -#: instances/templates/allinstances.html:125 +#: instances/templates/allinstances.html:134 #: instances/templates/instances/settings_tab.html:430 #: interfaces/templates/interface.html:60 #: interfaces/templates/interface.html:121 @@ -4119,7 +4120,7 @@ msgid "Disk source" msgstr "磁盘来源" #: instances/templates/add_instance_volume.html:21 -#: instances/templates/create_instance_w2.html:134 instances/views.py:2754 +#: instances/templates/create_instance_w2.html:134 instances/views.py:2795 msgid "New disk" msgstr "新磁盘" @@ -4233,99 +4234,107 @@ msgid "" "unsaved data." msgstr "强制关闭所选虚拟机?它们会像断电一样立即停止,可能丢失未保存的数据。" -#: instances/templates/allinstances.html:76 +#: instances/templates/allinstances.html:79 +msgid "Add tag" +msgstr "添加标签" + +#: instances/templates/allinstances.html:80 +msgid "Remove tag" +msgstr "移除标签" + +#: instances/templates/allinstances.html:85 #, python-format msgid "%%(shown)s of %%(all)s VMs match" msgstr "%%(shown)s / %%(all)s 台虚拟机匹配" -#: instances/templates/allinstances.html:79 +#: instances/templates/allinstances.html:88 msgid "There are no VMs here yet." msgstr "这里还没有虚拟机。" -#: instances/templates/allinstances.html:88 +#: instances/templates/allinstances.html:97 msgid "No VM matches the filters." msgstr "没有虚拟机匹配这些筛选条件。" -#: instances/templates/allinstances.html:94 +#: instances/templates/allinstances.html:103 msgid "The search did not go through. Try again." msgstr "搜索未完成。请重试。" -#: instances/templates/allinstances.html:95 +#: instances/templates/allinstances.html:104 msgid "No running VM reports this address." msgstr "没有运行中的虚拟机报告此地址。" -#: instances/templates/allinstances.html:96 +#: instances/templates/allinstances.html:105 msgid "No VM has a network card with this MAC address." msgstr "没有虚拟机的网卡使用此 MAC 地址。" -#: instances/templates/allinstances.html:97 +#: instances/templates/allinstances.html:106 msgid "(not registered in the panel)" msgstr "(未在面板中注册)" -#: instances/templates/allinstances.html:97 +#: instances/templates/allinstances.html:106 msgid "possible conflict" msgstr "可能冲突" -#: instances/templates/allinstances.html:98 +#: instances/templates/allinstances.html:107 #, python-format msgid "Running VMs checked: %%(n)s." msgstr "已检查的运行中虚拟机:%%(n)s。" -#: instances/templates/allinstances.html:99 +#: instances/templates/allinstances.html:108 #, python-format msgid "" "%%(n)s had no connected guest agent; a static address on them cannot be seen." msgstr "%%(n)s 台没有已连接的客户机代理;无法看到其上的静态地址。" -#: instances/templates/allinstances.html:100 +#: instances/templates/allinstances.html:109 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %%(n)s." msgstr "未读取的客户机代理(虚拟机已暂停、未及时响应或出错):%%(n)s。" -#: instances/templates/allinstances.html:101 +#: instances/templates/allinstances.html:110 #, python-format msgid "Not reached: %%(hosts)s." msgstr "未连接:%%(hosts)s。" -#: instances/templates/allinstances.html:102 +#: instances/templates/allinstances.html:111 #, python-format msgid "Not finished in time: %%(hosts)s." msgstr "未及时完成:%%(hosts)s。" -#: instances/templates/allinstances.html:103 +#: instances/templates/allinstances.html:112 #, python-format msgid "Read at %%(time)s." msgstr "读取于 %%(time)s。" -#: instances/templates/allinstances.html:104 +#: instances/templates/allinstances.html:113 msgid "Some of your VMs could not be checked." msgstr "您的部分虚拟机无法检查。" -#: instances/templates/allinstances.html:108 +#: instances/templates/allinstances.html:117 msgid "Find the VMs using an IP or MAC address" msgstr "通过 IP 或 MAC 地址查找虚拟机" -#: instances/templates/allinstances.html:113 +#: instances/templates/allinstances.html:122 msgid "IP address, network or MAC address" msgstr "IP 地址、网络或 MAC 地址" -#: instances/templates/allinstances.html:115 +#: instances/templates/allinstances.html:124 msgid "or" msgstr "或" -#: instances/templates/allinstances.html:116 +#: instances/templates/allinstances.html:125 msgid "Find" msgstr "查找" -#: instances/templates/allinstances.html:123 +#: instances/templates/allinstances.html:132 #: interfaces/templates/interface.html:101 networks/templates/network.html:143 #: networks/templates/network.html:199 networks/templates/network.html:364 #: nodedevs/templates/nodedevs.html:32 msgid "Address" msgstr "地址" -#: instances/templates/allinstances.html:124 instances/views.py:247 +#: instances/templates/allinstances.html:133 instances/views.py:249 #: interfaces/templates/interface.html:153 networks/templates/network.html:202 #: vmbackups/templates/vmbackups/index.html:18 #: vmbackups/templates/vmbackups/index.html:50 @@ -4531,7 +4540,7 @@ msgstr "自定义 CPU 型号" msgid "Size (GiB)" msgstr "大小(GiB)" -#: instances/templates/create_instance_w2.html:161 instances/views.py:2755 +#: instances/templates/create_instance_w2.html:161 instances/views.py:2796 msgid "Existing volumes" msgstr "已有卷" @@ -4568,7 +4577,7 @@ msgstr "设备" msgid "Remove" msgstr "移除" -#: instances/templates/create_instance_w2.html:194 instances/views.py:2756 +#: instances/templates/create_instance_w2.html:194 instances/views.py:2797 msgid "Clone from template" msgstr "从模板克隆" @@ -6700,15 +6709,15 @@ msgstr "无效的 MAC 地址" msgid "More MAC addresses than networks" msgstr "MAC 地址数量多于网络数量" -#: instances/views.py:198 +#: instances/views.py:200 msgid "Enter an IP address, a network such as 192.0.2.0/24, or a MAC address." msgstr "请输入 IP 地址、网络(如 192.0.2.0/24)或 MAC 地址。" -#: instances/views.py:204 instances/views.py:238 +#: instances/views.py:206 instances/views.py:240 msgid "Too many searches are still running; try again shortly." msgstr "仍在运行的搜索过多;请稍后再试。" -#: instances/views.py:247 interfaces/templates/interface.html:46 +#: instances/views.py:249 interfaces/templates/interface.html:46 #: networks/templates/network.html:51 #: operations/templates/operations/jobs.html:38 #: operations/templates/operations/jobs.html:62 @@ -6720,149 +6729,170 @@ msgstr "仍在运行的搜索过多;请稍后再试。" msgid "State" msgstr "状态" -#: instances/views.py:247 +#: instances/views.py:249 msgid "OS" msgstr "操作系统" -#: instances/views.py:247 +#: instances/views.py:249 msgid "OS family" msgstr "操作系统系列" -#: instances/views.py:247 +#: instances/views.py:249 msgid "IP addresses" msgstr "IP 地址" -#: instances/views.py:248 +#: instances/views.py:250 msgid "Address sources" msgstr "地址来源" -#: instances/views.py:248 +#: instances/views.py:250 msgid "MAC addresses" msgstr "MAC 地址" -#: instances/views.py:248 +#: instances/views.py:250 msgid "In the panel" msgstr "在面板中" -#: instances/views.py:260 +#: instances/views.py:262 msgid "yes" msgstr "是" -#: instances/views.py:260 +#: instances/views.py:262 msgid "no" msgstr "否" -#: instances/views.py:262 +#: instances/views.py:264 #, python-format msgid "Created: %(time)s" msgstr "创建时间:%(time)s" -#: instances/views.py:263 +#: instances/views.py:265 #, python-format msgid "VMs listed: %(n)s" msgstr "列出的虚拟机:%(n)s" -#: instances/views.py:264 +#: instances/views.py:266 #, python-format msgid "Running VMs read: %(n)s" msgstr "已读取的运行中虚拟机:%(n)s" -#: instances/views.py:265 +#: instances/views.py:267 #, python-format msgid "" "Without a connected guest agent (a static address on them cannot be seen): " "%(n)s" msgstr "没有已连接客户机代理的虚拟机(无法看到其上的静态地址):%(n)s" -#: instances/views.py:266 +#: instances/views.py:268 #, python-format msgid "" "Guest agents not read (a paused VM, no answer in time, or an error): %(n)s" msgstr "未读取的客户机代理(虚拟机已暂停、未及时响应或出错):%(n)s" -#: instances/views.py:268 +#: instances/views.py:270 #, python-format msgid "Hosts not reached: %(hosts)s" msgstr "无法连接的主机:%(hosts)s" -#: instances/views.py:270 +#: instances/views.py:272 #, python-format msgid "Hosts not finished in time: %(hosts)s" msgstr "未按时完成的主机:%(hosts)s" -#: instances/views.py:271 +#: instances/views.py:273 msgid "Coverage" msgstr "覆盖范围" -#: instances/views.py:286 +#: instances/views.py:288 #, python-format msgid "The host %(host)s of '%(name)s' cannot be reached: %(error)s" msgstr "无法连接“%(name)s”所在的主机 %(host)s:%(error)s" -#: instances/views.py:292 +#: instances/views.py:294 #, python-format msgid "The host of '%(name)s' cannot be reached right now." msgstr "目前无法连接“%(name)s”所在的主机。" -#: instances/views.py:293 +#: instances/views.py:295 msgid " Jobs on it can be followed under Jobs in the menu." msgstr " 其上的任务可在菜单的“任务”中跟踪。" -#: instances/views.py:301 +#: instances/views.py:303 #, python-format msgid "'%(name)s' is no longer on its host." msgstr "“%(name)s”已不在其主机上。" -#: instances/views.py:390 +#: instances/views.py:392 msgid "A VM migrates when it is running, paused or shut off." msgstr "虚拟机在运行、暂停或关机状态下均可迁移。" -#: instances/views.py:392 +#: instances/views.py:394 msgid "" "A VM with snapshots cannot be migrated: its snapshots stay on this host. " "Delete them first." msgstr "有快照的虚拟机无法迁移:其快照保留在本主机上。请先删除快照。" -#: instances/views.py:394 +#: instances/views.py:396 msgid "" "A VM with host devices cannot be migrated: the destination may not have them." " Remove them first." msgstr "有主机设备的虚拟机无法迁移:目标主机可能没有这些设备。请先移除它们。" -#: instances/views.py:644 +#: instances/views.py:646 #, python-format msgid "Disk %(dev)s has changed since the page was loaded; reload the page" msgstr "磁盘 %(dev)s 在页面加载后已更改;请刷新页面" -#: instances/views.py:717 +#: instances/views.py:721 instances/views.py:729 +msgid "Choose the VMs and write the tag" +msgstr "请选择虚拟机并填写标签" + +#: instances/views.py:734 +#, python-format +msgid "There is no tag %(tag)s" +msgstr "没有标签 %(tag)s" + +#: instances/views.py:741 +#, python-format +msgid "Tag %(tag)s removed from %(count)s VM" +msgid_plural "Tag %(tag)s removed from %(count)s VMs" +msgstr[0] "已从 %(count)s 台虚拟机移除标签 %(tag)s" + +#: instances/views.py:742 +#, python-format +msgid "Tag %(tag)s added to %(count)s VM" +msgid_plural "Tag %(tag)s added to %(count)s VMs" +msgstr[0] "已为 %(count)s 台虚拟机添加标签 %(tag)s" + +#: instances/views.py:758 msgid "Choose the VMs you may power, and Start, Shut down or Force off" msgstr "请选择您可操作电源的虚拟机,然后选择启动、关闭或强制关闭" -#: instances/views.py:720 +#: instances/views.py:761 #, python-format msgid "Choose at most %(count)s VMs at once" msgstr "一次最多选择 %(count)s 台虚拟机" -#: instances/views.py:727 +#: instances/views.py:768 msgid "a chosen VM" msgstr "所选的一台虚拟机" -#: instances/views.py:735 +#: instances/views.py:776 #, python-format msgid "%(vm)s: you may not power it now" msgstr "%(vm)s:您现在无法对其进行电源操作" -#: instances/views.py:740 +#: instances/views.py:781 #, python-format msgid "%(count)s VM is queued; the Jobs page follows it." msgid_plural "%(count)s VMs are queued; the Jobs page follows them." msgstr[0] "已将 %(count)s 台虚拟机加入队列;可在任务页面查看。" -#: instances/views.py:762 instances/views.py:763 +#: instances/views.py:803 instances/views.py:804 msgid "The VM was moved meanwhile; try again." msgstr "该虚拟机在此期间已被移动;请重试。" -#: instances/views.py:879 +#: instances/views.py:920 msgid "" "The running VM has no free PCI slot for another disk on this bus: choose the " "scsi bus if the VM has a SCSI controller, or shut the VM down and add the " @@ -6872,7 +6902,7 @@ msgstr "" "运行中的虚拟机在此总线上没有可用 PCI 插槽来添加磁盘:如果虚拟机有 SCSI 控制器,请选择 scsi " "总线;或关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。" -#: instances/views.py:883 +#: instances/views.py:924 msgid "" "The running VM has no free PCI slot for the SCSI controller the disk needs: " "shut the VM down and add the disk then; Add PCIe slots on the Disks tab gives" @@ -6882,289 +6912,289 @@ msgstr "" "运行中的虚拟机没有可用 PCI 插槽来添加磁盘所需的 SCSI 控制器:请关闭虚拟机后再添加磁盘。“磁盘”选项卡上的“添加 PCIe " "插槽”可使其从下次启动起获得可用插槽。新卷会保留在其存储池中,可作为现有卷挂载。" -#: instances/views.py:901 +#: instances/views.py:942 #, python-format msgid "Invalid disk options: %(options)s" msgstr "无效的磁盘选项:%(options)s" -#: instances/views.py:913 instances/views.py:1008 +#: instances/views.py:954 instances/views.py:1049 #, python-format msgid "Invalid options: %(options)s" msgstr "无效的选项:%(options)s" -#: instances/views.py:948 +#: instances/views.py:989 msgid "The VM was forced off but did not start again: it stays off." msgstr "虚拟机已被强制关机,但没有再次启动:它保持关机状态。" -#: instances/views.py:1136 +#: instances/views.py:1177 #, python-format msgid "Set the gstfsd key of %(compute)s first (Computes, edit the host)" msgstr "请先设置 %(compute)s 的 gstfsd 密钥(计算节点,编辑该主机)" -#: instances/views.py:1143 instances/views.py:1161 instances/views.py:1170 +#: instances/views.py:1184 instances/views.py:1202 instances/views.py:1211 #, python-format msgid "gstfsd error: %(err)s" msgstr "gstfsd 错误:%(err)s" -#: instances/views.py:1171 +#: instances/views.py:1212 msgid "the reply is not signed with the key" msgstr "回复未使用该密钥签名" -#: instances/views.py:1179 +#: instances/views.py:1220 msgid "Shut the VM down, or start its QEMU guest agent, and try again" msgstr "请关闭虚拟机,或启动其 QEMU 客户机代理,然后重试" -#: instances/views.py:1187 +#: instances/views.py:1228 msgid "The change may still be made when the agent answers again." msgstr "当代理再次响应时,此更改仍可能生效。" -#: instances/views.py:1202 +#: instances/views.py:1243 msgid "Enter a password" msgstr "请输入密码" -#: instances/views.py:1207 +#: instances/views.py:1248 msgid "Enter a password of at most 4096 characters, without NUL characters" msgstr "请输入不超过 4096 个字符且不含 NUL 字符的密码" -#: instances/views.py:1223 +#: instances/views.py:1264 msgid "Reset root password" msgstr "重置 root 密码" -#: instances/views.py:1239 +#: instances/views.py:1280 msgid "Select an SSH public key" msgstr "请选择 SSH 公钥" -#: instances/views.py:1261 +#: instances/views.py:1302 #, python-format msgid "Installed new SSH public key %(keyname)s" msgstr "已安装新的 SSH 公钥 %(keyname)s" -#: instances/views.py:1281 +#: instances/views.py:1322 msgid "Enter a whole number of vCPUs" msgstr "请输入整数个 vCPU" -#: instances/views.py:1285 +#: instances/views.py:1326 msgid "Shut off the VM to change its vCPUs" msgstr "请关闭虚拟机以更改其 vCPU" -#: instances/views.py:1288 +#: instances/views.py:1329 msgid "The current vCPUs cannot be more than the maximum" msgstr "当前 vCPU 数不能超过最大值" -#: instances/views.py:1295 +#: instances/views.py:1336 #, python-format msgid "%(quota)s: cannot resize the CPU of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的 CPU。" -#: instances/views.py:1303 +#: instances/views.py:1344 #, python-format msgid "vCPUs set to %(cur)s (maximum %(max)s)" msgstr "vCPU 已设为 %(cur)s(最大 %(max)s)" -#: instances/views.py:1322 +#: instances/views.py:1363 msgid "Enter a whole number for memory" msgstr "请输入整数内存值" -#: instances/views.py:1325 +#: instances/views.py:1366 msgid "The current memory cannot be more than the maximum" msgstr "当前内存不能超过最大值" -#: instances/views.py:1329 +#: instances/views.py:1370 #, python-format msgid "%(quota)s: cannot resize the memory of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的内存。" -#: instances/views.py:1335 +#: instances/views.py:1376 #, python-format msgid "Memory set to %(cur)s MiB (maximum %(max)s MiB)" msgstr "内存已设为 %(cur)s MiB(最大 %(max)s MiB)" -#: instances/views.py:1355 +#: instances/views.py:1396 msgid "Enter disk sizes as whole GiB" msgstr "请以整数 GiB 输入磁盘大小" -#: instances/views.py:1359 +#: instances/views.py:1400 #, python-format msgid "Disk %(dev)s was changed meanwhile; reload the page" msgstr "磁盘 %(dev)s 在此期间已更改;请重新加载页面" -#: instances/views.py:1363 +#: instances/views.py:1404 #, python-format msgid "%(dev)s is %(size)s: a disk cannot shrink" msgstr "%(dev)s 为 %(size)s:磁盘不能缩小" -#: instances/views.py:1371 +#: instances/views.py:1412 msgid "No disks were selected or valid for resizing." msgstr "未选择磁盘或没有可调整大小的有效磁盘。" -#: instances/views.py:1380 +#: instances/views.py:1421 #, python-format msgid "%(quota)s: cannot resize the disks of '%(instance_name)s'." msgstr "%(quota)s:无法调整“%(instance_name)s”的磁盘。" -#: instances/views.py:1392 +#: instances/views.py:1433 #, python-format msgid "The storage pool of %(dev)s cannot resize its volumes" msgstr "%(dev)s 所在的存储池无法调整其卷的大小" -#: instances/views.py:1394 +#: instances/views.py:1435 #, python-format msgid "Disk is resized: %(dev)s" msgstr "磁盘已调整大小:%(dev)s" -#: instances/views.py:1488 +#: instances/views.py:1529 msgid "The VM's machine has no PCIe slots to add" msgstr "该虚拟机的机器类型没有可添加的 PCIe 插槽" -#: instances/views.py:1493 +#: instances/views.py:1534 #, python-format msgid "%(count)s PCIe slots added" msgstr "已添加 %(count)s 个 PCIe 插槽" -#: instances/views.py:1495 +#: instances/views.py:1536 #, python-format msgid "%(count)s PCIe slots added: the VM gets them at its next start" msgstr "已添加 %(count)s 个 PCIe 插槽:虚拟机在下次启动时获得它们" -#: instances/views.py:1546 +#: instances/views.py:1587 #, python-format msgid "%(volume)s is already a disk of this VM" msgstr "%(volume)s 已是此虚拟机的磁盘" -#: instances/views.py:1636 +#: instances/views.py:1677 msgid "Volume changes are applied. But it will be activated after shutdown" msgstr "卷更改已应用,但将在关机后生效" -#: instances/views.py:1641 +#: instances/views.py:1682 msgid "Volume is changed successfully." msgstr "卷已成功更改。" -#: instances/views.py:1661 +#: instances/views.py:1702 #, python-format msgid "Disk %(dev)s is not a storage volume of this instance" msgstr "磁盘 %(dev)s 不是此虚拟机的存储卷" -#: instances/views.py:1666 vrtManager/instance.py:2594 +#: instances/views.py:1707 vrtManager/instance.py:2594 msgid "The VM has a saved state; start it or remove the saved state first" msgstr "虚拟机有保存的状态;请先启动它或删除保存的状态" -#: instances/views.py:1672 +#: instances/views.py:1713 #, python-format msgid "Disk %(dev)s has a pending change; delete it once the VM is shut down" msgstr "磁盘 %(dev)s 有待生效的更改;请在虚拟机关机后删除它" -#: instances/views.py:1687 +#: instances/views.py:1728 #, python-format msgid "Volume %(vol)s is used by another VM; detach it instead" msgstr "卷 %(vol)s 正被另一台虚拟机使用;请改为分离它" -#: instances/views.py:1705 +#: instances/views.py:1746 #, python-format msgid "" "The guest has not released disk %(dev)s yet; volume %(vol)s was kept. Delete " "it from the storage pool once the VM is shut down." msgstr "客户机尚未释放磁盘 %(dev)s;卷 %(vol)s 已保留。请在虚拟机关机后从存储池中删除它。" -#: instances/views.py:1716 +#: instances/views.py:1757 #, python-format msgid "Disk %(dev)s was detached, but its volume was kept: %(err)s" msgstr "磁盘 %(dev)s 已分离,但其卷已保留:%(err)s" -#: instances/views.py:1744 +#: instances/views.py:1785 #, python-format msgid "This VM cannot take a CD-ROM on the %(bus)s bus now" msgstr "该虚拟机现在无法在 %(bus)s 总线上添加 CD-ROM" -#: instances/views.py:1747 +#: instances/views.py:1788 msgid "A USB CD-ROM needs an ISO image: libvirt has no empty USB drive" msgstr "USB CD-ROM 需要 ISO 镜像:libvirt 不支持空的 USB 驱动器" -#: instances/views.py:1752 +#: instances/views.py:1793 #, python-format msgid "%(image)s is already in a CD-ROM of this VM" msgstr "%(image)s 已在此虚拟机的某个光驱中" -#: instances/views.py:1833 +#: instances/views.py:1874 #, python-format msgid "Pool %(pool)s was not read again: %(err)s" msgstr "未重新读取存储池 %(pool)s:%(err)s" -#: instances/views.py:1854 +#: instances/views.py:1895 #, python-format msgid "Snapshot was not deleted: %(err)s" msgstr "快照未删除:%(err)s" -#: instances/views.py:1973 +#: instances/views.py:2014 msgid "Add at least one device to the boot order." msgstr "请至少向启动顺序中添加一个设备。" -#: instances/views.py:1979 vrtManager/instance.py:1364 +#: instances/views.py:2020 vrtManager/instance.py:1364 msgid "Invalid Device Type for boot order" msgstr "启动顺序的设备类型无效" -#: instances/views.py:1990 +#: instances/views.py:2031 msgid "Boot order changed. It applies at the next start." msgstr "启动顺序已更改,将在下次启动时生效。" -#: instances/views.py:1992 +#: instances/views.py:2033 msgid "Boot order changed successfully." msgstr "启动顺序已成功更改。" -#: instances/views.py:2012 +#: instances/views.py:2053 msgid "The XML is empty" msgstr "XML 为空" -#: instances/views.py:2016 instances/views.py:2736 +#: instances/views.py:2057 instances/views.py:2777 #, python-format msgid "The XML is not well-formed: %(error)s" msgstr "XML 格式不正确:%(error)s" -#: instances/views.py:2018 +#: instances/views.py:2059 #, python-format msgid "The XML must keep the VM's UUID %(uuid)s." msgstr "XML 必须保留虚拟机的 UUID %(uuid)s。" -#: instances/views.py:2022 +#: instances/views.py:2063 msgid "" "The definition has changed since the editor was opened. Reload the page to " "edit the current one." msgstr "自打开编辑器以来定义已被更改。请重新加载页面以编辑当前定义。" -#: instances/views.py:2038 +#: instances/views.py:2079 msgid "The XML definition was saved." msgstr "XML 定义已保存。" -#: instances/views.py:2040 +#: instances/views.py:2081 msgid "The XML definition was saved; the VM uses it from its next start." msgstr "XML 定义已保存;虚拟机从下次启动起使用它。" -#: instances/views.py:2121 +#: instances/views.py:2162 msgid "Select one network interface to change" msgstr "请选择一个要更改的网络接口" -#: instances/views.py:2135 +#: instances/views.py:2176 #, python-format msgid "Network interface %(mac)s was changed meanwhile; reload the page" msgstr "网络接口 %(mac)s 在此期间已更改;请重新加载页面" -#: instances/views.py:2165 +#: instances/views.py:2206 msgid "Network Device Config is changed. Please shutdown instance to activate." msgstr "网络设备配置已更改。请关闭虚拟机以使其生效。" -#: instances/views.py:2167 +#: instances/views.py:2208 msgid "Network device changed" msgstr "网络设备已更改" -#: instances/views.py:2179 +#: instances/views.py:2220 msgid "No network selected" msgstr "未选择网络" -#: instances/views.py:2184 +#: instances/views.py:2225 #, python-format msgid "The VM already has a network device with MAC %(mac)s" msgstr "虚拟机已有 MAC 地址为 %(mac)s 的网络设备" -#: instances/views.py:2203 +#: instances/views.py:2244 msgid "" "The running VM has no free PCI slot for another network device: shut it down " "and add the device then; Add PCIe slots on the Disks tab gives it free ones " @@ -7172,140 +7202,140 @@ msgid "" msgstr "" "运行中的虚拟机没有可用 PCI 插槽来添加网络设备:请关机后再添加设备。“磁盘”选项卡上的“添加 PCIe 插槽”可使其从下次启动起获得可用插槽。" -#: instances/views.py:2249 instances/views.py:2255 +#: instances/views.py:2290 instances/views.py:2296 msgid "The VM has it" msgstr "虚拟机已有此设备" -#: instances/views.py:2290 +#: instances/views.py:2331 #, python-format msgid "The host has no USB device %(device)s; reload the page" msgstr "主机没有 USB 设备 %(device)s;请重新加载页面" -#: instances/views.py:2311 +#: instances/views.py:2352 #, python-format msgid "The host has no PCI device %(device)s" msgstr "主机上没有 PCI 设备 %(device)s" -#: instances/views.py:2329 +#: instances/views.py:2370 #, python-format msgid "" "Removal of PCI device %(address)s requested: the guest has not let it go yet;" " it stays in the running VM until it does or the VM stops." msgstr "已请求移除 PCI 设备 %(address)s:客户机尚未释放它;在客户机释放或虚拟机停止之前,它仍保留在运行中的虚拟机中。" -#: instances/views.py:2374 instances/views.py:2404 +#: instances/views.py:2415 instances/views.py:2445 msgid "Select a network interface and a QoS direction" msgstr "请选择网络接口和 QoS 方向" -#: instances/views.py:2377 vrtManager/network.py:470 +#: instances/views.py:2418 vrtManager/network.py:470 msgid "QoS rates must be whole numbers" msgstr "QoS 速率必须为整数" -#: instances/views.py:2384 networks/views.py:235 +#: instances/views.py:2425 networks/views.py:235 #, python-format msgid "%(qos_dir)s QoS is set" msgstr "%(qos_dir)s QoS 已设置" -#: instances/views.py:2389 +#: instances/views.py:2430 #, python-format msgid "" "%(qos_dir)s QoS is set. A running VM gets it after it is powered off and on." msgstr "%(qos_dir)s QoS 已设置。运行中的虚拟机需关机再开机后才能生效。" -#: instances/views.py:2411 networks/views.py:261 +#: instances/views.py:2452 networks/views.py:261 #, python-format msgid "%(qos_dir)s QoS is deleted" msgstr "%(qos_dir)s QoS 已删除" -#: instances/views.py:2416 +#: instances/views.py:2457 #, python-format msgid "" "%(qos_dir)s QoS is deleted. A running VM keeps the old limit until it is " "powered off and on." msgstr "%(qos_dir)s QoS 已删除。运行中的虚拟机在关机再开机之前保留旧的限制。" -#: instances/views.py:2444 +#: instances/views.py:2485 msgid "Only one owner is allowed and the one already added" msgstr "只允许一个所有者,且已添加" -#: instances/views.py:2446 +#: instances/views.py:2487 #, python-format msgid "%(user)s is already an owner" msgstr "%(user)s 已是所有者" -#: instances/views.py:2511 +#: instances/views.py:2552 #, python-format msgid "Console settings were not saved: %(errors)s" msgstr "控制台设置未保存:%(errors)s" -#: instances/views.py:2533 +#: instances/views.py:2574 msgid "" "Error setting console password. You should check that your instance have an " "graphic device." msgstr "设置控制台密码出错。请检查虚拟机是否有图形设备。" -#: instances/views.py:2580 +#: instances/views.py:2621 msgid "Shut the VM down to change whether it is a template." msgstr "请关闭虚拟机以更改其是否为模板。" -#: instances/views.py:2586 +#: instances/views.py:2627 #, python-format msgid "%(quota)s: '%(instance_name)s' stays a template." msgstr "%(quota)s:“%(instance_name)s”仍为模板。" -#: instances/views.py:2608 +#: instances/views.py:2649 msgid "An I/O limit is whole numbers of IOPS and MiB/s, 0 for none" msgstr "I/O 限制须为 IOPS 和 MiB/s 的整数,0 表示不限" -#: instances/views.py:2722 +#: instances/views.py:2763 msgid "The XML has no name" msgstr "XML 中没有名称" -#: instances/views.py:2740 webvirtcloud/middleware.py:157 +#: instances/views.py:2781 webvirtcloud/middleware.py:157 #, python-format msgid "libvirt Error - %(exception)s" msgstr "libvirt 错误 - %(exception)s" -#: instances/views.py:2754 +#: instances/views.py:2795 msgid "An empty disk of the size you set" msgstr "按设定大小创建的空磁盘" -#: instances/views.py:2755 +#: instances/views.py:2796 msgid "Volumes already in a pool" msgstr "存储池中已有的卷" -#: instances/views.py:2756 +#: instances/views.py:2797 msgid "A copy of a template volume" msgstr "模板卷的副本" -#: instances/views.py:2846 +#: instances/views.py:2887 msgid "" "This host has no running storage pool for the VM's disks: add or start one on" " its Storage page." msgstr "此主机没有可用于虚拟机磁盘的运行中存储池:请在其“存储”页面添加或启动一个。" -#: instances/views.py:2848 +#: instances/views.py:2889 msgid "This host has no network for the VM: add one on its Networks page." msgstr "此主机没有可供虚拟机使用的网络:请在其“网络”页面添加一个。" -#: instances/views.py:2880 +#: instances/views.py:2921 #, python-format msgid "The machine type is q35, not %(machine)s: UEFI Secure Boot needs it" msgstr "机器类型为 q35,而不是 %(machine)s:UEFI 安全启动需要它" -#: instances/views.py:2909 +#: instances/views.py:2950 msgid "Flavor Created" msgstr "规格已创建" -#: instances/views.py:2917 +#: instances/views.py:2958 msgid "Create Flavor" msgstr "创建规格" -#: instances/views.py:2929 +#: instances/views.py:2970 msgid "Flavor Deleted" msgstr "规格已删除" -#: instances/views.py:2935 +#: instances/views.py:2976 msgid "Only the size template goes; VMs made from it keep their size." msgstr "仅删除此规格;由它创建的虚拟机保持其大小。" diff --git a/static/js/bulk_power.js b/static/js/bulk_power.js index a34a712e..7768991a 100644 --- a/static/js/bulk_power.js +++ b/static/js/bulk_power.js @@ -39,6 +39,15 @@ later = setTimeout(update, 50); }).observe(document.querySelector(".table-responsive") || document.body, {attributes: true, attributeFilter: ["hidden", "class"], subtree: true}); + // Enter in the tag box would send the form with its first button, Start: it sends nothing + var tagBox = document.getElementById("bulk-tag"); + if (tagBox) { + tagBox.addEventListener("keydown", function (event) { + if (event.key === "Enter") { + event.preventDefault(); + } + }); + } form.addEventListener("submit", function () { document.querySelectorAll("input[name='vm'][form='bulk-power']:checked").forEach(function (box) { if (!box.getClientRects().length) {