fix(i18n): localise missing strings in budget dialogs to Spanish (#177)
## Summary - Wrap all hardcoded strings in `create-budget-dialog.tsx` and `edit-budget-dialog.tsx` with `__()` so they pass through the i18n system (submit button label, start day labels, helper text for carry-over/reset, and the selection-required validation message) - Update `getBudgetPeriodTypeLabel` and `getRolloverTypeLabel` in `budget.ts` to use `__()` so period type options (Monthly, Weekly, Bi-weekly, Custom) and rollover types (Carry Over, Reset/Pool) are translated - Add all missing Spanish translations to `lang/es.json`: period type labels, rollover type labels, start-day helpers, carry-over/reset descriptions, and validation messages
This commit is contained in:
parent
7a8eda9d90
commit
7260525890
12
lang/es.json
12
lang/es.json
|
|
@ -193,6 +193,7 @@
|
|||
"Budget Spending": "Gasto del Presupuesto",
|
||||
"Budget Tracking": "Seguimiento de Presupuesto",
|
||||
"Budget insights and alerts": "Informes y alertas de presupuesto",
|
||||
"Budget resets to zero at the start of each period.": "El presupuesto se reinicia a cero al inicio de cada período.",
|
||||
"Budgets": "Presupuestos",
|
||||
"Built for speed with instant sync and smooth interactions.": "Construido para velocidad con sincronización instantánea e interacciones fluidas.",
|
||||
"By creating an account or using Whisper Money, you agree to be bound by these Terms of Service and our Privacy Policy. If you do not agree to these terms, you may not use our service. These terms constitute a legally binding agreement between you and Whisper Money.": "Al crear una cuenta o usar Whisper Money, aceptas estar sujeto a estos Términos de Servicio y nuestra Política de Privacidad. Si no aceptas estos términos, no puedes usar nuestro servicio. Estos términos constituyen un acuerdo legalmente vinculante entre tú y Whisper Money.",
|
||||
|
|
@ -200,6 +201,7 @@
|
|||
"CSV, XLS, XLSX files": "Archivos CSV, XLS, XLSX",
|
||||
"Can I export or delete my data?": "¿Puedo exportar o eliminar mis datos?",
|
||||
"Cancel": "Cancelar",
|
||||
"Carry Over": "Arrastrar Saldo",
|
||||
"Cashflow": "Flujo de Efectivo",
|
||||
"Cashflow Trend": "Tendencia del Flujo de Efectivo",
|
||||
"Cashflow at a Glance": "Flujo de Caja de un Vistazo",
|
||||
|
|
@ -312,6 +314,8 @@
|
|||
"Daily spending and transactions": "Gastos diarios y transacciones",
|
||||
"Dark": "Oscuro",
|
||||
"Dashboard": "Panel",
|
||||
"Day of the month when the period starts (1-31)": "Día del mes en que comienza el período (1-31)",
|
||||
"Day of week (0=Sunday, 6=Saturday)": "Día de la semana (0=Domingo, 6=Sábado)",
|
||||
"Discord": "Discord",
|
||||
"Data Accuracy:": "Precisión de Datos:",
|
||||
"Data Imported": "Datos Importados",
|
||||
|
|
@ -776,10 +780,13 @@
|
|||
"Register": "Registrarse",
|
||||
"Regular Security Audits:": "Auditorías de Seguridad Regulares:",
|
||||
"Remaining": "Restante",
|
||||
"Remaining balance carries over to next period": "El saldo restante se arrastra al siguiente período",
|
||||
"Remaining balance returns to available money pool": "El saldo restante vuelve al fondo de dinero disponible",
|
||||
"Remember me": "Recuérdame",
|
||||
"Remove all labels": "Eliminar todas las etiquetas",
|
||||
"Resend verification email": "Reenviar correo de verificación",
|
||||
"Reset password": "Restablecer contraseña",
|
||||
"Reset/Pool": "Reiniciar/Acumular",
|
||||
"Retirement": "Jubilación",
|
||||
"Retirement / Pension": "Jubilación / Pensión",
|
||||
"Retry": "Reintentar",
|
||||
|
|
@ -898,9 +905,12 @@
|
|||
"Spent": "Gastado",
|
||||
"Spent:": "Gastado:",
|
||||
"Square images only (max": "Solo imágenes cuadradas (máx",
|
||||
"Start Day": "Día de Inicio",
|
||||
"Start Day of Month": "Día de Inicio del Mes",
|
||||
"Start My Financial Journey": "Comenzar Mi Viaje Financiero",
|
||||
"Start Your Financial Journey": "Comienza Tu Viaje Financiero",
|
||||
"Start managing your money privately. No credit card required.": "Empieza a gestionar tu dinero de forma privada. No se requiere tarjeta de crédito.",
|
||||
"Starting day": "Día de inicio",
|
||||
"Status": "Estado",
|
||||
"Stay on Track": "Mantente en el Camino",
|
||||
"Step 1: Export from your bank": "Paso 1: Exporta desde tu banco",
|
||||
|
|
@ -1048,6 +1058,7 @@
|
|||
"Unlock encryption key": "Desbloquear clave de encriptación",
|
||||
"Unlock encryption to add transactions": "Desbloquea la encriptación crear una transacción",
|
||||
"Unlock encryption to import transactions": "Desbloquea la encriptación para importar transacciones",
|
||||
"Unused budget will carry over to the next period.": "El presupuesto no utilizado se arrastrará al siguiente período.",
|
||||
"Update": "Actualizar",
|
||||
"Update Credentials": "Actualizar Credenciales",
|
||||
"Update account balance": "Actualizar balance de cuenta",
|
||||
|
|
@ -1209,6 +1220,7 @@
|
|||
"You may terminate your account at any time by\\n deleting your account through the application\\n settings or by contacting us. Upon termination,\\n your right to use the service will immediately\\n cease.": "Puedes terminar tu cuenta en cualquier momento eliminándola a través de la configuración de la aplicación o contactándonos. Tras la terminación, tu derecho a usar el servicio cesará de inmediato.",
|
||||
"You must be at least 16 years old to use this service. By using Whisper Money, you represent and warrant that you meet this age requirement.": "Debes tener al menos 16 años para usar este servicio. Al usar Whisper Money, declaras y garantizas que cumples con este requisito de edad.",
|
||||
"You must be at least 16 years old to use this\\n service. By using Whisper Money, you represent\\n and warrant that you meet this age requirement.": "Debes tener al menos 16 años para usar este servicio. Al usar Whisper Money, declaras y garantizas que cumples con este requisito de edad.",
|
||||
"You must select either a category or a label.": "Debes seleccionar una categoría o una etiqueta.",
|
||||
"You now have full access to all Whisper Money features. Thank you for supporting us!": "¡Ahora tienes acceso completo a todas las funciones de Whisper Money. Gracias por apoyarnos!",
|
||||
"You retain all ownership rights to the financial data and information you enter into Whisper Money. We do not claim any ownership over your personal financial information.": "Conservas todos los derechos de propiedad sobre los datos financieros e información que ingresas en Whisper Money. No reclamamos ninguna propiedad sobre tu información financiera personal.",
|
||||
"You retain all\\n ownership rights to the financial data and\\n information you enter into Whisper Money. We do\\n not claim any ownership over your personal\\n financial information.": "Conservas todos los derechos de propiedad sobre los datos financieros e información que introduces en Whisper Money. No reclamamos ningún derecho de propiedad sobre tu información financiera personal.",
|
||||
|
|
|
|||
|
|
@ -72,8 +72,9 @@ export function CreateBudgetDialog({
|
|||
const newErrors: Record<string, string> = {};
|
||||
|
||||
if (!selectedCategoryId && !selectedLabelId) {
|
||||
newErrors.selection =
|
||||
'You must select either a category or a label.';
|
||||
newErrors.selection = __(
|
||||
'You must select either a category or a label.',
|
||||
);
|
||||
}
|
||||
|
||||
if (Object.keys(newErrors).length > 0) {
|
||||
|
|
@ -209,8 +210,8 @@ export function CreateBudgetDialog({
|
|||
<div className="space-y-2">
|
||||
<UILabel htmlFor="period-start-day">
|
||||
{periodType === 'monthly'
|
||||
? 'Start Day of Month'
|
||||
: 'Start Day'}
|
||||
? __('Start Day of Month')
|
||||
: __('Start Day')}
|
||||
</UILabel>
|
||||
<Input
|
||||
id="period-start-day"
|
||||
|
|
@ -225,11 +226,13 @@ export function CreateBudgetDialog({
|
|||
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{periodType === 'monthly'
|
||||
? 'Day of the month when the period starts (1-31)'
|
||||
? __(
|
||||
'Day of the month when the period starts (1-31)',
|
||||
)
|
||||
: periodType === 'weekly' ||
|
||||
periodType === 'biweekly'
|
||||
? 'Day of week (0=Sunday, 6=Saturday)'
|
||||
: 'Starting day'}
|
||||
? __('Day of week (0=Sunday, 6=Saturday)')
|
||||
: __('Starting day')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -380,8 +383,12 @@ export function CreateBudgetDialog({
|
|||
</Select>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{rolloverType === 'carry_over'
|
||||
? 'Unused budget will carry over to the next period.'
|
||||
: 'Budget resets to zero at the start of each period.'}
|
||||
? __(
|
||||
'Unused budget will carry over to the next period.',
|
||||
)
|
||||
: __(
|
||||
'Budget resets to zero at the start of each period.',
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -404,7 +411,9 @@ export function CreateBudgetDialog({
|
|||
allocatedAmount <= 0
|
||||
}
|
||||
>
|
||||
{isSubmitting ? 'Creating...' : 'Create Budget'}
|
||||
{isSubmitting
|
||||
? __('Creating...')
|
||||
: __('Create Budget')}
|
||||
</Button>
|
||||
</DialogFooter>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ export function EditBudgetDialog({
|
|||
<div className="space-y-2">
|
||||
<Label htmlFor="period-start-day">
|
||||
{periodType === 'monthly'
|
||||
? 'Start Day of Month'
|
||||
: 'Start Day'}
|
||||
? __('Start Day of Month')
|
||||
: __('Start Day')}
|
||||
</Label>
|
||||
<Input
|
||||
id="period-start-day"
|
||||
|
|
@ -196,11 +196,13 @@ export function EditBudgetDialog({
|
|||
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{periodType === 'monthly'
|
||||
? 'Day of the month when the period starts (1-31)'
|
||||
? __(
|
||||
'Day of the month when the period starts (1-31)',
|
||||
)
|
||||
: periodType === 'weekly' ||
|
||||
periodType === 'biweekly'
|
||||
? 'Day of week (0=Sunday, 6=Saturday)'
|
||||
: 'Starting day'}
|
||||
? __('Day of week (0=Sunday, 6=Saturday)')
|
||||
: __('Starting day')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -250,8 +252,12 @@ export function EditBudgetDialog({
|
|||
</div>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
{rolloverType === 'carry_over'
|
||||
? 'Unused budget will carry over to the next period.'
|
||||
: 'Budget resets to zero at the start of each period.'}
|
||||
? __(
|
||||
'Unused budget will carry over to the next period.',
|
||||
)
|
||||
: __(
|
||||
'Budget resets to zero at the start of each period.',
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { __ } from '@/utils/i18n';
|
||||
import { Category } from './category';
|
||||
import { Label } from './label';
|
||||
import { Transaction } from './transaction';
|
||||
|
|
@ -66,26 +67,26 @@ export interface BudgetHistoryData {
|
|||
|
||||
export function getBudgetPeriodTypeLabel(type: BudgetPeriodType): string {
|
||||
const labels: Record<BudgetPeriodType, string> = {
|
||||
monthly: 'Monthly',
|
||||
weekly: 'Weekly',
|
||||
biweekly: 'Bi-weekly',
|
||||
custom: 'Custom',
|
||||
monthly: __('Monthly'),
|
||||
weekly: __('Weekly'),
|
||||
biweekly: __('Bi-weekly'),
|
||||
custom: __('Custom'),
|
||||
};
|
||||
return labels[type];
|
||||
}
|
||||
|
||||
export function getRolloverTypeLabel(type: RolloverType): string {
|
||||
const labels: Record<RolloverType, string> = {
|
||||
carry_over: 'Carry Over',
|
||||
reset: 'Reset/Pool',
|
||||
carry_over: __('Carry Over'),
|
||||
reset: __('Reset/Pool'),
|
||||
};
|
||||
return labels[type];
|
||||
}
|
||||
|
||||
export function getRolloverTypeDescription(type: RolloverType): string {
|
||||
const descriptions: Record<RolloverType, string> = {
|
||||
carry_over: 'Remaining balance carries over to next period',
|
||||
reset: 'Remaining balance returns to available money pool',
|
||||
carry_over: __('Remaining balance carries over to next period'),
|
||||
reset: __('Remaining balance returns to available money pool'),
|
||||
};
|
||||
return descriptions[type];
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue