Update more strings

This commit is contained in:
Fabio Comuni 2011-03-18 11:02:42 +01:00
parent d6b4940ddd
commit 7df8e18dd1
5 changed files with 1274 additions and 1278 deletions

View file

@ -1828,10 +1828,14 @@ if(! function_exists('format_like')) {
function format_like($cnt,$arr,$type,$id) { function format_like($cnt,$arr,$type,$id) {
$o = ''; $o = '';
if($cnt == 1) if($cnt == 1)
$o .= $arr[0] . (($type === 'like') ? t(' likes this.') : t(' doesn\'t like this.')) . EOL ; $o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
else { else {
$o .= '<span class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');" >' $spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
. $cnt . ' ' . t('people') . '</span> ' . (($type === 'like') ? t('like this.') : t('don\'t like this.')) . EOL ; $o .= (($type === 'like') ?
sprintf( t('<span %1$s>%2$d people</span> like this.'), $spanatts, $cnt)
:
sprintf( t('<span %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt) );
$o .= EOL ;
$total = count($arr); $total = count($arr);
if($total >= MAX_LIKERS) if($total >= MAX_LIKERS)
$arr = array_slice($arr, 0, MAX_LIKERS - 1); $arr = array_slice($arr, 0, MAX_LIKERS - 1);
@ -1839,8 +1843,8 @@ function format_like($cnt,$arr,$type,$id) {
$arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1]; $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1];
$str = implode(', ', $arr); $str = implode(', ', $arr);
if($total >= MAX_LIKERS) if($total >= MAX_LIKERS)
$str .= t(', and ') . $total - MAX_LIKERS . t(' other people'); $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
$str .= (($type === 'like') ? t(' like this.') : t(' don\'t like this.')); $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str));
$o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>'; $o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>';
} }
return $o; return $o;

View file

@ -472,7 +472,7 @@ function dfrn_notify_post(&$a) {
)); ));
$res = mail($importer['email'], sprintf( t("%s commented on an item at %s") , $from ,$a->config['sitename']), $res = mail($importer['email'], sprintf( t("%s commented on an item at %s") , $from ,$a->config['sitename']),
$email_tpl, t("From: Administrator@") . $a->get_hostname() ); $email_tpl, "From: ".t("Administrator") . "@". $a->get_hostname() );
break; break;
} }
} }

View file

@ -443,7 +443,7 @@ function item_post(&$a) {
)); ));
$res = mail($user['email'], sprintf( t("%s posted on your profile wall at %s") ,$from, $a->config['sitename']), $res = mail($user['email'], sprintf( t("%s posted on your profile wall at %s") ,$from, $a->config['sitename']),
$email_tpl,"From: " . t("Administrator@") . "@" . $a->get_hostname() ); $email_tpl,"From: " . t("Administrator") . "@" . $a->get_hostname() );
} }
} }

View file

@ -124,9 +124,9 @@ function like_content(&$a) {
</object> </object>
EOT; EOT;
if($verb === 'like') if($verb === 'like')
$bodyverb = t('likes'); $bodyverb = t('%1$s likes %2$s\'s %3$s');
if($verb === 'dislike') if($verb === 'dislike')
$bodyverb = t('doesn\'t like'); $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
if(! isset($bodyverb)) if(! isset($bodyverb))
return; return;
@ -147,9 +147,11 @@ EOT;
$arr['author-name'] = $contact['name']; $arr['author-name'] = $contact['name'];
$arr['author-link'] = $contact['url']; $arr['author-link'] = $contact['url'];
$arr['author-avatar'] = $contact['thumb']; $arr['author-avatar'] = $contact['thumb'];
$arr['body'] = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]' . ' ' . $bodyverb . ' '
. '[url=' . $item['author-link'] . ']' . sprintf( t("%s's") ,$item['author-name']) . '[/url]' . ' ' $ulink = '[url=' . $contact['url'] . ']' . $contact['name'] . '[/url]';
. '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]' ; $alink = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
$plink = '[url=' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . ']' . $post_type . '[/url]';
$arr['body'] = sprintf( $bodyverb, $ulink, $alink, $plink );
$arr['verb'] = $activity; $arr['verb'] = $activity;
$arr['object-type'] = $objtype; $arr['object-type'] = $objtype;

File diff suppressed because it is too large Load diff