Skip to content

Commit

Permalink
fixed extractor script to take into account new lang_name filter in t…
Browse files Browse the repository at this point in the history
…wig templates
  • Loading branch information
osma committed Jan 22, 2015
1 parent a36be22 commit 1c0b329
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/twig-gettext-extractor
Expand Up @@ -47,13 +47,19 @@ $twig->addExtension(new Symfony\Bridge\Twig\Extension\FormExtension(
));
// You can add more extensions here.

// Custom filter for ONKI Light / Skosmos templates
// Custom filters for Skosmos templates
$urlFilter = new Twig_SimpleFilter('link_url',
function($uri, $vocab, $lang,$type='page') {
function($uri, $vocab, $lang, $type='page') {
return $uri; // dummy implementation
});
$twig->addFilter($urlFilter);

$langFilter = new Twig_SimpleFilter('lang_name',
function ($langcode,$lang) {
return $langcode; // dummy implementation
});
$twig->addFilter($langFilter);

array_shift($_SERVER['argv']);
$addTemplate = false;

Expand Down

0 comments on commit 1c0b329

Please sign in to comment.