import {msg} from '@lingui/macro' export type TerminologyPreference = 'skeet' | 'post' | 'spell' /** * Returns the appropriate terminology based on the user's preference * @param preference - The user's terminology preference ('skeet', 'post', or 'spell') * @param variants - An object with message descriptors for each terminology option * @returns The appropriate message descriptor based on the preference */ export function getTerminology( preference: TerminologyPreference | undefined, variants: T, ): T[keyof T] { const pref = preference ?? 'skeet' return variants[pref] } /** * Common terminology variants used throughout the app */ export const TERMINOLOGY = { // Single post singular: { skeet: msg`skeet`, post: msg`post`, spell: msg`spell`, }, // Multiple posts plural: { skeet: msg`skeets`, post: msg`posts`, spell: msg`spells`, }, // "Skeet by @handle" byHandle: (handle: string) => ({ skeet: msg`Skeet by @${handle}`, post: msg`Post by @${handle}`, spell: msg`Spell by @${handle}`, }), // Repost terminology repost: { singular: { skeet: msg`reskeet`, post: msg`repost`, spell: msg`respell`, }, plural: { skeet: msg`reskeets`, post: msg`reposts`, spell: msg`respells`, }, pastTense: { skeet: msg`reskeeted`, post: msg`reposted`, spell: msg`respelled`, }, byLine: { skeet: msg`Reskeeted By`, post: msg`Reposted By`, spell: msg`Respelled By`, }, action: { skeet: msg`reskeet`, post: msg`repost`, spell: msg`respell`, }, }, // For metrics/counts metrics: { skeet: msg`skeets metrics`, post: msg`posts metrics`, spell: msg`spells metrics`, }, // For carousel carousel: { skeet: msg`Combine reskeets into a horizontal carousel`, post: msg`Combine reposts into a horizontal carousel`, spell: msg`Combine respells into a horizontal carousel`, }, // For notifications viaRepostNotification: { skeet: msg`Disable "via reskeet" notifications`, post: msg`Disable "via repost" notifications`, spell: msg`Disable "via respell" notifications`, }, viaRepostPrivacy: { skeet: msg`Forcefully disables the notifications other people receive when you like/reskeet a skeet someone else has reskeeted for privacy.`, post: msg`Forcefully disables the notifications other people receive when you like/repost a post someone else has reposted for privacy.`, spell: msg`Forcefully disables the notifications other people receive when you like/respell a spell someone else has respelled for privacy.`, }, // For external share buttons externalShareButtons: { skeet: msg`Show "Open original skeet" and "Open skeet in PDSls" buttons`, post: msg`Show "Open original post" and "Open post in PDSls" buttons`, spell: msg`Show "Open original spell" and "Open spell in PDSls" buttons`, }, // For metrics labels repostMetrics: { skeet: msg`Disable reskeets metrics`, post: msg`Disable reposts metrics`, spell: msg`Disable respells metrics`, }, // For deletion messages deleted: { skeet: msg`This skeet was deleted by its author`, post: msg`This post was deleted by its author`, spell: msg`This spell was deleted by its author`, }, deletedShort: { skeet: msg`Skeet has been deleted`, post: msg`Post has been deleted`, spell: msg`Spell has been deleted`, }, // For error messages notFound: { skeet: msg`Skeet not found`, post: msg`Post not found`, spell: msg`Spell not found`, }, blocked: { skeet: msg`Skeet blocked`, post: msg`Post blocked`, spell: msg`Spell blocked`, }, errorLoading: { skeet: msg`Error loading skeet`, post: msg`Error loading post`, spell: msg`Error loading spell`, }, // For success messages sent: { skeet: msg`Your skeet was sent`, post: msg`Your post was sent`, spell: msg`Your spell was sent`, }, sentPlural: { skeet: msg`Your skeets were sent`, post: msg`Your posts were sent`, spell: msg`Your spells were sent`, }, pinned: { skeet: msg`Skeet pinned`, post: msg`Post pinned`, spell: msg`Spell pinned`, }, unpinned: { skeet: msg`Skeet unpinned`, post: msg`Post unpinned`, spell: msg`Spell unpinned`, }, failedToPin: { skeet: msg`Failed to pin skeet`, post: msg`Failed to pin post`, spell: msg`Failed to pin spell`, }, // For composer addAnother: { skeet: msg`Add another skeet`, post: msg`Add another post`, spell: msg`Add another spell`, }, anythingBut: { skeet: msg`Anything but skeet`, post: msg`Anything but post`, spell: msg`Anything but spell`, }, delete: { skeet: msg`Delete skeet`, post: msg`Delete post`, spell: msg`Delete spell`, }, discard: { skeet: msg`Discard skeet?`, post: msg`Discard post?`, spell: msg`Discard spell?`, }, discardConfirm: { skeet: msg`Are you sure you'd like to discard this skeet?`, post: msg`Are you sure you'd like to discard this post?`, spell: msg`Are you sure you'd like to discard this spell?`, }, view: { skeet: msg`View skeet`, post: msg`View post`, spell: msg`View spell`, }, // For composer actions composeNew: { skeet: msg`Compose new skeet`, post: msg`Compose new post`, spell: msg`Compose new spell`, }, newAction: { skeet: msg`New Skeet`, post: msg`New Post`, spell: msg`New Spell`, }, postAll: { skeet: msg`Skeet All`, post: msg`Post All`, spell: msg`Spell All`, }, postSingle: { skeet: msg`Skeet`, post: msg`Post`, spell: msg`Spell`, }, // For language selection selectLanguage: { skeet: msg`Select skeet language`, post: msg`Select post language`, spell: msg`Select spell language`, }, chooseLanguages: { skeet: msg`Choose Skeet Languages`, post: msg`Choose Post Languages`, spell: msg`Choose Spell Languages`, }, languageDescription: { skeet: msg`Select up to 3 languages used in this skeet`, post: msg`Select up to 3 languages used in this post`, spell: msg`Select up to 3 languages used in this spell`, }, replyingLanguage: (langs: string) => ({ skeet: msg`The skeet you're replying to was marked as being written in ${langs}`, post: msg`The post you're replying to was marked as being written in ${langs}`, spell: msg`The spell you're replying to was marked as being written in ${langs}`, }), // For interaction settings interactionSettings: { skeet: msg`Skeet interaction settings`, post: msg`Post interaction settings`, spell: msg`Spell interaction settings`, }, editInteractionSettings: { skeet: msg`Edit skeet interaction settings`, post: msg`Edit post interaction settings`, spell: msg`Edit spell interaction settings`, }, whoCanInteract: { skeet: msg`Who can interact with this skeet?`, post: msg`Who can interact with this post?`, spell: msg`Who can interact with this spell?`, }, // For embedding embed: { skeet: msg`Embed skeet`, post: msg`Embed post`, spell: msg`Embed spell`, }, embedDescription: { skeet: msg`Embed this skeet in your website. Simply copy the following snippet and paste it into the HTML code of your website.`, post: msg`Embed this post in your website. Simply copy the following snippet and paste it into the HTML code of your website.`, spell: msg`Embed this spell in your website. Simply copy the following snippet and paste it into the HTML code of your website.`, }, // For sharing copyLink: { skeet: msg`Copy link to skeet`, post: msg`Copy link to post`, spell: msg`Copy link to spell`, }, shareUri: { skeet: msg`Share skeet at:// URI`, post: msg`Share post at:// URI`, spell: msg`Share spell at:// URI`, }, copyUri: { skeet: msg`Copy skeet at:// URI`, post: msg`Copy post at:// URI`, spell: msg`Copy spell at:// URI`, }, sendTo: { skeet: msg`Send skeet to...`, post: msg`Send post to...`, spell: msg`Send spell to...`, }, openOriginal: { skeet: msg`Open original skeet`, post: msg`Open original post`, spell: msg`Open original spell`, }, openInPDSls: { skeet: msg`Open skeet in PDSls`, post: msg`Open post in PDSls`, spell: msg`Open spell in PDSls`, }, // For reporting report: { skeet: msg`Report this skeet`, post: msg`Report this post`, spell: msg`Report this spell`, }, reportWhy: { skeet: msg`Why should this skeet be reviewed?`, post: msg`Why should this post be reviewed?`, spell: msg`Why should this spell be reviewed?`, }, // For search and browse search: { skeet: msg`Search skeets`, post: msg`Search posts`, spell: msg`Search spells`, }, searchProfile: (handle: string) => ({ skeet: msg`Search @${handle}'s skeets`, post: msg`Search @${handle}'s posts`, spell: msg`Search @${handle}'s spells`, }), searchMy: { skeet: msg`Search my skeets`, post: msg`Search my posts`, spell: msg`Search my spells`, }, browse: (tag: string) => ({ skeet: msg`Browse skeets about ${tag}`, post: msg`Browse posts about ${tag}`, spell: msg`Browse spells about ${tag}`, }), browseTagged: (tag: string) => ({ skeet: msg`Browse skeets tagged with ${tag}`, post: msg`Browse posts tagged with ${tag}`, spell: msg`Browse spells tagged with ${tag}`, }), seeTag: (tag: string) => ({ skeet: msg`See ${tag} skeets`, post: msg`See ${tag} posts`, spell: msg`See ${tag} spells`, }), seeTagByUser: (tag: string) => ({ skeet: msg`See ${tag} skeets by user`, post: msg`See ${tag} posts by user`, spell: msg`See ${tag} spells by user`, }), // For loading and errors loadNew: { skeet: msg`Load new skeets`, post: msg`Load new posts`, spell: msg`Load new spells`, }, fetchError: { skeet: msg`There was an issue fetching skeets. Tap here to try again.`, post: msg`There was an issue fetching posts. Tap here to try again.`, spell: msg`There was an issue fetching spells. Tap here to try again.`, }, uploadFailed: { skeet: msg`Skeet failed to upload. Please check your Internet connection and try again.`, post: msg`Post failed to upload. Please check your Internet connection and try again.`, spell: msg`Spell failed to upload. Please check your Internet connection and try again.`, }, // For feeds and filtering ranOut: { skeet: msg`We ran out of skeets from your follows. Here's the latest from`, post: msg`We ran out of posts from your follows. Here's the latest from`, spell: msg`We ran out of spells from your follows. Here's the latest from`, }, // For quote posts quoteAction: { skeet: msg`Quote skeet`, post: msg`Quote post`, spell: msg`Quote spell`, }, quoteDisabled: { skeet: msg`Quote skeets disabled`, post: msg`Quote posts disabled`, spell: msg`Quote spells disabled`, }, allowQuote: { skeet: msg`Allow quote skeets`, post: msg`Allow quote posts`, spell: msg`Allow quote spells`, }, quoteAuthorDisabled: { skeet: msg`This skeet's author has disabled quote skeets.`, post: msg`This post's author has disabled quote posts.`, spell: msg`This spell's author has disabled quote spells.`, }, cancelQuote: { skeet: msg`Cancel quote skeet`, post: msg`Cancel quote post`, spell: msg`Cancel quote spell`, }, noQuoteYet: { skeet: msg`No one but the author can quote this skeet.`, post: msg`No one but the author can quote this post.`, spell: msg`No one but the author can quote this spell.`, }, // For reply settings repliesDisabled: { skeet: msg`Replies to this skeet are disabled.`, post: msg`Replies to this post are disabled.`, spell: msg`Replies to this spell are disabled.`, }, everyoneCanReply: { skeet: msg`Everybody can reply to this skeet.`, post: msg`Everybody can reply to this post.`, spell: msg`Everybody can reply to this spell.`, }, unknownThreadgate: { skeet: msg`This skeet has an unknown type of threadgate on it. Your app may be out of date.`, post: msg`This post has an unknown type of threadgate on it. Your app may be out of date.`, spell: msg`This spell has an unknown type of threadgate on it. Your app may be out of date.`, }, // For replies repliedTo: { skeet: msg`Replied to a skeet`, post: msg`Replied to a post`, spell: msg`Replied to a spell`, }, repliedToBlocked: { skeet: msg`Replied to a blocked skeet`, post: msg`Replied to a blocked post`, spell: msg`Replied to a blocked spell`, }, replyWasDeleted: { skeet: msg`We're sorry! The skeet you are replying to has been deleted.`, post: msg`We're sorry! The post you are replying to has been deleted.`, spell: msg`We're sorry! The spell you are replying to has been deleted.`, }, sortReplies: { skeet: msg`Sort replies to the same skeet by:`, post: msg`Sort replies to the same post by:`, spell: msg`Sort replies to the same spell by:`, }, showRepliesTree: { skeet: msg`Show skeet replies in a threaded tree view`, post: msg`Show post replies in a threaded tree view`, spell: msg`Show spell replies in a threaded tree view`, }, // For visibility onlyLoggedIn: { skeet: msg`This skeet is only visible to logged-in users.`, post: msg`This post is only visible to logged-in users.`, spell: msg`This spell is only visible to logged-in users.`, }, noteOnlyLoggedIn: { skeet: msg`Note: This skeet is only visible to logged-in users.`, post: msg`Note: This post is only visible to logged-in users.`, spell: msg`Note: This spell is only visible to logged-in users.`, }, }