Merge "Remove unicode prefix from code"

This commit is contained in:
Zuul
2025-08-04 20:18:48 +00:00
committed by Gerrit Code Review
17 changed files with 133 additions and 133 deletions

View File

@@ -23,16 +23,16 @@ class DeleteSecurityService(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Security Service", "Delete Security Service",
u"Delete Security Services", "Delete Security Services",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Security Service", "Deleted Security Service",
u"Deleted Security Services", "Deleted Security Services",
count count
) )

View File

@@ -35,16 +35,16 @@ class DeleteShareGroupSnapshot(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Group Snapshot", "Delete Share Group Snapshot",
u"Delete Share Group Snapshots", "Delete Share Group Snapshots",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Group Snapshot", "Deleted Share Group Snapshot",
u"Deleted Share Group Snapshots", "Deleted Share Group Snapshots",
count count
) )
@@ -94,9 +94,9 @@ class ShareGroupSnapshotsTable(tables.DataTable):
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", ("available",
pgettext_lazy("Current status of snapshot", u"Available")), pgettext_lazy("Current status of snapshot", "Available")),
("creating", pgettext_lazy("Current status of snapshot", u"Creating")), ("creating", pgettext_lazy("Current status of snapshot", "Creating")),
("error", pgettext_lazy("Current status of snapshot", u"Error")), ("error", pgettext_lazy("Current status of snapshot", "Error")),
) )
name = tables.WrappingColumn( name = tables.WrappingColumn(
"name", verbose_name=_("Name"), "name", verbose_name=_("Name"),
@@ -107,7 +107,7 @@ class ShareGroupSnapshotsTable(tables.DataTable):
truncate=40) truncate=40)
created_at = tables.Column( created_at = tables.Column(
"created_at", "created_at",
verbose_name=_("Created at"), verbose_name=_("Created At"),
filters=( filters=(
filters.parse_isotime, filters.parse_isotime,
)) ))

View File

@@ -32,16 +32,16 @@ class DeleteShareGroupType(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Group Type", "Delete Share Group Type",
u"Delete Share Group Types", "Delete Share Group Types",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Group Type", "Deleted Share Group Type",
u"Deleted Share Group Types", "Deleted Share Group Types",
count count
) )

View File

