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

Fix/issue 2252 broken link when translated #2254

Merged
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions src/components/RandomContributor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import React, { MutableRefObject, useRef } from 'react';
import { useAdoptiumContributorsApi, useOnScreen } from '../../hooks';
import './RandomContributor.scss';
import AnimatedPlaceholder from '../AnimatedPlaceholder';
import { Trans, Link } from 'gatsby-plugin-react-i18next';
import { Trans } from 'gatsby-plugin-react-i18next';
import LinkText from '../LinkText'

const RandomContributor = (): JSX.Element => {
const ref = useRef<HTMLDivElement | null>(null);
Expand Down Expand Up @@ -31,9 +32,9 @@ const RandomContributor = (): JSX.Element => {
i18nKey="asciidoc.random.contributor.text"
defaults='Thank you <profileUri>{{login}}</profileUri> for making <commitsListUri>{{contributionsCount}} contribution(s)</commitsListUri> to <repoUri>{{repo}}</repoUri>'
components={{
profileUri: <Link to={contributor.profileUri} target="_blank" rel="nofollow noopener noreferrer" />,
commitsListUri: <Link to={contributor.commitsListUri} target="_blank" rel="nofollow noopener noreferrer"/>,
repoUri: <Link to={`https://github.com/adoptium/${contributor.repo}`} target="_blank" rel="nofollow noopener noreferrer"/>,
profileUri: <LinkText href={contributor.profileUri} />,
commitsListUri: <LinkText href={contributor.commitsListUri} />,
repoUri: <LinkText href={`https://github.com/adoptium/${contributor.repo}`} />,
}}
values={{
'login': contributor.login,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ exports[`TemurinDownloadTable component > renders correctly - with source 1`] =
</a>
<a
href="https://mock-link"
rel="noreferrer"
target="_blank"
>
<svg
fill="currentColor"
Expand Down
5 changes: 3 additions & 2 deletions src/components/TemurinDownloadTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { capitalize } from '../../util/capitalize';
import { localeDate } from '../../util/localeDate';
import { IoMdHelpBuoy } from 'react-icons/io';
import { PiFiles } from 'react-icons/pi';
import LinkText from '../LinkText'

const TemurinDownloadTable = ({results}) => {
const { language } = useI18next();
Expand All @@ -21,8 +22,8 @@ const TemurinDownloadTable = ({results}) => {
{source &&
<p className='release-notes'>
<Link to={`/temurin/release-notes?version=${source.release_name}`}><MdNotes /><Trans>Release Notes</Trans></Link>
<Link to="/installation/"><IoMdHelpBuoy /><Trans>Installation Guide</Trans></Link>
<Link to={source.binary.package.link}><PiFiles /><Trans>Source Code</Trans></Link>
<Link to="/installation/"><IoMdHelpBuoy /><Trans>Installation Guide</Trans></Link>
<LinkText href={source.binary.package.link}><PiFiles /><Trans>Source Code</Trans></LinkText>
</p>
}
<table id="download-table" className="table table-bordered releases-table" style={{borderSpacing: '0 10px', borderCollapse: 'separate'}}>
Expand Down