Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions apps/settings/src/components/PersonalInfo/PronounsSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
:placeholder="randomPronounsPlaceholder" />
</template>

<script>
import { loadState } from '@nextcloud/initial-state'
<script lang="ts">
import type { IAccountProperty } from '../../constants/AccountPropertyConstants.ts'

import { loadState } from '@nextcloud/initial-state'
import { t } from '@nextcloud/l10n'
import { defineComponent } from 'vue'
import AccountPropertySection from './shared/AccountPropertySection.vue'
import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.ts'

import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.js'

const { pronouns } = loadState('settings', 'personalInfoParameters', {})
const { pronouns } = loadState<{ pronouns: IAccountProperty }>('settings', 'personalInfoParameters')

export default {
export default defineComponent({
name: 'PronounsSection',

components: {
Expand All @@ -33,13 +35,13 @@ export default {
computed: {
randomPronounsPlaceholder() {
const pronouns = [
this.t('settings', 'she/her'),
this.t('settings', 'he/him'),
this.t('settings', 'they/them'),
t('settings', 'she/her'),
t('settings', 'he/him'),
t('settings', 'they/them'),
]
const pronounsExample = pronouns[Math.floor(Math.random() * pronouns.length)]
return this.t('settings', `Your pronouns. E.g. ${pronounsExample}`, { pronounsExample })
return t('settings', 'Your pronouns. E.g. {pronounsExample}', { pronounsExample })
},
},
}
})
</script>