feat authentication localization strings multiple languages

This commit is contained in:
cogwheel
2025-12-18 11:58:11 +05:30
parent 9da9f9e2b3
commit 66e226ab85
11 changed files with 99 additions and 86 deletions

View File

@@ -42,7 +42,6 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
bool _isConnecting = false; bool _isConnecting = false;
bool _showAdvancedSettings = false; bool _showAdvancedSettings = false;
bool _allowSelfSignedCertificates = false; bool _allowSelfSignedCertificates = false;
bool _serverBehindProxy = false;
@override @override
void initState() { void initState() {
@@ -108,16 +107,6 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
workerManager: workerManager, workerManager: workerManager,
); );
// If user indicated server is behind proxy, go directly to proxy auth
if (_serverBehindProxy) {
DebugLogger.log(
'User indicated server behind proxy, starting proxy auth',
scope: 'auth/connection',
);
await _handleProxyAuth(tempConfig, api, workerManager);
return;
}
// First check connectivity with proxy detection // First check connectivity with proxy detection
DebugLogger.log('Checking server health...', scope: 'auth/connection'); DebugLogger.log('Checking server health...', scope: 'auth/connection');
final healthResult = await api.checkHealthWithProxyDetection(); final healthResult = await api.checkHealthWithProxyDetection();
@@ -888,64 +877,6 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
], ],
), ),
), ),
// Server behind proxy toggle
Container(
width: double.infinity,
padding: const EdgeInsets.all(Spacing.md),
margin: const EdgeInsets.only(bottom: Spacing.md),
decoration: BoxDecoration(
color: context.conduitTheme.surfaceContainer.withValues(
alpha: 0.3,
),
borderRadius: BorderRadius.circular(AppBorderRadius.small),
border: Border.all(
color: context.conduitTheme.dividerColor.withValues(alpha: 0.4),
width: BorderWidth.thin,
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Icon(
Platform.isIOS ? CupertinoIcons.shield : Icons.security,
color: context.conduitTheme.iconSecondary,
size: IconSize.small,
),
const SizedBox(width: Spacing.sm),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
l10n.serverBehindProxy,
style: context.conduitTheme.bodySmall?.copyWith(
fontWeight: FontWeight.w600,
color: context.conduitTheme.textPrimary,
),
),
const SizedBox(height: Spacing.xs),
Text(
l10n.serverBehindProxyDescription,
style: context.conduitTheme.bodySmall?.copyWith(
color: context.conduitTheme.textSecondary,
),
),
],
),
),
const SizedBox(width: Spacing.sm),
Switch.adaptive(
value: _serverBehindProxy,
onChanged: (value) {
setState(() {
_serverBehindProxy = value;
});
},
activeTrackColor: context.conduitTheme.buttonPrimary,
),
],
),
),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Modellladezeit", "usageLoadDuration": "Modellladezeit",
"usageQueueTime": "Wartezeit", "usageQueueTime": "Wartezeit",
"usageReasoningTokens": "Reasoning-Tokens", "usageReasoningTokens": "Reasoning-Tokens",
"usageTotalTokens": "Gesamte Tokens" "usageTotalTokens": "Gesamte Tokens",
"proxyAuthentication": "Proxy-Authentifizierung",
"proxyAuthPlatformNotSupported": "Proxy-Authentifizierung erfordert ein mobiles Gerät. Bitte authentifizieren Sie sich zuerst über einen Browser.",
"proxyAuthLoading": "Authentifizierungsseite wird geladen...",
"proxyAuthFailed": "Proxy-Authentifizierung fehlgeschlagen",
"proxyAuthHelpText": "Melden Sie sich über den Proxy Ihrer Organisation an und dann bei Open WebUI. Sie werden automatisch weitergeleitet.",
"proxyAuthHelpTextSimple": "Melden Sie sich über Ihren Proxy an. Nach der Authentifizierung tippen Sie auf Weiter, um sich anzumelden.",
"continueButton": "Weiter",
"proxyAuthRequired": "Dieser Server erfordert Proxy-Authentifizierung",
"proxyAuthRequiredDescription": "Ihr Server scheint hinter einem Authentifizierungs-Proxy (wie oauth2-proxy) zu sein. Sie müssen sich zuerst über den Proxy anmelden.",
"authenticateThroughProxy": "Authentifizieren"
} }

