archivesspace icon indicating copy to clipboard operation
archivesspace copied to clipboard

Top Container Type does not always use translations from container_type enumeration

Open kloor opened this issue 2 years ago • 0 comments

Expected Behavior

Our Controlled Value List for container_type includes "flat_file", which has an English enumeration translation of "Flat File". When a Top Container that is a Flat File is displayed, the title should start with "Flat File <Indicator>: ".

Current Behavior

Instead, it currently displays as "Flat_file :" in both the frontend and public UI.

Possible Solution

The top_container.rb display_string and long_display_string simply use type.capitalize instead of properly looking up the translation. There may be other areas where a translation is not used.

Steps to Reproduce (for bugs)

  1. Create a new container_type value of "flat_file"
  2. Add "flat_file: Flat File" to the container_type English enumerations in locales/enums/en.yml.
  3. Reload server, and set the container_type of a Top Container to Flat File (the Type selection properly has the translation).
  4. After saving the Top Container, the displayed title has "Flat_file <Indicator>: " at the beginning and the Container Type field is displayed as "flat_file".

Context

Our archivists wish to use "flat_file" as a Top Container type.

Your Environment

  • Version used: 3.4.1

kloor avatar Sep 26 '23 18:09 kloor