Update to Drupal 8.0.1. For more information, see https://www.drupal.org/node/2627402
This commit is contained in:
parent
013aaaf2ff
commit
1a0e9d9fac
153 changed files with 1268 additions and 670 deletions
core/lib/Drupal/Core/StringTranslation
|
@ -77,8 +77,7 @@ trait StringTranslationTrait {
|
|||
/**
|
||||
* Formats a string containing a count of items.
|
||||
*
|
||||
* See the \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
|
||||
* documentation for details.
|
||||
* @see \Drupal\Core\StringTranslation\TranslationInterface::formatPlural()
|
||||
*/
|
||||
protected function formatPlural($count, $singular, $plural, array $args = array(), array $options = array()) {
|
||||
return $this->getStringTranslation()->formatPlural($count, $singular, $plural, $args, $options);
|
||||
|
@ -87,9 +86,6 @@ trait StringTranslationTrait {
|
|||
/**
|
||||
* Returns the number of plurals supported by a given language.
|
||||
*
|
||||
* See the \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
|
||||
* documentation for details.
|
||||
*
|
||||
* @see \Drupal\locale\PluralFormulaInterface::getNumberOfPlurals()
|
||||
*/
|
||||
protected function getNumberOfPlurals($langcode = NULL) {
|
||||
|
|
|
@ -184,7 +184,7 @@ class TranslatableMarkup extends FormattableMarkup {
|
|||
}
|
||||
|
||||
/**
|
||||
* Gets all argments from this translated string.
|
||||
* Gets all arguments from this translated string.
|
||||
*
|
||||
* @return mixed[]
|
||||
* The array of arguments.
|
||||
|
|
|
@ -16,20 +16,24 @@ use Drupal\Core\StringTranslation\Translator\TranslatorInterface;
|
|||
class TranslationManager implements TranslationInterface, TranslatorInterface {
|
||||
|
||||
/**
|
||||
* An array of active translators keyed by priority.
|
||||
* An unsorted array of arrays of active translators.
|
||||
*
|
||||
* @var array
|
||||
* Array of \Drupal\Core\StringTranslation\Translator\TranslatorInterface objects
|
||||
* An associative array. The keys are integers that indicate priority. Values
|
||||
* are arrays of TranslatorInterface objects.
|
||||
*
|
||||
* @var \Drupal\Core\StringTranslation\Translator\TranslatorInterface[][]
|
||||
*
|
||||
* @see \Drupal\Core\StringTranslation\TranslationManager::addTranslator()
|
||||
* @see \Drupal\Core\StringTranslation\TranslationManager::sortTranslators()
|
||||
*/
|
||||
protected $translators = array();
|
||||
|
||||
/**
|
||||
* Holds the array of translators sorted by priority.
|
||||
* An array of translators, sorted by priority.
|
||||
*
|
||||
* If this is NULL a rebuild will be triggered.
|
||||
*
|
||||
* @var array
|
||||
* An array of path processor objects.
|
||||
* @var null|\Drupal\Core\StringTranslation\Translator\TranslatorInterface[]
|
||||
*
|
||||
* @see \Drupal\Core\StringTranslation\TranslationManager::addTranslator()
|
||||
* @see \Drupal\Core\StringTranslation\TranslationManager::sortTranslators()
|
||||
|
@ -62,8 +66,7 @@ class TranslationManager implements TranslationInterface, TranslatorInterface {
|
|||
* @param int $priority
|
||||
* The priority of the logger being added.
|
||||
*
|
||||
* @return \Drupal\Core\StringTranslation\TranslationManager
|
||||
* The called object.
|
||||
* @return $this
|
||||
*/
|
||||
public function addTranslator(TranslatorInterface $translator, $priority = 0) {
|
||||
$this->translators[$priority][] = $translator;
|
||||
|
@ -75,8 +78,8 @@ class TranslationManager implements TranslationInterface, TranslatorInterface {
|
|||
/**
|
||||
* Sorts translators according to priority.
|
||||
*
|
||||
* @return array
|
||||
* A sorted array of translators objects.
|
||||
* @return \Drupal\Core\StringTranslation\Translator\TranslatorInterface[]
|
||||
* A sorted array of translator objects.
|
||||
*/
|
||||
protected function sortTranslators() {
|
||||
$sorted = array();
|
||||
|
|
Reference in a new issue