Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Create locale chooser `VLanguage` and place in the footer (#1821)

Dhruv Bhanushali30dcfbefa8ec
diff --git a/nuxt.config.ts b/nuxt.config.ts
index 3646c52aa..d819226e6 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -202,6 +202,7 @@ const config: NuxtConfig = {
// unique identifier for the locale in Vue i18n
code: 'en',
name: 'English',
+ nativeName: 'English',
// ISO code used for SEO purposes (html lang attribute)
iso: 'en',
// wp_locale as found in GlotPress
diff --git a/src/assets/icons/globe.svg b/src/assets/icons/globe.svg
new file mode 100644
index 000000000..81ade243c
--- /dev/null
+++ b/src/assets/icons/globe.svg
@@ -0,0 +1,6 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+ <g id="icon" fill="currentColor">
+ <path fill-rule="evenodd" clip-rule="evenodd"
+ d="M5.51749 8.75C6.41755 6.95823 8.03863 5.5911 9.99995 5.02939C9.5354 5.56854 9.13576 6.20527 8.80951 6.90523C8.54437 7.47408 8.3235 8.09299 8.15326 8.75H5.51749ZM4.96262 10.25C4.82371 10.8104 4.75 11.3966 4.75 12C4.75 12.6034 4.82371 13.1896 4.96262 13.75H7.86318C7.78881 13.1834 7.75 12.598 7.75 12C7.75 11.4019 7.78881 10.8165 7.86317 10.25H4.96262ZM9.37773 10.25C9.29449 10.8092 9.25 11.3951 9.25 12C9.25 12.6049 9.2945 13.1908 9.37774 13.75H14.6223C14.7055 13.1908 14.75 12.6049 14.75 12C14.75 11.3952 14.7055 10.8092 14.6223 10.25H9.37773ZM16.1368 10.25C16.2112 10.8165 16.25 11.4019 16.25 12C16.25 12.5981 16.2112 13.1835 16.1368 13.75H19.0374C19.1763 13.1896 19.25 12.6034 19.25 12C19.25 11.3966 19.1763 10.8104 19.0374 10.25H16.1368ZM18.4825 8.75H15.8467C15.6765 8.09302 15.4556 7.47413 15.1905 6.90529C14.8642 6.2053 14.4646 5.56854 14 5.02937C15.9613 5.59107 17.5824 6.95821 18.4825 8.75ZM14.2894 8.75H9.71058C9.84009 8.31962 9.99413 7.91428 10.1691 7.53893C10.6645 6.47611 11.308 5.69218 12 5.23256C12.6919 5.69217 13.3355 6.47613 13.8309 7.53899C14.0059 7.91433 14.1599 8.31964 14.2894 8.75ZM5.51749 15.25H8.15328C8.33284 15.943 8.56873 16.5936 8.85353 17.1879C9.17113 17.8505 9.5558 18.455 10.0001 18.9706C8.03869 18.409 6.41757 17.0418 5.51749 15.25ZM14.2894 15.25H9.7106C9.8492 15.7106 10.0159 16.1424 10.2062 16.5396C10.6974 17.5645 11.3261 18.3198 12.0001 18.7674C12.692 18.3078 13.3356 17.5239 13.8309 16.4611C14.0059 16.0857 14.1599 15.6804 14.2894 15.25ZM15.1905 17.0948C15.4556 16.5259 15.6765 15.907 15.8467 15.25H18.4825C17.5824 17.0418 15.9614 18.4089 14.0001 18.9706C14.4646 18.4315 14.8642 17.7947 15.1905 17.0948ZM3.25 12C3.25 7.16751 7.16751 3.25 12 3.25C16.8325 3.25 20.75 7.16751 20.75 12C20.75 16.8325 16.8325 20.75 12 20.75C7.16751 20.75 3.25 16.8325 3.25 12Z"/>
+ </g>
+</svg>
diff --git a/src/components/VFooter/VFooter.vue b/src/components/VFooter/VFooter.vue
index 5eac5c8c4..f4a945307 100644
--- a/src/components/VFooter/VFooter.vue
+++ b/src/components/VFooter/VFooter.vue
@@ -25,11 +25,7 @@
<!-- Locale chooser and WordPress affiliation graphic -->
<div class="locale-and-wp flex flex-col justify-between gap-10">
- <div
- class="language flex h-10 w-full w-full items-center justify-center rounded-sm border border-dark-charcoal-20 bg-white"
- >
- {{ $t('footer.wip') }}
- </div>
+ <VLanguageSelect v-bind="languageProps" class="language max-w-full" />
<VLink
href="https://wordpress.org"
class="text-dark-charcoal hover:no-underline"
@@ -63,9 +59,13 @@ import useResizeObserver from '~/composables/use-resize-observer'
import { SCREEN_SIZES } from '~/constants/screens'
+import type { SelectFieldProps } from '~/components/VSelectField/VSelectField.vue'
+
import VLink from '~/components/VLink.vue'
import VBrand from '~/components/VBrand/VBrand.vue'
+import VLanguageSelect from '~/components/VLanguageSelect/VLanguageSelect.vue'
+
import WordPress from '~/assets/wordpress.svg?inline'
/**
@@ -75,6 +75,7 @@ import WordPress from '~/assets/wordpress.svg?inline'
export default defineComponent({
name: 'VFooter',
components: {
+ VLanguageSelect,
VLink,
VBrand,
WordPress,
@@ -90,6 +91,10 @@ export default defineComponent({
required: false,
default: undefined,
},
+ languageProps: {
+ type: Object as PropType<SelectFieldProps>,
+ default: () => ({}),
+ },
},
setup(props) {
const { all: allPages, current: currentPage } = usePages(true)
@@ -134,7 +139,7 @@ export default defineComponent({
}
.footer.footer-sm .language {
- @apply w-50;
+ @apply max-w-[12.5rem];
}
.footer.footer-md .logo-and-links {
diff --git a/src/components/VFourOhFour.vue b/src/components/VFourOhFour.vue
index 54871019e..645780fc5 100644
--- a/src/components/VFourOhFour.vue
+++ b/src/components/VFourOhFour.vue
@@ -46,7 +46,11 @@
</div>
</main>
- <VFooter v-if="isNewHeaderEnabled" mode="internal" />
+ <VFooter
+ v-if="isNewHeaderEnabled"
+ mode="internal"
+ :language-props="{ variant: 'borderless' }"
+ />
</div>
</template>
diff --git a/src/components/VLanguageSelect/VLanguageSelect.vue b/src/components/VLanguageSelect/VLanguageSelect.vue
new file mode 100644
index 000000000..e1202170e
--- /dev/null
+++ b/src/components/VLanguageSelect/VLanguageSelect.vue
@@ -0,0 +1,63 @@
+<template>
+ <VSelectField
+ v-bind="$attrs"
+ v-model="locale"
+ field-id="language"
+ :choices="choices"
+ :blank-text="$t('language.language')"
+ :label-text="$t('language.language')"
+ >
+ <template #start>
+ <VIcon :icon-path="globeIcon" />
+ </template>
+ </VSelectField>
+</template>
+
+<script lang="ts">
+import { computed, defineComponent } from '@nuxtjs/composition-api'
+
+import { useI18n } from '~/composables/use-i18n'
+
+import VIcon from '~/components/VIcon/VIcon.vue'
+import VSelectField, {
+ type Choice,
+} from '~/components/VSelectField/VSelectField.vue'
+
+import type { LocaleObject } from '@nuxtjs/i18n'
+
+import globeIcon from '~/assets/icons/globe.svg'
+
+/**
+ * Presents a way for the users to change the app locale and use a translated
+ * version of the app.
+ */
+export default defineComponent({
+ name: 'VLanguageSelect',
+ components: { VSelectField, VIcon },
+ inheritAttrs: false,
+ setup() {
+ const i18n = useI18n()
+ const locale = computed({
+ get: () => i18n.locale,
+ set: (value) => {
+ i18n.setLocale(value)
+ },
+ })
+ const choices = computed<Choice[]>(() =>
+ i18n.locales
+ .map((locale: LocaleObject) => ({
+ key: locale.code,
+ text: locale.nativeName,
+ }))
+ .sort((a, b) => a.key.localeCompare(b.key))
+ )
+
+ return {
+ locale,
+ choices,
+
+ globeIcon,
+ }
+ },
+})
+</script>
diff --git a/src/components/VLanguageSelect/meta/VLanguageSelect.stories.mdx b/src/components/VLanguageSelect/meta/VLanguageSelect.stories.mdx
new file mode 100644
index 000000000..ff1f56282
--- /dev/null
+++ b/src/components/VLanguageSelect/meta/VLanguageSelect.stories.mdx
@@ -0,0 +1,22 @@
+import { Description, Meta, Canvas, Story } from '@storybook/addon-docs'
+
+import VLanguageSelect from '~/components/VLanguageSelect/VLanguageSelect.vue'
+
+<Meta title="Components/VLanguageSelect" component={VLanguageSelect} />
+
+export const Template = (args) => ({
+ template: `
+ <VLanguageSelect v-bind="args" />`,
+ components: { VLanguageSelect },
+ setup() {
+ return { args }
+ },
+})
+
+# VLanguageSelect
+
+<Description of={VLanguageSelect} />
+
+<Canvas>
+ <Story name="Default">{Template.bind({})}</Story>
+</Canvas>
diff --git a/src/components/VSelectField/VSelectField.vue b/src/components/VSelectField/VSelectField.vue
new file mode 100644
index 000000000..f8a731bd0
--- /dev/null
+++ b/src/components/VSelectField/VSelectField.vue
@@ -0,0 +1,133 @@
+<template>
+ <div
+ class="relative m-0.5px box-content block w-fit overflow-hidden rounded-sm border text-sm focus-within:m-0 focus-within:border-1.5 focus-within:border-pink hover:border-dark-charcoal focus-within:hover:border-pink"
+ :class="variant === 'borderless' ? 'border-tx' : 'border-dark-charcoal-20'"
+ >
+ <div class="pointer-events-none absolute inset-y-0 my-auto h-fit start-2">
+ <slot name="start" />
+ </div>
+ <div class="pointer-events-none absolute inset-y-0 my-auto h-fit end-2">
+ <VIcon :icon-path="caretDownIcon" />
+ </div>
+ <select
+ :id="fieldId"
+ v-model="modelMedium"
+ class="flex h-[calc(theme(spacing.10)_-_2_*_theme(borderWidth.DEFAULT))] w-full appearance-none truncate bg-white pe-10"
+ :class="hasStartContent ? 'ps-10' : 'ps-2'"
+ :name="fieldName"
+ v-bind="$attrs"
+ :aria-label="labelText"
+ v-on="$listeners"
+ >
+ <option v-if="blankText" disabled value="">{{ blankText }}</option>
+ <option v-for="choice in choices" :key="choice.key" :value="choice.key">
+ {{ choice.text }}
+ </option>
+ </select>
+ </div>
+</template>
+
+<script lang="ts">
+import { defineComponent, computed, PropType } from '@nuxtjs/composition-api'
+
+import { defineEvent } from '~/types/emits'
+import { ProperlyExtractPropTypes } from '~/types/prop-extraction'
+
+import VIcon from '~/components/VIcon/VIcon.vue'
+
+import caretDownIcon from '~/assets/icons/caret-down.svg'
+
+/**
+ * Represents a singular valid option of the dropdown.
+ */
+export interface Choice {
+ /** the programmatic value of this option */
+ key: string
+ /** the text to show to the user corresponding to this option */
+ text: string
+}
+
+export type SelectFieldProps = ProperlyExtractPropTypes<
+ NonNullable<typeof VSelectField['props']>
+>
+
+/**
+ * This field present many viable choices of which any one may be selected.
+ */
+const VSelectField = defineComponent({
+ name: 'VSelectField',
+ components: { VIcon },
+ inheritAttrs: false,
+ model: {
+ prop: 'modelValue',
+ event: 'update:modelValue',
+ },
+ props: {
+ modelValue: {
+ type: String,
+ default: '',
+ },
+ /**
+ * the text to associate with the blank value option; Skipping this prop
+ * removes the option. This string should be translated.
+ */
+ blankText: {
+ type: String,
+ },
+ /**
+ * the textual content of the label associated with this input field; This
+ * label is SR-only and should be translated.
+ */
+ labelText: {
+ type: String,
+ required: true,
+ },
+ /**
+ * the ID to assign to the field; This can be used to attach custom labels
+ * to the field.
+ */
+ fieldId: {
+ type: String,
+ required: true,
+ },
+ /**
+ * a list of valid choices for this select field. i18n functionality can be
+ * individually toggled for each option
+ */
+ choices: {
+ type: Array as PropType<Choice[]>,
+ default: () => [],
+ },
+ variant: {
+ type: String as PropType<'regular' | 'borderless'>,
+ default: 'regular',
+ },
+ },
+ // using non-native event name to ensure the two are not mixed
+ emits: {
+ 'update:modelValue': defineEvent<[string]>(),
+ },
+ setup(props, { emit, attrs, slots }) {
+ const fieldName = computed(() => attrs['name'] ?? props.fieldId)
+ const modelMedium = computed<string>({
+ get: () => props.modelValue ?? '',
+ set: (value: string) => {
+ emit('update:modelValue', value)
+ },
+ })
+
+ const hasStartContent = computed(() => {
+ return slots && slots.start && slots.start().length !== 0
+ })
+
+ return {
+ fieldName,
+ modelMedium,
+ hasStartContent,
+ caretDownIcon,
+ }
+ },
+})
+
+export default VSelectField
+</script>
diff --git a/src/components/VSelectField/meta/VSelectField.stories.mdx b/src/components/VSelectField/meta/VSelectField.stories.mdx
new file mode 100644
index 000000000..1ee215a28
--- /dev/null
+++ b/src/components/VSelectField/meta/VSelectField.stories.mdx
@@ -0,0 +1,147 @@
+import {
+ Description,
+ ArgsTable,
+ Meta,
+ Canvas,
+ Story,
+} from '@storybook/addon-docs'
+
+import { ref } from '@nuxtjs/composition-api'
+import VIcon from '~/components/VIcon/VIcon.vue'
+import VSelectField from '~/components/VSelectField/VSelectField.vue'
+
+import radioIcon from '~/assets/icons/radiomark.svg'
+
+<Meta
+ title="Components/VSelectField"
+ component={VSelectField}
+ argTypes={{
+ 'update:modelValue': {
+ action: 'update:modelValue',
+ },
+ }}
+/>
+
+export const Template = (args) => ({
+ template: `
+ <VSelectField v-bind="args" v-on="args" />`,
+ components: { VSelectField },
+ setup() {
+ return { args }
+ },
+})
+
+export const baseArgs = {
+ fieldId: 'fruit',
+ blankText: 'Fruit',
+ labelText: 'Fruit',
+ choices: [
+ { key: 'a', text: 'Apple' },
+ { key: 'b', text: 'Banana' },
+ { key: 'c', text: 'Cantaloupe' },
+ ],
+}
+
+# VSelectField
+
+<Description of={VSelectField} />
+
+<ArgsTable of={VSelectField} />
+
+<Canvas>
+ <Story name="Default" args={baseArgs}>
+ {Template.bind({})}
+ </Story>
+</Canvas>
+
+The recommended way to use it is with `v-model` mapping to a `String`. This
+string value will be the `key` field of the selected choice.
+
+export const vModelTemplate = (args) => ({
+ template: `
+ <div>
+ <VSelectField v-model="choice" v-bind="args" />
+ {{ choice }}
+ </div>
+ `,
+ components: { VSelectField },
+ setup() {
+ const choice = ref('a')
+ return { choice, args }
+ },
+})
+
+<Canvas>
+ <Story name="v-model" args={baseArgs}>
+ {vModelTemplate.bind({})}
+ </Story>
+</Canvas>
+
+## With icon
+
+An icon, or anything else of a 24px &times; 24px size, can be added before the
+dropdown by populating the `start` slot.
+
+export const SlotTemplate = (args) => ({
+ template: `
+ <VSelectField v-bind="args">
+ <template #start>
+ <VIcon :icon-path="radioIcon">
+ </template>
+ </VSelectField>
+ `,
+ components: { VSelectField, VIcon },
+ setup() {
+ return { args, radioIcon }
+ },
+})
+
+<Canvas>
+ <Story name="With icon" args={baseArgs}>
+ {SlotTemplate.bind({})}
+ </Story>
+</Canvas>
+
+## With constraints
+
+Note that the `max-width` CSS property can be set on a `VSelectField` but that
+only applies to the rest state click target, the menu is unaffected. This means
+once a long option is selected, it will get clipped.
+
+export const ConstraintTemplate = (args) => ({
+ template: `
+ <VSelectField class="max-w-[100px]" v-bind="args" />`,
+ components: { VSelectField, VIcon },
+ setup() {
+ return { args, radioIcon }
+ },
+})
+
+<Canvas>
+ <Story
+ name="With constraints"
+ args={{
+ ...baseArgs,
+ choices: [
+ { key: 'short', text: 'Kiwi' },
+ {
+ key: 'long',
+ text: 'Bob Gordon American Elderberry',
+ },
+ ],
+ }}
+ >
+ {ConstraintTemplate.bind({})}
+ </Story>
+</Canvas>
+
+## Without border
+
+There is a variant of the select field without the border, currently used only
+on the 404 page.
+
+<Canvas>
+ <Story name="Without border" args={{ ...baseArgs, variant: 'borderless' }}>
+ {Template.bind({})}
+ </Story>
+</Canvas>
diff --git a/src/layouts/default.vue b/src/layouts/default.vue
index 7ddbe379f..28e0540e1 100644
--- a/src/layouts/default.vue
+++ b/src/layouts/default.vue
@@ -22,7 +22,7 @@
<Nuxt v-else class="main-page min-w-0" />
<VSidebarTarget
- class="sidebar fixed overflow-y-auto bg-dark-charcoal-06 end-0"
+ class="sidebar fixed z-10 overflow-y-auto bg-dark-charcoal-06 end-0"
:class="{ 'border-dark-charcoal-20 border-s': isSidebarVisible }"
/>
</main>
diff --git a/src/locales/en.json b/src/locales/en.json
index e5f9fe58e..38dff30b7 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -118,7 +118,9 @@
},
"suggestions": "We appreciate suggestions for new sources from our community of users.",
"issue-button": "Suggest a new source",
- "aria": { "table": "sources table" },
+ "aria": {
+ "table": "sources table"
+ },
"heading": {
"image": "Image Sources",
"audio": "Audio Sources"
@@ -682,5 +684,8 @@
"footer": {
"wordpress-affiliation": "Powered by {wordpress}",
"wip": "\uD83D\uDEA7"
+ },
+ "language": {
+ "language": "Language"
}
}
diff --git a/src/locales/scripts/get-validated-locales.js b/src/locales/scripts/get-validated-locales.js
index 50fe6db43..b09616edc 100644
--- a/src/locales/scripts/get-validated-locales.js
+++ b/src/locales/scripts/get-validated-locales.js
@@ -24,6 +24,7 @@ const getValidatedLocales = async () => {
const allLocales = Object.values(updatedLocaleList).map((locale) => ({
code: locale.slug,
name: locale.name,
+ nativeName: locale.nativeName ?? locale.name,
iso: locale.langCodeIso_639_1,
wpLocale: locale.wpLocale,
dir: locale.textDirection || 'ltr',
diff --git a/test/locales/scripts/valid-locales.json b/test/locales/scripts/valid-locales.json
index 382db5a56..f7db2f42d 100644
--- a/test/locales/scripts/valid-locales.json
+++ b/test/locales/scripts/valid-locales.json
@@ -2,6 +2,7 @@
{
"code": "ar",
"name": "Arabic",
+ "nativeName": "العربية",
"iso": "ar",
"wpLocale": "ar",
"dir": "rtl",
@@ -11,6 +12,7 @@
{
"code": "es",
"name": "Spanish (Spain)",
+ "nativeName": "Español",
"iso": "es",
"wpLocale": "es_ES",
"dir": "ltr",
@@ -20,6 +22,7 @@
{
"code": "ru",
"name": "Russian",
+ "nativeName": "Русский",
"iso": "ru",
"wpLocale": "ru_RU",
"dir": "ltr",
diff --git a/test/storybook/visual-regression/v-language-select.spec.ts b/test/storybook/visual-regression/v-language-select.spec.ts
new file mode 100644
index 000000000..370cb1394
--- /dev/null
+++ b/test/storybook/visual-regression/v-language-select.spec.ts
@@ -0,0 +1,14 @@
+import { Page, test, expect } from '@playwright/test'
+
+import { makeGotoWithArgs } from '~~/test/storybook/utils/args'
+
+const expectSnapshot = async (name: string, page: Page) => {
+ expect(await page.screenshot()).toMatchSnapshot({ name: `${name}.png` })
+}
+
+test.describe('VLanguageSelect', () => {
+ test('default', async ({ page }) => {
+ await makeGotoWithArgs('components-vlanguageselect--default-story')(page)
+ await expectSnapshot('vlanguageselect-default', page)
+ })
+})
diff --git a/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png b/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png
new file mode 100644
index 000000000..22bb4bf2a
Binary files /dev/null and b/test/storybook/visual-regression/v-language-select.spec.ts-snapshots/vlanguageselect-default-linux.png differ
diff --git a/test/storybook/visual-regression/v-select-field.spec.ts b/test/storybook/visual-regression/v-select-field.spec.ts
new file mode 100644
index 000000000..12185e785
--- /dev/null
+++ b/test/storybook/visual-regression/v-select-field.spec.ts
@@ -0,0 +1,24 @@
+import { Page, test, expect } from '@playwright/test'
+
+import { makeGotoWithArgs } from '~~/test/storybook/utils/args'
+
+const expectSnapshot = async (name: string, page: Page) => {
+ expect(await page.screenshot()).toMatchSnapshot({ name: `${name}.png` })
+}
+
+test.describe('VSelectField', () => {
+ test('default', async ({ page }) => {
+ await makeGotoWithArgs('components-vselectfield--default-story')(page)
+ await expectSnapshot('vselectfield-default', page)
+ })
+
+ test('with icon', async ({ page }) => {
+ await makeGotoWithArgs('components-vselectfield--with-icon')(page)
+ await expectSnapshot('vselectfield-with-icon', page)
+ })
+
+ test('without border', async ({ page }) => {
+ await makeGotoWithArgs('components-vselectfield--without-border')(page)
+ await expectSnapshot('vselectfield-without-border', page)
+ })
+})
diff --git a/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-default-linux.png b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-default-linux.png
new file mode 100644
index 000000000..707fda678
Binary files /dev/null and b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-default-linux.png differ
diff --git a/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-with-icon-linux.png b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-with-icon-linux.png
new file mode 100644
index 000000000..683fc01ef
Binary files /dev/null and b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-with-icon-linux.png differ
diff --git a/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-without-border-linux.png b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-without-border-linux.png
new file mode 100644
index 000000000..f44edbd99
Binary files /dev/null and b/test/storybook/visual-regression/v-select-field.spec.ts-snapshots/vselectfield-without-border-linux.png differ
diff --git a/typings/nuxt__types/index.d.ts b/typings/nuxt__types/index.d.ts
index a3f1532fc..80b89a595 100644
--- a/typings/nuxt__types/index.d.ts
+++ b/typings/nuxt__types/index.d.ts
@@ -1,4 +1,5 @@
import '@nuxt/types'
+import '@nuxtjs/i18n'
import type { Details as UADetails } from 'express-useragent'
declare module '@nuxt/types' {
@@ -9,3 +10,14 @@ declare module '@nuxt/types' {
$ua: UADetails | null
}
}
+
+declare module '@nuxtjs/i18n' {
+ /**
+ * We put a little extra information in the Vue-i18n `locales` field such as the
+ * locale's name and native name, which comes in use here.
+ */
+ export interface LocaleObject {
+ name: string
+ nativeName: string
+ }
+}