Skip to content

Commit

Permalink
-Fixed incorrect translation domain on text string "Keep original ima…
Browse files Browse the repository at this point in the history
…ge files" in admin menu

-Added unicode support to image title length truncation code
  • Loading branch information
foxly committed Dec 18, 2010
1 parent 24194b6 commit 3bfe012
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
16 changes: 8 additions & 8 deletions bp-album-0.1.8.6.po → bp-album-0.1.8.6-2010-12-18.po
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: http://wordpress.org/tag/bp-album\n"
"POT-Creation-Date: 2010-12-18 00:05+0000\n"
"POT-Creation-Date: 2010-12-18 16:12+0000\n"
"PO-Revision-Date: 2010-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -255,32 +255,32 @@ msgstr ""
msgid "Save Settings"
msgstr ""

#: includes/bp-album-core.php:114
#: includes/bp-album-core.php:113
msgid "BP Album+"
msgstr ""

#: includes/bp-album-core.php:130
#: includes/bp-album-core.php:129
msgid "Album"
msgstr ""

#: includes/bp-album-core.php:138
#: includes/bp-album-core.php:137
msgid "My pictures"
msgstr ""

#: includes/bp-album-core.php:138
#: includes/bp-album-core.php:137
#, php-format
msgid "%s's pictures"
msgstr ""

#: includes/bp-album-core.php:152
#: includes/bp-album-core.php:151
msgid "Picture"
msgstr ""

#: includes/bp-album-core.php:162 includes/bp-album-screens.php:197
#: includes/bp-album-core.php:161 includes/bp-album-screens.php:197
msgid "Upload picture"
msgstr ""

#: includes/bp-album-core.php:477 includes/bp-album-core.php:690
#: includes/bp-album-core.php:490 includes/bp-album-core.php:702
#, php-format
msgid "%s uploaded a new picture: %s"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion includes/bp-album-admin.php
Expand Up @@ -256,7 +256,7 @@ function bp_album_admin() {
</td>
</tr>
<tr>
<th scope="row"><?php _e('Keep original image files', 'buddypress' ) ?></th>
<th scope="row"><?php _e('Keep original image files', 'bp-album' ) ?></th>
<td>
<input type="radio" name="bp_album_keep_original" type="text" id="bp_album_keep_original"<?php if ( $bp_album_keep_original == true ) : ?> checked="checked"<?php endif; ?> id="bp-disable-account-deletion" value="1" /> <?php _e( 'Yes', 'bp-album' ) ?> &nbsp;
<input type="radio" name="bp_album_keep_original" type="text" id="bp_album_keep_original"<?php if ($bp_album_keep_original == false) : ?> checked="checked"<?php endif; ?> id="bp-disable-account-deletion" value="0" /> <?php _e( 'No', 'bp-album' ) ?>
Expand Down
20 changes: 16 additions & 4 deletions includes/bp-album-core.php
Expand Up @@ -40,7 +40,6 @@
require_once( ABSPATH . '/wp-admin/includes/file.php' );



/**
* bp_album_setup_globals()
*
Expand Down Expand Up @@ -471,8 +470,22 @@ function bp_album_record_activity($pic_data) {

$title = $pic_data->title;
$desc = $pic_data->description;
$title = ( strlen($title)<= 20 ) ? $title : substr($title, 0 ,20-1).'&#8230;';
$desc = ( strlen($desc)<= 400 ) ? $desc : substr($desc, 0 ,400-1).'&#8230;';

// Using mb_strlen adds support for unicode (asian languages). Unicode uses TWO bytes per character, and is not
// accurately counted in most string length functions
// ========================================================================================================

if ( function_exists( 'mb_strlen' ) ) {

$title = ( mb_strlen($title)<= 20 ) ? $title : mb_substr($title, 0 ,20-1).'&#8230;';
$desc = ( mb_strlen($desc)<= 400 ) ? $desc : mb_substr($desc, 0 ,400-1).'&#8230;';

}
else {

$title = ( strlen($title)<= 20 ) ? $title : substr($title, 0 ,20-1).'&#8230;';
$desc = ( strlen($desc)<= 400 ) ? $desc : substr($desc, 0 ,400-1).'&#8230;';
}

$action = sprintf( __( '%s uploaded a new picture: %s', 'bp-album' ), bp_core_get_userlink($pic_data->owner_id), '<a href="'. $primary_link .'">'.$title.'</a>' );

Expand All @@ -494,7 +507,6 @@ function bp_album_record_activity($pic_data) {
// ===========================================================================================================



$content = '<p> <a href="'. $primary_link .'" class="picture-activity-thumb" title="'.$title.'"><img src="'. $image_path .'" /></a>'.$desc.'</p>';

$type = 'bp_album_picture';
Expand Down
2 changes: 1 addition & 1 deletion loader.php
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://code.google.com/p/buddypress-media/
Description: Photo Albums for BuddyPress. Includes Posts to Wire, Member Comments, and Gallery Privacy Controls. Works with current BuddyPress theme and includes Easy To Skin Templates.
Version: 0.1.8.6
Revision Date: December 17, 2010
Revision Date: December 18, 2010
Requires at least: WP 2.9.2, BP 1.2.1
Tested up to: WP 3.0.3, BP 1.2.6
License: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
Expand Down

0 comments on commit 3bfe012

Please sign in to comment.