From 3a3afb84abfe715c198fb6e0ad20e8e0ad847626 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Tue, 31 Jan 2023 10:28:20 -0300 Subject: [PATCH] Bug 32292: Tidy and sort keys This patch does a perltidy on the data structure, but also organizes keys alphabetically to ease maintenance. Signed-off-by: Tomas Cohen Arazi --- Koha/Database/Columns.pm | 433 +++++++++++++++++++-------------------- 1 file changed, 216 insertions(+), 217 deletions(-) diff --git a/Koha/Database/Columns.pm b/Koha/Database/Columns.pm index f1e2c3e9e6b..e476e4ac3be 100644 --- a/Koha/Database/Columns.pm +++ b/Koha/Database/Columns.pm @@ -61,264 +61,263 @@ to descriptions, for several tables. Currently sub columns { return { aqorders => { - "ordernumber" => __("Order number"), - "biblionumber" => __("Biblionumber (internal)"), - "entrydate" => __("Creation date"), - "quantity" => __("Quantity"), - "currency" => __("Currency"), - "listprice" => __("Vendor price"), - "datereceived" => __("Date received"), - "invoiceid" => __("Invoice ID (internal)"), - "freight" => __("Not used (deprecated)"), - "unitprice" => __("Actual cost"), - "unitprice_tax_excluded" => __("Actual cost, tax excl."), - "unitprice_tax_included" => __("Actual cost, tax incl."), - "quantityreceived" => __("Quantity received"), - "created_by" => __("Borrower number of creator"), - "datecancellationprinted" => __("Cancellation date"), - "cancellationreason" => __("Cancellation reason"), - "order_internalnote" => __("Internal note"), - "order_vendornote" => __("Vendor note"), - "purchaseordernumber" => __("Not used (deprecated)"), - "basketno" => __("Basket ID (inernal)"), - "timestamp" => __("Timestamp"), - "rrp" => __("Retail price"), - "replacementprice" => __("Replacement price"), - "rrp_tax_excluded" => __("Retail price, tax excl."), - "rrp_tax_included" => __("Retail price, tax incl."), - "ecost" => __("Budgeted cost"), - "ecost_tax_excluded" => __("Budgeted cost, tax excl."), - "ecost_tax_included" => __("Budgeted cost, tax incl."), - "tax_rate_bak" => __("Tax rate backup (deprecated)"), - "tax_rate_on_ordering" => __("Tax rate on order"), - "tax_rate_on_receiving" => __("Tax rate on receive"), - "tax_value_bak" => __("Tax value backup (deprecated)"), - "tax_value_on_ordering" => __("Tax amount on order"), - "tax_value_on_receiving" => __("Tax amount on receive"), - "discount" => __("Discount"), - "budget_id" => __("Fund ID (internal)"), - "budgetdate" => __("Not used (deprecated)"), - "sort1" => __("Statistic 1"), - "sort2" => __("Statistic 2"), - "sort1_authcat" => __("Not used"), - "sort2_authcat" => __("Not used"), - "uncertainprice" => __("Uncertain price"), - "subscriptionid" => __("Subscription ID (internal)"), - "parent_ordernumber" => __("Parent order number (internal)"), - "orderstatus" => __("Order status"), - "line_item_id" => __("Line item ID (EDIFACT)"), - "suppliers_reference_number" => __("Vendor reference number (EDIFACT)"), + "basketno" => __("Basket ID (internal)"), + "biblionumber" => __("Biblionumber (internal)"), + "budget_id" => __("Fund ID (internal)"), + "budgetdate" => __("Not used (deprecated)"), + "cancellationreason" => __("Cancellation reason"), + "created_by" => __("Borrower number of creator"), + "currency" => __("Currency"), + "datecancellationprinted" => __("Cancellation date"), + "datereceived" => __("Date received"), + "discount" => __("Discount"), + "ecost_tax_excluded" => __("Budgeted cost, tax excl."), + "ecost_tax_included" => __("Budgeted cost, tax incl."), + "ecost" => __("Budgeted cost"), + "entrydate" => __("Creation date"), + "estimated_delivery_date" => __("Estimated delivery date"), + "freight" => __("Not used (deprecated)"), + "invoiceid" => __("Invoice ID (internal)"), + "line_item_id" => __("Line item ID (EDIFACT)"), + "listprice" => __("Vendor price"), + "order_internalnote" => __("Internal note"), + "order_vendornote" => __("Vendor note"), + "ordernumber" => __("Order number"), + "orderstatus" => __("Order status"), + "parent_ordernumber" => __("Parent order number (internal)"), + "purchaseordernumber" => __("Not used (deprecated)"), + "quantity" => __("Quantity"), + "quantityreceived" => __("Quantity received"), + "replacementprice" => __("Replacement price"), + "rrp_tax_excluded" => __("Retail price, tax excl."), + "rrp_tax_included" => __("Retail price, tax incl."), + "rrp" => __("Retail price"), + "sort1_authcat" => __("Not used"), + "sort1" => __("Statistic 1"), + "sort2_authcat" => __("Not used"), + "sort2" => __("Statistic 2"), + "subscriptionid" => __("Subscription ID (internal)"), + "suppliers_reference_number" => __("Vendor reference number (EDIFACT)"), "suppliers_reference_qualifier" => __("Vendor reference qualifier (EDIFACT)"), - "suppliers_report" => __("Vendor report (EDIFACT)"), - "estimated_delivery_date" => __("Estimated delivery date"), + "suppliers_report" => __("Vendor report (EDIFACT)"), + "tax_rate_bak" => __("Tax rate backup (deprecated)"), + "tax_rate_on_ordering" => __("Tax rate on order"), + "tax_rate_on_receiving" => __("Tax rate on receive"), + "tax_value_bak" => __("Tax value backup (deprecated)"), + "tax_value_on_ordering" => __("Tax amount on order"), + "tax_value_on_receiving" => __("Tax amount on receive"), + "timestamp" => __("Timestamp"), + "uncertainprice" => __("Uncertain price"), + "unitprice_tax_excluded" => __("Actual cost, tax excl."), + "unitprice_tax_included" => __("Actual cost, tax incl."), + "unitprice" => __("Actual cost"), }, borrowers => { - "borrowernumber" => __("Borrower number"), - "title" => __("Salutation"), - "surname" => __("Surname"), - "firstname" => __("First name"), - "middle_name" => __("Middle name"), - "dateofbirth" => __("Date of birth"), - "initials" => __("Initials"), - "pronouns" => __("Pronouns"), - "othernames" => __("Other name"), - "sex" => __("Gender"), - "relationship" => __("Relationship"), - "streetnumber" => __("Street number"), - "streettype" => __("Street type"), - "address" => __("Address"), - "address2" => __("Address 2"), - "city" => __("City"), - "state" => __("State"), - "zipcode" => __("ZIP/Postal code"), - "country" => __("Country"), - "phone" => __("Primary phone"), - "phonepro" => __("Secondary phone"), - "mobile" => __("Other phone"), - "email" => __("Primary email"), - "emailpro" => __("Secondary email"), - "fax" => __("Fax"), - "B_streetnumber" => __("Alternate address: Street number"), - "B_streettype" => __("Alternate address: Street type"), - "B_address" => __("Alternate address: Address"), - "B_address2" => __("Alternate address: Address 2"), - "B_city" => __("Alternate address: City"), - "B_state" => __("Alternate address: State"), - "B_zipcode" => __("Alternate address: ZIP/Postal code"), - "B_country" => __("Alternate address: Country"), - "B_phone" => __("Alternate address: Phone"), - "B_email" => __("Alternate address: Email"), - "contactnote" => __("Alternate contact: Note"), - "altcontactfirstname" => __("Alternate contact: First name"), - "altcontactsurname" => __("Alternate contact: Surname"), - "altcontactaddress1" => __("Alternate contact: Address"), - "altcontactaddress2" => __("Alternate contact: Address 2"), - "altcontactaddress3" => __("Alternate contact: City"), - "contactname" => __("Alternate contact: Surname"), - "contactfirstname" => __("Alternate contact: First name"), - "contacttitle" => __("Alternate contact: Title"), - "altcontactstate" => __("Alternate contact: State"), - "altcontactzipcode" => __("Alternate contact: ZIP/Postal code"), - "altcontactcountry" => __("Alternate contact: Country"), - "altcontactphone" => __("Alternate contact: Phone"), - "cardnumber" => __("Card number"), - "branchcode" => __("Home library"), - "categorycode" => __("Patron category"), - "sort1" => __("Sort 1"), - "sort2" => __("Sort 2"), - "dateenrolled" => __("Registration date"), - "dateexpiry" => __("Expiry date"), - "password_expiration_date" => __("Password expiration date"), - "date_renewed" => __("Account renewal date"), - "opacnote" => __("OPAC note"), - "borrowernotes" => __("Circulation note"), - "userid" => __("Username"), - "password" => __("Password"), - "secret" => __("Secret (2FA)"), + "address" => __("Address"), + "address2" => __("Address 2"), + "altcontactaddress1" => __("Alternate contact: Address"), + "altcontactaddress2" => __("Alternate contact: Address 2"), + "altcontactaddress3" => __("Alternate contact: City"), + "altcontactcountry" => __("Alternate contact: Country"), + "altcontactfirstname" => __("Alternate contact: First name"), + "altcontactphone" => __("Alternate contact: Phone"), + "altcontactstate" => __("Alternate contact: State"), + "altcontactsurname" => __("Alternate contact: Surname"), + "altcontactzipcode" => __("Alternate contact: ZIP/Postal code"), + "anonymized" => __("Data anonymization flag"), "auth_method" => __("Authentication method"), + "autorenew_checkouts" => __("Allow auto-renewals"), + "B_address" => __("Alternate address: Address"), + "B_address2" => __("Alternate address: Address 2"), + "B_city" => __("Alternate address: City"), + "B_country" => __("Alternate address: Country"), + "B_email" => __("Alternate address: Email"), + "B_phone" => __("Alternate address: Phone"), + "B_state" => __("Alternate address: State"), + "B_streetnumber" => __("Alternate address: Street number"), + "B_streettype" => __("Alternate address: Street type"), + "B_zipcode" => __("Alternate address: ZIP/Postal code"), + "borrowernotes" => __("Circulation note"), + "borrowernumber" => __("Borrower number"), + "branchcode" => __("Home library"), + "cardnumber" => __("Card number"), + "categorycode" => __("Patron category"), + "checkprevcheckout" => __("Check for previous checkouts"), + "city" => __("City"), + "contactfirstname" => __("Alternate contact: First name"), + "contactname" => __("Alternate contact: Surname"), + "contactnote" => __("Alternate contact: Note"), + "contacttitle" => __("Alternate contact: Title"), + "country" => __("Country"), + "date_renewed" => __("Account renewal date"), + "dateenrolled" => __("Registration date"), + "dateexpiry" => __("Expiry date"), + "dateofbirth" => __("Date of birth"), + "debarred" => __("Restricted [until] flag"), + "debarredcomment" => __("Comment"), + "email" => __("Primary email"), + "emailpro" => __("Secondary email"), + "fax" => __("Fax"), + "firstname" => __("First name"), "flags" => __("System permissions"), "gonenoaddress" => __("Gone no address flag"), + "initials" => __("Initials"), + "lang" => __("Preferred language for notices"), + "lastseen" => __("Last activity date"), + "login_attempts" => __("Number of failed login attempts"), "lost" => __("Lost card flag"), - "debarred" => __("Restricted [until] flag"), - "debarredcomment" => __("Comment"), - "smsalertnumber" => __("Mobile phone number"), - "sms_provider_id" => __("SMS provier ID (internal)"), - "privacy" => __("Privacy settings"), - "privacy_guarantor_fines" => __("Show fines to guarantor"), + "middle_name" => __("Middle name"), + "mobile" => __("Other phone"), + "opacnote" => __("OPAC note"), + "othernames" => __("Other name"), + "overdrive_auth_token" => __("Overdrive auth token"), + "password_expiration_date" => __("Password expiration date"), + "password" => __("Password"), + "phone" => __("Primary phone"), + "phonepro" => __("Secondary phone"), + "primary_contact_method" => __("Primary contact method"), "privacy_guarantor_checkouts" => __("Show checkouts to guarantor"), - "checkprevcheckout" => __("Check for previous checkouts"), + "privacy_guarantor_fines" => __("Show fines to guarantor"), + "privacy" => __("Privacy settings"), + "pronouns" => __("Pronouns"), + "relationship" => __("Relationship"), + "secret" => __("Secret (2FA)"), + "sex" => __("Gender"), + "sms_provider_id" => __("SMS provier ID (internal)"), + "smsalertnumber" => __("Mobile phone number"), + "sort1" => __("Sort 1"), + "sort2" => __("Sort 2"), + "state" => __("State"), + "streetnumber" => __("Street number"), + "streettype" => __("Street type"), + "surname" => __("Surname"), + "title" => __("Salutation"), "updated_on" => __("Last update date"), - "lastseen" => __("Last activity date"), - "lang" => __("Preferred language for notices"), - "login_attempts" => __("Number of failed login attempts"), - "overdrive_auth_token" => __("Overdrive auth token"), - "anonymized" => __("Data anonymization flag"), - "autorenew_checkouts" => __("Allow auto-renewals"), - "primary_contact_method" => __("Primary contact method"), - }, - + "userid" => __("Username"), + "zipcode" => __("ZIP/Postal code"), + }, items => { - "itemnumber" => __("Item number (internal)"), - "biblionumber" => __("Biblio number (internal)"), - "biblioitemnumber" => __("Biblioitem number (internal)"), - "barcode" => __("Barcode"), - "dateaccessioned" => __("Date acquired"), - "booksellerid" => __("Source of acquisition"), - "homebranch" => __("Permanent library"), - "price" => __("Price"), - "replacementprice" => __("Replacement price"), - "replacementpricedate" => __("Price effective from"), - "datelastborrowed" => __("Date last checked out"), - "datelastseen" => __("Date last seen"), - "stack" => __("Shelving control number"), - "onloan" => __("Due date"), - "cn_source" => __("Source of classification / shelving scheme"), - "cn_sort" => __("Koha normalized classification for sorting"), - "notforloan" => __("Not for loan"), - "itemlost" => __("Lost status"), - "itemlost_on" => __("Lost on"), - "withdrawn" => __("Withdrawn status"), - "withdrawn_on" => __("Withdrawn on"), - "itemcallnumber" => __("Call number"), - "coded_location_qualifier" => __("Coded location qualifier"), - "issues" => __("Total checkouts"), - "renewals" => __("Total renewals"), - "reserves" => __("Total holds"), - "restricted" => __("Use restrictions"), - "itemnotes" => __("Public note"), - "itemnotes_nonpublic" => __("Internal note"), - "holdingbranch" => __("Current library"), - "timestamp" => __("Timestamp"), - "deleted_on" => __("Date of deletion"), - "location" => __("Shelving location"), - "permanent_location" => __("Permanent shelving location"), - "ccode" => __("Collection"), - "itype" => __("Koha item type"), - "stocknumber" => __("Inventory number"), - "damaged" => __("Damaged status"), - "damaged_on" => __("Damaged on"), - "materials" => __("Materials specified"), - "uri" => __("Uniform resource identifier"), - "more_subfields_xml" => __("Additional subfields (XML)"), - "enumchron" => __("Serial enumeraton/chronology"), - "copynumber" => __("Copy number"), - "new_status" => __("New status"), + "barcode" => __("Barcode"), + "biblioitemnumber" => __("Biblioitem number (internal)"), + "biblionumber" => __("Biblio number (internal)"), + "booksellerid" => __("Source of acquisition"), + "ccode" => __("Collection"), + "cn_sort" => __("Koha normalized classification for sorting"), + "cn_source" => __("Source of classification / shelving scheme"), + "coded_location_qualifier" => __("Coded location qualifier"), + "copynumber" => __("Copy number"), + "damaged_on" => __("Damaged on"), + "damaged" => __("Damaged status"), + "dateaccessioned" => __("Date acquired"), + "datelastborrowed" => __("Date last checked out"), + "datelastseen" => __("Date last seen"), + "deleted_on" => __("Date of deletion"), + "enumchron" => __("Serial enumeraton/chronology"), "exclude_from_local_holds_priority" => __("Exclude from local holds priority"), - }, - statistics => { - "datetime" => __("Statistics date and time"), - "branch" => __("Library"), - "value" => __("Value"), - "type" => __("Type"), - "other" => __(""), - "itemnumber" => __("Item number"), - "itemtype" => __("Itemtype"), - "borrowernumber" => __("Borrower number"), + "holdingbranch" => __("Current library"), + "homebranch" => __("Permanent library"), + "issues" => __("Total checkouts"), + "itemcallnumber" => __("Call number"), + "itemlost_on" => __("Lost on"), + "itemlost" => __("Lost status"), + "itemnotes_nonpublic" => __("Internal note"), + "itemnotes" => __("Public note"), + "itemnumber" => __("Item number (internal)"), + "itype" => __("Koha item type"), + "location" => __("Shelving location"), + "materials" => __("Materials specified"), + "more_subfields_xml" => __("Additional subfields (XML)"), + "new_status" => __("New status"), + "notforloan" => __("Not for loan"), + "onloan" => __("Due date"), + "permanent_location" => __("Permanent shelving location"), + "price" => __("Price"), + "renewals" => __("Total renewals"), + "replacementprice" => __("Replacement price"), + "replacementpricedate" => __("Price effective from"), + "reserves" => __("Total holds"), + "restricted" => __("Use restrictions"), + "stack" => __("Shelving control number"), + "stocknumber" => __("Inventory number"), + "timestamp" => __("Timestamp"), + "uri" => __("Uniform resource identifier"), + "withdrawn_on" => __("Withdrawn on"), + "withdrawn" => __("Withdrawn status"), }, biblio => { - "biblionumber" => __("Biblio number"), - "frameworkcode" => __("Framework code"), + "abstract" => __("Abstract"), "author" => __("Author"), - "title" => __("Title"), + "biblionumber" => __("Biblio number"), + "copyrightdate" => __("Copyright date"), + "datecreated" => __("Creation date"), + "frameworkcode" => __("Framework code"), "medium" => __("Medium"), - "subtitle" => __("Remainder of title"), - "part_number" => __("Number of part/section of a work"), - "part_name" => __("Name of part/section of a work"), - "unititle" => __("Uniform title"), "notes" => __("Notes"), + "part_name" => __("Name of part/section of a work"), + "part_number" => __("Number of part/section of a work"), "serial" => __("Is a serial?"), "seriestitle" => __("Series title"), - "copyrightdate" => __("Copyright date"), - "datecreated" => __("Creation date"), + "subtitle" => __("Remainder of title"), "timestamp" => __("Modification date"), - "abstract" => __("Abstract"), + "title" => __("Title"), + "unititle" => __("Uniform title"), }, biblioitems => { + "agerestriction" => __("Age restriction"), "biblioitemnumber" => __("Biblioitem number"), "biblionumber" => __("Biblio number"), - "volume" => __("Volume number"), - "number" => __("Number"), "classification" => __("Classification"), - "itemtype" => __("Biblio-level item type"), + "dewey" => __("Dewey/classification"), + "illus" => __("Illustrations"), "isbn" => __("ISBN"), "issn" => __("ISSN"), - "dewey" => __("Dewey/classification"), - "subclass" => __("Sub classification"), + "itemtype" => __("Biblio-level item type"), + "lccn" => __("LCCN"), + "notes" => __("Notes"), + "number" => __("Number"), + "pages" => __("Number of pages"), + "place" => __("Place of publication"), "publicationyear" => __("Publication date"), "publishercode" => __("Publisher"), - "volumedate" => __("Volume date"), - "volumedesc" => __("Volume information"), - "timestamp" => __("Timestamp"), - "illus" => __("Illustrations"), - "pages" => __("Number of pages"), - "notes" => __("Notes"), "size" => __("Size"), - "place" => __("Place of publication"), - "lccn" => __("LCCN"), - "agerestriction" => __("Age restriction"), - "url" => __("URL"), + "subclass" => __("Sub classification"), + "timestamp" => __("Timestamp"), "title" => __("Title"), + "url" => __("URL"), + "volume" => __("Volume number"), + "volumedate" => __("Volume date"), + "volumedesc" => __("Volume information"), + }, + statistics => { + "borrowernumber" => __("Borrower number"), + "branch" => __("Library"), + "datetime" => __("Statistics date and time"), + "itemnumber" => __("Item number"), + "itemtype" => __("Itemtype"), + "other" => __(""), + "type" => __("Type"), + "value" => __("Value"), }, subscription => { - "startdate" => __("Start date"), - "enddate" => __("End date"), - "periodicity" => __("Periodicity"), + "branchcode" => __("Library"), "callnumber" => __("Call number"), + "enddate" => __("End date"), "location" => __("Location"), - "branchcode" => __("Library"), + "periodicity" => __("Periodicity"), + "startdate" => __("Start date"), }, suggestions => { "author" => __("Author"), + "branchcode" => __("Library"), + "collectiontitle" => __("Collection title"), "copyrightdate" => __("Copyright date"), "isbn" => __("ISBN"), - "publishercode" => __("Publisher"), - "collectiontitle" => __("Collection title"), - "place" => __("Place of publication"), - "quantity" => __("Quantity"), "itemtype" => __("Item type"), - "branchcode" => __("Library"), - "patronreason" => __("Patron reason"), "note" => __("Note"), + "patronreason" => __("Patron reason"), + "place" => __("Place of publication"), + "publishercode" => __("Publisher"), + "quantity" => __("Quantity"), "title" => __("Title"), } }; -- 2.34.1