🌐 refactor: Interpolate Localization Keys (#10650)

* fix: replace string concatenation of localization keys with interpolations and add keys for unlocalized string literals

* chore: update test for new localization key

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Dustin Healy 2025-11-25 12:19:49 -08:00 committed by Danny Avila
parent 39cecc97bd
commit b6dcefc53a
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
28 changed files with 130 additions and 85 deletions

View file

@ -1,4 +1,5 @@
import React, { useCallback } from 'react';
import { Trans } from 'react-i18next';
import { QueryKeys } from 'librechat-data-provider';
import { useQueryClient } from '@tanstack/react-query';
import { useParams, useNavigate } from 'react-router-dom';
@ -80,7 +81,7 @@ export function DeleteConversationDialog({
return (
<OGDialogContent
title={localize('com_ui_delete_confirm') + ' ' + title}
title={localize('com_ui_delete_confirm', { title })}
className="w-11/12 max-w-md"
showCloseButton={false}
>
@ -88,7 +89,11 @@ export function DeleteConversationDialog({
<OGDialogTitle>{localize('com_ui_delete_conversation')}</OGDialogTitle>
</OGDialogHeader>
<div className="w-full truncate">
{localize('com_ui_delete_confirm')} <strong>{title}</strong> ?
<Trans
i18nKey="com_ui_delete_confirm_strong"
values={{ item: title }}
components={{ strong: <strong /> }}
/>
</div>
<div className="flex justify-end gap-4 pt-4">
<Button aria-label="cancel" variant="outline" onClick={() => setShowDeleteDialog(false)}>