archesproject / arches-for-science

Arches for Science
GNU General Public License v3.0
14 stars 9 forks source link

[i18n] Digital resource identifier is a string #1524

Open jacobtylerwalls opened 10 months ago

jacobtylerwalls commented 10 months ago

Because the "service identifier" node on the Digital Resource graph is a string, and not a URL, it's keyed on "en". That fails assumptions like this that the active language always has a stored value:

https://github.com/archesproject/arches-for-science/blob/600c7e0516ff894008826ef78297e7701e53040f/afs/media/js/views/components/workflows/sample-taking-workflow/sample-taking-sample-location-step.js#L31

To reproduce: Enable the language switcher Sample Taking > Image Step Switch the language away from english:

Result: page freeze

knockout-latest.js:20 Uncaught TypeError: Cannot read properties of undefined (reading 'value')
    at new viewModel (sample-taking-sample-location-step.js:30:139)
...

Should we make this node a URL?

chiatt commented 10 months ago

I agree we should change it to a url