From 2c68f039ae13b159ebc08cac8af4d7abf6f7e6af Mon Sep 17 00:00:00 2001 From: RainLoop Team Date: Sat, 2 Jul 2016 21:08:49 +0300 Subject: [PATCH] Remove unnecessary code --- .gitignore | 1 + build/langs.php | 76 ------------------------------------------------- 2 files changed, 1 insertion(+), 76 deletions(-) delete mode 100644 build/langs.php diff --git a/.gitignore b/.gitignore index 7bce6cb2f..164551c21 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /.idea +/.vscode /api.php /error.log /nbproject diff --git a/build/langs.php b/build/langs.php deleted file mode 100644 index 339c8bc88..000000000 --- a/build/langs.php +++ /dev/null @@ -1,76 +0,0 @@ - $aSectionValue) - { - foreach (\array_keys($aSectionValue) as $sParamKey) - { - if (isset($aFromLang[$sSectionKey][$sParamKey])) - { - $aEngLang[$sSectionKey][$sParamKey] = $aFromLang[$sSectionKey][$sParamKey]; - } - else - { - echo $sSectionKey.'/'.$sParamKey.','."\n"; - $iCount++; - } - } - } - - return $aEngLang; -} - -function saveLangStructure($sLangFile, $aLang) -{ - $aResultLines = array(); -// $aResultLines[] = '; '.$sLangFile; - - foreach ($aLang as $sSectionKey => $aSectionValue) - { - $aResultLines[] = ''; - $aResultLines[] = '['.$sSectionKey.']'; - - foreach ($aSectionValue as $sParamKey => $sParamValue) - { - $aResultLines[] = $sParamKey.' = "'. - \str_replace(array('\\', '"'), array('\\\\', '\\"'), \trim($sParamValue)).'"'; - } - } - - \file_put_contents(LANGS_PATH.'/'.$sLangFile, implode("\n", $aResultLines)."\n"); -} - -$sNL = "\n"; -$aEngLang = \getLangStructure('en.ini'); - -$aFiles = \glob(LANGS_PATH.'/*.ini'); -foreach ($aFiles as $sFile) -{ - $iCount = 0; - $sFileName = \basename($sFile); - - $aNextLang = \getLangStructure($sFileName); - $aNewLang = \mergeLangStructure($aNextLang, $aEngLang, $iCount); - - if (0 === $iCount) - { - echo $sFileName.': ok'.$sNL; - } - else - { - echo $sFileName.': changed ('.$iCount.')'.$sNL; - } - -// \saveLangStructure($sFileName, $aNewLang); -} \ No newline at end of file