Merged in marcoAntonioNina/processmaker (pull request #393)

Improvement Translation mafe
This commit is contained in:
Julio Cesar Laura Avendaño
2014-04-14 13:23:16 -04:00
3 changed files with 11 additions and 6 deletions

View File

@@ -220,14 +220,12 @@ class Translation extends BaseTranslation
try {
if (! is_dir( dirname( $mafeFolder ) )) {
G::mk_dir( dirname( $mafeFolder, 0777 ) );
}
G::verifyPath($mafeFolder, true);
if (! is_dir( dirname( $cacheFileMafe ) )) {
G::mk_dir( dirname( $cacheFileMafe, 0777 ) );
G::mk_dir( dirname( $cacheFileMafe ) );
}
$f = fopen( $cacheFileMafe, 'w+' );
$f = fopen( $cacheFileMafe, 'w' );
if ($f == false) {
error_log("Error: Cannot write into cacheFileMafe: $cacheFileMafe\n");
} else {

View File

@@ -72,6 +72,13 @@ class Designer extends Controller
$this->setVar('buildhash', $buildhash);
}
$translationMafe = "/translations/translationsMafe.js";
$this->setVar('translationMafe', $translationMafe);
if (!file_exists(PATH_HTML . "translations" . PATH_SEP. 'translationsMafe' . ".js")) {
$translation = new Translation();
$translation->generateFileTranslationMafe();
}
$this->setView('designer/index');
$this->render();
}

View File

@@ -65,7 +65,7 @@
{/if}
<!-- translations -->
<script type="text/javascript" src="/translations/translationsMafe.js"></script>
<script type="text/javascript" src="{$translationMafe}"></script>
</head>
<body onresize="resizingFrame();">