1Zanata::Util::ZanataXMLU(s3e)r Contributed Perl DocumentaZtainoanta::Util::ZanataXML(3)
2
3
4
5 new($content)
6 New a ZanataXML instance. If content is given, the value is set
7 accordingly.
8
9 Parameters
10
11 content
12 A string representation of xml.
13
14 Properties
15
16 url URL to zanata server
17
18 project
19 Project ID.
20
21 project-version
22 Project version.
23
24 project-type
25 Project type.
26
27 locales
28 Hash of locales. Locale acts as key while either map-from
29 (when it has map-from) or 1 as value.
30
31 new_from_url($url)
32 New a ZanataXML instance from a url
33
34 url url is the actual url to access zanata.xml, not the zanata
35 server URL.
36
37 get_locales() Get the list of locales.
38 Returns: list of locales.
39
40 update_locale($locale, $mapFrom)
41 Insert or update locale and its mapFrom.
42
43 locale
44 Locale that enabled in Zanata
45
46 mapFrom
47 For attribute "mapFrom" for tag <locale>. The attribute will
48 be omitted if mapFrom is either empty or 1.
49
50 parse_locales($twig)
51 Parse locales and map-from from XML
52
53 Returns: locales hash which locale is key and either map-from (when
54 it has map-from) or 1 as value. Or undef if xml does not contain
55 any locale.
56
58 Hey! The above document had some coding errors, which are explained
59 below:
60
61 Around line 17:
62 '=item' outside of any '=over'
63
64 =over without closing =back
65
66
67
68perl v5.30.0 2019-07-27 Zanata::Util::ZanataXML(3)