1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge remote-tracking branch 'prototech/ticket/11959' into develop-ascraeus

* prototech/ticket/11959:
  [ticket/11959] Move phpbb_generate_string_list() to functions_content.php.
  [ticket/11959] Add unit tests.
  [ticket/11959] Remove use of plurals and make it possible to use Oxford comma.
  [ticket/11959] Rename phpbb_gen_string_list() & fix incorrect var name.
  [ticket/11959] Simplify how the users are trimmed.
  [ticket/11959] Add function to create a string list.
  [ticket/11959] Add samples for the untrimmed strings.
  [ticket/11959] List the last user with "and" instead of a comma.
  [ticket/11959] Use the plurals system for the untrimmed language strings.
  [ticket/11959] Fix the NOTIFICATION_QUOTE_TRIMMED text.
  [ticket/11959] Use plurals for the language strings.
This commit is contained in:
Joas Schilling
2014-03-29 20:39:22 +01:00
7 changed files with 345 additions and 11 deletions

View File

@@ -205,18 +205,17 @@ class post extends \phpbb\notification\type\base
$usernames[] = $this->user_loader->get_username($responder['poster_id'], 'no_profile');
}
}
$lang_key = $this->language_key;
if ($trimmed_responders_cnt)
{
$lang_key .= '_TRIMMED';
$usernames[] = $this->user->lang('NOTIFICATION_X_OTHERS', $trimmed_responders_cnt);
}
return $this->user->lang(
$lang_key,
implode($this->user->lang['COMMA_SEPARATOR'], $usernames),
$this->language_key,
phpbb_generate_string_list($usernames, $this->user),
censor_text($this->get_data('topic_title')),
$trimmed_responders_cnt
$responders_cnt
);
}