refactor(i18n): Optimize service pagination internationalization copy

- Added service pagination related copy in English and Chinese translation files
- Updated type definitions to include new translation fields
- Modified the ServicesPagination component to use the newly added translation fields
This commit is contained in:
YiZixuan
2025-09-09 22:39:17 +08:00
parent 1296cf6a32
commit 5f893e3b20
4 changed files with 9 additions and 3 deletions
@@ -81,8 +81,8 @@ export function ServicesPagination({
</Select> </Select>
<span className="text-sm text-muted-foreground whitespace-nowrap"> <span className="text-sm text-muted-foreground whitespace-nowrap">
{totalItems > 0 {totalItems > 0
? `${startItem}-${endItem} of ${totalItems} ${t("services") || "services"}` ? t("servicesPagination", {"startItem": startItem, "endItem": endItem, "totalItems": totalItems})
: `0 ${t("services") || "services"}` : t("servicesPaginationNoService")
} }
</span> </span>
</div> </div>
@@ -84,4 +84,6 @@ export const maintenanceTranslations: MaintenanceTranslations = {
retry: 'Retry', retry: 'Retry',
loadingServerData: 'Loading server data...', loadingServerData: 'Loading server data...',
retrievingYourInformation: 'Please wait while we retrieve your information...', retrievingYourInformation: 'Please wait while we retrieve your information...',
servicesPagination: '{startItem}-{endItem} of {totalItems} services',
servicesPaginationNoService: '0 services',
}; };
@@ -82,4 +82,6 @@ export interface MaintenanceTranslations {
retry: string; retry: string;
loadingServerData: string; loadingServerData: string;
retrievingYourInformation: string; retrievingYourInformation: string;
servicesPagination: string;
servicesPaginationNoService: string;
} }
@@ -84,4 +84,6 @@ export const maintenanceTranslations: MaintenanceTranslations = {
retry: '重试', retry: '重试',
loadingServerData: '正在加载服务器数据...', loadingServerData: '正在加载服务器数据...',
retrievingYourInformation: '正在获取您的信息,请稍候...', retrievingYourInformation: '正在获取您的信息,请稍候...',
servicesPagination: '{startItem}-{endItem}, 共 {totalItems} 个服务',
servicesPaginationNoService: '0 服务',
}; };