Permalink
Browse files

* Create Twig gettext translations parser.

* Update translations .POT file.
  • Loading branch information...
1 parent 11acbb2 commit 6262c8e2551410b0fffc6211d154fa5a70333d13 @dannyakakong committed Sep 27, 2014
@@ -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"
+ }
+ ]
+}
@@ -1 +1 @@
-h1{position:relative}h1 i{display:inline-block;position:absolute;bottom:0;right:0;font-size:16px;font-style:italic;font-weight:normal;color:#666}h1 i a{color:#666}div.row{position:relative;width:100%}div.row div.left{font-weight:bold;width:100px}div.row div.right{position:relative;width:800px;left:100px;top:-22px}body.neverland div.row div.right{width:86%}form#account{width:286px;margin:4px 0 16px 0}#step_2-code{margin-top:4px}form#data{margin-bottom:48px}form#data h3{margin:28px 0 8px 0}form#data table{margin-left:16px;border-collapse:collapse}form#data tr.privacy-private{background-color:#dbffbf}form#data td{padding:4px 0}form#data td.title{min-width:160px;padding-right:10px;text-align:right}form#data td.value{padding-right:32px}form#data td.value input{width:222px}form#data td.value select{width:230px}form#data td.privacy{padding-right:12px;font-size:14px;font-style:italic;color:#666}form#data tr.privacy-always td.privacy{padding-left:20px}form#data td.privacy label{display:block;cursor:pointer;padding:2px 0}form#data td.privacy label input{margin:0 7px 0 0}form#data tr[data-privacy="dob"] td{vertical-align:top}form#data tr[data-privacy="dob"] td.title{padding-top:8px}form#data tr[data-privacy="dob"] td.privacy{padding-top:10px;padding-bottom:10px}form#data tr[data-privacy="dob"] td.privacy b{display:inline-block;margin:0 0 4px 24px}form#data div.buttons{margin-top:32px;height:32px}form#data div.buttons label{float:none}form#data div.buttons input[type="submit"]{float:left}form#data div.buttons img#spinner{float:left;margin:-3px 0 0 12px}form#data div.buttons label{display:inline-block;margin:0 0 0 130px;padding:4px 6px 6px 6px;cursor:pointer}form#data div.buttons label.alert{border:2px solid red}form#data div.buttons label input{margin:0 10px 0 0}p.intro{padding:0 0 22px 0}
+h1{position:relative}h1 i{display:inline-block;position:absolute;bottom:0;right:48px;font-size:16px;font-style:italic;font-weight:400;color:#666}div.row{position:relative;width:100%}div.row div.left{font-weight:700;width:100px}div.row div.right{position:relative;width:800px;left:100px;top:-22px}body.neverland div.row div.right{width:86%}form#account{width:286px;margin:4px 0 16px}#step_2-code{margin-top:4px}form#data{margin-bottom:48px}form#data h3{margin:28px 0 8px}form#data table{margin-left:16px;border-collapse:collapse}form#data tr.privacy-private{background-color:#dbffbf}form#data tr.privacy-private input,form#data tr.privacy-private select,form#data tr.privacy-public input,form#data tr.privacy-public select{margin:2px 0}form#data td{padding:4px 0}form#data td.title{min-width:160px;padding-right:10px;text-align:right}form#data td.value{padding-right:32px}form#data td.value input{width:222px}form#data td.value select{width:236px}form#data td.privacy{padding-right:12px;font-size:14px;font-style:italic;color:#666}form#data tr.privacy-always td.privacy{padding-left:20px}form#data td.privacy label{display:block;cursor:pointer;padding:4px 0 0}form#data td.privacy label input{margin:-4px 7px 0 0}form#data tr[data-privacy=dob] td{vertical-align:top}form#data tr[data-privacy=dob] td.title{padding-top:8px}form#data tr[data-privacy=dob] td.privacy{padding-top:10px;padding-bottom:10px}form#data tr[data-privacy=dob] td.privacy b{display:inline-block;margin:0 0 4px 24px}form#data div.buttons{margin-top:32px;height:32px}form#data div.buttons label{float:none}form#data div.buttons input[type=submit]{float:left}form#data div.buttons img#spinner{float:left;margin:-3px 0 0 12px}form#data div.buttons label{display:inline-block;margin:0 0 0 130px;padding:4px 6px 6px;cursor:pointer}form#data div.buttons label.alert{border:2px solid red}form#data div.buttons label input{margin:0 10px 0 0}p.intro{padding:0 0 22px}
Binary file not shown.
Oops, something went wrong.

0 comments on commit 6262c8e

Please sign in to comment.