mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
Merge pull request #768 from kabrunko-dev/docs/sponsors-i18n
docs: add i18n for hero sponsors banner
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
---
|
||||
import Default from '@astrojs/starlight/components/Hero.astro';
|
||||
import MyIcon from './MyIcon.astro';
|
||||
|
||||
import { getEntry } from 'astro:content';
|
||||
|
||||
const sponsorFetch = await fetch('https://ghs.vercel.app/v2/sponsors/tomalaforge');
|
||||
const { sponsors } = await sponsorFetch.json();
|
||||
|
||||
const { lang } = Astro.props;
|
||||
const { data } = await getEntry('i18n', lang);
|
||||
---
|
||||
|
||||
<div class="sponsor-header button-hover">
|
||||
<p>Big thanks to the people supporting this project:
|
||||
<p>{data['sponsors.description']}
|
||||
{sponsors.past.map(({username, avatar}) => (
|
||||
<a href=`https://github.com/${username}`>
|
||||
<img
|
||||
@@ -23,7 +26,7 @@ const { sponsors } = await sponsorFetch.json();
|
||||
))}
|
||||
</p>
|
||||
<a class="action-button" href="https://github.com/sponsors/tomalaforge">
|
||||
<div>Join the list</div>
|
||||
<div>{data['sponsors.joinButton']}</div>
|
||||
<MyIcon name="heart" fill="none" stroke="currentColor" color="white" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -60,6 +60,8 @@ const i18n = defineCollection({
|
||||
'subscription.note.description': z.string(),
|
||||
'contributor.title': z.string(),
|
||||
'contributor.subtitle': z.string(),
|
||||
'sponsors.description': z.string(),
|
||||
'sponsors.joinButton': z.string(),
|
||||
})
|
||||
.partial(),
|
||||
}),
|
||||
|
||||
@@ -21,5 +21,7 @@
|
||||
"subscription.note.title": "Notes",
|
||||
"subscription.note.description": "This email will only be used for sending new challenges updates",
|
||||
"contributor.title": "Contributors",
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!"
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!",
|
||||
"sponsors.description": "Big thanks to the people supporting this project: ",
|
||||
"sponsors.joinButton": "Join the list"
|
||||
}
|
||||
|
||||
@@ -61,5 +61,7 @@
|
||||
"subscription.note.title": "Notas",
|
||||
"subscription.note.description": "Este correo se utilizará para informar acerca de nuevos retos",
|
||||
"contributor.title": "Contributors",
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!"
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!",
|
||||
"sponsors.description": "Big thanks to the people supporting this project: ",
|
||||
"sponsors.joinButton": "Join the list"
|
||||
}
|
||||
|
||||
@@ -21,5 +21,7 @@
|
||||
"subscription.note.title": "Notes",
|
||||
"subscription.note.description": "This email will only be used for sending new challenges updates",
|
||||
"contributor.title": "Contributors",
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!"
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!",
|
||||
"sponsors.description": "Big thanks to the people supporting this project: ",
|
||||
"sponsors.joinButton": "Join the list"
|
||||
}
|
||||
|
||||
@@ -22,5 +22,7 @@
|
||||
"subscription.note.title": "Notas",
|
||||
"subscription.note.description": "Este email será apenas usado para enviar atualizações de novos desafios",
|
||||
"contributor.title": "Contributors",
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!"
|
||||
"contributor.subtitle": "Thanks to all the contributors who have helped make this documentation better!",
|
||||
"sponsors.description": "Muito obrigado as pessoas que apoiam este projeto: ",
|
||||
"sponsors.joinButton": "Juntar-se à lista"
|
||||
}
|
||||
|
||||
@@ -22,5 +22,7 @@
|
||||
"subscription.note.title": "Примечание",
|
||||
"subscription.note.description": "Этот email будет использоваться только для сообщений о новых испытаниях",
|
||||
"contributor.title": "Контрибьюторы",
|
||||
"contributor.subtitle": "Спасибо всем контрибьюторам которые помогли сделать эту документацию лучше!"
|
||||
"contributor.subtitle": "Спасибо всем контрибьюторам которые помогли сделать эту документацию лучше!",
|
||||
"sponsors.description": "Big thanks to the people supporting this project: ",
|
||||
"sponsors.joinButton": "Join the list"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user