about summary refs log tree commit diff
path: root/src/components/moderation
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-07-25 18:07:15 -0500
committerGitHub <noreply@github.com>2024-07-25 18:07:15 -0500
commit783fd351ba5299a74cc9e6885939ef09034ed97d (patch)
treea204d2745402ba183bc68be15dbdc3677303f7ba /src/components/moderation
parente7b485f185913dd52f807c232b3b9c9a580ae33d (diff)
downloadvoidsky-783fd351ba5299a74cc9e6885939ef09034ed97d.tar.zst
Add labels to a few missing places (#4838)
Diffstat (limited to 'src/components/moderation')
-rw-r--r--src/components/moderation/LabelPreference.tsx7
-rw-r--r--src/components/moderation/LabelsOnMeDialog.tsx14
2 files changed, 15 insertions, 6 deletions
diff --git a/src/components/moderation/LabelPreference.tsx b/src/components/moderation/LabelPreference.tsx
index 619164303..78b50ff8b 100644
--- a/src/components/moderation/LabelPreference.tsx
+++ b/src/components/moderation/LabelPreference.tsx
@@ -174,7 +174,7 @@ export function LabelerLabelPreference({
   disabled?: boolean
   labelerDid?: string
 }) {
-  const {i18n} = useLingui()
+  const {_, i18n} = useLingui()
   const t = useTheme()
   const {gtPhone} = useBreakpoints()
 
@@ -243,7 +243,10 @@ export function LabelerLabelPreference({
               ) : isGlobalLabel ? (
                 <Trans>
                   Configured in{' '}
-                  <InlineLinkText to="/moderation" style={a.text_sm}>
+                  <InlineLinkText
+                    label={_(msg`moderation settings`)}
+                    to="/moderation"
+                    style={a.text_sm}>
                     moderation settings
                   </InlineLinkText>
                   .
diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx
index e581d22c1..b920a0d25 100644
--- a/src/components/moderation/LabelsOnMeDialog.tsx
+++ b/src/components/moderation/LabelsOnMeDialog.tsx
@@ -128,6 +128,9 @@ function Label({
   const t = useTheme()
   const {_} = useLingui()
   const {labeler, strings} = useLabelInfo(label)
+  const sourceName = labeler
+    ? sanitizeHandle(labeler.creator.handle, '@')
+    : label.src
   return (
     <View
       style={[
@@ -169,13 +172,12 @@ function Label({
             <Trans>
               Source:{' '}
               <InlineLinkText
+                label={sourceName}
                 to={makeProfileLink(
                   labeler ? labeler.creator : {did: label.src, handle: ''},
                 )}
                 onPress={() => control.close()}>
-                {labeler
-                  ? sanitizeHandle(labeler.creator.handle, '@')
-                  : label.src}
+                {sourceName}
               </InlineLinkText>
             </Trans>
           )}
@@ -203,6 +205,9 @@ function AppealForm({
   const isAccountReport = 'did' in subject
   const agent = useAgent()
   const gate = useGate()
+  const sourceName = labeler
+    ? sanitizeHandle(labeler.creator.handle, '@')
+    : label.src
 
   const {mutate, isPending} = useMutation({
     mutationFn: async () => {
@@ -260,12 +265,13 @@ function AppealForm({
         <Trans>
           This appeal will be sent to{' '}
           <InlineLinkText
+            label={sourceName}
             to={makeProfileLink(
               labeler ? labeler.creator : {did: label.src, handle: ''},
             )}
             onPress={() => control.close()}
             style={[a.text_md, a.leading_snug]}>
-            {labeler ? sanitizeHandle(labeler.creator.handle, '@') : label.src}
+            {sourceName}
           </InlineLinkText>
           .
         </Trans>