1Locale::Maketext::ExtraUcste:r:PCloungtirni:b:uYtAeLMdoLc(Pa3el)rel::DMoackuemteenxtta:t:iEoxntract::Plugin::YAML(3)
2
3
4

NAME

6       Locale::Maketext::Extract::Plugin::YAML - YAML format parser
7

SYNOPSIS

9           $plugin = Locale::Maketext::Extract::Plugin::YAML->new(
10               $lexicon            # A Locale::Maketext::Extract object
11               @file_types         # Optionally specify a list of recognised file types
12           )
13
14           $plugin->extract($filename,$filecontents);
15

DESCRIPTION

17       Extracts strings to localise from YAML files.
18

SHORT PLUGIN NAME

20           yaml
21

VALID FORMATS

23       Valid formats are:
24
25       ·
26
27
28               key: _"string"
29
30       ·
31
32
33               key: _'string'
34
35       ·
36
37
38               key: _'string with embedded 'quotes''
39
40       ·
41
42
43               key: |-
44                    _'my folded
45                    string
46                    to translate'
47
48           Note, the left hand side of the folded string must line up with the
49           "_", otherwise YAML adds spaces at the beginning of each line.
50
51       ·
52
53
54               key: |-
55                    _'my block
56                    string
57                    to translate
58                    '
59           Note, you must use the trailing C<-> so that YAMl doesn't add a carriage
60           return after your final quote.
61

KNOWN FILE TYPES

63       .yaml
64       .yml
65       .conf
66

REQUIRES

68       YAML
69

NOTES

71       The docs for the YAML module describes it as alpha code. It is not as
72       tolerant of errors as YAML::Syck. However, because it is pure Perl, it
73       is easy to hook into.
74
75       I have seen it enter endless loops, so if xgettext.pl hangs, try
76       running it again with "--verbose --verbose" (twice) enabled, so that
77       you can see if the fault lies with YAML.  If it does, either correct
78       the YAML source file, or use the file_types to exclude that file.
79

SEE ALSO

81       xgettext.pl
82           for extracting translatable strings from common template systems
83           and perl source files.
84
85       YAML
86       Locale::Maketext::Lexicon
87       Locale::Maketext::Extract::Plugin::Base
88       Locale::Maketext::Extract::Plugin::FormFu
89       Locale::Maketext::Extract::Plugin::Perl
90       Locale::Maketext::Extract::Plugin::TT2
91       Locale::Maketext::Extract::Plugin::Mason
92       Locale::Maketext::Extract::Plugin::TextTemplate
93       Locale::Maketext::Extract::Plugin::Generic
94

AUTHORS

96       Clinton Gormley <clint@traveljury.com>
97
99       Copyright 2002-2008 by Audrey Tang <cpan@audreyt.org>.
100
101       This software is released under the MIT license cited below.
102
103   The "MIT" License
104       Permission is hereby granted, free of charge, to any person obtaining a
105       copy of this software and associated documentation files (the
106       "Software"), to deal in the Software without restriction, including
107       without limitation the rights to use, copy, modify, merge, publish,
108       distribute, sublicense, and/or sell copies of the Software, and to
109       permit persons to whom the Software is furnished to do so, subject to
110       the following conditions:
111
112       The above copyright notice and this permission notice shall be included
113       in all copies or substantial portions of the Software.
114
115       THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
116       OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
117       MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
118       IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
119       CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
120       TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
121       SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
122
123
124
125perl v5.12.2                      201L0o-c0a8l-e1:0:Maketext::Extract::Plugin::YAML(3)
Impressum