You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This could be related to #3470, but that appears to be fixed -- at least the multilingual demo example that was linked as not working, does appear to me to work now -- although that ticket is still open.
Current behavior
If a "homepage" property is present in a manifest, we currently display it in the Related > Links section of the viewer sidebar:
However, if the manifest includes multiple language versions of the homepage label, I believe we display the first one, without checking to see if that one matches the currently selected locale. For example, for this manifest edited to include multiple language labels for the homepage property:
"homepage": [
{
"id": "https://www.getty.edu/art/collection/object/103RQQ",
"type": "Text",
"label": {
"en": [
"Home page at the Getty Museum Collection"
],
"fr": [
"French label for home page"
]
},
"format": "text/html",
"language": [
"en"
]
}
],
The label for the homepage link is always the value for the first language in the manifest, whether I've chosen the English or French locale, and if I swap the order of the en and fr language attributes.
So it appears that we're simply not looking for the presence other language attributes in the homepage property, or there's a bug in the code that does try to do this.
Desired behavior
The desired behavior is we check the currently selected locale of the viewer and if there is a homepage language attribute that matches that locale, we use that label for the homepage link. We currently do this as desired for the label property of the metadata property, for example -- see how this cookbook manifest correctly displays "Auteur," "Sujet," and the Subject value as labels if you load it in the viewer and change your locale to French:
As an example, going back to my simplistic manifest edit above that adds a fr attribute to the homepage label, if that is in the loaded manifest and we are in the fr locale, we'd expect the Related > Links section to show the fr version of the label:
The text was updated successfully, but these errors were encountered:
This could be related to #3470, but that appears to be fixed -- at least the multilingual demo example that was linked as not working, does appear to me to work now -- although that ticket is still open.
Current behavior
If a "homepage" property is present in a manifest, we currently display it in the Related > Links section of the viewer sidebar:
However, if the manifest includes multiple language versions of the homepage label, I believe we display the first one, without checking to see if that one matches the currently selected locale. For example, for this manifest edited to include multiple language labels for the homepage property:
The label for the homepage link is always the value for the first language in the manifest, whether I've chosen the English or French locale, and if I swap the order of the
en
andfr
language attributes.So it appears that we're simply not looking for the presence other language attributes in the homepage property, or there's a bug in the code that does try to do this.
Desired behavior
The desired behavior is we check the currently selected locale of the viewer and if there is a homepage language attribute that matches that locale, we use that label for the homepage link. We currently do this as desired for the
label
property of themetadata
property, for example -- see how this cookbook manifest correctly displays "Auteur," "Sujet," and the Subject value as labels if you load it in the viewer and change your locale to French:As an example, going back to my simplistic manifest edit above that adds a
fr
attribute to the homepage label, if that is in the loaded manifest and we are in thefr
locale, we'd expect the Related > Links section to show thefr
version of the label:The text was updated successfully, but these errors were encountered: