Permalink
Browse files

* Create Twig gettext translations parser.

* Update translations .POT file.
  • Loading branch information...
dannya committed Sep 27, 2014
1 parent 11acbb2 commit 6262c8e2551410b0fffc6211d154fa5a70333d13
View
@@ -0,0 +1,33 @@
<?php
include($_SERVER['DOCUMENT_ROOT'] . '/autoload.php');
$themes = array('default', 'neverland');
foreach ($themes as $theme) {
$templateDirectory = BASE_DIR . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR . $theme;
// define template engine options
$options = array(
'cache' => $templateDirectory . DIRECTORY_SEPARATOR . 'cache',
'auto_reload' => true,
);
// initialise templating engine
$loader = new Twig_Loader_Filesystem($templateDirectory);
$twig = new Twig_Environment($loader, $options);
// enable additional Twig extensions
$twig->addExtension(new Twig_Extensions_Extension_I18n());
$twig->addExtension(new Twig_Extensions_Extension_Text());
// iterate over all your templates
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($templateDirectory), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {
// force compilation
if ($file->isFile()) {
$twig->loadTemplate(str_replace($templateDirectory . DIRECTORY_SEPARATOR, '', $file));
}
}
}
?>
@@ -22,7 +22,7 @@
// define app constants
public static $app = array('id' => 'commit-digest',
'name' => 'KDE Commit-Digest',
'version' => '1.30');
'version' => '1.40');
// define meta information
View
@@ -0,0 +1,12 @@
{
"name": "dannya/commit-digest",
"description": "",
"minimum-stability": "stable",
"license": "Affero GPL",
"authors": [
{
"name": "Danny Allen",
"email": "danny@commit-digest.org"
}
]
}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.

0 comments on commit 6262c8e

Please sign in to comment.