diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-03-19 10:52:29 +0900 |
---|---|---|
committer | Minseo Lee <itoupluk427@gmail.com> | 2024-03-19 10:52:29 +0900 |
commit | ad43d594c9f63fc85e6927d23cd3f3f21406b002 (patch) | |
tree | 8a20f9f9051ff066bd54c5bc126ccc548e2cb16c /src/lib/moderation/useGlobalLabelStrings.ts | |
parent | 73dae9f7b5c169aa303e9ef9487040e850998edf (diff) | |
parent | 3abf302b0b189c50acf11489bf60bdaeb187b722 (diff) | |
download | voidsky-ad43d594c9f63fc85e6927d23cd3f3f21406b002.tar.zst |
Merge remote-tracking branch 'upstream/main' into patch-3
Diffstat (limited to 'src/lib/moderation/useGlobalLabelStrings.ts')
-rw-r--r-- | src/lib/moderation/useGlobalLabelStrings.ts | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/lib/moderation/useGlobalLabelStrings.ts b/src/lib/moderation/useGlobalLabelStrings.ts new file mode 100644 index 000000000..1c5a48231 --- /dev/null +++ b/src/lib/moderation/useGlobalLabelStrings.ts @@ -0,0 +1,52 @@ +import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' +import {useMemo} from 'react' + +export type GlobalLabelStrings = Record< + string, + { + name: string + description: string + } +> + +export function useGlobalLabelStrings(): GlobalLabelStrings { + const {_} = useLingui() + return useMemo( + () => ({ + '!hide': { + name: _(msg`Content Blocked`), + description: _(msg`This content has been hidden by the moderators.`), + }, + '!warn': { + name: _(msg`Content Warning`), + description: _( + msg`This content has received a general warning from moderators.`, + ), + }, + '!no-unauthenticated': { + name: _(msg`Sign-in Required`), + description: _( + msg`This user has requested that their content only be shown to signed-in users.`, + ), + }, + porn: { + name: _(msg`Pornography`), + description: _(msg`Explicit sexual images.`), + }, + sexual: { + name: _(msg`Sexually Suggestive`), + description: _(msg`Does not include nudity.`), + }, + nudity: { + name: _(msg`Non-sexual Nudity`), + description: _(msg`E.g. artistic nudes.`), + }, + 'graphic-media': { + name: _(msg`Graphic Media`), + description: _(msg`Explicit or potentially disturbing media.`), + }, + }), + [_], + ) +} |