+const char *volume_status_to_str(const char *status)
+{
+ int pos;
+ const char *vs[] = {
+ NT_("Append"), _("Append"),
+ NT_("Archive"), _("Archive"),
+ NT_("Disabled"), _("Disabled"),
+ NT_("Full"), _("Full"),
+ NT_("Used"), _("Used"),
+ NT_("Cleaning"), _("Cleaning"),
+ NT_("Purged"), _("Purged"),
+ NT_("Recycle"), _("Recycle"),
+ NT_("Read-Only"), _("Read-Only"),
+ NT_("Error"), _("Error"),
+ NULL, NULL};
+
+ if (status) {
+ for (pos = 0 ; vs[pos] ; pos += 2) {
+ if ( !strcmp(vs[pos],status) ) {
+ return vs[pos+1];
+ }
+ }
+ }
+
+ return _("Invalid volume status");
+}
+