feat(i18n): add stargazer feature in multiple languages

This commit is contained in:
Fatih Kadir Akın
2025-12-12 13:40:09 +03:00
parent b2e16a9f2f
commit 731bcf0f7d
8 changed files with 46 additions and 21 deletions
+1
View File
@@ -429,6 +429,7 @@
"heroFeature2": "استضافة ذاتية للخصوصية",
"heroFeature3": "للفرق والمؤسسات",
"cloneOnGithub": "استنساخ على GitHub",
"beStargazer": "كن النجمة رقم {count} على GitHub",
"browsePrompts": "تصفح الأوامر",
"viewFeed": "عرض الموجز",
"readyToStart": "مستعد للبدء؟",
+1
View File
@@ -528,6 +528,7 @@
"heroFeature2": "Self-host for Privacy",
"heroFeature3": "For Teams & Organizations",
"cloneOnGithub": "Clone on GitHub",
"beStargazer": "Be the {count}{ordinal} stargazer on GitHub",
"browsePrompts": "Browse Prompts",
"viewFeed": "View Feed",
"readyToStart": "Ready to get started?",
+1
View File
@@ -446,6 +446,7 @@
"heroFeature2": "Auto-hospeda para Privacidad",
"heroFeature3": "Para Equipos y Organizaciones",
"cloneOnGithub": "Clonar en GitHub",
"beStargazer": "Sé el stargazer número {count} en GitHub",
"browsePrompts": "Explorar Prompts",
"viewFeed": "Ver Feed",
"readyToStart": "¿Listo para comenzar?",
+1
View File
@@ -423,6 +423,7 @@
"heroFeature2": "プライバシーのためセルフホスト",
"heroFeature3": "チーム & 組織向け",
"cloneOnGithub": "GitHubでクローン",
"beStargazer": "GitHubで{count}番目のスターになる",
"browsePrompts": "プロンプトを見る",
"viewFeed": "フィードを見る",
"readyToStart": "始める準備はできましたか?",
+1
View File
@@ -528,6 +528,7 @@
"heroFeature2": "Gizlilik için Self-host",
"heroFeature3": "Ekipler & Organizasyonlar için",
"cloneOnGithub": "GitHub'dan Klonla",
"beStargazer": "GitHub'da {count}. yıldız veren ol",
"browsePrompts": "Promptlara Göz At",
"viewFeed": "Akışı Görüntüle",
"readyToStart": "Başlamaya hazır mısınız?",
+1
View File
@@ -423,6 +423,7 @@
"heroFeature2": "自托管保护隐私",
"heroFeature3": "适用于团队和组织",
"cloneOnGithub": "在 GitHub 上克隆",
"beStargazer": "成为 GitHub 上第 {count} 位 Star 用户",
"browsePrompts": "浏览提示词",
"viewFeed": "查看动态",
"readyToStart": "准备好开始了吗?",
+1 -1
View File
@@ -88,7 +88,7 @@ export default async function FeedPage() {
return (
<div className="container py-6">
<div className="flex items-center justify-between mb-6">
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-6">
<div>
<h1 className="text-lg font-semibold">{t("yourFeed")}</h1>
<p className="text-sm text-muted-foreground">
+39 -20
View File
@@ -7,6 +7,12 @@ import { getConfig } from "@/lib/config";
import { Button } from "@/components/ui/button";
import { DiscoveryPrompts } from "@/components/prompts/discovery-prompts";
function getOrdinalSuffix(n: number): string {
const s = ["th", "st", "nd", "rd"];
const v = n % 100;
return s[(v - 20) % 10] || s[v] || s[0];
}
export default async function HomePage() {
const tHomepage = await getTranslations("homepage");
const tNav = await getTranslations("nav");
@@ -113,27 +119,40 @@ export default async function HomePage() {
</>
)}
<div className="mt-10 flex flex-wrap gap-3">
<Button size="lg" asChild>
<Link href={session ? "/feed" : "/prompts"}>
{session ? tHomepage("viewFeed") : tHomepage("browsePrompts")}
<ArrowRight className="ml-1.5 h-4 w-4" />
</Link>
</Button>
<div className="mt-10 flex flex-col gap-4">
<div className="flex flex-wrap gap-3">
<Button size="lg" asChild>
<Link href={session ? "/feed" : "/prompts"}>
{session ? tHomepage("viewFeed") : tHomepage("browsePrompts")}
<ArrowRight className="ml-1.5 h-4 w-4" />
</Link>
</Button>
{!useCloneBranding && (
<Button variant="outline" size="lg" asChild>
<Link href="https://github.com/f/awesome-chatgpt-prompts" target="_blank" rel="noopener noreferrer">
<Github className="mr-1.5 h-4 w-4" />
{tHomepage("cloneOnGithub")}
</Link>
</Button>
)}
{showRegisterButton && (
<Button variant="outline" size="lg" asChild>
<Link href={isOAuth ? "/login" : "/register"}>
{isOAuth ? tNav("login") : tNav("register")}
</Link>
</Button>
)}
</div>
{!useCloneBranding && (
<Button variant="outline" size="lg" asChild>
<Link href="https://github.com/f/awesome-chatgpt-prompts" target="_blank" rel="noopener noreferrer">
<Github className="mr-1.5 h-4 w-4" />
{tHomepage("cloneOnGithub")}
</Link>
</Button>
)}
{showRegisterButton && (
<Button variant="outline" size="lg" asChild>
<Link href={isOAuth ? "/login" : "/register"}>
{isOAuth ? tNav("login") : tNav("register")}
</Link>
</Button>
<Link
href="https://github.com/f/awesome-chatgpt-prompts/stargazers"
target="_blank"
rel="noopener noreferrer"
className="flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors"
>
<Star className="h-4 w-4 text-amber-500" />
<span>{tHomepage("beStargazer", { count: (githubStars + 1).toLocaleString(), ordinal: getOrdinalSuffix(githubStars + 1) })}</span>
</Link>
)}
</div>
</div>