@@ -12,6 +12,8 @@ import {
1212} from '@librechat/client' ;
1313import type { TStartupConfig } from 'librechat-data-provider' ;
1414
15+ import { useLocalize , TranslationKeys } from '~/hooks' ;
16+
1517type SolidLoginButtonProps = {
1618 startupConfig : TStartupConfig ;
1719 label : string ;
@@ -34,6 +36,7 @@ function isValidIssuerUrl(url: string): boolean {
3436 * Redirects to serverDomain + '/oauth/openid?issuer=' + encodeURIComponent(selectedIssuer)
3537 */
3638function SolidLoginButton ( { startupConfig, label, Icon } : SolidLoginButtonProps ) {
39+ const localize = useLocalize ( ) ;
3740 const [ open , setOpen ] = useState ( false ) ;
3841 const [ providerUrl , setProviderUrl ] = useState ( '' ) ;
3942 const [ selectedOptionIssuer , setSelectedOptionIssuer ] = useState < string | null > ( null ) ;
@@ -47,7 +50,9 @@ function SolidLoginButton({ startupConfig, label, Icon }: SolidLoginButtonProps)
4750 const canContinue =
4851 serverDomain &&
4952 ! ! trimmedUrl &&
50- ( customEnabled ? isValidIssuerUrl ( trimmedUrl ) : options . some ( ( opt ) => opt . issuer === trimmedUrl ) ) ;
53+ ( customEnabled
54+ ? isValidIssuerUrl ( trimmedUrl )
55+ : options . some ( ( opt ) => opt . issuer === trimmedUrl ) ) ;
5156
5257 const handleSelectOption = ( issuer : string ) => {
5358 setSelectedOptionIssuer ( issuer ) ;
@@ -88,23 +93,22 @@ function SolidLoginButton({ startupConfig, label, Icon }: SolidLoginButtonProps)
8893 </ OGDialogTrigger >
8994 < OGDialogContent className = "max-w-md" >
9095 < OGDialogHeader >
91- < OGDialogTitle > Choose Solid Identity Provider</ OGDialogTitle >
96+ < OGDialogTitle >
97+ { localize ( 'com_auth_solid_idp_modal_title' as TranslationKeys ) }
98+ </ OGDialogTitle >
9299 < OGDialogDescription >
93- Enter your provider URL or pick one of the providers below.
100+ { localize ( 'com_auth_solid_idp_modal_description' as TranslationKeys ) }
94101 </ OGDialogDescription >
95102 </ OGDialogHeader >
96103 < div className = "space-y-4 py-4" >
97104 < div className = "space-y-2" >
98- < label
99- htmlFor = "solid-idp-url"
100- className = "text-sm font-medium text-text-primary"
101- >
102- Solid Identity Provider
105+ < label htmlFor = "solid-idp-url" className = "text-sm font-medium text-text-primary" >
106+ { localize ( 'com_auth_solid_idp_label' as TranslationKeys ) }
103107 </ label >
104108 < input
105109 id = "solid-idp-url"
106110 type = "url"
107- placeholder = "Enter your provider URL"
111+ placeholder = { localize ( 'com_auth_solid_idp_placeholder' as TranslationKeys ) }
108112 value = { providerUrl }
109113 onChange = { ( e ) => {
110114 setProviderUrl ( e . target . value ) ;
@@ -120,7 +124,7 @@ function SolidLoginButton({ startupConfig, label, Icon }: SolidLoginButtonProps)
120124 { options . length > 0 && (
121125 < div className = "space-y-2" >
122126 < p className = "text-sm font-medium text-text-secondary" >
123- Or select a provider:
127+ { localize ( 'com_auth_solid_select_provider' as TranslationKeys ) }
124128 </ p >
125129 < div className = "flex flex-wrap gap-2" >
126130 { options . map ( ( opt ) => {
@@ -146,10 +150,10 @@ function SolidLoginButton({ startupConfig, label, Icon }: SolidLoginButtonProps)
146150 </ div >
147151 < OGDialogFooter >
148152 < OGDialogClose asChild >
149- < Button variant = "outline" > Cancel </ Button >
153+ < Button variant = "outline" > { localize ( 'com_ui_cancel' as TranslationKeys ) } </ Button >
150154 </ OGDialogClose >
151155 < Button onClick = { handleContinue } disabled = { ! canContinue } >
152- Continue
156+ { localize ( 'com_auth_continue' as TranslationKeys ) }
153157 </ Button >
154158 </ OGDialogFooter >
155159 </ OGDialogContent >
0 commit comments