forked from GNUsocial/gnu-social
i18n fixes for xgettext issue with contructions like "<<< END_OF_INSTRUCTIONS".
Update translator documentation. FIXMEs added. Asking Zach on IRC to have a look at them.
This commit is contained in:
parent
edb467978d
commit
abcfde4d7d
@ -91,17 +91,23 @@ class GroupdirectoryAction extends Action
|
|||||||
|
|
||||||
if ($this->filter == 'all') {
|
if ($this->filter == 'all') {
|
||||||
if ($this->page != 1) {
|
if ($this->page != 1) {
|
||||||
|
// TRANS: Title for group directory page. %d is a page number.
|
||||||
return(sprintf(_m('Group Directory, page %d'), $this->page));
|
return(sprintf(_m('Group Directory, page %d'), $this->page));
|
||||||
}
|
}
|
||||||
|
// TRANS: Title for group directory page.
|
||||||
return _m('Group directory');
|
return _m('Group directory');
|
||||||
} else if ($this->page == 1) {
|
} else if ($this->page == 1) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
|
// TRANS: Title for group directory page when it is filtered.
|
||||||
|
// TRANS: %s is the filter string.
|
||||||
_m('Group directory - %s'),
|
_m('Group directory - %s'),
|
||||||
strtoupper($this->filter)
|
strtoupper($this->filter)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
_m('Group directory - %s, page %d'),
|
// TRANS: Title for group directory page when it is filtered.
|
||||||
|
// TRANS: %1$s is the filter string, %2$d is a page number.
|
||||||
|
_m('Group directory - %1$s, page %2$d'),
|
||||||
strtoupper($this->filter),
|
strtoupper($this->filter),
|
||||||
$this->page
|
$this->page
|
||||||
);
|
);
|
||||||
@ -115,19 +121,11 @@ class GroupdirectoryAction extends Action
|
|||||||
*/
|
*/
|
||||||
function getInstructions()
|
function getInstructions()
|
||||||
{
|
{
|
||||||
// TRANS: Page notice for groups directory.
|
// TRANS: Page instructions.
|
||||||
// TRANS: %%site.name%% is the name of the StatusNet site.
|
return _m("After you join a group you can send messages to all other members\n".
|
||||||
// TRANS: %%action.newgroup%% is a URL. Do not change it.
|
"using the syntax \"!groupname\".\n\n".
|
||||||
// TRANS: This message contains Markdown links in the form [link text](link).
|
"Browse groups, or search for groups on by their name, location or topic.\n".
|
||||||
$instructions = <<< END_OF_INSTRUCTIONS
|
"Separate the terms by spaces; they must be three characters or more.\n");
|
||||||
After you join a group you can send messages to all other members
|
|
||||||
using the syntax "!groupname".
|
|
||||||
|
|
||||||
Browse groups, or search for groups on by their name, location or topic.
|
|
||||||
Separate the terms by spaces; they must be three characters or more.
|
|
||||||
END_OF_INSTRUCTIONS;
|
|
||||||
|
|
||||||
return _m($instructions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -217,7 +215,7 @@ END_OF_INSTRUCTIONS;
|
|||||||
'href' => common_local_url('newgroup'),
|
'href' => common_local_url('newgroup'),
|
||||||
'class' => 'more'),
|
'class' => 'more'),
|
||||||
// TRANS: Link to create a new group on the group list page.
|
// TRANS: Link to create a new group on the group list page.
|
||||||
_('Create a new group')
|
_m('Create a new group')
|
||||||
);
|
);
|
||||||
$this->elementEnd('p');
|
$this->elementEnd('p');
|
||||||
}
|
}
|
||||||
@ -226,6 +224,7 @@ END_OF_INSTRUCTIONS;
|
|||||||
|
|
||||||
$this->elementStart('div', array('id' => 'profile_directory'));
|
$this->elementStart('div', array('id' => 'profile_directory'));
|
||||||
|
|
||||||
|
// @todo FIXME: Does "All" need i18n here?
|
||||||
$alphaNav = new AlphaNav($this, false, false, array('0-9', 'All'));
|
$alphaNav = new AlphaNav($this, false, false, array('0-9', 'All'));
|
||||||
$alphaNav->show();
|
$alphaNav->show();
|
||||||
|
|
||||||
@ -280,12 +279,15 @@ END_OF_INSTRUCTIONS;
|
|||||||
|
|
||||||
$this->elementStart('fieldset');
|
$this->elementStart('fieldset');
|
||||||
|
|
||||||
|
// TRANS: Fieldset legend.
|
||||||
$this->element('legend', null, _m('Search groups'));
|
$this->element('legend', null, _m('Search groups'));
|
||||||
$this->elementStart('ul', 'form_data');
|
$this->elementStart('ul', 'form_data');
|
||||||
$this->elementStart('li');
|
$this->elementStart('li');
|
||||||
|
|
||||||
|
// TRANS: Field label for input of one or more keywords.
|
||||||
$this->input('q', _m('Keyword(s)'), $this->q);
|
$this->input('q', _m('Keyword(s)'), $this->q);
|
||||||
|
|
||||||
|
// TRANS: Button text for searching group directory.
|
||||||
$this->submit('search', _m('BUTTON','Search'));
|
$this->submit('search', _m('BUTTON','Search'));
|
||||||
$this->elementEnd('li');
|
$this->elementEnd('li');
|
||||||
$this->elementEnd('ul');
|
$this->elementEnd('ul');
|
||||||
@ -401,19 +403,20 @@ GROUP_QUERY_END;
|
|||||||
'p',
|
'p',
|
||||||
'error',
|
'error',
|
||||||
sprintf(
|
sprintf(
|
||||||
_m('No groups starting with %s'),
|
// TRANS: Empty list message for searching group directory.
|
||||||
|
// TRANS: %s is the search string.
|
||||||
|
_m('No groups starting with %s.'),
|
||||||
$this->filter
|
$this->filter
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
// TRANS: Empty list message for searching group directory.
|
||||||
$this->element('p', 'error', _m('No results.'));
|
$this->element('p', 'error', _m('No results.'));
|
||||||
$message = _m(<<<E_O_T
|
// TRANS: Help text for searching group directory.
|
||||||
* Make sure all words are spelled correctly.
|
$message = _m("* Make sure all words are spelled correctly.\n".
|
||||||
* Try different keywords.
|
"* Try different keywords.\n".
|
||||||
* Try more general keywords.
|
"* Try more general keywords.\n".
|
||||||
* Try fewer keywords.
|
"* Try fewer keywords.");
|
||||||
E_O_T
|
|
||||||
);
|
|
||||||
$this->elementStart('div', 'help instructions');
|
$this->elementStart('div', 'help instructions');
|
||||||
$this->raw(common_markup_to_html($message));
|
$this->raw(common_markup_to_html($message));
|
||||||
$this->elementEnd('div');
|
$this->elementEnd('div');
|
||||||
@ -427,5 +430,4 @@ E_O_T
|
|||||||
$gbm = new GroupsByMembersSection($this);
|
$gbm = new GroupsByMembersSection($this);
|
||||||
$gbm->show();
|
$gbm->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* StatusNet, the distributed open-source microblogging tool
|
* StatusNet, the distributed open-source microblogging tool
|
||||||
*
|
*
|
||||||
@ -43,7 +42,6 @@ require_once INSTALLDIR . '/lib/subscriptionlist.php';
|
|||||||
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
|
||||||
* @link http://status.net/
|
* @link http://status.net/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class SortableGroupList extends SortableSubscriptionList
|
class SortableGroupList extends SortableSubscriptionList
|
||||||
{
|
{
|
||||||
/** Owner of this list */
|
/** Owner of this list */
|
||||||
@ -63,12 +61,13 @@ class SortableGroupList extends SortableSubscriptionList
|
|||||||
$this->out->elementStart('tr');
|
$this->out->elementStart('tr');
|
||||||
|
|
||||||
$tableHeaders = array(
|
$tableHeaders = array(
|
||||||
|
// TRANS: Column header in table for user nickname.
|
||||||
'nickname' => _m('Nickname'),
|
'nickname' => _m('Nickname'),
|
||||||
|
// TRANS: Column header in table for timestamp when user was created.
|
||||||
'created' => _m('Created')
|
'created' => _m('Created')
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($tableHeaders as $id => $label) {
|
foreach ($tableHeaders as $id => $label) {
|
||||||
|
|
||||||
$attrs = array('id' => $id);
|
$attrs = array('id' => $id);
|
||||||
$current = (!empty($this->action->sort) && $this->action->sort == $id);
|
$current = (!empty($this->action->sort) && $this->action->sort == $id);
|
||||||
|
|
||||||
@ -110,6 +109,7 @@ class SortableGroupList extends SortableSubscriptionList
|
|||||||
$this->out->elementEnd('th');
|
$this->out->elementEnd('th');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TRANS: Column header in table for members of a group.
|
||||||
$this->out->element('th', array('id' => 'Members'), _m('Members'));
|
$this->out->element('th', array('id' => 'Members'), _m('Members'));
|
||||||
$this->out->element('th', array('id' => 'controls'), null);
|
$this->out->element('th', array('id' => 'controls'), null);
|
||||||
|
|
||||||
@ -245,6 +245,7 @@ class SortableGroupListItem extends SortableSubscriptionListItem
|
|||||||
function showCreatedDate()
|
function showCreatedDate()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('td', 'entry_created');
|
$this->out->elementStart('td', 'entry_created');
|
||||||
|
// @todo FIXME: Should we provide i18n for timestamps in core?
|
||||||
$this->out->raw(date('j M Y', strtotime($this->profile->created)));
|
$this->out->raw(date('j M Y', strtotime($this->profile->created)));
|
||||||
$this->out->elementEnd('td');
|
$this->out->elementEnd('td');
|
||||||
}
|
}
|
||||||
@ -267,5 +268,4 @@ class SortableGroupListItem extends SortableSubscriptionListItem
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user