Fill the missing keys with an empty string in the given file.

@param string $fileName
@param array $foundMissingKeys
@param string $languageKey
@return void
327404
private function fillMissingKeys($fileName, array $foundMissingKeys, $languageKey)
    {
        $missingKeys = [];

        foreach ($foundMissingKeys as $missingKey) {
            $missingKeys[$missingKey] = [$languageKey => ''];

            $this->output->writeln("\"<fg=yellow>{$fileName}.{$missingKey}.{$languageKey}</>\" was added.");
        }

        $this->manager->fillKeys(
            $fileName,
            $missingKeys
        );
    }
1218851
private function addMissing($locale, $transKey)
    {
        if ( ! $this->hasMissing($locale, $transKey)) {
            $this->missing[$locale][] = $transKey;
        }
    }
757558
public function _($translateKey, $defaultTranslation = "", $placeholders = null)
	{
		$translation = $translateKey;
		
		if (is_array($defaultTranslation) && $placeholders === null) {
			$placeholders = $defaultTranslation;
		} else {
			if ($defaultTranslation!="") {
				$translation = $defaultTranslation;
			}
		}
		if ($this->exists($translateKey)) {
			$translation = $this->_translate[$translateKey];
		}
		return $this->replacePlaceholders($translation, $placeholders);
	}
694072
public function recognize($filename, array $languages = null, $pageSegMode = self::PAGE_SEG_MODE_AUTOMATIC_OCR)
    {
        if ($pageSegMode < 0 || $pageSegMode > 10) {
            throw new \InvalidArgumentException(
                'Page seg mode must be between 0 and 10'
            );
        }
        
        $tempFile = tempnam(sys_get_temp_dir(), 'tesseract');
        
        $arguments = array(
            $filename,
            $tempFile,
            '-psm',
            $pageSegMode
        );
        
        if (null !== $languages) {
            $arguments[] = '-l';
            $arguments[] = implode('+', $languages);
        }
        
        $this->execute($arguments);

        $recognizedText = trim(\file_get_contents($tempFile . '.txt'));

        if (file_exists($tempFile)) {
            unlink($tempFile);
        }

        if (file_exists($tempFile . '.txt')) {
            unlink($tempFile . '.txt');
        }

        return $recognizedText;
    }
1215097
public static void insertStopRegexes(String key, String... regexes) {
        StopRecognition fr = get(key);
        fr.insertStopRegexes(regexes);
    }
1337688
private function getFromExcludedSource($key, $replace, $locale, $fallback)
    {
        if(!PageKey::fromLineKeyString($key)->isExcludedSource()) return null;

        return parent::get($key, $replace, $locale, $fallback);
    }
944697
public function add(string $key): WritableTranslationValueInterface
    {
        if ($this->has($key)) {
            throw new TranslationAlreadyContainedException($key, $this);
        }

        return $this->translationBuffer[$key] = new MemoryTranslationValue($key);
    }
12884
public function validateDateformats($file, $key, $validate_language)
	{
		if (empty($validate_language))
		{
			$this->output->addMessage(Output::FATAL, 'Array must not be empty', $file, $key);
			return;
		}

		foreach ($validate_language as $dateformat => $example_time)
		{
			$this->validateString($file, $key . '.' . $dateformat, '', $dateformat);
			$this->validateString($file, $key . '.' . $dateformat, '', $example_time);
		}
	}
850416
public function loadKeys($configuredKeys, string $usage = null) : void
    {
        foreach ($configuredKeys as $keyData) {
            if (isset($keyData['X509Certificate'])) {
                $key = new X509($keyData);
            } else {
                $key = new Key($keyData);
            }

            if ($usage && !$key->canBeUsedFor($usage)) {
                continue;
            }

            $this->loadedKeys->add($key);
        }
    }
