Skip to content

Commit

Permalink
add localization for flair badge config
Browse files Browse the repository at this point in the history
  • Loading branch information
kabeaty committed Aug 8, 2023
1 parent 50ae6ba commit 9e4a11d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,20 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
return (
<ConfigBox
title={
<Localized id="">
<Localized id="configure-general-flairBadge-header">
<Header container={<legend />}>Custom flair badges</Header>
</Localized>
}
container={<FieldSet />}
>
<Localized id="">
<Localized
id="configure-general-flairBadge-description"
elems={{
externalLink: (
<ExternalLink href="https://docs.coralproject.net/sso" />
),
}}
>
<FormFieldDescription>
Encourage user engagement and participation by adding custom flair
badges for your site. Badges can be allocated as part of your{" "}
Expand All @@ -99,7 +106,7 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
</FormFieldDescription>
</Localized>
<FormField container={<FieldSet />}>
<Localized id="">
<Localized id="configure-general-flairBadge-enable-label">
<Label component="legend">Enable custom flair badges</Label>
</Localized>
<OnOffField name="flairBadges.flairBadgesEnabled" disabled={disabled} />
Expand All @@ -108,10 +115,10 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
<Field name="flairBadgeURL">
{({ input, meta }) => (
<FormField>
<Localized id="">
<Localized id="configure-general-flairBadge-add">
<Label>Add flair by URL</Label>
</Localized>
<Localized id="">
<Localized id="configure-general-flairBadge-add-helperText">
<HelperText>
Paste the web address for your custom flair badge. Supported
file types: png, jpeg, jpg, and gif
Expand All @@ -127,7 +134,7 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
onChange={(e) => setFlairBadgeURLInput(e.target.value)}
value={flairBadgeURLInput}
/>
<Localized id="">
<Localized id="configure-general-flairBadge-add-button">
<Button
iconLeft
className={styles.addButton}
Expand All @@ -153,10 +160,10 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
<Table fullWidth>
<TableHead>
<TableRow>
<Localized id="">
<Localized id="configure-general-flairBadge-table-flairURL">
<TableCell>Flair URL</TableCell>
</Localized>
<Localized id="">
<Localized id="configure-general-flairBadge-table-preview">
<TableCell>Preview</TableCell>
</Localized>
</TableRow>
Expand All @@ -174,7 +181,7 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
<img className={styles.imagePreview} src={url} alt="" />
<Flex className={styles.deleteButton}>
<Localized
id=""
id="configure-general-flairBadge-table-deleteButton"
elems={{
icon: <ButtonSvgIcon Icon={BinIcon} />,
}}
Expand All @@ -196,7 +203,7 @@ const FlairBadgeConfigContainer: FunctionComponent<Props> = ({
})}
</TableBody>
) : (
<Localized id="">
<Localized id="configure-general-flairBadge-table-empty">
<HelperText className={styles.emptyCustomFlairText}>
No custom flair added for this site
</HelperText>
Expand Down
13 changes: 13 additions & 0 deletions src/locales/en-US/admin.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,19 @@ configure-general-featuredBy-title = Featured by
configure-general-featuredBy-enabled = Featured by enabled
configure-general-featuredBy-explanation = Add moderator name to featured comment display
configure-general-flairBadge-header = Custom flair badges
configure-general-flairBadge-description = Encourage user engagement and participation by adding custom flair
badges for your site. Badges can be allocated as part of your <externalLink>JWT claim</externalLink>.
configure-general-flairBadge-enable-label = Enable custom flair badges
configure-general-flairBadge-add = Add flair by URL
configure-general-flairBadge-add-helperText = Paste the web address for your custom flair badge. Supported
file types: png, jpeg, jpg, and gif
configure-general-flairBadge-add-button = Add
configure-general-flairBadge-table-flairURL = Flair URL
configure-general-flairBadge-table-preview = Preview
configure-general-flairBadge-table-deleteButton = <icon></icon> Delete
configure-general-flairBadge-table-empty = No custom flair added for this site
#### Closed Stream Message
configure-general-closedStreamMessage-title = Closed comment stream message
configure-general-closedStreamMessage-explanation = Write a message to appear when a story is closed for commenting.
Expand Down

0 comments on commit 9e4a11d

Please sign in to comment.