Commit graph

13 commits

Author SHA1 Message Date
Haoyu Weng
f2d1f7dbbb
[Enhancement] Fix #5042 Add copy link button (#5080)
* Add a "copy link" button next to the share button. Add relative English and Simplified Chinese text in strings.xml.

* Change the icon from copy to link

* Fixed typo

* Fixed case

---------

Co-authored-by: Justweng <justweng19@gmail.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
2024-12-14 18:45:44 +09:00
ErenratZeng
c77e5abba7
notification: classify email messages and add mail check prompt (#5865)
This commit adds logic to classify notifications as "email" type when the notification text contains "sent you an email". It also updates the email notification prompt to support localization, ensuring a better user experience across different regions.

### Problem:
1. Previously, email-related notifications from the backend were missing a URL. As a result, when users clicked on these notifications, there was no link to open, and the notifications were categorized as UNKNOWN. This led to a poor user experience since there was no feedback provided when the user clicked on an email notification.
2. Additionally, 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:
1. Added logic to categorize email-related notifications as `EMAIL` when the notification text contains "sent you an email".
2. Replaced the hardcoded "Check your email inbox" string with a localized string and added translations for multiple languages, including zh, zh-rhk, zh-rcn, zh-rtw, and ja.

### Changes:
- **NotificationClient**:
  - Modified `WikimediaNotification.toCommonsNotification()` to check if the notification text contains "sent you an email". If it does, the notification is classified as `EMAIL_MESSAGE` instead of the default `UNKNOWN`.

- **NotificationActivity**:
  - In the `NotificatinAdapter` click handler, added a check for `EMAIL_MESSAGE` type. When an email-type notification is clicked, a localized "Check your mail box" prompt is shown using `Snackbar`, instead of attempting to open a URL (which is typically missing for such notifications).
  - Modified to fetch the string using `getString(R.string.check_your_mail_box)` to support localization.

- **NotificationType**:
  - Added a new `EMAIL` type to categorize email-related notifications.

- **Localization**:
  - Added localized translations for "Check your mail box" in zh, zh-rhk, zh-rcn, zh-rtw, and ja.

Co-authored-by: Qiutong Zeng <Qiutong.zeng@anu.edu.au>
2024-10-18 15:31:54 +09:00
Carlos Valencia
696f3744e1 Fixed problem where strings files were accepting multiple variables but no order was specified (#1116) 2018-02-01 18:41:46 +09:00
Adam Jones
fdb0db9cb3 Fix ellipsis characters 2017-05-21 00:10:38 +01:00
Adam Jones
b872ba011d Fix github url 2017-05-21 00:09:53 +01:00
Adam Jones
b92d8e03e8 Fix spaces 2017-05-21 00:08:21 +01:00
dr0ptp4kt
db4eb3a699 Remove unused interface license message strings
The app current displays licenses aligned with MediaWiki's
UploadWizard UploadWizard.config.php file for ownWork. Presently,
the aligned licenses are as follows.h

cc-by-sa-4.0
cc-by-sa-4.0
cc-by-sa-3.0
cc-by-4.0
cc-by-3.0
cc-zero

License messages other than these are removed with this patch.

This closes #243.
2017-05-20 01:58:51 -05:00
Adam Jones
c03957368c Update github.com/wikimedia -> github.com/commons-app 2017-05-15 16:49:03 +01:00
Nicolas Raoul
c1274cf189 Merge pull request #240 from jayvdb/remove-campaigns
Complete removal of Campaigns feature
2016-08-31 15:58:20 +09:00
John Vandenberg
b184aaadbb Complete removal of Campaigns feature 2016-08-31 13:09:57 +07:00
John Vandenberg
dde058808c Remove unused translation app_name_beta 2016-08-31 12:23:14 +07:00
Nicolas Raoul
9673f61dd9 Direct bug reports to Github instead of Bugzilla, in l10n 2016-08-08 12:17:05 +09:00
Yusuke Matsubara
b4231bbfdc Merge "commons" into the project root directory 2016-07-02 16:48:57 +09:00