mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
fix: add missing i18n text in components
* Affects ActionButtonFooter, ChallengeFooter, ClipboardCopy, SubscriptionForm, VideoButton components * Adds new entries for each json file: buttons.email, buttons.clipboardCopy, challenge.footer.video, challenge.footer.upvoteAnswer * Available in English and Spanish
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
---
|
||||
import { getEntry } from 'astro:content';
|
||||
|
||||
interface Props {
|
||||
lang: any;
|
||||
link: string;
|
||||
alt: string;
|
||||
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';
|
||||
---
|
||||
|
||||
@@ -16,6 +19,6 @@ const isFR = flag === 'FR';
|
||||
rel="noopener noreferrer"
|
||||
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>
|
||||
Video
|
||||
{data['challenge.footer.video']}
|
||||
{isFR && <span class="flag">🇫🇷</span>}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user