310913
public function findLanguageDBFile($db_filename = null, $db_directory = null)
    {
        if (empty($db_filename)) {
            $db_filename = $this->buildLanguageDBFileName();
        }
        if (empty($db_directory)) {
            $db_directory = $this->buildLanguageDBDirName();
        }

        $_file = null;
        $tmp_file = DirectoryHelper::slashDirname($db_directory).$db_filename;
        if (file_exists($tmp_file)) {
            $_file = $tmp_file;
        } else {
            foreach ($this->_paths['language_strings_db_directory'] as $dir) {
                $tmp_file = DirectoryHelper::slashDirname($dir).$db_filename;
                if (file_exists($tmp_file)) {
                    $_file = $tmp_file;
                }
            }
        }

        $this->addPath($db_filename, $db_directory, $_file);
        return $_file;
    }
80277
public function maskPayload($maskingKey = null) {
        if (null === $maskingKey) {
            $maskingKey = $this->generateMaskingKey();
        }

        if (static::MASK_LENGTH !== strlen($maskingKey)) {
            throw new \InvalidArgumentException("Masking key must be " . static::MASK_LENGTH ." characters");
        }

        if (extension_loaded('mbstring') && true !== mb_check_encoding($maskingKey, 'US-ASCII')) {
            throw new \OutOfBoundsException("Masking key MUST be ASCII");
        }

        $this->unMaskPayload();

        $this->secondByte = $this->secondByte | 128;
        $this->data[1]    = chr($this->secondByte);

        $this->data = substr_replace($this->data, $maskingKey, $this->getNumPayloadBytes() + 1, 0);

        $this->bytesRecvd += static::MASK_LENGTH;
        $this->data        = substr_replace($this->data, $this->applyMask($maskingKey), $this->getPayloadStartingByte(), $this->getPayloadLength());

        return $this;
    }
676540
protected function ignoreMissingMessage($locale, $domain, $messageId, $config)
    {
        if (!isset($config['ignore_missing_messages'])) {
            return false;
        }
        if (!isset($config['ignore_missing_messages'][$domain])) {
            return false;
        }

        foreach ([$locale, 'all'] as $lang) {
            if (isset($config['ignore_missing_messages'][$domain][$lang]) && in_array($messageId, $config['ignore_missing_messages'][$domain][$lang])) {
                return true;
            }
        }

        return false;
    }
129508
private function evaluateMatchingAnyLimitation(
        array $languageCodesList,
        array $limitationValues
    ): bool {
        return empty(array_intersect($languageCodesList, $limitationValues))
            ? self::ACCESS_DENIED
            : self::ACCESS_GRANTED;
    }
981789
public function remove(string $key): void
    {
        if (null === $unit = $this->xliff->searchTranslationUnit($key)) {
            throw new TranslationNotFoundException($key, $this);
        }
        $unit->parentNode->removeChild($unit);

        $this->markChanged();
    }
16786
public static function save($key, string $filename = ''): bool
    {
        if ($key instanceof KeyPair) {
            return self::saveKeyFile(
                $filename,
                $key->getSecretKey()->getRawKeyMaterial()
            );
        }
        return self::saveKeyFile($filename, $key->getRawKeyMaterial());
    }
188787
public function addError($errorKey, $errorValue)
    {
        if (!isset($this->errors[$errorKey])) {
            $this->errors[$errorKey] = [];
        }
        $this->errors[$errorKey][] = $errorValue;
    }
829259
private function findSourceFilesFromList(array $filenames): void
  {
    foreach ($filenames as $filename)
    {
      if (!file_exists($filename))
      {
        $this->io->error(sprintf("File not exists: '%s'", $filename));
        $this->errorFilenames[] = $filename;
      }
      else
      {
        $routineName     = pathinfo($filename, PATHINFO_FILENAME);
        $this->sources[] = ['path_name'    => $filename,
                            'routine_name' => $routineName,
                            'method_name'  => $this->methodName($routineName)];
      }
    }
  }