diff --git a/app/(auth)/(tabs)/(home)/settings.tsx b/app/(auth)/(tabs)/(home)/settings.tsx index f28918c6..cbe9871d 100644 --- a/app/(auth)/(tabs)/(home)/settings.tsx +++ b/app/(auth)/(tabs)/(home)/settings.tsx @@ -42,8 +42,8 @@ export default function settings() { const openQuickConnectAuthCodeInput = () => { Alert.prompt( - "Quick connect", - "Enter the quick connect code", + t("home.settings.quick_connect.quick_connect_title"), + t("home.settings.quick_connect.enter_the_quick_connect_code"), async (text) => { if (text) { try { @@ -55,14 +55,14 @@ export default function settings() { Haptics.notificationAsync( Haptics.NotificationFeedbackType.Success ); - Alert.alert("Success", "Quick connect authorized"); + Alert.alert(t("home.settings.quick_connect.success"), t("home.settings.quick_connect.quick_connect_autorized")); } else { Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error); - Alert.alert("Error", "Invalid code"); + Alert.alert(t("home.settings.quick_connect.error"), t("home.settings.quick_connect.invalid_code")); } } catch (e) { Haptics.notificationAsync(Haptics.NotificationFeedbackType.Error); - Alert.alert("Error", "Invalid code"); + Alert.alert(t("home.settings.quick_connect.error"), t("home.settings.quick_connect.invalid_code")); } } } diff --git a/app/login.tsx b/app/login.tsx index f335bb79..dd9efe93 100644 --- a/app/login.tsx +++ b/app/login.tsx @@ -162,8 +162,8 @@ const CredentialsSchema = z.object({ if (result === undefined) { Alert.alert( - "Connection failed", - "Could not connect to the server. Please check the URL and your network connection." + t("login.connection_failed"), + t("login.could_not_connect_to_server") ); return; } @@ -175,14 +175,14 @@ const CredentialsSchema = z.object({ try { const code = await initiateQuickConnect(); if (code) { - Alert.alert("Quick Connect", `Enter code ${code} to login`, [ + Alert.alert(t("login.quick_connect"), t("login.enter_code_to_login", {code: code}), [ { - text: "Got It", + text: t("login.got_it"), }, ]); } } catch (error) { - Alert.alert(t("login.error_title"), "Failed to initiate Quick Connect"); + Alert.alert(t("login.error_title"), t("login.failed_to_initiate_quick_connect")); } }; diff --git a/translations/en.json b/translations/en.json index 50f4b1bf..4aac97be 100644 --- a/translations/en.json +++ b/translations/en.json @@ -7,7 +7,13 @@ "username_placeholder": "Username", "password_placeholder": "Password", "use_quick_connect": "Use Quick Connect", - "login_button": "Log in" + "login_button": "Log in", + "quick_connect": "Quick Connect", + "enter_code_to_login": "Enter code {{code}} to login", + "failed_to_initiate_quick_connect": "Failed to initiate Quick Connect", + "got_it": "Got it", + "connection_failed": "Connection failed", + "could_not_connect_to_server": "Could not connect to the server. Please check the URL and your network connection." }, "server": { "enter_url_to_jellyfin_server": "Enter the URL to your Jellyfin server", @@ -38,7 +44,12 @@ }, "quick_connect": { "quick_connect_title": "Quick connect", - "authorize_button": "Authorize" + "authorize_button": "Authorize", + "enter_the_quick_connect_code": "Enter the Quick Connect code", + "success": "Success", + "quick_connect_autorized": "Quick Connect authorized", + "error": "Error", + "invalid_code": "Invalid code" }, "media": { "media_title": "Media",