From 424a214af1c82dd8c71d2dd7ad4a010d46fed851 Mon Sep 17 00:00:00 2001 From: thomas Date: Sun, 28 Jan 2024 09:46:27 +0100 Subject: [PATCH] feat: add en translation --- docs/src/components/ActionButtonFooter.astro | 4 +-- docs/src/components/Author.astro | 2 +- docs/src/components/ChallengeFooter.astro | 27 ++++++++------------ docs/src/components/PageTitle.astro | 2 +- docs/src/content/i18n/ fr.json | 16 ++++++------ docs/src/content/i18n/en.json | 20 +++++++++++++++ 6 files changed, 43 insertions(+), 28 deletions(-) create mode 100644 docs/src/content/i18n/en.json diff --git a/docs/src/components/ActionButtonFooter.astro b/docs/src/components/ActionButtonFooter.astro index 2c96ca8..9a8b3f2 100644 --- a/docs/src/components/ActionButtonFooter.astro +++ b/docs/src/components/ActionButtonFooter.astro @@ -9,12 +9,12 @@ const { labels } = Astro.props; diff --git a/docs/src/components/Author.astro b/docs/src/components/Author.astro index 1b78c90..5d77b5a 100644 --- a/docs/src/components/Author.astro +++ b/docs/src/components/Author.astro @@ -14,7 +14,7 @@ const { name, twitter, linkedin, github, labels } = Astro.props; ---

- {labels['author.createdBy'] ?? 'Created by'} {name} + {labels['author.createdBy']} {name} {twitter && } {linkedin && } {github && } diff --git a/docs/src/components/ChallengeFooter.astro b/docs/src/components/ChallengeFooter.astro index e7982c1..a35e2dc 100644 --- a/docs/src/components/ChallengeFooter.astro +++ b/docs/src/components/ChallengeFooter.astro @@ -8,9 +8,7 @@ const { labels } = Astro.props; const {author, challengeNumber, title, blogLink, videoLink, command} = Astro.props.entry.data; const authorLink = `https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A${challengeNumber}+label%3A"answer+author"`; -const authorDescription = `${title} solution author`; const communityLink = `https://github.com/tomalaforge/angular-challenges/pulls?q=label%3A${challengeNumber}+label%3Aanswer+sort%3Areactions-%2B1-desc`; -const communityDescription = `${title} community solutions`; const npxCommand = `npx nx serve ${command}`; --- @@ -18,35 +16,32 @@ const npxCommand = `npx nx serve ${command}`; {command &&

} + {labels['challenge.footer.reminder']}

+

{labels['challenge.footer.start']} Answer:{challengeNumber}.

diff --git a/docs/src/components/PageTitle.astro b/docs/src/components/PageTitle.astro index 953d44b..f32a28e 100644 --- a/docs/src/components/PageTitle.astro +++ b/docs/src/components/PageTitle.astro @@ -7,7 +7,7 @@ const { labels } = Astro.props;
- {challengeNumber &&
{labels['page.title.challenge'] ?? 'Challenge'} #{challengeNumber}
} + {challengeNumber &&
{labels['page.title.challenge']} #{challengeNumber}
}