@@ -26,16 +26,16 @@ class DeleteShareGroup(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Group", "Delete Share Group",
u"Delete Share Groups", "Delete Share Groups",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Group", "Deleted Share Group",
u"Deleted Share Groups", "Deleted Share Groups",
count count
) )
@@ -76,11 +76,11 @@ class ShareGroupsTable(tables.DataTable):
("error_deleting", False), ("error_deleting", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", u"Available"), ("available", "Available"),
("creating", u"Creating"), ("creating", "Creating"),
("deleting", u"Deleting"), ("deleting", "Deleting"),
("error", u"Error"), ("error", "Error"),
("error_deleting", u"Error deleting"), ("error_deleting", "Error deleting"),
) )
name = tables.Column( name = tables.Column(
"name", "name",

View File

@@ -24,11 +24,11 @@ class ShareInstancesTable(tables.DataTable):
("error_deleting", False), ("error_deleting", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", u"Available"), ("available", "Available"),
("creating", u"Creating"), ("creating", "Creating"),
("deleting", u"Deleting"), ("deleting", "Deleting"),
("error", u"Error"), ("error", "Error"),
("error_deleting", u"Error deleting"), ("error_deleting", "Error deleting"),
) )
uuid = tables.Column( uuid = tables.Column(
"id", verbose_name=_("ID"), "id", verbose_name=_("ID"),
@@ -78,7 +78,7 @@ class ShareInstancesTable(tables.DataTable):
link=get_share_network_link) link=get_share_network_link)
share_server_id = tables.Column( share_server_id = tables.Column(
"share_server_id", "share_server_id",
verbose_name=_("Share Server Id"), verbose_name=_("Share Server ID"),
link=get_share_server_link) link=get_share_server_link)
share_id = tables.Column( share_id = tables.Column(
"share_id", "share_id",

View File

@@ -26,16 +26,16 @@ class DeleteShareServer(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Server", "Delete Share Server",
u"Delete Share Server", "Delete Share Server",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Server", "Deleted Share Server",
u"Deleted Share Server", "Deleted Share Server",
count count
) )
@@ -69,12 +69,12 @@ class ShareServersTable(tables.DataTable):
("error", False), ("error", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("in-use", pgettext_lazy("Current status of share server", u"In-use")), ("in-use", pgettext_lazy("Current status of share server", "In-use")),
("active", pgettext_lazy("Current status of share server", u"Active")), ("active", pgettext_lazy("Current status of share server", "Active")),
("creating", pgettext_lazy("Current status of share server", ("creating", pgettext_lazy("Current status of share server",
u"Creating")), "Creating")),
("error", pgettext_lazy("Current status of share server", ("error", pgettext_lazy("Current status of share server",
u"Error")), "Error")),
) )
uid = tables.Column( uid = tables.Column(
"id", verbose_name=_("Id"), "id", verbose_name=_("Id"),

View File

@@ -38,16 +38,16 @@ class DeleteShareSnapshot(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Snapshot", "Delete Snapshot",
u"Delete Snapshots", "Delete Snapshots",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Snapshot", "Deleted Snapshot",
u"Deleted Snapshots", "Deleted Snapshots",
count count
) )
@@ -82,11 +82,11 @@ class ShareSnapshotsTable(tables.DataTable):
("error", False), ("error", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("in-use", pgettext_lazy("Current status of snapshot", u"In-use")), ("in-use", pgettext_lazy("Current status of snapshot", "In-use")),
("available", ("available",
pgettext_lazy("Current status of snapshot", u"Available")), pgettext_lazy("Current status of snapshot", "Available")),
("creating", pgettext_lazy("Current status of snapshot", u"Creating")), ("creating", pgettext_lazy("Current status of snapshot", "Creating")),
("error", pgettext_lazy("Current status of snapshot", u"Error")), ("error", pgettext_lazy("Current status of snapshot", "Error")),
) )
name = tables.WrappingColumn( name = tables.WrappingColumn(
"name", verbose_name=_("Name"), "name", verbose_name=_("Name"),

View File

@@ -33,16 +33,16 @@ class DeleteShareType(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Type", "Delete Share Type",
u"Delete Share Types", "Delete Share Types",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Type", "Deleted Share Type",
u"Deleted Share Types", "Deleted Share Types",
count count
) )

View File

@@ -93,16 +93,16 @@ class DeleteReplica(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Replica", "Delete Replica",
u"Delete Replicas", "Delete Replicas",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Replica", "Deleted Replica",
u"Deleted Replicas", "Deleted Replicas",
count count
) )

View File

@@ -34,16 +34,16 @@ class Delete(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Security Service", "Delete Security Service",
u"Delete Security Services", "Delete Security Services",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Security Service", "Deleted Security Service",
u"Deleted Security Services", "Deleted Security Services",
count count
) )

View File

