mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
Merge pull request #563 from 1fbr/fix-missing-i18n
fix: add missing i18n text in components
This commit is contained in:
@@ -10,7 +10,7 @@ const { data } = await getEntry('i18n', lang);
|
|||||||
|
|
||||||
<div class="action-footer">
|
<div class="action-footer">
|
||||||
<a class="action-button" href="/subscription">
|
<a class="action-button" href="/subscription">
|
||||||
<div>Email subscription</div>
|
<div>{data['buttons.email']}</div>
|
||||||
<Icon name="email" size="1rem" />
|
<Icon name="email" size="1rem" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ const npxCommand = `npx nx serve ${command}`;
|
|||||||
<p>{data['challenge.footer.gettingStarted.title']} <a
|
<p>{data['challenge.footer.gettingStarted.title']} <a
|
||||||
href="/guides/getting-started">{data['challenge.footer.gettingStarted.link']}</a>.</p>
|
href="/guides/getting-started">{data['challenge.footer.gettingStarted.link']}</a>.</p>
|
||||||
<p>{data['challenge.footer.running']} <code class="code" dir="auto">{npxCommand}
|
<p>{data['challenge.footer.running']} <code class="code" dir="auto">{npxCommand}
|
||||||
<ClipboardCopy copyText={npxCommand} />
|
<ClipboardCopy copyText={npxCommand} {...Astro.props} />
|
||||||
</code></p>
|
</code></p>
|
||||||
</section>
|
</section>
|
||||||
</aside>
|
</aside>
|
||||||
@@ -71,7 +71,7 @@ const npxCommand = `npx nx serve ${command}`;
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer-note">
|
<div class="footer-note">
|
||||||
* You can upvote an answer with a 👍 if you like it
|
* {data['challenge.footer.upvoteAnswer']}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
---
|
---
|
||||||
const { copyText } = Astro.props;
|
import { getEntry } from "astro:content";
|
||||||
|
|
||||||
|
const { copyText, lang } = Astro.props;
|
||||||
|
const { data } = await getEntry('i18n', lang);
|
||||||
---
|
---
|
||||||
|
|
||||||
<span class="copy-container">
|
<span class="copy-container">
|
||||||
@@ -32,7 +35,9 @@ const { copyText } = Astro.props;
|
|||||||
d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"
|
d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"
|
||||||
></path></svg
|
></path></svg
|
||||||
>
|
>
|
||||||
<span class="tooltipText triangle">Copied!</span>
|
<span class="tooltipText triangle">
|
||||||
|
{data['buttons.clipboardCopy']}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<script define:vars={{ copyText }}>
|
<script define:vars={{ copyText }}>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const { data } = await getEntry('i18n', lang ?? 'en');
|
|||||||
<form novalidate="" class="sp-element-container ">
|
<form novalidate="" class="sp-element-container ">
|
||||||
<div class="sp-field " sp-id="sp-76dfa588-3af2-4619-b685-835cf8c62ef0">
|
<div class="sp-field " sp-id="sp-76dfa588-3af2-4619-b685-835cf8c62ef0">
|
||||||
<input
|
<input
|
||||||
type="email" sp-type="email" name="sform[email]" class="sp-form-control " placeholder="username@gmail.com"
|
type="email" sp-type="email" name="sform[email]" class="sp-form-control " placeholder={data['subscription.email']}
|
||||||
sp-tips="%7B%22required%22%3A%22Required%20field%22%2C%22wrong%22%3A%22Wrong%20email%22%7D" autocomplete="on"
|
sp-tips="%7B%22required%22%3A%22Required%20field%22%2C%22wrong%22%3A%22Wrong%20email%22%7D" autocomplete="on"
|
||||||
required="required"></div>
|
required="required"></div>
|
||||||
<div class="sp-field sp-button-container " sp-id="sp-82642eda-e68f-4b7a-a2b8-69e9d9bb5c99">
|
<div class="sp-field sp-button-container " sp-id="sp-82642eda-e68f-4b7a-a2b8-69e9d9bb5c99">
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
---
|
---
|
||||||
|
import { getEntry } from 'astro:content';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
lang: any;
|
||||||
link: string;
|
link: string;
|
||||||
alt: string;
|
alt: string;
|
||||||
flag?: 'FR';
|
flag?: 'FR';
|
||||||
}
|
}
|
||||||
|
|
||||||
const { link, alt, flag } = Astro.props;
|
const { link, alt, flag, lang } = Astro.props;
|
||||||
|
const { data } = await getEntry('i18n', lang);
|
||||||
const isFR = flag === 'FR';
|
const isFR = flag === 'FR';
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -16,6 +19,6 @@ const isFR = flag === 'FR';
|
|||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
alt={alt}>
|
alt={alt}>
|
||||||
<svg aria-hidden="true" class="astro-yzt5nm4y astro-lq7oo3uf" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z"></path></svg>
|
<svg aria-hidden="true" class="astro-yzt5nm4y astro-lq7oo3uf" width="20" height="20" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M23.5 6.2A3 3 0 0 0 21.4 4c-1.9-.5-9.4-.5-9.4-.5s-7.5 0-9.4.5A3 3 0 0 0 .5 6.3C0 8 0 12 0 12s0 4 .5 5.8A3 3 0 0 0 2.6 20c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2c.5-2 .5-5.9.5-5.9s0-4-.5-5.8zm-14 9.4V8.4l6.3 3.6-6.3 3.6z"></path></svg>
|
||||||
Video
|
{data['challenge.footer.video']}
|
||||||
{isFR && <span class="flag">🇫🇷</span>}
|
{isFR && <span class="flag">🇫🇷</span>}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ const i18n = defineCollection({
|
|||||||
.object({
|
.object({
|
||||||
'page.title.challenge': z.string(),
|
'page.title.challenge': z.string(),
|
||||||
'author.createdBy': z.string(),
|
'author.createdBy': z.string(),
|
||||||
|
'buttons.email': z.string(),
|
||||||
'buttons.star': z.string(),
|
'buttons.star': z.string(),
|
||||||
'buttons.sponsor': z.string(),
|
'buttons.sponsor': z.string(),
|
||||||
|
'buttons.clipboardCopy': z.string(),
|
||||||
'challenge.footer.note': z.string(),
|
'challenge.footer.note': z.string(),
|
||||||
'challenge.footer.running': z.string(),
|
'challenge.footer.running': z.string(),
|
||||||
'challenge.footer.start': z.string(),
|
'challenge.footer.start': z.string(),
|
||||||
@@ -47,9 +49,12 @@ const i18n = defineCollection({
|
|||||||
'challenge.footer.communityAnswers': z.string(),
|
'challenge.footer.communityAnswers': z.string(),
|
||||||
'challenge.footer.authorAnswer': z.string(),
|
'challenge.footer.authorAnswer': z.string(),
|
||||||
'challenge.footer.blogPost': z.string(),
|
'challenge.footer.blogPost': z.string(),
|
||||||
|
'challenge.footer.video': z.string(),
|
||||||
'challenge.footer.gettingStarted.title': z.string(),
|
'challenge.footer.gettingStarted.title': z.string(),
|
||||||
'challenge.footer.gettingStarted.link': z.string(),
|
'challenge.footer.gettingStarted.link': z.string(),
|
||||||
|
'challenge.footer.upvoteAnswer': z.string(),
|
||||||
'subscription.button': z.string(),
|
'subscription.button': z.string(),
|
||||||
|
'subscription.email': z.string(),
|
||||||
'subscription.note.title': z.string(),
|
'subscription.note.title': z.string(),
|
||||||
'subscription.note.description': z.string(),
|
'subscription.note.description': z.string(),
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"page.title.challenge": "Challenge",
|
"page.title.challenge": "Challenge",
|
||||||
"author.createdBy": "Created by",
|
"author.createdBy": "Created by",
|
||||||
|
"buttons.email": "Email subscription",
|
||||||
"buttons.star": "Give a star",
|
"buttons.star": "Give a star",
|
||||||
"buttons.sponsor": "Sponsor",
|
"buttons.sponsor": "Sponsor",
|
||||||
|
"buttons.clipboardCopy": "Copied!",
|
||||||
"challenge.footer.note": "Note",
|
"challenge.footer.note": "Note",
|
||||||
"challenge.footer.running": "Start the project by executing:",
|
"challenge.footer.running": "Start the project by executing:",
|
||||||
"challenge.footer.start": "The title of your PR must begin with",
|
"challenge.footer.start": "The title of your PR must begin with",
|
||||||
@@ -10,8 +12,10 @@
|
|||||||
"challenge.footer.communityAnswers": "Community solutions",
|
"challenge.footer.communityAnswers": "Community solutions",
|
||||||
"challenge.footer.authorAnswer": "Author's solution",
|
"challenge.footer.authorAnswer": "Author's solution",
|
||||||
"challenge.footer.blogPost": "Article",
|
"challenge.footer.blogPost": "Article",
|
||||||
|
"challenge.footer.video": "Video",
|
||||||
"challenge.footer.gettingStarted.title": "To complete this challenge, start by reading: ",
|
"challenge.footer.gettingStarted.title": "To complete this challenge, start by reading: ",
|
||||||
"challenge.footer.gettingStarted.link": "Getting started",
|
"challenge.footer.gettingStarted.link": "Getting started",
|
||||||
|
"challenge.footer.upvoteAnswer": "You can upvote an answer with a 👍 if you like it",
|
||||||
"subscription.button": "Subscribe",
|
"subscription.button": "Subscribe",
|
||||||
"subscription.email": "username@gmail.com",
|
"subscription.email": "username@gmail.com",
|
||||||
"subscription.note.title": "Notes",
|
"subscription.note.title": "Notes",
|
||||||
|
|||||||
@@ -34,8 +34,10 @@
|
|||||||
"pagefind.searching": "Buscando [SEARCH_TERM]...",
|
"pagefind.searching": "Buscando [SEARCH_TERM]...",
|
||||||
"page.title.challenge": "Reto",
|
"page.title.challenge": "Reto",
|
||||||
"author.createdBy": "Creado por",
|
"author.createdBy": "Creado por",
|
||||||
|
"buttons.email": "Suscripción por correo",
|
||||||
"buttons.star": "Danos una estrella",
|
"buttons.star": "Danos una estrella",
|
||||||
"buttons.sponsor": "Patrocínanos",
|
"buttons.sponsor": "Patrocínanos",
|
||||||
|
"buttons.clipboardCopy": "Copiado!",
|
||||||
"note": "Nota",
|
"note": "Nota",
|
||||||
"running": "Inicia el proyecto ejecutando el siguiente comando:",
|
"running": "Inicia el proyecto ejecutando el siguiente comando:",
|
||||||
"start": "El título de tu PR debe iniciar con",
|
"start": "El título de tu PR debe iniciar con",
|
||||||
@@ -50,8 +52,10 @@
|
|||||||
"challenge.footer.communityAnswers": "Respuestas de la comunidad",
|
"challenge.footer.communityAnswers": "Respuestas de la comunidad",
|
||||||
"challenge.footer.authorAnswer": "Respuesta del autor",
|
"challenge.footer.authorAnswer": "Respuesta del autor",
|
||||||
"challenge.footer.blogPost": "Artículo",
|
"challenge.footer.blogPost": "Artículo",
|
||||||
|
"challenge.footer.video": "Vídeo",
|
||||||
"challenge.footer.gettingStarted.title": "Para realizar este desafío, comienza por leer: ",
|
"challenge.footer.gettingStarted.title": "Para realizar este desafío, comienza por leer: ",
|
||||||
"challenge.footer.gettingStarted.link": "Inicio",
|
"challenge.footer.gettingStarted.link": "Inicio",
|
||||||
|
"challenge.footer.upvoteAnswer": "Puedes votar positivo una respuesta con un 👍 si te gusta",
|
||||||
"subscription.button": "Suscríbete",
|
"subscription.button": "Suscríbete",
|
||||||
"subscription.email": "usuario@gmail.com",
|
"subscription.email": "usuario@gmail.com",
|
||||||
"subscription.note.title": "Notas",
|
"subscription.note.title": "Notas",
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"page.title.challenge": "Challenge",
|
"page.title.challenge": "Challenge",
|
||||||
"author.createdBy": "Créé par",
|
"author.createdBy": "Créé par",
|
||||||
|
"buttons.email": "Email subscription",
|
||||||
"buttons.star": "Donne une étoile",
|
"buttons.star": "Donne une étoile",
|
||||||
"buttons.sponsor": "Sponsorise",
|
"buttons.sponsor": "Sponsorise",
|
||||||
|
"buttons.clipboardCopy": "Copied!",
|
||||||
"challenge.footer.note": "Note",
|
"challenge.footer.note": "Note",
|
||||||
"challenge.footer.running": "Démarre le projet en exécutant:",
|
"challenge.footer.running": "Démarre le projet en exécutant:",
|
||||||
"challenge.footer.start": "Le titre de ta PR doit commencer par",
|
"challenge.footer.start": "Le titre de ta PR doit commencer par",
|
||||||
@@ -10,8 +12,10 @@
|
|||||||
"challenge.footer.communityAnswers": "Solution de la communauté",
|
"challenge.footer.communityAnswers": "Solution de la communauté",
|
||||||
"challenge.footer.authorAnswer": "Solution de l'auteur",
|
"challenge.footer.authorAnswer": "Solution de l'auteur",
|
||||||
"challenge.footer.blogPost": "Article",
|
"challenge.footer.blogPost": "Article",
|
||||||
|
"challenge.footer.video": "Video",
|
||||||
"challenge.footer.gettingStarted.title": "Pour faire ce challenge, commencer par lire: ",
|
"challenge.footer.gettingStarted.title": "Pour faire ce challenge, commencer par lire: ",
|
||||||
"challenge.footer.gettingStarted.link": "Comment Démarrer",
|
"challenge.footer.gettingStarted.link": "Comment Démarrer",
|
||||||
|
"challenge.footer.upvoteAnswer": "You can upvote an answer with a 👍 if you like it",
|
||||||
"subscription.button": "Subscribe",
|
"subscription.button": "Subscribe",
|
||||||
"subscription.email": "username@gmail.com",
|
"subscription.email": "username@gmail.com",
|
||||||
"subscription.note.title": "Notes",
|
"subscription.note.title": "Notes",
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"page.title.challenge": "Desafio",
|
"page.title.challenge": "Desafio",
|
||||||
"author.createdBy": "Criado por",
|
"author.createdBy": "Criado por",
|
||||||
|
"buttons.email": "Email subscription",
|
||||||
"buttons.star": "Dar uma estrela",
|
"buttons.star": "Dar uma estrela",
|
||||||
"buttons.sponsor": "Patrocinar",
|
"buttons.sponsor": "Patrocinar",
|
||||||
|
"buttons.clipboardCopy": "Copied!",
|
||||||
"404.text": "Página não encontrada. Verifique a URL ou tente usar a barra de busca.",
|
"404.text": "Página não encontrada. Verifique a URL ou tente usar a barra de busca.",
|
||||||
"challenge.footer.note": "Nota",
|
"challenge.footer.note": "Nota",
|
||||||
"challenge.footer.running": "Rode o projeto executando o comando:",
|
"challenge.footer.running": "Rode o projeto executando o comando:",
|
||||||
@@ -11,8 +13,10 @@
|
|||||||
"challenge.footer.communityAnswers": "Solução da Comunidade",
|
"challenge.footer.communityAnswers": "Solução da Comunidade",
|
||||||
"challenge.footer.authorAnswer": "Solução do Autor do Desafio",
|
"challenge.footer.authorAnswer": "Solução do Autor do Desafio",
|
||||||
"challenge.footer.blogPost": "Artigo",
|
"challenge.footer.blogPost": "Artigo",
|
||||||
|
"challenge.footer.video": "Video",
|
||||||
"challenge.footer.gettingStarted.title": "Para realizar este desafio, comece lendo: ",
|
"challenge.footer.gettingStarted.title": "Para realizar este desafio, comece lendo: ",
|
||||||
"challenge.footer.gettingStarted.link": "Começando",
|
"challenge.footer.gettingStarted.link": "Começando",
|
||||||
|
"challenge.footer.upvoteAnswer": "You can upvote an answer with a 👍 if you like it",
|
||||||
"subscription.button": "Inscrever-se",
|
"subscription.button": "Inscrever-se",
|
||||||
"subscription.email": "usuario@gmail.com",
|
"subscription.email": "usuario@gmail.com",
|
||||||
"subscription.note.title": "Notas",
|
"subscription.note.title": "Notas",
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"page.title.challenge": "Испытание",
|
"page.title.challenge": "Испытание",
|
||||||
"author.createdBy": "Создано",
|
"author.createdBy": "Создано",
|
||||||
|
"buttons.email": "Email subscription",
|
||||||
"buttons.star": "Дать звезду",
|
"buttons.star": "Дать звезду",
|
||||||
"buttons.sponsor": "Спонсор",
|
"buttons.sponsor": "Спонсор",
|
||||||
|
"buttons.clipboardCopy": "Copied!",
|
||||||
"404.text": "Страница не найдена. Проверьте URL-адрес или воспользуйтесь строкой поиска.",
|
"404.text": "Страница не найдена. Проверьте URL-адрес или воспользуйтесь строкой поиска.",
|
||||||
"challenge.footer.note": "Примечание",
|
"challenge.footer.note": "Примечание",
|
||||||
"challenge.footer.running": "Запустите проект, выполнив команду:",
|
"challenge.footer.running": "Запустите проект, выполнив команду:",
|
||||||
@@ -11,8 +13,10 @@
|
|||||||
"challenge.footer.communityAnswers": "Решения сообщества",
|
"challenge.footer.communityAnswers": "Решения сообщества",
|
||||||
"challenge.footer.authorAnswer": "Решение автора",
|
"challenge.footer.authorAnswer": "Решение автора",
|
||||||
"challenge.footer.blogPost": "Статья",
|
"challenge.footer.blogPost": "Статья",
|
||||||
|
"challenge.footer.video": "Video",
|
||||||
"challenge.footer.gettingStarted.title": "Чтобы пройти это испытание, прочитайте:",
|
"challenge.footer.gettingStarted.title": "Чтобы пройти это испытание, прочитайте:",
|
||||||
"challenge.footer.gettingStarted.link": "Первые шаги",
|
"challenge.footer.gettingStarted.link": "Первые шаги",
|
||||||
|
"challenge.footer.upvoteAnswer": "You can upvote an answer with a 👍 if you like it",
|
||||||
"subscription.button": "Subscribe",
|
"subscription.button": "Subscribe",
|
||||||
"subscription.email": "username@gmail.com",
|
"subscription.email": "username@gmail.com",
|
||||||
"subscription.note.title": "Notes",
|
"subscription.note.title": "Notes",
|
||||||
|
|||||||
Reference in New Issue
Block a user