diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7a447093..2b764eac 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,7 +103,7 @@ If you are updating a translation in your local environment, you can run the fol ### Adding a new language 1. Add a new file in [locales](./locales) folder with the language code as the filename. -2. Copy [en-US](./locales/en-US.json) and translate the strings. +2. Copy [en](./locales/en.json) and translate the strings. 3. Add the language to the `locales` array in [config/i18n.ts](./config/i18n.ts#L61), below `en` and `ar`: - If your language has multiple country variants, add the generic one for language only (only if there are a lot of common entries, you can always add it as a new one) - Add all country variants in [country variants object](./config/i18n.ts#L12) diff --git a/components/account/AccountHeader.vue b/components/account/AccountHeader.vue index df7f330b..5c6c89b4 100644 --- a/components/account/AccountHeader.vue +++ b/components/account/AccountHeader.vue @@ -81,6 +81,8 @@ watchEffect(() => { iconFields.value = icons }) +const personalNoteDraft = ref(relationship?.note ?? '') + async function editNote(event: Event) { if (!event.target || !('value' in event.target) || !relationship) return @@ -92,10 +94,13 @@ async function editNote(event: Event) { const newNoteApiResult = await client.v1.accounts.createNote(account.id, { comment: newNote }) relationship.note = newNoteApiResult.note + personalNoteDraft.value = relationship.note ?? '' } const isSelf = $(useSelfAccount(() => account)) const isNotifiedOnPost = $computed(() => !!relationship?.notifying) + +const personalNoteMaxLength = 2000