@@ -75,16 +75,16 @@ class DeleteShareGroupSnapshot(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Group Snapshot", "Delete Share Group Snapshot",
u"Delete Share Group Snapshots", "Delete Share Group Snapshots",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Group Snapshot", "Deleted Share Group Snapshot",
u"Deleted Share Group Snapshots", "Deleted Share Group Snapshots",
count count
) )
@@ -124,9 +124,9 @@ class ShareGroupSnapshotsTable(tables.DataTable):
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", ("available",
pgettext_lazy("Current status of snapshot", u"Available")), pgettext_lazy("Current status of snapshot", "Available")),
("creating", pgettext_lazy("Current status of snapshot", u"Creating")), ("creating", pgettext_lazy("Current status of snapshot", "Creating")),
("error", pgettext_lazy("Current status of snapshot", u"Error")), ("error", pgettext_lazy("Current status of snapshot", "Error")),
) )
name = tables.WrappingColumn( name = tables.WrappingColumn(
"name", verbose_name=_("Name"), "name", verbose_name=_("Name"),

View File

@@ -37,16 +37,16 @@ class DeleteShareGroup(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Group", "Delete Share Group",
u"Delete Share Groups", "Delete Share Groups",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Group", "Deleted Share Group",
u"Deleted Share Groups", "Deleted Share Groups",
count count
) )
@@ -109,11 +109,11 @@ class ShareGroupsTable(tables.DataTable):
("error_deleting", False), ("error_deleting", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", u"Available"), ("available", "Available"),
("creating", u"Creating"), ("creating", "Creating"),
("deleting", u"Deleting"), ("deleting", "Deleting"),
("error", u"Error"), ("error", "Error"),
("error_deleting", u"Error deleting"), ("error_deleting", "Error deleting"),
) )
name = tables.Column( name = tables.Column(
"name", "name",

View File

@@ -42,16 +42,16 @@ class Delete(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Network", "Delete Share Network",
u"Delete Share Networks", "Delete Share Networks",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Network", "Deleted Share Network",
u"Deleted Share Networks", "Deleted Share Networks",
count count
) )
@@ -110,10 +110,10 @@ class ShareNetworksTable(tables.DataTable):
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("ACTIVE", pgettext_lazy("Current status of share network", ("ACTIVE", pgettext_lazy("Current status of share network",
u"Active")), "Active")),
("INACTIVE", pgettext_lazy("Current status of share network", ("INACTIVE", pgettext_lazy("Current status of share network",
u"Inactive")), "Inactive")),
("ERROR", pgettext_lazy("Current status of share network", u"Error")), ("ERROR", pgettext_lazy("Current status of share network", "Error")),
) )
name = tables.WrappingColumn( name = tables.WrappingColumn(
"name", verbose_name=_("Name"), "name", verbose_name=_("Name"),

View File

@@ -91,16 +91,16 @@ class DeleteShareSnapshot(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Snapshot", "Delete Share Snapshot",
u"Delete Share Snapshots", "Delete Share Snapshots",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Snapshot", "Deleted Share Snapshot",
u"Deleted Share Snapshots", "Deleted Share Snapshots",
count count
) )
@@ -191,16 +191,16 @@ class DeleteShareSnapshotRule(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share Snapshot Rule", "Delete Share Snapshot Rule",
u"Delete Share Snapshot Rules", "Delete Share Snapshot Rules",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share Snapshot Rule", "Deleted Share Snapshot Rule",
u"Deleted Share Snapshot Rules", "Deleted Share Snapshot Rules",
count count
) )
@@ -256,11 +256,11 @@ class ShareSnapshotsTable(tables.DataTable):
("error", False), ("error", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("in-use", pgettext_lazy("Current status of snapshot", u"In-use")), ("in-use", pgettext_lazy("Current status of snapshot", "In-use")),
("available", ("available",
pgettext_lazy("Current status of snapshot", u"Available")), pgettext_lazy("Current status of snapshot", "Available")),
("creating", pgettext_lazy("Current status of snapshot", u"Creating")), ("creating", pgettext_lazy("Current status of snapshot", "Creating")),
("error", pgettext_lazy("Current status of snapshot", u"Error")), ("error", pgettext_lazy("Current status of snapshot", "Error")),
) )
name = tables.Column( name = tables.Column(
"name", "name",

View File

@@ -80,16 +80,16 @@ class DeleteReplica(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Replica", "Delete Replica",
u"Delete Replicas", "Delete Replicas",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Replica", "Deleted Replica",
u"Deleted Replicas", "Deleted Replicas",
count count
) )
@@ -140,10 +140,10 @@ class ReplicasTable(tables.DataTable):
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", ("available",
pgettext_lazy("Current status of replica", u"Available")), pgettext_lazy("Current status of replica", "Available")),
("creating", pgettext_lazy("Current status of replica", u"Creating")), ("creating", pgettext_lazy("Current status of replica", "Creating")),
("deleting", pgettext_lazy("Current status of replica", u"Deleting")), ("deleting", pgettext_lazy("Current status of replica", "Deleting")),
("error", pgettext_lazy("Current status of replica", u"Error")), ("error", pgettext_lazy("Current status of replica", "Error")),
) )
id = tables.Column( id = tables.Column(
"id", "id",
@@ -152,7 +152,7 @@ class ReplicasTable(tables.DataTable):
) )
availability_zone = tables.Column( availability_zone = tables.Column(
"availability_zone", verbose_name=_("Availability zone")) "availability_zone", verbose_name=_("Availability Zone"))
status = tables.Column( status = tables.Column(
"status", "status",

View File

@@ -41,16 +41,16 @@ class DeleteShare(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Share", "Delete Share",
u"Delete Shares", "Delete Shares",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Share", "Deleted Share",
u"Deleted Shares", "Deleted Shares",
count count
) )
@@ -218,33 +218,33 @@ class SharesTableBase(tables.DataTable):
("reverting_error", False), ("reverting_error", False),
) )
STATUS_DISPLAY_CHOICES = ( STATUS_DISPLAY_CHOICES = (
("available", pgettext_lazy("Current status of share", u"Available")), ("available", pgettext_lazy("Current status of share", "Available")),
("AVAILABLE", pgettext_lazy("Current status of share", u"Available")), ("AVAILABLE", pgettext_lazy("Current status of share", "Available")),
("creating", pgettext_lazy("Current status of share", u"Creating")), ("creating", pgettext_lazy("Current status of share", "Creating")),
("CREATING", pgettext_lazy("Current status of share", u"Creating")), ("CREATING", pgettext_lazy("Current status of share", "Creating")),
("deleting", pgettext_lazy("Current status of share", u"Deleting")), ("deleting", pgettext_lazy("Current status of share", "Deleting")),
("DELETING", pgettext_lazy("Current status of share", u"Deleting")), ("DELETING", pgettext_lazy("Current status of share", "Deleting")),
("migrating", pgettext_lazy("Current status of share", u"Migrating")), ("migrating", pgettext_lazy("Current status of share", "Migrating")),
("migrating_to", pgettext_lazy("Current status of share", ("migrating_to", pgettext_lazy("Current status of share",
u"Migrating to")), "Migrating to")),
("error", pgettext_lazy("Current status of share", u"Error")), ("error", pgettext_lazy("Current status of share", "Error")),
("ERROR", pgettext_lazy("Current status of share", u"Error")), ("ERROR", pgettext_lazy("Current status of share", "Error")),
("error_deleting", pgettext_lazy("Current status of share", ("error_deleting", pgettext_lazy("Current status of share",
u"Deleting")), "Deleting")),
("ERROR_DELETING", pgettext_lazy("Current status of share", ("ERROR_DELETING", pgettext_lazy("Current status of share",
u"Deleting")), "Deleting")),
("MANAGE_ERROR", pgettext_lazy("Current status of share", ("MANAGE_ERROR", pgettext_lazy("Current status of share",
u"Manage Error")), "Manage Error")),
("UNMANAGE_ERROR", pgettext_lazy("Current status of share", ("UNMANAGE_ERROR", pgettext_lazy("Current status of share",
u"Unmanage Error")), "Unmanage Error")),
("extending_error", pgettext_lazy("Current status of share", ("extending_error", pgettext_lazy("Current status of share",
u"Extending Error")), "Extending Error")),
("shrinking_error", pgettext_lazy("Current status of share", ("shrinking_error", pgettext_lazy("Current status of share",
u"Shrinking Error")), "Shrinking Error")),
("shrinking_possible_data_loss_error", pgettext_lazy( ("shrinking_possible_data_loss_error", pgettext_lazy(
"Current status of share", u"Shrinking Error")), "Current status of share", "Shrinking Error")),
("reverting_error", pgettext_lazy("Current status of share", ("reverting_error", pgettext_lazy("Current status of share",
u"Reverting Error")), "Reverting Error")),
) )
name = tables.WrappingColumn( name = tables.WrappingColumn(
"name", verbose_name=_("Name"), "name", verbose_name=_("Name"),
@@ -326,16 +326,16 @@ class DeleteRule(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete Rule", "Delete Rule",
u"Delete Rules", "Delete Rules",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted Rule", "Deleted Rule",
u"Deleted Rules", "Deleted Rules",
count count
) )

View File

@@ -32,16 +32,16 @@ class DeleteUserMessage(tables.DeleteAction):
@staticmethod @staticmethod
def action_present(count): def action_present(count):
return ngettext_lazy( return ngettext_lazy(
u"Delete User Message", "Delete User Message",
u"Delete User Messages", "Delete User Messages",
count count
) )
@staticmethod @staticmethod
def action_past(count): def action_past(count):
return ngettext_lazy( return ngettext_lazy(
u"Deleted User Message", "Deleted User Message",
u"Deleted User Messages", "Deleted User Messages",
count count
) )