Add to the $translations the value read from the configuration.

@param string $context
@param string|string[]|mixed $configurationValue
@param \Gettext\Translations $translations
@param string $concrete5version
@param string $fileRel
487882
private function parseTranslatableConfigValue($context, $configurationValue, \Gettext\Translations $translations, $fileRel)
    {
        $translation = null;
        if (is_string($configurationValue)) {
            if ($configurationValue !== '') {
                $translation = $translations->insert((string) $context, $configurationValue);
            }
        } elseif (is_array($configurationValue)) {
            if (
                count($configurationValue) === 2
                && isset($configurationValue[0]) && isset($configurationValue[1])
                && is_string($configurationValue[0]) && is_string($configurationValue[1])
                && $configurationValue[0] !== '' && $configurationValue[1] !== ''
            ) {
                $translation = $translations->insert((string) $context, $configurationValue[0], $configurationValue[1]);
            }
        }
        if ($translation !== null) {
            $translation->addReference($fileRel);
        }
    }
86631
public function loadConfiguration($configurationFile)
    {
        if (is_file($configurationFile)) {
            $dom = new DOMDocument('1.0', 'UTF-8');
            $dom->load($configurationFile);

            $this->setDOMDocument($dom);
        } elseif ($configurationFile !== $this->defaultConfigurationFile && is_file($this->defaultConfigurationFile)) {
            $this->loadConfiguration($this->defaultConfigurationFile);
        }
    }
282724
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        $db = \Loader::db();
        $rs = $db->Execute('select distinct (binary arHandle) as AreaName from Areas order by binary arHandle');
        while ($row = $rs->FetchRow()) {
            $this->addTranslation($translations, $row['AreaName'], 'AreaName');
        }
        $rs->Close();
    }
768018
protected function parseRunningConcrete5Do(\Gettext\Translations $translations, $concrete5version, $subParsersFilter)
    {
        foreach ($this->getSubParsers() as $dynamicItemParser) {
            if ((!is_array($subParsersFilter)) || in_array($dynamicItemParser->getDynamicItemsParserHandler(), $subParsersFilter, true)) {
                $dynamicItemParser->parse($translations, $concrete5version);
            }
        }
    }
4402
public function translator(string $locale, string $domain, string $directory): ?TranslatorInterface
    {
        $class = GETTEXT_EXTENSION ? GettextTranslator::class : Translator::class;

        $previous = self::$translator;
        self::$translator = new $class($locale, $domain, $directory);

        if ($previous === null) {
            require __DIR__ . DIRECTORY_SEPARATOR . 'helpers.php';
        }

        $this->locale = $locale;

        return $previous;
    }
1065076
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\GroupSet', true)) {
            foreach (\GroupSet::getList() as $gs) {
                $this->addTranslation($translations, $gs->getGroupSetName(), 'GroupSetName');
            }
        }
    }
236923
public function addConfigValue(\VinceT\AdminConfigurationBundle\Entity\ConfigValue $configValue)
    {
        $this->configValues[] = $configValue;

        return $this;
    }
808979
private function getTranslationFilesFromConfiguration($domain, $locale)
    {
        $filteredFilenames = array();

        foreach ($this->translationFilesByLocale as $localeFromConfig => $resourceFilePaths) {
            foreach ($resourceFilePaths as $filename) {
                list($currentDomain, $currentLocale) = explode('.', basename($filename), 3);

                if ($currentDomain === $domain && $currentLocale === $locale) {
                    $filteredFilenames[] = $filename;
                }
            }
        }
        return $filteredFilenames;
    }