View File

@@ -1943,14 +1943,6 @@
"@authenticateThroughProxy": { "@authenticateThroughProxy": {
"description": "Button text to start proxy authentication." "description": "Button text to start proxy authentication."
}, },
"serverBehindProxy": "Server behind proxy",
"@serverBehindProxy": {
"description": "Toggle label for servers behind authentication proxies."
},
"serverBehindProxyDescription": "Enable if your server uses oauth2-proxy or similar authentication.",
"@serverBehindProxyDescription": {
"description": "Description for the proxy server toggle."
},
"continueWithProvider": "Continue with {provider}", "continueWithProvider": "Continue with {provider}",
"@continueWithProvider": { "@continueWithProvider": {
"description": "Button text for OAuth provider sign-in.", "description": "Button text for OAuth provider sign-in.",

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Tiempo de carga del modelo", "usageLoadDuration": "Tiempo de carga del modelo",
"usageQueueTime": "Tiempo en cola", "usageQueueTime": "Tiempo en cola",
"usageReasoningTokens": "Tokens de razonamiento", "usageReasoningTokens": "Tokens de razonamiento",
"usageTotalTokens": "Tokens totales" "usageTotalTokens": "Tokens totales",
"proxyAuthentication": "Autenticación de Proxy",
"proxyAuthPlatformNotSupported": "La autenticación de proxy requiere un dispositivo móvil. Por favor, autentíquese primero a través de un navegador.",
"proxyAuthLoading": "Cargando página de autenticación...",
"proxyAuthFailed": "Error en la autenticación de proxy",
"proxyAuthHelpText": "Complete el inicio de sesión a través del proxy de su organización, luego inicie sesión en Open WebUI. Será redirigido automáticamente.",
"proxyAuthHelpTextSimple": "Inicie sesión a través de su proxy. Una vez autenticado, toque Continuar para iniciar sesión.",
"continueButton": "Continuar",
"proxyAuthRequired": "Este servidor requiere autenticación de proxy",
"proxyAuthRequiredDescription": "Su servidor parece estar detrás de un proxy de autenticación (como oauth2-proxy). Deberá iniciar sesión a través del proxy primero.",
"authenticateThroughProxy": "Autenticar"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Temps de chargement du modèle", "usageLoadDuration": "Temps de chargement du modèle",
"usageQueueTime": "Temps d'attente", "usageQueueTime": "Temps d'attente",
"usageReasoningTokens": "Tokens de raisonnement", "usageReasoningTokens": "Tokens de raisonnement",
"usageTotalTokens": "Tokens totaux" "usageTotalTokens": "Tokens totaux",
"proxyAuthentication": "Authentification Proxy",
"proxyAuthPlatformNotSupported": "L'authentification proxy nécessite un appareil mobile. Veuillez d'abord vous authentifier via un navigateur.",
"proxyAuthLoading": "Chargement de la page d'authentification...",
"proxyAuthFailed": "Échec de l'authentification proxy",
"proxyAuthHelpText": "Connectez-vous via le proxy de votre organisation, puis connectez-vous à Open WebUI. Vous serez redirigé automatiquement.",
"proxyAuthHelpTextSimple": "Connectez-vous via votre proxy. Une fois authentifié, appuyez sur Continuer pour vous connecter.",
"continueButton": "Continuer",
"proxyAuthRequired": "Ce serveur nécessite une authentification proxy",
"proxyAuthRequiredDescription": "Votre serveur semble être derrière un proxy d'authentification (comme oauth2-proxy). Vous devrez d'abord vous connecter via le proxy.",
"authenticateThroughProxy": "S'authentifier"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Tempo di caricamento modello", "usageLoadDuration": "Tempo di caricamento modello",
"usageQueueTime": "Tempo in coda", "usageQueueTime": "Tempo in coda",
"usageReasoningTokens": "Token di ragionamento", "usageReasoningTokens": "Token di ragionamento",
"usageTotalTokens": "Token totali" "usageTotalTokens": "Token totali",
"proxyAuthentication": "Autenticazione Proxy",
"proxyAuthPlatformNotSupported": "L'autenticazione proxy richiede un dispositivo mobile. Si prega di autenticarsi prima tramite un browser.",
"proxyAuthLoading": "Caricamento della pagina di autenticazione...",
"proxyAuthFailed": "Autenticazione proxy fallita",
"proxyAuthHelpText": "Completa l'accesso tramite il proxy della tua organizzazione, poi accedi a Open WebUI. Sarai reindirizzato automaticamente.",
"proxyAuthHelpTextSimple": "Accedi tramite il tuo proxy. Una volta autenticato, tocca Continua per procedere all'accesso.",
"continueButton": "Continua",
"proxyAuthRequired": "Questo server richiede l'autenticazione proxy",
"proxyAuthRequiredDescription": "Il tuo server sembra essere dietro un proxy di autenticazione (come oauth2-proxy). Dovrai prima accedere tramite il proxy.",
"authenticateThroughProxy": "Autentica"
} }

