Skip to content

Commit 5575cbc

Browse files
committed
update: localize strings + add to new feature alert
1 parent 48d49c5 commit 5575cbc

15 files changed

Lines changed: 36 additions & 6 deletions

File tree

app/src/main/java/com/example/sw0b_001/ui/appbars/RecentAppBar.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ fun RecentAppBar(
113113
Row(verticalAlignment = Alignment.CenterVertically) {
114114
Icon(
115115
imageVector = Icons.Default.AccountCircle,
116-
contentDescription = "Your account",
116+
contentDescription = stringResource(R.string.your_account),
117117
modifier = Modifier.size(40.dp),
118118
tint = MaterialTheme.colorScheme.onSurfaceVariant
119119
)
120120
Spacer(modifier = Modifier.width(16.dp))
121121
Column {
122122
Text(
123-
text = "Your Account",
123+
text = stringResource(R.string.your_account),
124124
fontWeight = FontWeight.SemiBold,
125125
style = MaterialTheme.typography.bodyMedium
126126
)

app/src/main/java/com/example/sw0b_001/ui/features/FeatureInfo.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@ data class FeatureInfo(
1414
object AppFeatures {
1515
val ALL_FEATURES = listOf(
1616
FeatureInfo(
17-
id = "oauth_token_storage_device_setting_info_alert",
17+
id = "view_current_account",
1818
titleRes = R.string.new_feature_title,
19-
descriptionRes = R.string.oauth_token_storage_device_setting_info,
19+
descriptionRes = R.string.view_account_menu,
2020
iconRes = R.drawable.relaysms_icon_default_shape
2121
),
22+
// FeatureInfo(
23+
// id = "oauth_token_storage_device_setting_info_alert",
24+
// titleRes = R.string.new_feature_title,
25+
// descriptionRes = R.string.oauth_token_storage_device_setting_info,
26+
// iconRes = R.drawable.relaysms_icon_default_shape
27+
// ),
2228

2329
)
2430
}

app/src/main/java/com/example/sw0b_001/ui/views/compose/MessageComposeView.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,8 @@ private fun processSend(
433433
?: return@launch onFailure("Could not find platform details for '${account.name}'.")
434434

435435

436-
val accessToken = if (platform.protocol_type == "oauth2") account.accessToken else null
437-
val refreshToken = if (platform.protocol_type == "oauth2") account.refreshToken else null
436+
val accessToken = account.accessToken
437+
val refreshToken = account.refreshToken
438438
Log.d("MessageComposeView", "Access Token: $accessToken, Refresh Token: $refreshToken")
439439

440440
val contentFormatV2Bytes = createMessageByteBuffer(

app/src/main/res/values-ar/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,5 +321,7 @@
321321
<string name="recipient_account_format_hint">تأكد من أن حساب المستلم بالتنسيق الصحيح.</string>
322322
<string name="slack_recipient">قناة أو مستخدم سلاك</string>
323323
<string name="slack_hint">للقنوات: استخدم #الاسم أو مُعرّف (مثال: #عام أو C123ABC). للرسائل الخاصة: استخدم @اسم_المستخدم، أو بريد إلكتروني، أو مُعرّف مستخدم (مثال: @jane أو @user@gmail.com أو U456DEF).</string>
324+
<string name="view_account_menu">يمكنك الآن رؤية الحساب الذي سجلت دخولك به حاليًا بالنقر على أيقونة القائمة في شريط التنقل</string>
325+
<string name="your_account">حسابك</string>
324326

325327
</resources>

app/src/main/res/values-de/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,5 +319,7 @@
319319
<string name="recipient_account_format_hint">Stellen Sie sicher, dass das Empfängerkonto im richtigen Format ist.</string>
320320
<string name="slack_recipient">Slack-Kanal oder -Benutzer</string>
321321
<string name="slack_hint">Für Kanäle: Verwenden Sie #Name oder eine ID (z.B. #general oder C123ABC). Für DMs: Verwenden Sie @Benutzername, eine E-Mail-Adresse oder eine Benutzer-ID (z.B. @jane oder @user@gmail.com oder U456DEF).</string>
322+
<string name="view_account_menu">Sie können Ihr aktuell angemeldetes Konto jetzt sehen, indem Sie auf das Menü-Symbol in der Navigationsleiste klicken</string>
323+
<string name="your_account">Ihr Konto</string>
322324

323325
</resources>

app/src/main/res/values-es/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,5 +320,7 @@
320320
<string name="recipient_account_format_hint">Asegúrese de que la cuenta del destinatario esté en el formato correcto.</string>
321321
<string name="slack_recipient">Canal o usuario de Slack</string>
322322
<string name="slack_hint">Para canales: use #nombre o una ID (ej., #general o C123ABC). Para MD: use @nombredeusuario, un correo electrónico o una ID de usuario (ej., @jane o @user@gmail.com o U456DEF).</string>
323+
<string name="view_account_menu">Ahora puede ver la cuenta en la que ha iniciado sesión haciendo clic en el icono del menú en la barra de navegación</string>
324+
<string name="your_account">Su cuenta</string>
323325

324326
</resources>

app/src/main/res/values-fa/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,5 +320,7 @@
320320
<string name="recipient_account_format_hint">اطمینان حاصل کنید که فرمت حساب گیرنده صحیح باشد.</string>
321321
<string name="slack_recipient">کانال یا کاربر Slack</string>
322322
<string name="slack_hint">برای کانال‌ها: از #نام یا یک شناسه (مثلا #general یا C123ABC) استفاده کنید. برای پیام‌های مستقیم: از @نام‌کاربری، یک ایمیل یا شناسه کاربری (مثلا @jane یا @user@gmail.com یا U456DEF) استفاده کنید.</string>
323+
<string name="view_account_menu">اکنون می‌توانید حسابی که با آن وارد شده‌اید را با کلیک بر روی آیکون منو در نوار پیمایش مشاهده کنید</string>
324+
<string name="your_account">حساب شما</string>
323325

324326
</resources>

app/src/main/res/values-fr/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,4 +320,6 @@
320320
<string name="recipient_account_format_hint">Assurez-vous que le compte du destinataire est au bon format.</string>
321321
<string name="slack_recipient">Canal ou utilisateur Slack</string>
322322
<string name="slack_hint">Pour les canaux : utilisez #nom ou un ID (par ex., #general ou C123ABC). Pour les MP : utilisez @nomutilisateur, une adresse e-mail ou un ID utilisateur (par ex., @jane ou @user@gmail.com ou U456DEF).</string>
323+
<string name="view_account_menu">Vous pouvez maintenant voir le compte sur lequel vous êtes actuellement connecté en cliquant sur l\'icône du menu dans la barre de navigation</string>
324+
<string name="your_account">Votre compte</string>
323325
</resources>

app/src/main/res/values-hi/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,5 +325,7 @@
325325
<string name="recipient_account_format_hint">सुनिश्चित करें कि प्राप्तकर्ता का खाता सही प्रारूप में है।</string>
326326
<string name="slack_recipient">स्लैक चैनल या उपयोगकर्ता</string>
327327
<string name="slack_hint">चैनलों के लिए: #नाम या एक आईडी का उपयोग करें (जैसे, #general या C123ABC)। डीएम के लिए: @उपयोगकर्ता नाम, एक ईमेल, या एक उपयोगकर्ता आईडी का उपयोग करें (जैसे, @jane या @user@gmail.com या U456DEF)।</string>
328+
<string name="view_account_menu">अब आप नेविगेशन बार पर मेनू आइकन पर क्लिक करके वह खाता देख सकते हैं जिसमें आपने वर्तमान में लॉग इन किया है</string>
329+
<string name="your_account">आपका खाता</string>
328330

329331
</resources>

app/src/main/res/values-ko/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,5 +324,7 @@
324324
<string name="recipient_account_format_hint">수신자 계정이 올바른 형식인지 확인하십시오.</string>
325325
<string name="slack_recipient">Slack 채널 또는 사용자</string>
326326
<string name="slack_hint">채널: #이름 또는 ID(예: #general 또는 C123ABC)를 사용하세요. DM: @사용자이름, 이메일 또는 사용자 ID(예: @jane 또는 @user@gmail.com 또는 U456DEF)를 사용하세요.</string>
327+
<string name="view_account_menu">이제 탐색 메뉴 아이콘을 클릭하여 현재 로그인된 계정을 볼 수 있습니다</string>
328+
<string name="your_account">내 계정</string>
327329

328330
</resources>

0 commit comments

Comments
 (0)