2017 © Pedro Peláez
 

library twig-tools

Extension tools for Twig

image

xhaleera/twig-tools

Extension tools for Twig

  • Monday, February 26, 2018
  • by chrisCheeseBurgames
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

TwigTools

A collection of Twig tools and extensions, (*1)

Available Tools

  • Xhaleera_Twig_Extension_Gettext provides gettext functions for use in Twig templates
  • Xhaleera_Twig_Extension_Lazy provides a Twig tag to temporarily skip strict variable checking
  • Xhaleera_Twig_Extension_Switch provides a switch case tag implementation for Twig templates

Setting Up Twig Template Message Extractor with Poedit

The file extract_gettext_messages.php available in the repository can be set up as an extractor for Twig templates in Poedit, providing you use the same syntax as the Gettext extension you can find here., (*2)

A common path for xgettext on macOS is: /Applications/Poedit.app/Contents/PlugIns/GettextTools.bundle/Contents/MacOS/bin/, (*3)

Here are the proper settings to enter in the extractor settings window: * Language: Custom name. Set it to Twig or anything else, at your convenience * List of extensions...: Set it to *.twig. You can add any other extension that suits your needs. * Parser command: php -f /path/to/extract_gettext_messages.php -- -o %o %C %K --xgettext-path /path/to/xgettext/parent/folder/ %F * An item in keyword list: -k%k (should be the default) * An item in input files list: %f (should be the default) * Source code charset: ‪--from-code=%c (should be the default), (*4)

License

Source code is released under the terms of the GNU General Public License v2 if not specified otherwise., (*5)

The Versions

26/02 2018

dev-master

9999999-dev https://github.com/xhaleera/TwigTools

Extension tools for Twig

  Sources   Download

GPL-2.0-only

The Requires

 

by Christophe SAUVEUR

26/02 2018

v1.0

1.0.0.0 https://github.com/xhaleera/TwigTools

Extension tools for Twig

  Sources   Download

GPL-2.0-only

The Requires

 

by Christophe SAUVEUR