View File

@@ -664,5 +664,15 @@
"usageLoadDuration": "모델 로드 시간", "usageLoadDuration": "모델 로드 시간",
"usageQueueTime": "대기 시간", "usageQueueTime": "대기 시간",
"usageReasoningTokens": "추론 토큰", "usageReasoningTokens": "추론 토큰",
"usageTotalTokens": "총 토큰" "usageTotalTokens": "총 토큰",
"proxyAuthentication": "프록시 인증",
"proxyAuthPlatformNotSupported": "프록시 인증은 모바일 장치가 필요합니다. 먼저 브라우저를 통해 인증해 주세요.",
"proxyAuthLoading": "인증 페이지 로딩 중...",
"proxyAuthFailed": "프록시 인증 실패",
"proxyAuthHelpText": "조직의 프록시를 통해 로그인한 다음 Open WebUI에 로그인하세요. 자동으로 리디렉션됩니다.",
"proxyAuthHelpTextSimple": "프록시를 통해 로그인하세요. 인증 후 계속을 탭하여 로그인을 진행하세요.",
"continueButton": "계속",
"proxyAuthRequired": "이 서버는 프록시 인증이 필요합니다",
"proxyAuthRequiredDescription": "서버가 인증 프록시(예: oauth2-proxy) 뒤에 있는 것 같습니다. 먼저 프록시를 통해 로그인해야 합니다.",
"authenticateThroughProxy": "인증"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Modellaadtijd", "usageLoadDuration": "Modellaadtijd",
"usageQueueTime": "Wachttijd", "usageQueueTime": "Wachttijd",
"usageReasoningTokens": "Redeneertokens", "usageReasoningTokens": "Redeneertokens",
"usageTotalTokens": "Totaal tokens" "usageTotalTokens": "Totaal tokens",
"proxyAuthentication": "Proxy-authenticatie",
"proxyAuthPlatformNotSupported": "Proxy-authenticatie vereist een mobiel apparaat. Authenticeer eerst via een browser.",
"proxyAuthLoading": "Authenticatiepagina laden...",
"proxyAuthFailed": "Proxy-authenticatie mislukt",
"proxyAuthHelpText": "Meld u aan via de proxy van uw organisatie en vervolgens bij Open WebUI. U wordt automatisch doorgestuurd.",
"proxyAuthHelpTextSimple": "Meld u aan via uw proxy. Na authenticatie tikt u op Doorgaan om in te loggen.",
"continueButton": "Doorgaan",
"proxyAuthRequired": "Deze server vereist proxy-authenticatie",
"proxyAuthRequiredDescription": "Uw server lijkt achter een authenticatieproxy (zoals oauth2-proxy) te staan. U moet eerst inloggen via de proxy.",
"authenticateThroughProxy": "Authenticeren"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "Время загрузки модели", "usageLoadDuration": "Время загрузки модели",
"usageQueueTime": "Время в очереди", "usageQueueTime": "Время в очереди",
"usageReasoningTokens": "Токены рассуждений", "usageReasoningTokens": "Токены рассуждений",
"usageTotalTokens": "Всего токенов" "usageTotalTokens": "Всего токенов",
"proxyAuthentication": "Аутентификация через прокси",
"proxyAuthPlatformNotSupported": "Аутентификация через прокси требует мобильное устройство. Пожалуйста, сначала авторизуйтесь через браузер.",
"proxyAuthLoading": "Загрузка страницы аутентификации...",
"proxyAuthFailed": "Ошибка аутентификации через прокси",
"proxyAuthHelpText": "Войдите через прокси вашей организации, затем войдите в Open WebUI. Вы будете перенаправлены автоматически.",
"proxyAuthHelpTextSimple": "Войдите через ваш прокси. После аутентификации нажмите Продолжить для входа.",
"continueButton": "Продолжить",
"proxyAuthRequired": "Этот сервер требует аутентификацию через прокси",
"proxyAuthRequiredDescription": "Ваш сервер, похоже, находится за прокси аутентификации (например, oauth2-proxy). Сначала необходимо войти через прокси.",
"authenticateThroughProxy": "Аутентифицировать"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "模型加载时间", "usageLoadDuration": "模型加载时间",
"usageQueueTime": "排队时间", "usageQueueTime": "排队时间",
"usageReasoningTokens": "推理 token", "usageReasoningTokens": "推理 token",
"usageTotalTokens": "总 token" "usageTotalTokens": "总 token",
"proxyAuthentication": "代理认证",
"proxyAuthPlatformNotSupported": "代理认证需要移动设备。请先通过浏览器进行认证。",
"proxyAuthLoading": "正在加载认证页面...",
"proxyAuthFailed": "代理认证失败",
"proxyAuthHelpText": "通过您组织的代理完成登录,然后登录 Open WebUI。您将被自动重定向。",
"proxyAuthHelpTextSimple": "通过您的代理登录。认证后,点击继续以进行登录。",
"continueButton": "继续",
"proxyAuthRequired": "此服务器需要代理认证",
"proxyAuthRequiredDescription": "您的服务器似乎位于认证代理(如 oauth2-proxy后面。您需要先通过代理登录。",
"authenticateThroughProxy": "认证"
} }

View File

@@ -886,5 +886,15 @@
"usageLoadDuration": "模型載入時間", "usageLoadDuration": "模型載入時間",
"usageQueueTime": "排隊時間", "usageQueueTime": "排隊時間",
"usageReasoningTokens": "推理 token", "usageReasoningTokens": "推理 token",
"usageTotalTokens": "總 token" "usageTotalTokens": "總 token",
"proxyAuthentication": "代理認證",
"proxyAuthPlatformNotSupported": "代理認證需要行動裝置。請先透過瀏覽器進行認證。",
"proxyAuthLoading": "正在載入認證頁面...",
"proxyAuthFailed": "代理認證失敗",
"proxyAuthHelpText": "透過您組織的代理完成登入,然後登入 Open WebUI。您將被自動重新導向。",
"proxyAuthHelpTextSimple": "透過您的代理登入。認證後,點擊繼續以進行登入。",
"continueButton": "繼續",
"proxyAuthRequired": "此伺服器需要代理認證",
"proxyAuthRequiredDescription": "您的伺服器似乎位於認證代理(如 oauth2-proxy後面。您需要先透過代理登入。",
"authenticateThroughProxy": "認證"
} }