* change for en to de lang.

This commit is contained in:
wangyidong
2019-07-15 08:07:30 +08:00
parent 136e68e3dc
commit 00a096c5ee
3 changed files with 25 additions and 0 deletions

View File

@@ -105,6 +105,7 @@ zentaoxx:
sed -i 's/v\.//g' zentaoxx/module/client/js/checkupgrade.js
sed -i 's/xxb_/zt_/g' zentaoxx/db/*.sql
mkdir zentaoxx/tools; cp tools/cn2tw.php zentaoxx/tools; cd zentaoxx/tools; php cn2tw.php
cp tools/en2de.php zentaoxx/tools; cd zentaoxx/tools; php en2de.php ../
rm -rf zentaoxx/tools
zip -rqm -9 zentaoxx.$(VERSION).zip zentaoxx/*
rm -rf xuan.zip xuan zentaoxx

View File

@@ -124,6 +124,7 @@
4068 用例等待评审翻译调整
4067 用例不需要评审翻译调整
4066 用户性别添加的时候不要使用缩写
2019-06-26 11.5.2
完善登录禅道弱口令检查
增加禅道安全性

23
tools/en2de.php Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env php
<?php
/* Set the extpath and cconv binary. */
if(empty($argv[1])) die("Must give the module path.\n");
$extPath = $argv[1];
foreach(glob("$extPath/module/*") as $moduleName)
{
/* Convert the main lang file. */
$moduleLangPath = realpath($moduleName) . '/lang/';
$defaultLangFile = $moduleLangPath . 'en.php';
$targetLangFile = $moduleLangPath . 'de.php';
if(file_exists($defaultLangFile)) system("cp -r $defaultLangFile $targetLangFile");
/* Convert the extened lang file. */
foreach(glob("$moduleName/ext/lang/en/*.php") as $extLangFile)
{
$pathOfTW = dirname(dirname($extLangFile)) . "/de";
$extFileName = basename($extLangFile);
if(!is_dir($pathOfTW)) mkdir($pathOfTW);
system("cp -r $extLangFile $pathOfTW/$extFileName");
}
}