2namespace Bitrix\Translate\Controller\Editor;
6use Bitrix\Translate\Index;
7use Bitrix\Main\Localization\Loc;
30 self::$documentRoot = rtrim(
Translate\
IO\Path::tidy(
Main\Application::getDocumentRoot()),
'/');
50 Loc::getMessage(
'TR_CREATE_BACKUP_ERROR', [
'#FILE#' =>
$langFile->getPath()])
56 if (
Translate\Config::needToSortPhrases())
58 if (\in_array(
$langFile->getLangId(),
Translate\Config::getNonSortPhraseLanguages()) ===
false)
76 catch (
Main\
IO\IoException $exception)
81 Loc::getMessage(
'TR_ERROR_WRITE_CREATE', [
'#FILE#' =>
$langFile->getPath()])
87 Loc::getMessage(
'TR_ERROR_WRITE_UPDATE', [
'#FILE#' =>
$langFile->getPath()])
112 Loc::getMessage(
'TR_CREATE_BACKUP_ERROR', [
'#FILE#' =>
$langFile->getPath()])
123 $this->
addErrors($langFile->getErrors());
128 Loc::getMessage(
'TR_ERROR_DELETE', [
'#FILE#' =>
$langFile->getPath()])
135 catch (
Main\
IO\IoException $exception)
138 Loc::getMessage(
'TR_ERROR_DELETE', [
'#FILE#' =>
$langFile->getPath()])
188 foreach (self::$enabledLanguagesList as $langId)
195 if (!empty($childrenList))
197 foreach ($childrenList as $fullPath)
199 $name = \basename($fullPath);
214 if (!empty($childrenList))
217 foreach ($childrenList as $fullPath)
219 $name = \basename($fullPath);
227 if (!\is_dir($fullPath))
238 if (\preg_match(
"#^bitrix/modules/[^/]+/({$ignoreDev})$#", \trim(
$relPath,
'/')))
248 $folders[$langPath.
'/'.
$name] = $langPath.
'/'.
$name;
258 if (\
count($folders) > 0)
260 foreach ($folders as $subFolderPath)
static convertLangPath($langFile, $language)
static getEnabledLanguages()
static $enabledLanguagesList
updatePhraseIndex(Translate\File $langFile)
lookThroughLangFolder($langPath)
updateLangFile(Translate\File $langFile)
deleteLangFile(Translate\File $langFile)
deletePhraseIndex(Translate\File $langFile)
__construct($name, Main\Engine\Controller $controller, array $config=[])
static getFileList(string $path)
static getFolderList(string $path)
static replaceLangId(string $path, string $langId)
static tidy(string $path)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
const IGNORE_MODULE_NAMES
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"