fix(i18n): rename subscription.servers object to subscription.serverManagement

Resolves conflict where subscription.servers existed as both a nested
object (for server management UI keys) and a pluralization base key.
Renamed the nested object to serverManagement in all 4 locales and
updated all t() references in Subscription.tsx.
This commit is contained in:
c0mrade
2026-01-27 22:47:41 +03:00
parent 821f9954c8
commit 4b35d8c392
5 changed files with 15 additions and 15 deletions

View File

@@ -333,7 +333,7 @@
"manageServers": "Server management", "manageServers": "Server management",
"manageServersTitle": "Server management" "manageServersTitle": "Server management"
}, },
"servers": { "serverManagement": {
"statusLegend": "✅ — connected • — will be added (paid) • — will be disconnected", "statusLegend": "✅ — connected • — will be added (paid) • — will be disconnected",
"discountBanner": "Your server discount: -{{percent}}%", "discountBanner": "Your server discount: -{{percent}}%",
"forDays": "(for {{days}} days)", "forDays": "(for {{days}} days)",

View File

@@ -242,7 +242,7 @@
"manageServers": "مدیریت سرورها", "manageServers": "مدیریت سرورها",
"manageServersTitle": "مدیریت سرورها" "manageServersTitle": "مدیریت سرورها"
}, },
"servers": { "serverManagement": {
"statusLegend": "✅ — متصل • — اضافه خواهد شد (پولی) • — قطع خواهد شد", "statusLegend": "✅ — متصل • — اضافه خواهد شد (پولی) • — قطع خواهد شد",
"discountBanner": "تخفیف سرور شما: -{{percent}}%", "discountBanner": "تخفیف سرور شما: -{{percent}}%",
"forDays": "(برای {{days}} روز)", "forDays": "(برای {{days}} روز)",

View File

@@ -355,7 +355,7 @@
"manageServers": "Управление серверами", "manageServers": "Управление серверами",
"manageServersTitle": "Управление серверами" "manageServersTitle": "Управление серверами"
}, },
"servers": { "serverManagement": {
"statusLegend": "✅ — подключено • — будет добавлено (платно) • — будет отключено", "statusLegend": "✅ — подключено • — будет добавлено (платно) • — будет отключено",
"discountBanner": "Ваша скидка на серверы: -{{percent}}%", "discountBanner": "Ваша скидка на серверы: -{{percent}}%",
"forDays": "(за {{days}} дн.)", "forDays": "(за {{days}} дн.)",

View File

@@ -242,7 +242,7 @@
"manageServers": "服务器管理", "manageServers": "服务器管理",
"manageServersTitle": "服务器管理" "manageServersTitle": "服务器管理"
}, },
"servers": { "serverManagement": {
"statusLegend": "✅ — 已连接 • — 将添加(付费)• — 将断开", "statusLegend": "✅ — 已连接 • — 将添加(付费)• — 将断开",
"discountBanner": "您的服务器折扣:-{{percent}}%", "discountBanner": "您的服务器折扣:-{{percent}}%",
"forDays": "{{days}} 天)", "forDays": "{{days}} 天)",

View File

@@ -1287,13 +1287,13 @@ export default function Subscription() {
) : countriesData && countriesData.countries.length > 0 ? ( ) : countriesData && countriesData.countries.length > 0 ? (
<div className="space-y-4"> <div className="space-y-4">
<div className="rounded-lg bg-dark-700/30 p-2 text-xs text-dark-500"> <div className="rounded-lg bg-dark-700/30 p-2 text-xs text-dark-500">
{t('subscription.servers.statusLegend')} {t('subscription.serverManagement.statusLegend')}
</div> </div>
{countriesData.discount_percent > 0 && ( {countriesData.discount_percent > 0 && (
<div className="rounded-lg border border-success-500/30 bg-success-500/10 p-2 text-xs text-success-400"> <div className="rounded-lg border border-success-500/30 bg-success-500/10 p-2 text-xs text-success-400">
🎁{' '} 🎁{' '}
{t('subscription.servers.discountBanner', { {t('subscription.serverManagement.discountBanner', {
percent: countriesData.discount_percent, percent: countriesData.discount_percent,
})} })}
</div> </div>
@@ -1351,7 +1351,7 @@ export default function Subscription() {
{willBeAdded && ( {willBeAdded && (
<div className="text-xs text-success-400"> <div className="text-xs text-success-400">
+{formatPrice(country.price_kopeks)}{' '} +{formatPrice(country.price_kopeks)}{' '}
{t('subscription.servers.forDays', { {t('subscription.serverManagement.forDays', {
days: countriesData.days_left, days: countriesData.days_left,
})} })}
{country.has_discount && ( {country.has_discount && (
@@ -1370,7 +1370,7 @@ export default function Subscription() {
{!willBeAdded && !isCurrentlyConnected && ( {!willBeAdded && !isCurrentlyConnected && (
<div className="text-xs text-dark-500"> <div className="text-xs text-dark-500">
{formatPrice(country.price_per_month_kopeks)} {formatPrice(country.price_per_month_kopeks)}
{t('subscription.servers.perMonth')} {t('subscription.serverManagement.perMonth')}
{country.has_discount && ( {country.has_discount && (
<span className="ml-1 text-dark-600 line-through"> <span className="ml-1 text-dark-600 line-through">
{formatPrice(country.base_price_kopeks)} {formatPrice(country.base_price_kopeks)}
@@ -1380,7 +1380,7 @@ export default function Subscription() {
)} )}
{!country.is_available && !isCurrentlyConnected && ( {!country.is_available && !isCurrentlyConnected && (
<div className="text-xs text-dark-500"> <div className="text-xs text-dark-500">
{t('subscription.servers.unavailable')} {t('subscription.serverManagement.unavailable')}
</div> </div>
)} )}
</div> </div>
@@ -1423,7 +1423,7 @@ export default function Subscription() {
{added.length > 0 && ( {added.length > 0 && (
<div className="text-sm"> <div className="text-sm">
<span className="text-success-400"> <span className="text-success-400">
{t('subscription.servers.toAdd')} {t('subscription.serverManagement.toAdd')}
</span>{' '} </span>{' '}
<span className="text-dark-300"> <span className="text-dark-300">
{addedServers.map((s) => s.name).join(', ')} {addedServers.map((s) => s.name).join(', ')}
@@ -1433,7 +1433,7 @@ export default function Subscription() {
{removed.length > 0 && ( {removed.length > 0 && (
<div className="text-sm"> <div className="text-sm">
<span className="text-error-400"> <span className="text-error-400">
{t('subscription.servers.toDisconnect')} {t('subscription.serverManagement.toDisconnect')}
</span>{' '} </span>{' '}
<span className="text-dark-300"> <span className="text-dark-300">
{countriesData.countries {countriesData.countries
@@ -1446,7 +1446,7 @@ export default function Subscription() {
{totalCost > 0 && ( {totalCost > 0 && (
<div className="text-center"> <div className="text-center">
<div className="text-sm text-dark-400"> <div className="text-sm text-dark-400">
{t('subscription.servers.paymentProrated')} {t('subscription.serverManagement.paymentProrated')}
</div> </div>
<div className="text-xl font-bold text-accent-400"> <div className="text-xl font-bold text-accent-400">
{formatPrice(totalCost)} {formatPrice(totalCost)}
@@ -1477,13 +1477,13 @@ export default function Subscription() {
<span className="h-4 w-4 animate-spin rounded-full border-2 border-white/30 border-t-white" /> <span className="h-4 w-4 animate-spin rounded-full border-2 border-white/30 border-t-white" />
</span> </span>
) : ( ) : (
t('subscription.servers.applyChanges') t('subscription.serverManagement.applyChanges')
)} )}
</button> </button>
</div> </div>
) : ( ) : (
<div className="py-2 text-center text-sm text-dark-500"> <div className="py-2 text-center text-sm text-dark-500">
{t('subscription.servers.selectServersHint')} {t('subscription.serverManagement.selectServersHint')}
</div> </div>
); );
})()} })()}
@@ -1496,7 +1496,7 @@ export default function Subscription() {
</div> </div>
) : ( ) : (
<div className="py-4 text-center text-sm text-dark-400"> <div className="py-4 text-center text-sm text-dark-400">
{t('subscription.servers.noServersAvailable')} {t('subscription.serverManagement.noServersAvailable')}
</div> </div>
)} )}
</div> </div>