423329
private function parseFileTypes(\Gettext\Translations $translations, $rootDirectory, $prefix, $directoryAlternatives)
    {
        foreach ($directoryAlternatives as $subDir) {
            $rel = ($subDir === '') ? 'app.php' : "$subDir/app.php";
            $fileAbs = $rootDirectory.'/'.$rel;
            if (!is_file($fileAbs)) {
                continue;
            }
            $fileRel = $prefix.$rel;
            $configFile = new \C5TL\Util\ConfigFile($fileAbs);
            $config = $configFile->getArray();
            if (isset($config['file_types']) && is_array($config['file_types'])) {
                $fileTypes = $config['file_types'];
                foreach (array_keys($fileTypes) as $fileType) {
                    $translation = $translations->insert('', $fileType);
                    $translation->addReference($fileRel);
                }
            }
        }
    }
1210528
protected function addTranslation($string, array $translations, $file)
    {
        if ($this->prepared && !isset($this->written[$file][$string]) && !empty($this->context)) {

            $data = array($string);

            if (isset($translations[$string][0]) && $translations[$string][0] !== '') {
                $data = $translations[$string];
                array_unshift($data, $string);
            }

            gplcart_file_csv($file, $data);
            $this->written[$file][$string] = true;
        }
    }
1260067
final protected function addTranslation(\Gettext\Translations $translations, $string, $context = '')
    {
        if (is_string($string) && ($string !== '')) {
            $translations->insert($context, $string);
        }
    }
1240941
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\PermissionKeyCategory', true) && method_exists('\PermissionKeyCategory', 'getList')) {
            foreach (\PermissionKeyCategory::getList() as $pkc) {
                $pkcHandle = $pkc->getPermissionKeyCategoryHandle();
                foreach (\PermissionKey::getList($pkcHandle) as $pk) {
                    $this->addTranslation($translations, $pk->getPermissionKeyName(), 'PermissionKeyName');
                    $this->addTranslation($translations, $pk->getPermissionKeyDescription(), 'PermissionKeyDescription');
                }
            }
        }
    }
933328
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\AttributeType', true)) {
            foreach (\AttributeType::getList() as $at) {
                $this->addTranslation($translations, $at->getAttributeTypeName(), 'AttributeTypeName');
            }
        }
    }
250579
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        $akcNameMap = array(
            'collection' => 'Page attributes',
            'user' => 'User attributes',
            'file' => 'File attributes',
        );
        if (version_compare($concrete5version, '5.7') < 0) {
            $akcClass = '\AttributeKeyCategory';
        } else {
            $akcClass = '\Concrete\Core\Attribute\Key\Category';
        }
        if (class_exists($akcClass, true) && method_exists($akcClass, 'getList')) {
            foreach (call_user_func($akcClass.'::getList') as $akc) {
                $akcHandle = $akc->getAttributeKeyCategoryHandle();
                $this->addTranslation($translations, isset($akcNameMap[$akcHandle]) ? $akcNameMap[$akcHandle] : ucwords(str_replace(array('_', '-', '/'), ' ', $akcHandle)));
            }
        }
    }
103781
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\GroupList', true)) {
            $gl = new \GroupList(null, false, true);
            foreach ($gl->getGroupList() as $g) {
                $this->addTranslation($translations, $g->getGroupName(), 'GroupName');
                $this->addTranslation($translations, $g->getGroupDescription(), 'GroupDescription');
            }
        }
    }
1067400
public function createTranslatedProperty($property, $locale, StructureInterface $structure = null)
    {
        if ($property instanceof ItemMetadata) {
            $property = $this->createProperty($property, $structure);
        }
        $property = new TranslatedProperty(
            $property,
            $locale,
            $this->namespaceRegistry->getPrefix('content_localized')
        );

        return $property;
    }
1074430
public function parseManual(\Gettext\Translations $translations, $concrete5version)
    {
        if (class_exists('\PermissionAccessEntityType', true) && method_exists('\PermissionAccessEntityType', 'getList')) {
            foreach (\PermissionAccessEntityType::getList() as $aet) {
                $this->addTranslation($translations, $aet->getAccessEntityTypeName(), 'PermissionAccessEntityTypeName');
            }
        }
    }