Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change 'a Music' to 'a Sound' in activity feed (issue: 1951) #1978

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions app/main/controllers/activity/RTMediaBuddyPressActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,10 @@ public function bp_prefetch_activity_object_data( $activities ) {
$media_const .= '_LABEL';
if ( defined( $media_const ) ) {
$media_str = constant( $media_const );

if ( 'Music' === $media_str ) {
$media_str = esc_html__( 'Sound', 'buddypress-media' );
}
} else {
$media_str = RTMEDIA_MEDIA_SLUG;
}
Expand Down
4 changes: 4 additions & 0 deletions app/main/controllers/media/RTMediaMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,10 @@ public function insert_activity( $id, $media, $activity_text = false ) {

$media_str = constant( $media_const );

if ( 'Music' === $media_str ) {
$media_str = esc_html__( 'Sound', 'buddypress-media' );
}

// translators: 1: username, 2: media type, 3: media name, 4: total media.
$action = sprintf( ( 1 === $count ) ? esc_html__( '%1$s added a %2$s', 'buddypress-media' ) : esc_html__( '%1$s added %4$d %3$s', 'buddypress-media' ), $username, $media->media_type, $media_str, $count );
$action = apply_filters( 'rtmedia_buddypress_action_text_fitler', $action, $username, $count, $user->display_name, $media->media_type );
Expand Down
31 changes: 18 additions & 13 deletions languages/buddypress-media.po
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Copyright (C) 2022 rtCamp
# Copyright (C) 2023 rtCamp
# This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
msgid ""
msgstr ""
"Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.6.13\n"
"Report-Msgid-Bugs-To: https://rtmedia.io/support/\n"
"POT-Creation-Date: 2022-12-12 07:09:00+00:00\n"
"POT-Creation-Date: 2023-07-18 13:57:10+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"PO-Revision-Date: 2022-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2023-MO-DA HO:MI+ZONE\n"
"Last-Translator: rtMedia <[email protected]>\n"
"Language-Team: rtMedia <[email protected]>\n"
"Language: en\n"
Expand Down Expand Up @@ -2585,48 +2585,53 @@ msgstr ""
msgid "You are not allowed to upload/attach media."
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:975
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:968
#: app/main/controllers/media/RTMediaMedia.php:797
msgid "Sound"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:979
#: app/main/controllers/media/RTMediaMedia.php:801
#. translators: 1: user link, 2: media.
#. translators: 1: username, 2: media type, 3: media name, 4: total media.
msgid "%1$s added a %2$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:983
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:986
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:987
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:990
#: app/main/controllers/upload/RTMediaUploadEndpoint.php:283
#. translators: 1: user link, 2: media count, 3: media.
#. translators: 1: user link, 2: media count, 3: rtMedia slug.
#. translators: 1: Username, 2: Number of medias, 3: Media slug.
msgid "%1$s added %2$d %3$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1051
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1055
#. translators: 1: username, 2: media, 3: group name.
msgid "%1$s liked a %2$s in the group %3$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1055
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1059
#. translators: 1: username, 2: media.
msgid "%1$s liked their %2$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1064
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1068
#. translators: 1: username, 2: author, 3: media.
msgid "%1$s liked %2$s's %3$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1166
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1170
#. translators: 1: username, 2: media, 3: group name.
msgid "%1$s commented on a %2$s in the group %3$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1171
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1175
#. translators: 1: username, 2: media.
msgid "%1$s commented on their %2$s"
msgstr ""

#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1180
#: app/main/controllers/activity/RTMediaBuddyPressActivity.php:1184
#. translators: 1: username, 2: author, 3: media.
msgid "%1$s commented on %2$s's %3$s"
msgstr ""
Expand Down Expand Up @@ -2985,7 +2990,7 @@ msgstr ""
msgid "Error creating attachment for the media file, please try again"
msgstr ""

#: app/main/controllers/media/RTMediaMedia.php:797
#: app/main/controllers/media/RTMediaMedia.php:801
msgid "%1$s added %4$d %3$s"
msgstr ""

Expand Down