A React web application which provides the front-end user interface for the online discovery of archival collections, objects, and agents at the Rockefeller Archive Center.
DIMES is part of Project Electron, an initiative to build sustainable, open and user-centered infrastructure for the archival management of digital records at the Rockefeller Archive Center.
Install git and clone the repository
$ git clone https://github.com/RockefellerArchiveCenter/dimes.git
Install dependencies and run the development server:
$ yarn install
$ yarn start
The repository includes BackstopJS to test visual changes to the site by comparing a set of reference images for different screen sizes. Anytime the CSS styles are changed, use BackstopJS to test locally:
yarn start
yarn backstop-test
.yarn backstop-approve
. Subsequent tests will be compared against these updated reference files.To add or update reference images, edit the scenarios in backstop.json
and run yarn backstop-reference
.
The repository includes linguijs which is an Open-source Internationalization Framework. This allows you to translate static UI elements into other languages.
DIMES is currently translated into the following languages:
Lingui requires a configuration file (located in the base directory and named lingui.config.js
). See the official documentation for full instructions on configuration.
DIMES uses a macro implementation for message extraction. This means that all text with a <Trans></Trans>
block will be automatically extracted for localization files.
/src/locales/
. Then add that ISO 639-1 code to the locales
array in lingui.config.js
.$ yarn lingui-extract
to extract translation strings from application code. This command
will automatically generate a messages.po
file in the language's /src/locales/
directory.msgstr
line in the created messages.po
.$ yarn lingui-compile
to compile the locale files into Javascript files which are used by the application
to present translated strings. This command should be run whenever changes are made to any of the
locale files.import { Trans } from "@lingui/ macro";
.<Trans>
macro if adding a new element, or update
the HTML structure within an already existing <Trans>
tag.$ yarn lingui-extract
to add or update any translation strings from the updated HTML structure.
Failure to run this will result in translated strings being presented as random numbers and letters in the built application. This command's output will also show any translation items without translations. If you have removed
translation strings you may want to run yarn lingui-extract --clean
which will remove any missing strings from the messages.po
file.msgstr
lines in all messages.po
files based on the changes.$ yarn lingui-compile
to update the locale files into Javascript files which are used by the application
to present translated strings.messages.po
file in the desired language's /src/locales/
directory.msgstr
translation.messages.po
file.$ yarn lingui-compile
to update the locale files into Javascript files which are used by the application
to present translated strings.Available dates for reading rooms can be pulled from Aeon via the request broker by setting the REACT_APP_ENABLE_READING_ROOM_SELECT
environment variable. Not setting this environment variable or leaving it blank will disable this feature. Setting this environment variable to any string will activate it.
It is possible to limit the number of duplication requests a user can submit at once by setting the REACT_APP_DUPLICATION_REQUEST_LIMIT
environment variable. Not setting this environment variable or leaving it blank will disable this feature.
This code is released under an MIT License.