Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions app/src/main/java/com/nextcloud/talk/diagnose/DiagnoseActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -302,25 +302,25 @@ class DiagnoseActivity : BaseActivity() {
addDiagnosisEntry(
key = context.resources.getString(R.string.nc_diagnose_notification_permission),
value = if (platformPermissionUtil.isPostNotificationsPermissionGranted()) {
context.resources.getString(R.string.nc_settings_notifications_granted)
context.resources.getString(R.string.nc_diagnose_notifications_granted)
} else {
context.resources.getString(R.string.nc_settings_notifications_declined)
context.resources.getString(R.string.nc_diagnose_notifications_declined)
}
)
}

addDiagnosisEntry(
key = context.resources.getString(R.string.nc_diagnose_notification_calls_channel_permission),
value =
translateBoolean(
getStringForBoolean(
NotificationUtils.isCallsNotificationChannelEnabled(this)
)
)

addDiagnosisEntry(
key = context.resources.getString(R.string.nc_diagnose_notification_messages_channel_permission),
value =
translateBoolean(
getStringForBoolean(
NotificationUtils.isMessagesNotificationChannelEnabled(this)
)
)
Expand All @@ -344,7 +344,7 @@ class DiagnoseActivity : BaseActivity() {
.pushTokenLatestGeneration
)
} else {
context.resources.getString(R.string.nc_common_unknown)
"Unknown"
}
)

