{
    "content": [
        {
            "type": "text",
            "text": "# Locale::Maketext::Extract::Plugin::TT2 (perldoc)\n\n## NAME\n\nLocale::Maketext::Extract::Plugin::TT2 - Template Toolkit format parser\n\n## SYNOPSIS\n\n$plugin = Locale::Maketext::Extract::Plugin::TT2->new(\n$lexicon            # A Locale::Maketext::Extract object\n@filetypes         # Optionally specify a list of recognised file types\n)\n$plugin->extract($filename,$filecontents);\n\n## DESCRIPTION\n\nExtracts strings to localise from Template Toolkit templates.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SHORT PLUGIN NAME**\n- **VALID FORMATS**\n- **KNOWN FILE TYPES**\n- **REQUIRES**\n- **NOTES**\n- **ACKNOWLEDGEMENTS**\n- **SEE ALSO**\n- **AUTHORS**\n- **COPYRIGHT**\n- **COPYRIGHT AND LICENSE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Locale::Maketext::Extract::Plugin::TT2",
        "section": "",
        "mode": "perldoc",
        "summary": "Locale::Maketext::Extract::Plugin::TT2 - Template Toolkit format parser",
        "synopsis": "$plugin = Locale::Maketext::Extract::Plugin::TT2->new(\n$lexicon            # A Locale::Maketext::Extract object\n@filetypes         # Optionally specify a list of recognised file types\n)\n$plugin->extract($filename,$filecontents);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SHORT PLUGIN NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VALID FORMATS",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "KNOWN FILE TYPES",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "REQUIRES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 44,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Locale::Maketext::Extract::Plugin::TT2 - Template Toolkit format parser\n",
                "subsections": []
            },
            "VERSION": {
                "content": "version 1.00\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "$plugin = Locale::Maketext::Extract::Plugin::TT2->new(\n$lexicon            # A Locale::Maketext::Extract object\n@filetypes         # Optionally specify a list of recognised file types\n)\n\n$plugin->extract($filename,$filecontents);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Extracts strings to localise from Template Toolkit templates.\n",
                "subsections": []
            },
            "SHORT PLUGIN NAME": {
                "content": "tt2\n",
                "subsections": []
            },
            "VALID FORMATS": {
                "content": "Valid formats are:\n\n[% |l(args) %]string[% END %]\n[% 'string' | l(args) %]\n[% l('string',args) %]\n[% c.l('string') %]\nAlso all the above combinations with \"c.\" prepended should work\ncorrectly. This is the default syntax when using TT templates with\nMojolicious.\n\nl and loc are interchangeable.\n\n| and FILTER are interchangeable.\n",
                "subsections": []
            },
            "KNOWN FILE TYPES": {
                "content": ".tt\n.tt2\n.html\n.tt.*\n.tt2.*\n",
                "subsections": []
            },
            "REQUIRES": {
                "content": "Template\n",
                "subsections": []
            },
            "NOTES": {
                "content": "*   BEWARE Using the \"loc\" form can give false positives if you use the\nPerl parser plugin on TT files. If you want to use the \"loc\" form,\nthen you should specify the file types that you want to the Perl\nplugin to parse, or enable the default file types, eg:\n\nxgetext.pl -P perl ....        # default file types\nxgettext.pl -P perl=pl,pm  ... # specified file types\n\n*   The string-to-be-localised must be a string, not a variable. We try\nnot to extract calls to your localise function which contain\nvariables eg:\n\nl('string',arg)  # extracted\nl(var,arg)       # not extracted\n\nThis doesn't work for block filters, so don't do that. Eg:\n\n[%  FILTER l %]\nstring [% var %]      # BAD!\n[% END %]\n\n*   Getting the right line number is difficult in TT. Often it'll be a\nrange of lines, or it may be thrown out by the use of PRECHOMP or\nPOSTCHOMP. It will always be within a few lines of the correct\nlocation.\n\n*   If you have PRE/POSTCHOMP enabled by default in your templates,\nthen you should extract the strings using the same values. In order\nto set them, you can use the following wrapper script:\n\n#!/usr/bin/perl\n\nuse Locale::Maketext::Extract::Run qw(xgettext);\nuse Locale::Maketext::Extract::Plugin::TT2();\n\n%Locale::Maketext::Extract::Plugin::TT2::PARSEROPTIONS = (\nPRECHOMP  => 1, # or 2\nPOSTCHOMP => 1, # or 2\n\n# Also START/ENDTAG, ANYCASE, INTERPOLATE, V1DOLLAR, EVALPERL\n);\n\nxgettext(@ARGV);\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "Thanks to Andy Wardley for writing the Template::Directive subclass\nwhich made this possible.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "xgettext.pl\nfor extracting translatable strings from common template systems and\nperl source files.\n\nLocale::Maketext::Lexicon\nLocale::Maketext::Extract::Plugin::Base\nLocale::Maketext::Extract::Plugin::FormFu\nLocale::Maketext::Extract::Plugin::Perl\nLocale::Maketext::Extract::Plugin::YAML\nLocale::Maketext::Extract::Plugin::Mason\nLocale::Maketext::Extract::Plugin::TextTemplate\nLocale::Maketext::Extract::Plugin::Generic\nTemplate::Toolkit\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "*   Clinton Gormley <drtech@cpan.org>\n\n*   Audrey Tang <cpan@audreyt.org>\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "Copyright 2002-2013 by Audrey Tang <cpan@audreyt.org>.\n\nThis software is released under the MIT license cited below.\n\nThe \"MIT\" License\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "This software is Copyright (c) 2014 by Audrey Tang.\n\nThis is free software, licensed under:\n\nThe MIT (X11) License\n",
                "subsections": []
            }
        }
    }
}