original_string: public function filter($translations)
      {
          $cleanedTranslations = array();
  
          foreach ($translations as $pluginName => $pluginTranslations) {
  
              foreach ($pluginTranslations as $key => $translation) {
  
                  if (isset($this->baseTranslations[$pluginName][$key])) {
                      $baseTranslation = $this->baseTranslations[$pluginName][$key];
                  } else {
                      // english string was deleted, do not error
                      continue;
                  }
  
                  // ensure that translated strings have the same number of %s as the english source strings
                  $baseCount = $this->_getParametersCountToReplace($baseTranslation);
                  $translationCount = $this->_getParametersCountToReplace($translation);
  
                  if ($baseCount != $translationCount) {
  
                      $this->filteredData[$pluginName][$key] = $translation;
                      continue;
                  }
  
                  $cleanedTranslations[$pluginName][$key] = $translation;
              }
          }
  
          return $cleanedTranslations;
      }
code: public function filter($translations)
      {
          $cleanedTranslations = array();
  
          foreach ($translations as $pluginName => $pluginTranslations) {
  
              foreach ($pluginTranslations as $key => $translation) {
  
                  if (isset($this->baseTranslations[$pluginName][$key])) {
                      $baseTranslation = $this->baseTranslations[$pluginName][$key];
                  } else {
                      // english string was deleted, do not error
                      continue;
                  }
  
                  // ensure that translated strings have the same number of %s as the english source strings
                  $baseCount = $this->_getParametersCountToReplace($baseTranslation);
                  $translationCount = $this->_getParametersCountToReplace($translation);
  
                  if ($baseCount != $translationCount) {
  
                      $this->filteredData[$pluginName][$key] = $translation;
                      continue;
                  }
  
                  $cleanedTranslations[$pluginName][$key] = $translation;
              }
          }
  
          return $cleanedTranslations;
      }
code_tokens: public function filter ( $ translations ) { $ cleanedTranslations = array ( ) ; foreach ( $ translations as $ pluginName => $ pluginTranslations ) { foreach ( $ pluginTranslations as $ key => $ translation ) { if ( isset ( $ this -> baseTranslations [ $ pluginName ] [ $ key ] ) ) { $ baseTranslation = $ this -> baseTranslations [ $ pluginName ] [ $ key ] ; } else { // english string was deleted, do not error continue ; } // ensure that translated strings have the same number of %s as the english source strings $ baseCount = $ this -> _getParametersCountToReplace ( $ baseTranslation ) ; $ translationCount = $ this -> _getParametersCountToReplace ( $ translation ) ; if ( $ baseCount != $ translationCount ) { $ this -> filteredData [ $ pluginName ] [ $ key ] = $ translation ; continue ; } $ cleanedTranslations [ $ pluginName ] [ $ key ] = $ translation ; } } return $ cleanedTranslations ; }
docstring: Removes all translations where the placeholder parameter count differs to base translation
  
  @param  array $translations
  
  @return array   filtered translations
docstring_tokens: Removes all translations where the placeholder parameter count differs to base translation