Silex downgrade, trans

This commit is contained in:
Simon Vieille 2015-05-06 00:18:16 +02:00
parent a6ece12b3e
commit 49dfa69b50
6 changed files with 41 additions and 7 deletions

View File

@ -20,7 +20,7 @@ return call_user_func(function () {
$files = array();
foreach (new DirectoryIterator(__FILE__ . '.d') as $file) {
if (!$file->isDot() && $file->isFile()) {
if (!$file->isDot() && $file->isFile() && $file->getBasename()[0] !== '.') {
$files[] = $file->getPathname();
}
}

View File

@ -7,7 +7,7 @@ $app->register(new TwigServiceProvider(), array(
));
$app->extend('twig', function ($twig, $app) {
$twig->addGlobal('web_path', '/');
$twig->addGlobal('web_path', $app['request']->getBaseUrl().'/');
return $twig;
});

View File

@ -26,13 +26,13 @@ $app['translator'] = $app->extend('translator', function ($translator, $app) {
return $translator;
});
$app['routes'] = $app->extend('routes', function ($routes, $app) {
$app['routes'] = $app->share($app->extend('routes', function ($routes, $app) {
$routes->addPrefix('/{_locale}');
$routes->addDefaults(array('_locale' => $app['locale_fallbacks'][0]));
$routes->addRequirements(array('_locale' => implode('|', $app['locales'])));
return $routes;
});
}));
/**
* Redirect home on right locale page, regarding of request accept locale or

View File

@ -3,7 +3,5 @@
use GitWrapper\GitWrapper;
$app['git'] = function ($app) {
echo "ok";
return new GitWrapper();
};

View File

@ -0,0 +1,36 @@
app:
title_prefix: '#!GIST - '
menu:
home:
title: 'Accueil'
about:
title: 'À propos'
form:
error:
not_blank: 'Vous devez saisir cette donnée.'
title:
placeholder: 'Titre'
cipher:
alert: 'En activant le chiffrement, le fork deviendra impossible.'
label: 'Chiffrer : %value%'
choice:
yes: 'Oui'
no: 'No'
type:
label: 'Langage : %value%'
choice:
xml: 'HTML/XML'
css: 'CSS'
js: 'JAVASCRIPT'
php: 'PHP'
sql: 'SQL'
yaml: 'YAML'
perl: 'PERL'
c: 'C/C++'
asp: 'ASP'
python: 'PYTHON'
bash: 'BASH'
as: 'ACTION SCRIPT'
text: 'TEXTE'

View File

@ -1,7 +1,7 @@
{
"require": {
"geshi/geshi": "dev-master",
"silex/silex": "dev-master",
"silex/silex": "1.3.x-dev",
"symfony/yaml": "~2.6",
"symfony/twig-bridge": "~2.6",
"symfony/translation": "dev-master",