Skip to content

Commit

Permalink
Improve i18n for branding
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Oct 22, 2021
1 parent 4b99e45 commit 2f9f849
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
25 changes: 14 additions & 11 deletions components/Giscus.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useContext, useEffect } from 'react';
import { AuthContext, ConfigContext } from '../lib/context';
import { useGiscusTranslation } from '../lib/i18n';
import { Trans, useGiscusTranslation } from '../lib/i18n';
import { emitData } from '../lib/messages';
import { IMetadataMessage } from '../lib/types/giscus';
import { useFrontBackDiscussion } from '../services/giscus/discussions';
Expand Down Expand Up @@ -115,16 +115,19 @@ export default function Giscus({ onDiscussionCreateRequest, onError }: IGiscusPr
) : null}
{shouldShowBranding ? (
<em className="text-sm color-text-secondary">
{' '}
{t('poweredBy')}{' '}
<a
href="https://giscus.app"
target="_blank"
rel="noreferrer noopener nofollow"
className="Link--secondary"
>
giscus
</a>
<Trans
i18nKey="common:poweredBy"
components={{
a: (
<a
href="https://giscus.app"
target="_blank"
rel="noreferrer noopener nofollow"
className="Link--secondary"
/>
),
}}
/>
</em>
) : null}
</div>
Expand Down
2 changes: 1 addition & 1 deletion locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"loading": "Loading",
"loadingComments": "Loading comments…",
"loadingPreview": "Loading preview…",
"poweredBy": "– powered by",
"poweredBy": "– powered by <a>giscus</a>",
"showPreviousReplies": {
"0": "Show {{count}} previous replies",
"one": "Show {{count}} previous reply",
Expand Down
2 changes: 1 addition & 1 deletion locales/pl/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"loading": "Wczytywanie",
"loadingComments": "Wczytywanie komentarzy…",
"loadingPreview": "Wczytywanie podglądu…",
"poweredBy": "– zasilane przez",
"poweredBy": "– zasilane przez <a>giscus</a>",
"showPreviousReplies": {
"0": "Pokaż {{count}} poprzednich odpowiedzi",
"one": "Pokaż poprzednią odpowiedź",
Expand Down
2 changes: 1 addition & 1 deletion locales/ro/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"loading": "Încărcare",
"loadingComments": "Încărcare comentarii…",
"loadingPreview": "Încărcare previzualizare…",
"poweredBy": "– oferit de",
"poweredBy": "– oferit de <a>giscus</a>",
"showPreviousReplies": {
"0": "Arată {{count}} răspunsuri anterioare",
"one": "Arată {{count}} răspuns anterior",
Expand Down

1 comment on commit 2f9f849

@vercel
Copy link

@vercel vercel bot commented on 2f9f849 Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.