Dotclear

source: build-tools/make-l10n.php @ 3877:e68b76561491

Revision 3877:e68b76561491, 744 bytes checked in by franck <carnet.franck.paul@…>, 7 years ago (diff)

Back to the old array() notation for build tools (they still may be used with old PHP versions)

  • Property exe set to *
RevLine 
[0]1#!/usr/bin/env php
2<?php
3$license_block = <<<EOF
[3731]4/**
5 * @package Dotclear
6 *
7 * @copyright Olivier Meunier & Association Dotclear
8 * @copyright GPL-2.0-only
9 */
[0]10EOF;
11
[3730]12require dirname(__FILE__) . '/../inc/libs/clearbricks/common/lib.l10n.php';
[0]13
14$path = (!empty($_SERVER['argv'][1])) ? $_SERVER['argv'][1] : getcwd();
15$path = realpath($path);
16
[3730]17$cmd = 'find ' . $path . ' -type f -name \'*.po\'';
18exec($cmd, $eres, $ret);
[0]19
[3877]20$res = array();
[0]21
[3730]22foreach ($eres as $f) {
23    $dest = dirname($f) . '/' . basename($f, '.po') . '.lang.php';
24    echo "l10n file " . $dest . ": ";
[2566]25
[3730]26    if (l10n::generatePhpFileFromPo(dirname($f) . '/' . basename($f, '.po'), $license_block)) {
27        echo 'OK';
28    } else {
29        echo 'FAILED';
30    }
31    echo "\n";
[0]32}
[2566]33?>
Note: See TracBrowser for help on using the repository browser.

Sites map