Skip to content

Instantly share code, notes, and snippets.

@dlsniper
Created February 6, 2013 21:35
Show Gist options
  • Save dlsniper/4726085 to your computer and use it in GitHub Desktop.
Save dlsniper/4726085 to your computer and use it in GitHub Desktop.
Translation update demo Use AcmeDemoBundle Put embed.html.twig in Acme/DemoBundle/Resources/views/ Change Acme/DemoBundle/Resources/views/Welcome/index.html.twig accordingly Output is output.yml
{% block msg %}
<p>Congratulations! You have successfully installed a new Symfony application.</p>
{{ 'embed'|trans }}
{% endblock %}
{% extends 'AcmeDemoBundle::layout.html.twig' %}
{% trans_default_domain "users" %}
{% block title %}{{ 'Symfony - Welcome'|trans }}{% endblock %}
{% block content %}
{% set version = constant('Symfony\\Component\\HttpKernel\\Kernel::MAJOR_VERSION') ~ '.' ~ constant('Symfony\\Component\\HttpKernel\\Kernel::MINOR_VERSION')%}
<h1>Welcome!</h1>
{% embed 'AcmeDemoBundle::embed.html.twig'%}
{% trans_default_domain "users" %}
{% endembed %}
<div class="symfony-blocks-welcome">
<div class="block-quick-tour">
<div class="illustration">
<img src="{{ asset('bundles/acmedemo/images/welcome-quick-tour.gif') }}" alt="Quick tour" />
</div>
<a class="symfony-button-green" href="http://symfony.com/doc/{{ version }}/quick_tour/index.html">Read the Quick Tour</a>
</div>
{% if app.environment == 'dev' %}
<div class="block-configure">
<div class="illustration">
<img src="{{ asset('bundles/acmedemo/images/welcome-configure.gif') }}" alt="Configure your application" />
</div>
<a class="symfony-button-green" href="{{ path('_configurator_home') }}">Configure</a>
</div>
{% endif %}
<div class="block-demo">
<div class="illustration">
<img src="{{ asset('bundles/acmedemo/images/welcome-demo.gif') }}" alt="Demo" />
</div>
<a class="symfony-button-green" href="{{ path('_demo') }}">Run The Demo</a>
</div>
</div>
<div class="symfony-blocks-help">
<div class="block-documentation">
<ul>
<li><strong>Documentation</strong></li>
<li><a href="http://symfony.com/doc/{{ version }}/book/index.html">The Book</a></li>
<li><a href="http://symfony.com/doc/{{ version }}/cookbook/index.html">The Cookbook</a></li>
<li><a href="http://symfony.com/doc/{{ version }}/components/index.html">The Components</a></li>
<li><a href="http://symfony.com/doc/{{ version }}/reference/index.html">Reference</a></li>
<li><a href="http://symfony.com/doc/{{ version }}/glossary.html">Glossary</a></li>
</ul>
</div>
<div class="block-documentation-more">
<ul>
<li><strong>Sensio</strong></li>
<li><a href="http://trainings.sensiolabs.com">Trainings</a></li>
<li><a href="http://books.sensiolabs.com">Books</a></li>
</ul>
</div>
<div class="block-community">
<ul>
<li><strong>Community</strong></li>
<li><a href="http://symfony.com/irc">IRC channel</a></li>
<li><a href="http://symfony.com/mailing-lists">Mailing lists</a></li>
<li><a href="http://forum.symfony-project.org">Forum</a></li>
<li><a href="http://symfony.com/doc/{{ version }}/contributing/index.html">Contributing</a></li>
</ul>
</div>
</div>
{% endblock %}
'Symfony - Welcome': '__Symfony - Welcome'
'Congratulations! You have successfully installed a new Symfony application.': '__Congratulations! You have successfully installed a new Symfony application.'
embed: __embed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment