diff --git a/messages/en.json b/messages/en.json index 0f9af942..a7c0d88f 100644 --- a/messages/en.json +++ b/messages/en.json @@ -37,7 +37,8 @@ "fundingHistory": "Funding/Donation History", "noFundingHistory": "No funding/donation activity yet.", "donated": "Donated {amount} XLM on {date}", - "campaignFallback": "Campaign #{id}" + "campaignFallback": "Campaign #{id}", + "loadMore": "Load more" }, "MyContributions": { "title": "My Contributions", @@ -88,7 +89,15 @@ "donatedSuccess": "{amount} XLM donated successfully", "thankYou": "Thank you for supporting this cause.", "viewExplorer": "View on Stellar Explorer →", - "close": "Close" + "close": "Close", + "closeAriaLabel": "Close", + "amountPlaceholder": "e.g. 10", + "scientificNotation": "Scientific notation is not allowed.", + "invalidNumber": "Please enter a valid number.", + "invalidAmount": "Please enter a valid amount.", + "amountMustBePositive": "Amount must be greater than zero.", + "invalidNumberFormat": "Invalid number format.", + "maxDecimalPlaces": "Maximum 7 decimal places allowed." }, "Admin": { "title": "Admin Moderation", @@ -433,10 +442,8 @@ "votesOfQuorum": "{current} of {quorum} votes", "approvalThreshold": "Approval threshold", "approvalOfThreshold": "{current}% of {threshold}%", - "needMoreVotes_one": "Need {count} more vote to reach quorum.", - "needMoreVotes_other": "Need {count} more votes to reach quorum.", - "needMoreApproval_one": "Need {count} more approval point to reach the approval threshold.", - "needMoreApproval_other": "Need {count} more approval points to reach the approval threshold.", + "needMoreVotes": "Need {count, plural, =1 {# more vote} other {# more votes}} to reach quorum.", + "needMoreApproval": "Need {count, plural, =1 {# more approval point} other {# more approval points}} to reach the approval threshold.", "quorumReached": "Quorum and approval threshold reached. Anyone can finalize verification.", "connectWalletPrompt": "Connect your wallet to vote on this cause", "tokenHoldersOnlyPrompt": "Only governance token holders can vote on causes", diff --git a/messages/es.json b/messages/es.json index 189a1906..7f42411b 100644 --- a/messages/es.json +++ b/messages/es.json @@ -37,7 +37,8 @@ "fundingHistory": "Historial de Financiación/Donaciones", "noFundingHistory": "Aún no hay actividad de financiación/donación.", "donated": "Donó {amount} XLM el {date}", - "campaignFallback": "Campaña #{id}" + "campaignFallback": "Campaña #{id}", + "loadMore": "Cargar más" }, "MyContributions": { "title": "Mis Contribuciones", @@ -88,7 +89,15 @@ "donatedSuccess": "{amount} XLM donados correctamente", "thankYou": "Gracias por apoyar esta causa.", "viewExplorer": "Ver en Stellar Explorer →", - "close": "Cerrar" + "close": "Cerrar", + "closeAriaLabel": "Cerrar", + "amountPlaceholder": "ej. 10", + "scientificNotation": "No se permite la notación científica.", + "invalidNumber": "Por favor, ingresa un número válido.", + "invalidAmount": "Por favor, ingresa un monto válido.", + "amountMustBePositive": "El monto debe ser mayor que cero.", + "invalidNumberFormat": "Formato de número inválido.", + "maxDecimalPlaces": "Se permiten máximo 7 decimales." }, "Admin": { "title": "Moderación Administrativa", @@ -433,10 +442,8 @@ "votesOfQuorum": "{current} de {quorum} votos", "approvalThreshold": "Umbral de aprobación", "approvalOfThreshold": "{current}% de {threshold}%", - "needMoreVotes_one": "Se necesita {count} voto más para alcanzar el quórum.", - "needMoreVotes_other": "Se necesitan {count} votos más para alcanzar el quórum.", - "needMoreApproval_one": "Se necesita {count} punto de aprobación más para alcanzar el umbral.", - "needMoreApproval_other": "Se necesitan {count} puntos de aprobación más para alcanzar el umbral.", + "needMoreVotes": "Se {count, plural, =1 {necesita # voto más} other {necesitan # votos más}} para alcanzar el quórum.", + "needMoreApproval": "Se {count, plural, =1 {necesita # punto de aprobación más} other {necesitan # puntos de aprobación más}} para alcanzar el umbral.", "quorumReached": "Quórum y umbral de aprobación alcanzados. Cualquiera puede finalizar la verificación.", "connectWalletPrompt": "Conecta tu wallet para votar en esta causa", "tokenHoldersOnlyPrompt": "Solo los poseedores de tokens de gobernanza pueden votar en causas", diff --git a/src/app/[locale]/causes/[id]/CauseDetailClient.tsx b/src/app/[locale]/causes/[id]/CauseDetailClient.tsx index 66727d79..51550a30 100644 --- a/src/app/[locale]/causes/[id]/CauseDetailClient.tsx +++ b/src/app/[locale]/causes/[id]/CauseDetailClient.tsx @@ -48,6 +48,9 @@ import { isSameAddress } from "@/lib/stellar"; const EditCampaignMetadata = dynamic(() => import("@/components/EditCampaignMetadata"), { ssr: false, }); +======= +import { getLocalizedDescription } from "@/utils/localizedDescription"; +>>>>>>> a758690 (fix: resolve issues #605 #606 #607 #611) export default function CauseDetailClient({ id }: { id: string }) { const { publicKey: userWalletAddress } = useWallet(); diff --git a/src/app/[locale]/dashboard/DashboardClient.tsx b/src/app/[locale]/dashboard/DashboardClient.tsx index 00fb3fff..a0c19fc7 100644 --- a/src/app/[locale]/dashboard/DashboardClient.tsx +++ b/src/app/[locale]/dashboard/DashboardClient.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; import { useTranslations } from "next-intl"; -import React, { useMemo } from "react"; +import React, { useMemo, useState } from "react"; import MyContributionsSection from "@/components/MyContributionsSection"; import MultiSigWithdrawalPanel from "@/components/MultiSigWithdrawalPanel"; import { Spinner, DashboardSkeleton } from "@/components/Skeleton"; @@ -25,6 +25,12 @@ export default function DashboardPage() { const balanceError = balanceQueryError ? t("balanceFetchError") : null; const { savedIds } = useSavedCampaigns(); + const [visibleSavedCount, setVisibleSavedCount] = useState(5); + const [visibleSubmittedCount, setVisibleSubmittedCount] = useState(5); + + const handleLoadMoreSaved = () => setVisibleSavedCount((prev) => prev + 5); + const handleLoadMoreSubmitted = () => setVisibleSubmittedCount((prev) => prev + 5); + const savedCampaigns = useMemo( () => campaigns.filter((c) => savedIds.includes(c.id)), [campaigns, savedIds], @@ -107,19 +113,31 @@ export default function DashboardPage() { You haven't saved any campaigns yet. ) : ( -
{t("rights", { year })}
{t("builtWith")} -