Skip to content

Commit a28526d

Browse files
authored
Merge pull request #53698 from nextcloud/fix/pronouns-translation
fix(settings): translate pronounce account property
2 parents 57a375c + 89738e1 commit a28526d

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

apps/settings/src/components/PersonalInfo/PronounsSection.vue

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
:placeholder="randomPronounsPlaceholder" />
99
</template>
1010

11-
<script>
12-
import { loadState } from '@nextcloud/initial-state'
11+
<script lang="ts">
12+
import type { IAccountProperty } from '../../constants/AccountPropertyConstants.ts'
1313
14+
import { loadState } from '@nextcloud/initial-state'
15+
import { t } from '@nextcloud/l10n'
16+
import { defineComponent } from 'vue'
1417
import AccountPropertySection from './shared/AccountPropertySection.vue'
18+
import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.ts'
1519
16-
import { NAME_READABLE_ENUM } from '../../constants/AccountPropertyConstants.js'
17-
18-
const { pronouns } = loadState('settings', 'personalInfoParameters', {})
20+
const { pronouns } = loadState<{ pronouns: IAccountProperty }>('settings', 'personalInfoParameters')
1921
20-
export default {
22+
export default defineComponent({
2123
name: 'PronounsSection',
2224
2325
components: {
@@ -33,13 +35,13 @@ export default {
3335
computed: {
3436
randomPronounsPlaceholder() {
3537
const pronouns = [
36-
this.t('settings', 'she/her'),
37-
this.t('settings', 'he/him'),
38-
this.t('settings', 'they/them'),
38+
t('settings', 'she/her'),
39+
t('settings', 'he/him'),
40+
t('settings', 'they/them'),
3941
]
4042
const pronounsExample = pronouns[Math.floor(Math.random() * pronouns.length)]
41-
return this.t('settings', `Your pronouns. E.g. ${pronounsExample}`, { pronounsExample })
43+
return t('settings', 'Your pronouns. E.g. {pronounsExample}', { pronounsExample })
4244
},
4345
},
44-
}
46+
})
4547
</script>

dist/settings-vue-settings-personal-info.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/settings-vue-settings-personal-info.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)