Update some gettext strings and number the arguements so life is easier for translators

darcs-hash:20080729080641-533db-560337e226a02dd6fc671f090883d4bedd50eaaa.gz
This commit is contained in:
Mike Cochrane 2008-07-29 04:06:41 -04:00
parent f318f41ebf
commit 9d89e7b4ac
4 changed files with 606 additions and 405 deletions

View File

@ -109,11 +109,37 @@ class TagAction extends StreamAction {
$tw[$tags->tag] = $tags->weight; $tw[$tags->tag] = $tags->weight;
$sum += $tags->weight; $sum += $tags->weight;
} }
common_element_end('ul');
foreach ($tw as $tag => $weight) {
$this->show_tag($tag, $weight, $weight/$sum);
} }
common_pagination($page > 1, $cnt > TAGS_PER_PAGE,
$page, 'tags');
}
private static function show_tag($tag) {
common_element_start('li', array('class' => 'notice_single'));
common_element_start('a', array(
'class' => 'nickname',
'href' => common_local_url('tag', array('tag' => $tag->tag)),
'title' => sprintf(_("Notices tagged with %s"), $tag->tag)));
common_text('#' . $tag->tag);
common_element_end('a');
common_text(sprintf(_('%s Notices recently tagged with %s'), $tag->num, $tag->tag));
$notice = Notice::staticGet($tag->last_notice_id);
if ($notice) {
$noticeurl = common_local_url('shownotice', array('notice' => $notice->id));
common_element_start('p', 'time');
common_text(_('Last message posted: '));
common_element('a', array('class' => 'permalink',
'href' => $noticeurl,
'title' => common_exact_date($notice->created)),
common_date_string($notice->created));
common_text(_(' by '));
$profile = $notice->getProfile();
common_element('a', array('href' => $profile->profileurl),
$profile->nickname);
common_element_end('p'); common_element_end('p');
} }
} }

View File

@ -235,7 +235,7 @@ class TwitapistatusesAction extends TwitterapiAction {
$title = sprintf(_("%s and friends"), $user->nickname); $title = sprintf(_("%s and friends"), $user->nickname);
$id = "tag:$siteserver:friends:".$user->id; $id = "tag:$siteserver:friends:".$user->id;
$link = common_local_url('all', array('nickname' => $user->nickname)); $link = common_local_url('all', array('nickname' => $user->nickname));
$subtitle = sprintf(_("Updates from %s and friends on %s!"), $user->nickname, $sitename); $subtitle = sprintf(_('Updates from %1$s and friends on %2$s!'), $user->nickname, $sitename);
$notice = $user->noticesWithFriends(($page-1)*20, $count); $notice = $user->noticesWithFriends(($page-1)*20, $count);
@ -335,7 +335,7 @@ class TwitapistatusesAction extends TwitterapiAction {
$title = sprintf(_("%s timeline"), $user->nickname); $title = sprintf(_("%s timeline"), $user->nickname);
$id = "tag:$siteserver:user:".$user->id; $id = "tag:$siteserver:user:".$user->id;
$link = common_local_url('showstream', array('nickname' => $user->nickname)); $link = common_local_url('showstream', array('nickname' => $user->nickname));
$subtitle = sprintf(_("Updates from %s on %s!"), $user->nickname, $sitename); $subtitle = sprintf(_('Updates from %1$s on %2$s!'), $user->nickname, $sitename);
$notice = new Notice(); $notice = new Notice();
@ -376,14 +376,16 @@ class TwitapistatusesAction extends TwitterapiAction {
$user = $apidata['user']; $user = $apidata['user'];
$status = $this->trimmed('status'); $this->is_readonly();
$source = $this->trimmed('source');
if (!$source) {
$source = 'api';
}
if (!$status) { $notice = DB_DataObject::factory('notice');
$notice->profile_id = $user->id; # user id *is* profile id
$notice->created = DB_DataObject_Cast::dateTime();
$notice->content = $this->trimmed('status');
if (!$notice->content) {
// XXX: Note: In this case, Twitter simply returns '200 OK' // XXX: Note: In this case, Twitter simply returns '200 OK'
// No error is given, but the status is not posted to the // No error is given, but the status is not posted to the
@ -402,6 +404,9 @@ class TwitapistatusesAction extends TwitterapiAction {
exit(); exit();
} }
$notice->rendered = common_render_content($notice->content, $notice);
$notice->is_local = 1;
$notice = Notice::saveNew($user->id, $status, $source); $notice = Notice::saveNew($user->id, $status, $source);
if (is_string($notice)) { if (is_string($notice)) {
@ -453,11 +458,11 @@ class TwitapistatusesAction extends TwitterapiAction {
$sitename = common_config('site', 'name'); $sitename = common_config('site', 'name');
$siteserver = common_config('site', 'server'); $siteserver = common_config('site', 'server');
$title = sprintf(_("%s / Updates replying to %s"), $sitename, $user->nickname); $title = sprintf(_('%1$s / Updates replying to %2$s'), $sitename, $user->nickname);
$id = "tag:$siteserver:replies:".$user->id; $id = "tag:$siteserver:replies:".$user->id;
$link = common_local_url('replies', array('nickname' => $user->nickname)); $link = common_local_url('replies', array('nickname' => $user->nickname));
$subtitle = "gar"; $subtitle = "gar";
$subtitle = sprintf(_("%s updates that reply to updates from %s / %s."), $sitename, $user->nickname, $profile->getBestName()); $subtitle = sprintf(_('%1$s updates that reply to updates from %2$s / %3$s.'), $sitename, $user->nickname, $profile->getBestName());
if (!$page) { if (!$page) {
$page = 1; $page = 1;

File diff suppressed because it is too large Load Diff