notification: localize email message prompt and add translations.

This commit updates the email notification prompt to support localization and adds translations for multiple languages. The original hardcoded "Check your mail box" string has been replaced with a localized string from resources.

### Changes:
- Added localized translations for "Check your mail box" in zh, zh-rhk, zh-rcn, zh-rtw, and ja.
- Modified the `NotificationActivity` to fetch the string using `getString(R.string.check_your_mail_box)` to support localization.

### Problem:
The existing code used hardcoded English text for the email notification prompt, which did not provide a localized experience for users in different regions.

### Solution:
By adding localized strings and retrieving them dynamically from resources, the app now provides a better user experience for non-English speakers. This also ensures future ease of maintenance as the app scales to support more languages.

This change improves the internationalization of the app and ensures consistency with the rest of the notification system.
This commit is contained in:
Qiutong Zeng 2024-10-17 13:42:33 +11:00
parent 6243bf142b
commit 35b700c85d
7 changed files with 7 additions and 1 deletions

View file

@ -149,7 +149,7 @@ public class NotificationActivity extends BaseActivity {
}
adapter = new NotificatinAdapter(item -> {
if (item.getNotificationType() == NotificationType.EMAIL){
ViewUtil.showLongSnackbar(binding.container, "Check your mail box");
ViewUtil.showLongSnackbar(binding.container, getString(R.string.check_your_email_inbox));
} else {
handleUrl(item.getLink());
}

View file

@ -679,6 +679,7 @@
<string name="error_sending_thanks">作者への感謝の送信エラー。</string>
<string name="invalid_login_message">ログインが期限切れになりました。もう一度ログインしてください。</string>
<string name="no_application_available_to_open_gpx_files">GPXファイルを開くことができるアプリケーションがありません</string>
<string name="check_your_email_inbox">メールをご確認ください</string>
<plurals name="custom_picker_images_selected_title_appendix">
<item quantity="other">%d件の画像が選択されました</item>
</plurals>

View file

@ -111,4 +111,5 @@
<string name="detail_description_empty">没有说明</string>
<string name="detail_license_empty">未知授权协议</string>
<string name="menu_refresh">刷新</string>
<string name="check_your_email_inbox">请查看你的电子邮箱</string>
</resources>

View file

@ -215,4 +215,5 @@
<string name="description_info">請盡可能描述媒體內容:拍攝於何處?是顯示什麼事物?有什麼脈絡?請描述對象或人物。透露出一些較不易猜測的訊息,例如是風景的話,可以是一天裡的時間。如果媒體顯示出了一些不尋常的事物,請說明不尋常原因。</string>
<string name="learn_how_to_write_a_useful_description">學習如何編寫有用的描述</string>
<string name="learn_how_to_write_a_useful_caption">學習如何編寫有用的標題</string>
<string name="check_your_email_inbox">請查看你的電子郵件信箱</string>
</resources>

View file

@ -805,4 +805,5 @@
<string name="pending">待處理</string>
<string name="failed">失敗</string>
<string name="could_not_load_place_data">無法載入地點資料</string>
<string name="check_your_email_inbox">請查看你的電子郵件信箱</string>
</resources>

View file

@ -834,4 +834,5 @@
<string name="pending">待处理</string>
<string name="failed">失败</string>
<string name="could_not_load_place_data">无法加载地点数据</string>
<string name="check_your_email_inbox">请查看你的电子邮箱</string>
</resources>

View file

@ -503,6 +503,7 @@ Upload your first media by tapping on the add button.</string>
<string name="no_notification">You have no unread notifications</string>
<string name="no_read_notification">You have no read notifications</string>
<string name="check_your_email_inbox">Check your email inbox</string>
<string name="share_logs_using">Share logs using</string>
<string name="menu_option_read">View read</string>
<string name="menu_option_unread">View unread</string>