Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

privacy and terms of service routable links added #1192

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ui/src/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ const Index = () => {
<footer className="bg-light">
<Container className="py-3">
<p className="text-center mb-0 small text-secondary">
<a className="m-2" href="/privacy" target="_blank">
Copy link
Member

Choose a reason for hiding this comment

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

m-2 has margins in multiple directions and can be changed to me-2

Copy link
Member

Choose a reason for hiding this comment

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

class should be me-2

Privacy Policy
Copy link
Member

Choose a reason for hiding this comment

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

Content should be translated

</a>
<a href="/tos" target="_blank">
Terms of Service
Copy link
Member

Choose a reason for hiding this comment

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

Content should be translated

Copy link
Author

Choose a reason for hiding this comment

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

if u have the transaletd privacy policy and terms of service it will surely work out

Copy link
Member

@shuashuai shuashuai Dec 6, 2024

Choose a reason for hiding this comment

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

if u have the transaletd privacy policy and terms of service it will surely work out

What I mean is that Terms of Services should use i18n translation, not the content inside.

eg:

// import useTranslation
import { Trans, useTranslation } from 'react-i18next';

// Add translated content in tooter in `i18m/en_US.yaml`
footer:
    build_on: >-
      Powered by <1> Apache Answer </1>- the open-source software that powers Q&A
      communities.<br />Made with love © {{cc}}.
    privacy: Privacy Policy
   terms_of_service: 

// Use where translation is required on the page
const { t } = useTranslation('translation', { keyPrefix: 'footer' });

<a className="me-2" href="/privacy" target="_blank">
            {t('privacy')}
          </a>
          <a href="/tos" target="_blank">
            {t('terms_of_service')}
          </a>

</a>
<br />
<Trans i18nKey="footer.build_on" values={{ cc }}>
Powered by
{/* eslint-disable-next-line react/jsx-no-target-blank */}
Expand Down