Skip to content
Snippets Groups Projects
Commit a968a38f authored by Azadpour, Elmera's avatar Azadpour, Elmera
Browse files

Merge branch 'main' of https://code.usgs.gov/wma/vizlab/vulnerability-indicators into edit-cap-capt

parents 8d006813 c4df12e9
No related branches found
No related tags found
1 merge request!75Drop map captions and retain alt text
......@@ -6,7 +6,7 @@
<div class="text-container">
<div v-for="reference in text.references" :key="reference.subTitle">
<p>
<span v-html="reference.num" />. <span v-html="reference.authors" />,
<span v-html="reference.authors" />,
<span v-html="reference.year" />,
<a :href="reference.link" target="_blank"><span v-html="reference.title" /></a
><span v-if="reference.type != ''">, </span><span v-html="reference.type" /><span
......@@ -28,7 +28,7 @@ export default {
data() {
return {
text: {}
}
};
},
created() {
const { locale } = useI18n();
......@@ -39,17 +39,28 @@ export default {
import('@/assets/text/referencesText_es.js')
.then((module) => {
this.text = module.default.referencesContent;
this.sortReferences();
})
.catch((error) => console.error('Failed to load Spanish references:', error));
} else {
import('@/assets/text/referencesText_en.js')
.then((module) => {
this.text = module.default.referencesContent;
this.sortReferences();
})
.catch((error) => console.error('Failed to load English references:', error));
}
},
methods: {
sortReferences() {
if (this.text.references && Array.isArray(this.text.references)) {
this.text.references.sort((a, b) => {
return a.authors.localeCompare(b.authors);
});
}
}
}
}
};
</script>
<style scoped lang="scss">
......
......@@ -20,6 +20,14 @@ const routes = [
requiresLang: true, // Add a meta field to indicate language switching
},
},
{
path: '/:lang(en|es)', // Language prefix is required
name: 'VisualizationContent',
component: VisualizationView,
meta: {
requiresLang: true,
},
},
{
path: '/:lang(en|es)?/index.html', // Handle direct navigation to index.html with language
name: 'Index',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment