浏览代码

Created string resource for forgot password screen

Khubaib 8 月之前
父节点
当前提交
3002ca1f85

+ 6 - 4
app/src/main/java/com/vpn/fastestvpnservice/screens/ForgotPassword.kt

@@ -52,6 +52,7 @@ import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.graphics.toArgb
 import androidx.compose.ui.input.pointer.pointerInput
 import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.platform.LocalContext
 import androidx.compose.ui.platform.LocalFocusManager
 import androidx.compose.ui.platform.LocalSoftwareKeyboardController
 import androidx.compose.ui.platform.LocalView
@@ -83,6 +84,7 @@ fun ForgotPassword(navHostController: NavHostController) {
     val snackBarStateRed = remember { SnackbarHostState() }
     val coroutineScope = rememberCoroutineScope()
     var isShowLoader by remember { mutableStateOf(false) }
+    val context = LocalContext.current
 
     Box(
         modifier = Modifier
@@ -184,7 +186,7 @@ fun ForgotPassword(navHostController: NavHostController) {
                     .align(Alignment.Start)
                 ,
                 style = MaterialTheme.typography.displayLarge,
-                text = "Forgot Password!",
+                text = context.getString(R.string.forgot_passwords),
                 color = Color.White,
             )
             Text(
@@ -193,7 +195,7 @@ fun ForgotPassword(navHostController: NavHostController) {
                     .align(Alignment.Start)
                     .alpha(0.6F),
                 style = MaterialTheme.typography.customTypography.labelLarge,
-                text = "Enter the email address associated with your account.",
+                text = context.getString(R.string.email_associated),
                 maxLines = 2,
             )
             Spacer(modifier = Modifier.height(20.dp))
@@ -226,7 +228,7 @@ fun ForgotPassword(navHostController: NavHostController) {
 //                    )
 //                },
                 label = {
-                    Text(text = "Email",
+                    Text(text = context.getString(R.string.email),
                         style = MaterialTheme.typography.customTypography.bodySmall
                     )
                 },
@@ -292,7 +294,7 @@ fun ForgotPassword(navHostController: NavHostController) {
                 ),
             )
             {
-                Text(text = "Send Code",
+                Text(text = context.getString(R.string.send_code),
                     style = MaterialTheme.typography.titleMedium
                 )
                 Log.d("test_button", "RowScope")

+ 5 - 0
app/src/main/res/values/strings.xml

@@ -521,6 +521,11 @@
     <string name="termsndcond">Terms &amp; Conditions</string>
     <string name="already_have_acc">Already have an account? </string>
 
+    <!-- Forgot Password Screen -->
+    <string name="forgot_passwords">Forgot Password!</string>
+    <string name="email_associated">Enter the email address associated with your account.</string>
+    <string name="send_code">Send Code</string>
+
     <!-- Home Screen -->
     <string name="change">Change</string>
     <string name="see_all_locations">See All Locations</string>