Expand Down Expand Up @@ -378,15 +378,15 @@ class DiagnoseActivity : BaseActivity() {
addDiagnosisEntry(
key = context.resources.getString(R.string.nc_diagnose_account_user_status_enabled),
value =
translateBoolean(
getStringForBoolean(
(currentUser.capabilities?.userStatusCapability?.enabled)
)
)

addDiagnosisEntry(
key = context.resources.getString(R.string.nc_diagnose_account_server_notification_app),
value =
translateBoolean(currentUser.capabilities?.notificationsCapability?.features?.isNotEmpty())
getStringForBoolean(currentUser.capabilities?.notificationsCapability?.features?.isNotEmpty())
)

if (isGooglePlayServicesAvailable) {
Expand Down Expand Up @@ -457,11 +457,11 @@ class DiagnoseActivity : BaseActivity() {
"$MANUFACTURER $MODEL"
}

private fun translateBoolean(answer: Boolean?): String =
private fun getStringForBoolean(answer: Boolean?): String =
when (answer) {
null -> context.resources.getString(R.string.nc_common_unknown)
true -> context.resources.getString(R.string.nc_yes)
else -> context.resources.getString(R.string.nc_no)
null -> context.getString(R.string.nc_diagnose_unknown)
true -> context.getString(R.string.nc_diagnose_yes)
else -> context.getString(R.string.nc_diagnose_no)
}

private fun List<DiagnoseElement>.toMarkdownString(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,13 +332,13 @@ class SettingsActivity :

if (PowerManagerUtils().isIgnoringBatteryOptimizations()) {
binding.batteryOptimizationIgnored.text =
resources!!.getString(R.string.nc_diagnose_battery_optimization_ignored)
resources!!.getString(R.string.battery_optimization_ignored)
binding.batteryOptimizationIgnored.setTextColor(
resources.getColor(R.color.high_emphasis_text, null)
)
} else {
binding.batteryOptimizationIgnored.text =
resources!!.getString(R.string.nc_diagnose_battery_optimization_not_ignored)
resources!!.getString(R.string.battery_optimization_not_ignored)
Comment thread
mahibi marked this conversation as resolved.
binding.batteryOptimizationIgnored.setTextColor(resources.getColor(R.color.nc_darkRed, null))

if (openedByNotificationWarning) {
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?><!--
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Nextcloud Talk - Android Client
~
~ SPDX-FileCopyrightText: 2024 Parneet Singh <gurayaparneet@gmail.com>
Expand Down Expand Up @@ -279,7 +280,7 @@
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nc_diagnose_notification_permission"
android:text="@string/notification_permission"
android:textSize="@dimen/headline_text_size" />

<com.google.android.material.textview.MaterialTextView
Expand All @@ -299,14 +300,14 @@
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nc_diagnose_battery_optimization_title"
android:text="@string/battery_optimization_title"
android:textSize="@dimen/headline_text_size" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/battery_optimization_ignored"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="@string/nc_diagnose_battery_optimization_ignored" />
tools:text="@string/battery_optimization_ignored"/>
</LinearLayout>

</LinearLayout>
Expand All @@ -323,7 +324,7 @@
<com.google.android.material.textview.MaterialTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nc_diagnose_gplay_available_no" />
android:text="@string/gplay_available_no" />

</LinearLayout>

Expand Down
39 changes: 3 additions & 36 deletions app/src/main/res/values-ar/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -188,45 +188,12 @@
<string name="nc_demote">تخفيض رتبة مشرف</string>
<string name="nc_description_record_voice">تسجيل رسالة صوتية</string>
<string name="nc_description_send_message_button">أرسل رسالة</string>
<string name="nc_diagnose_account_category_title">الحساب الحالي</string>
<string name="nc_diagnose_account_server">خادوم</string>
<string name="nc_diagnose_account_server_notification_app">هل تم تثبيت تطبيق إشعارات الخادم؟</string>
<string name="nc_diagnose_account_user_name">مستخدم</string>
<string name="nc_diagnose_account_user_status_enabled">هل حالة المُستخدِم مُمكّنة؟</string>
<string name="nc_diagnose_android_version_title">إصدار أندرويد</string>
<string name="nc_diagnose_app_category_title">تطبيق</string>
<string name="nc_diagnose_app_name_title">اسم التطبيق</string>
<string name="nc_diagnose_app_users_amount">المستخدمون المسجلون</string>
<string name="nc_diagnose_app_version_title">رقم إصدار التطبيق</string>
<string name="nc_diagnose_battery_optimization_ignored">تمّ تجاهل توفير البطارية، و كل شيء على ما يرُام</string>
<string name="nc_diagnose_battery_optimization_not_ignored">تحسين البطارية تمّ تمكينه؛ الأمر الذي قد يتسبب في مشكلات. يجب عليك تعطيل تحسين البطارية!</string>
<string name="nc_diagnose_battery_optimization_title">إعدادات البطارية</string>
<string name="nc_diagnose_device_name_title">الجهاز</string>

<string name="nc_diagnose_dialog_open_checklist">فتح قائمة التحقق لاكتشاف الأعطال و إصلاحها</string>
<string name="nc_diagnose_dialog_open_diagnose">فتح شاشة الفحص</string>
<string name="nc_diagnose_dialog_open_dontkillmyapp_website">فتح dontkillmyapp.com</string>
<string name="nc_diagnose_firebase_push_token_latest_fetch">آخر أَمَارَات إدخال push token في \"فاير بيس\" firebase تمّ جلبها</string>
<string name="nc_diagnose_firebase_push_token_latest_generated">آخر أَمَارَات إدخال push token في \"فاير بيس\" firebase تمّ توليدها</string>
<string name="nc_diagnose_firebase_push_token_missing">لم يتم تعيين أيّ رموز توكن push token. من فضلك، أنشيء تقريراً حول هذا الخطأ.</string>
<string name="nc_diagnose_firebase_push_token_title">أَمَارَة إدخال push token في \"فاير بيس\" firebase </string>
<string name="nc_diagnose_gplay_available_no">خدمات متجر التطبيقات من قوقل Google Play غير متاحة. و الإشعارات غير مدعومة</string>
<string name="nc_diagnose_gplay_available_title">خدمات متجر التطبيقات من قوقل Google play</string>
<string name="nc_diagnose_gplay_available_yes">خدمات متجر التطبيقات من قوقل Google play متاحة</string>
<string name="nc_diagnose_latest_push_registration_at_push_proxy">آخر تسجيل لعملية إدخال push في وكيل الإدخال push proxy</string>
<string name="nc_diagnose_latest_push_registration_at_push_proxy_fail">لم يتم التسجيل حتى الآن في وكيل الإرسال Push proxy</string>
<string name="nc_diagnose_latest_push_registration_at_server">آخر تسجيل لعملية إدخال push في الخادم</string>
<string name="nc_diagnose_latest_push_registration_at_server_fail">لم يتم التسجيل حتى الآن في الخادم</string>
<string name="nc_diagnose_meta_category_title">معلومات وصفية</string>
<string name="nc_diagnose_meta_system_report_date">توليد تقرير النظام</string>
<string name="nc_diagnose_notification_calls_channel_permission">هل قناة الإشعار بالمكالمات مُمكّنة؟</string>
<string name="nc_diagnose_notification_messages_channel_permission">هل قناة الإشعار بالرسائل مُمكّنة؟</string>
<string name="nc_diagnose_notification_permission">إذونات الإشعارات</string>
<string name="nc_diagnose_phone_category_title">الهاتف</string>
<string name="nc_diagnose_server_talk_version">رقم إصدار خادوم \"المحادثة\" Talk</string>
<string name="nc_diagnose_server_version">رقم إصدار الخادم</string>
<string name="nc_diagnose_signaling_mode_extern">خارجي</string>
<string name="nc_diagnose_signaling_mode_intern">داخلي</string>
<string name="nc_diagnose_signaling_mode_title">وضعية إرسال الإشارات</string>


<string name="nc_dialog_invalid_password">كلمة المرور غير صحيحة</string>
<string name="nc_dialog_maintenance_mode_description">الخادم حالياً في وضع الصيانة</string>
<string name="nc_dialog_outdated_client">التطبيق غير مُحدَّث</string>
Expand Down
36 changes: 0 additions & 36 deletions app/src/main/res/values-b+en+001/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,45 +203,9 @@
<string name="nc_demote">Demote from moderator</string>
<string name="nc_description_record_voice">Record voice message</string>
<string name="nc_description_send_message_button">Send message</string>
<string name="nc_diagnose_account_category_title">Current account</string>
<string name="nc_diagnose_account_server">Server</string>
<string name="nc_diagnose_account_server_notification_app">Server notification app installed?</string>
<string name="nc_diagnose_account_user_name">User</string>
<string name="nc_diagnose_account_user_status_enabled">User status enabled?</string>
<string name="nc_diagnose_android_version_title">Android version</string>
<string name="nc_diagnose_app_category_title">App</string>
<string name="nc_diagnose_app_name_title">App name</string>
<string name="nc_diagnose_app_users_amount">Registered users</string>
<string name="nc_diagnose_app_version_title">App version</string>
<string name="nc_diagnose_battery_optimization_ignored">Battery optimization is ignored, all fine</string>
<string name="nc_diagnose_battery_optimization_not_ignored">Battery optimization is enabled which might cause issues. You should disable battery optimization!</string>
<string name="nc_diagnose_battery_optimization_title">Battery settings</string>
<string name="nc_diagnose_device_name_title">Device</string>
<string name="nc_diagnose_dialog_open_checklist">Open troubleshooting checklist</string>
<string name="nc_diagnose_dialog_open_diagnose">Open diagnosis screen</string>
<string name="nc_diagnose_dialog_open_dontkillmyapp_website">Open dontkillmyapp.com</string>
<string name="nc_diagnose_firebase_push_token_latest_fetch">Latest firebase push token fetch</string>
<string name="nc_diagnose_firebase_push_token_latest_generated">Latest firebase push token generation</string>
<string name="nc_diagnose_firebase_push_token_missing">No firebase push token set. Please create a bug report.</string>
<string name="nc_diagnose_firebase_push_token_title">Firebase push token</string>
<string name="nc_diagnose_gplay_available_no">Google Play services are not available. Notifications are not supported</string>
<string name="nc_diagnose_gplay_available_title">Google Play services</string>
<string name="nc_diagnose_gplay_available_yes">Google Play services are available</string>
<string name="nc_diagnose_latest_push_registration_at_push_proxy">Latest push registration at push proxy</string>
<string name="nc_diagnose_latest_push_registration_at_push_proxy_fail">Not yet registered at push proxy</string>
<string name="nc_diagnose_latest_push_registration_at_server">Latest push registration at server</string>
<string name="nc_diagnose_latest_push_registration_at_server_fail">Not yet registered at server</string>
<string name="nc_diagnose_meta_category_title">Meta information</string>
<string name="nc_diagnose_meta_system_report_date">Generation of system report</string>
<string name="nc_diagnose_notification_calls_channel_permission">Calls notification channel enabled?</string>
<string name="nc_diagnose_notification_messages_channel_permission">Messages notification channel enabled?</string>
<string name="nc_diagnose_notification_permission">Notification permissions</string>
<string name="nc_diagnose_phone_category_title">Phone</string>
<string name="nc_diagnose_server_talk_version">Server Talk version</string>
<string name="nc_diagnose_server_version">Server version</string>
<string name="nc_diagnose_signaling_mode_extern">External</string>
<string name="nc_diagnose_signaling_mode_intern">Internal</string>
<string name="nc_diagnose_signaling_mode_title">Signaling Mode</string>
<string name="nc_dialog_invalid_password">Invalid password</string>
<string name="nc_dialog_maintenance_mode_description">Server is currently in maintenance mode.</string>
<string name="nc_dialog_outdated_client">App is outdated</string>
Expand Down
Loading
Loading