Version Description
on April 29, 2015 =
* Added: Now supports Weather Underground Severe Weather alerts & warnings
* Fixed: Issue using multi-word cities (thanks @christianriley!)
* Fixed: Restored alt
text for icon when using the Current template
* Fixed: Widget preview for "Old School" icon set
* Fixed: Fatal error if plugin or theme already used Twig template loader
* Fixed: Replace Icon Set FAQ code
* Updated: Translations - thanks to all the translators!
- Slovenian: Ale Hoevar
- Bosnian: Marko Saraba
Download this release
Release Info
Developer | katzwebdesign |
Plugin | Weather Underground |
Version | 2.1 |
Comparing to | |
See all releases |
Code changes from version 2.0.11 to 2.1
- inc/Wunderground.php +0 -54
- inc/class-alert.php +58 -0
- inc/class-alerts.php +0 -58
- inc/class-request.php +1 -1
- inc/class-widget.php +7 -4
- inc/functions.php +1 -1
- languages/wunderground-ach.mo +0 -0
- languages/wunderground-ach.po +660 -0
- languages/wunderground-bs_BA.mo +0 -0
- languages/wunderground-bs_BA.po +661 -0
- languages/wunderground-ca.mo +0 -0
- languages/wunderground-ca.po +660 -0
- languages/wunderground-fa.mo +0 -0
- languages/wunderground-fa.po +660 -0
- languages/wunderground-fr.mo +0 -0
- languages/wunderground-fr.po +660 -0
- languages/wunderground-is.mo +0 -0
- languages/wunderground-is.po +660 -0
- languages/wunderground-nb_NO.mo +0 -0
- languages/wunderground-nb_NO.po +660 -0
- languages/wunderground-pl_PL.mo +0 -0
- languages/wunderground-pl_PL.po +660 -0
- languages/wunderground-sl.mo +0 -0
- languages/wunderground-sl.po +660 -0
- languages/wunderground-sl_SI.mo +0 -0
- languages/wunderground-sl_SI.po +661 -0
- readme.txt +22 -7
- templates/alert.html +6 -5
- templates/snippets/icon.html +1 -1
- vendor/composer/ClassLoader.php +39 -4
- vendor/composer/autoload_real.php +0 -3
- vendor/composer/installed.json +10 -10
- vendor/twig/twig/.gitignore +4 -1
- vendor/twig/twig/.travis.yml +11 -0
- vendor/twig/twig/CHANGELOG +55 -1
- vendor/twig/twig/composer.json +3 -3
- vendor/twig/twig/doc/advanced.rst +5 -5
- vendor/twig/twig/doc/advanced_legacy.rst +3 -3
- vendor/twig/twig/doc/api.rst +48 -41
- vendor/twig/twig/doc/deprecated.rst +14 -2
- vendor/twig/twig/doc/filters/batch.rst +2 -2
- vendor/twig/twig/doc/filters/convert_encoding.rst +1 -1
- vendor/twig/twig/doc/filters/first.rst +1 -1
- vendor/twig/twig/doc/filters/index.rst +2 -2
- vendor/twig/twig/doc/filters/json_encode.rst +1 -1
- vendor/twig/twig/doc/filters/last.rst +1 -1
- vendor/twig/twig/doc/filters/length.rst +1 -1
- vendor/twig/twig/doc/filters/merge.rst +6 -0
- vendor/twig/twig/doc/filters/nl2br.rst +1 -1
- vendor/twig/twig/doc/filters/number_format.rst +1 -1
- vendor/twig/twig/doc/filters/raw.rst +24 -0
- vendor/twig/twig/doc/filters/slice.rst +4 -3
- vendor/twig/twig/doc/filters/split.rst +9 -9
- vendor/twig/twig/doc/filters/trim.rst +1 -1
- vendor/twig/twig/doc/filters/url_encode.rst +8 -2
- vendor/twig/twig/doc/functions/date.rst +2 -2
- vendor/twig/twig/doc/functions/dump.rst +1 -1
- vendor/twig/twig/doc/functions/include.rst +1 -1
- vendor/twig/twig/doc/functions/max.rst +3 -2
- vendor/twig/twig/doc/functions/min.rst +3 -2
- vendor/twig/twig/doc/functions/random.rst +1 -1
- vendor/twig/twig/doc/functions/source.rst +1 -1
- vendor/twig/twig/doc/functions/template_from_string.rst +1 -1
- vendor/twig/twig/doc/index.rst +2 -2
- vendor/twig/twig/doc/installation.rst +46 -48
- vendor/twig/twig/doc/internals.rst +1 -1
- vendor/twig/twig/doc/intro.rst +6 -4
- vendor/twig/twig/doc/recipes.rst +1 -51
- vendor/twig/twig/doc/tags/autoescape.rst +12 -0
- vendor/twig/twig/doc/tags/do.rst +1 -1
- vendor/twig/twig/doc/tags/extends.rst +2 -2
- vendor/twig/twig/doc/tags/if.rst +25 -0
- vendor/twig/twig/doc/tags/index.rst +1 -1
- vendor/twig/twig/doc/tags/use.rst +2 -1
- vendor/twig/twig/doc/templates.rst +20 -18
- vendor/twig/twig/doc/tests/sameas.rst +2 -2
- vendor/twig/twig/ext/twig/LICENSE +0 -31
- vendor/twig/twig/ext/twig/php_twig.h +5 -1
- vendor/twig/twig/ext/twig/twig.c +67 -97
- vendor/twig/twig/lib/Twig/Autoloader.php +4 -4
- vendor/twig/twig/lib/Twig/Compiler.php +13 -5
- vendor/twig/twig/lib/Twig/CompilerInterface.php +2 -1
- vendor/twig/twig/lib/Twig/Environment.php +59 -20
- vendor/twig/twig/lib/Twig/Error.php +7 -5
- vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php +3 -2
- vendor/twig/twig/lib/Twig/ExpressionParser.php +21 -4
- vendor/twig/twig/lib/Twig/Extension/Core.php +123 -90
- vendor/twig/twig/lib/Twig/Extension/Escaper.php +4 -0
- vendor/twig/twig/lib/Twig/Extension/Profiler.php +52 -0
- vendor/twig/twig/lib/Twig/Extension/Sandbox.php +1 -1
- vendor/twig/twig/lib/Twig/Extension/StringLoader.php +1 -18
- vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php +49 -0
- vendor/twig/twig/lib/Twig/Lexer.php +0 -2
- vendor/twig/twig/lib/Twig/LexerInterface.php +2 -1
- vendor/twig/twig/lib/Twig/Loader/Array.php +2 -0
- vendor/twig/twig/lib/Twig/Loader/Filesystem.php +21 -10
- vendor/twig/twig/lib/Twig/Loader/String.php +3 -3
- vendor/twig/twig/lib/Twig/LoaderInterface.php +1 -1
- vendor/twig/twig/lib/Twig/Node.php +9 -6
- vendor/twig/twig/lib/Twig/Node/AutoEscape.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Block.php +1 -1
- vendor/twig/twig/lib/Twig/Node/BlockReference.php +1 -1
- vendor/twig/twig/lib/Twig/Node/CheckSecurity.php +78 -0
- vendor/twig/twig/lib/Twig/Node/Do.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Embed.php +5 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Array.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php +5 -5
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php +5 -3
- vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Call.php +43 -11
- vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +22 -12
- vendor/twig/twig/lib/Twig/Node/Expression/Name.php +3 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Parent.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Expression/Unary.php +2 -5
- vendor/twig/twig/lib/Twig/Node/Flush.php +1 -1
- vendor/twig/twig/lib/Twig/Node/For.php +1 -1
- vendor/twig/twig/lib/Twig/Node/ForLoop.php +1 -1
- vendor/twig/twig/lib/Twig/Node/If.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Import.php +6 -2
- vendor/twig/twig/lib/Twig/Node/Include.php +20 -31
- vendor/twig/twig/lib/Twig/Node/Macro.php +3 -3
- vendor/twig/twig/lib/Twig/Node/Module.php +79 -39
- vendor/twig/twig/lib/Twig/Node/Print.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Sandbox.php +1 -1
- vendor/twig/twig/lib/Twig/Node/SandboxedModule.php +0 -60
- vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Set.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Spaceless.php +1 -1
- vendor/twig/twig/lib/Twig/Node/Text.php +1 -1
- vendor/twig/twig/lib/Twig/NodeInterface.php +3 -2
- vendor/twig/twig/lib/Twig/NodeTraverser.php +1 -1
- vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php +23 -2
- vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php +7 -7
- vendor/twig/twig/lib/Twig/NodeVisitorInterface.php +1 -1
- vendor/twig/twig/lib/Twig/ParserInterface.php +2 -1
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php +68 -0
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php +43 -0
- vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php +68 -0
- vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php +40 -0
- vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php +34 -0
- vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php +72 -0
- vendor/twig/twig/lib/Twig/Profiler/Profile.php +150 -0
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php +31 -0
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php +31 -0
- vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php +31 -0
- vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php +3 -3
- vendor/twig/twig/lib/Twig/Template.php +82 -51
- vendor/twig/twig/lib/Twig/TemplateInterface.php +2 -1
- vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php +1 -1
- vendor/twig/twig/lib/Twig/Test/NodeTestCase.php +6 -4
- vendor/twig/twig/lib/Twig/Token.php +10 -10
- vendor/twig/twig/lib/Twig/TokenStream.php +3 -3
- vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php +20 -20
- vendor/twig/twig/test/Twig/Tests/ErrorTest.php +2 -2
- vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php +15 -15
- vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php +18 -0
- vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php +7 -2
- vendor/twig/twig/test/Twig/Tests/FileCachingTest.php +14 -5
- vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php +49 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_trait.test +1 -1
- vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test +1 -1
- vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test +0 -4
- vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test +14 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test +2 -2
- vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test +10 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test +16 -2
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test +2 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test +29 -29
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test +1 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test +1 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test +13 -1
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test +2 -0
- vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test +6 -2
- vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test +3 -1
- vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test +4 -1
- vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test +80 -2
- vendor/twig/twig/test/Twig/Tests/IntegrationTest.php +12 -0
- vendor/twig/twig/test/Twig/Tests/LexerTest.php +6 -11
- vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php +32 -0
- vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php +7 -7
- vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/DoTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php +0 -13
- vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php +37 -2
- vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php +3 -15
- vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php +2 -14
- vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php +3 -15
- vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php +4 -16
- vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php +2 -14
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php +2 -14
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php +1 -14
- vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php +1 -14
- vendor/twig/twig/test/Twig/Tests/Node/ForTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/IfTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php +1 -13
- vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php +5 -18
- vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php +3 -15
- vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php +22 -35
- vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/SetTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/Node/TextTest.php +0 -12
- vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php +15 -5
- vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php +45 -0
- vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/BlackfireTest.php +32 -0
- vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/HtmlTest.php +30 -0
- vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php +30 -0
- vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php +100 -0
- vendor/twig/twig/test/Twig/Tests/TemplateTest.php +7 -5
- vendor/twig/twig/test/Twig/Tests/escapingTest.php +6 -7
- wunderground.php +9 -3
inc/Wunderground.php
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
die(Wunderground_Plugin::$dir_path);
|
3 |
-
|
4 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Request.php';
|
5 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Response.php';
|
6 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Date.php';
|
7 |
-
include_once Wunderground_Plugin::$dir_path.'inc/ForecastDay.php';
|
8 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Current_Observation.php';
|
9 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Station.php';
|
10 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Forecast.php';
|
11 |
-
include_once Wunderground_Plugin::$dir_path.'inc/Alerts.php';
|
12 |
-
|
13 |
-
class KWS_Wunderground {
|
14 |
-
|
15 |
-
var $response;
|
16 |
-
|
17 |
-
var $current_observation;
|
18 |
-
|
19 |
-
var $forecast;
|
20 |
-
|
21 |
-
function __construct( Wunderground_Request $request ) {
|
22 |
-
|
23 |
-
$results = $request->get_results();
|
24 |
-
|
25 |
-
# echo '<pre>';
|
26 |
-
# print_r($results);
|
27 |
-
# echo '</pre>';
|
28 |
-
|
29 |
-
if( !empty( $results->error ) ) {
|
30 |
-
die(print_r($results->error));
|
31 |
-
return NULL;
|
32 |
-
}
|
33 |
-
|
34 |
-
$this->response = new Wunderground_Response( $request );
|
35 |
-
$this->forecast = new Wunderground_Forecast( $request );
|
36 |
-
$this->current_observation = new Wunderground_Current_Observation( $request );
|
37 |
-
$this->alerts = new Wunderground_Alerts( $request );
|
38 |
-
|
39 |
-
Wunderground_Plugin::log_debug( 'Wunderground_Forecast', $this );
|
40 |
-
}
|
41 |
-
|
42 |
-
function getSimpleDay($number) {
|
43 |
-
return $this->simple_forecast->days[$number];
|
44 |
-
}
|
45 |
-
|
46 |
-
function getTextDay($number) {
|
47 |
-
return $this->text_forecast->days[$number];
|
48 |
-
}
|
49 |
-
|
50 |
-
function getCurrent() {
|
51 |
-
return $this->current_observation;
|
52 |
-
}
|
53 |
-
|
54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-alert.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Wunderground_Alert {
|
4 |
+
|
5 |
+
var $type;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Alert title or phrase
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
var $description;
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Date and time in GMT
|
15 |
+
* @var string
|
16 |
+
*/
|
17 |
+
var $date;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Date and time in GMT
|
21 |
+
* @var [type]
|
22 |
+
*/
|
23 |
+
var $date_epoch;
|
24 |
+
var $expires;
|
25 |
+
var $expires_epoch;
|
26 |
+
var $tz_short;
|
27 |
+
var $tz_long;
|
28 |
+
var $message;
|
29 |
+
var $phenomena;
|
30 |
+
var $significance;
|
31 |
+
|
32 |
+
var $ZONES;
|
33 |
+
var $StormBased;
|
34 |
+
|
35 |
+
// European cities only
|
36 |
+
var $wtype_meteoalarm;
|
37 |
+
/**
|
38 |
+
* Title
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
var $wtype_meteoalarm_name;
|
42 |
+
|
43 |
+
var $level_meteoalarm;
|
44 |
+
var $level_meteoalarm_name;
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Full description
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
var $level_meteoalarm_description;
|
51 |
+
|
52 |
+
function __construct( $alert ) {
|
53 |
+
foreach ($alert as $key => $value) {
|
54 |
+
$this->{$key} = $value;
|
55 |
+
}
|
56 |
+
}
|
57 |
+
|
58 |
+
}
|
inc/class-alerts.php
CHANGED
@@ -17,61 +17,3 @@ class Wunderground_Alerts {
|
|
17 |
}
|
18 |
|
19 |
}
|
20 |
-
|
21 |
-
class Wunderground_Alert {
|
22 |
-
|
23 |
-
var $type;
|
24 |
-
|
25 |
-
/**
|
26 |
-
* Alert title or phrase
|
27 |
-
* @var string
|
28 |
-
*/
|
29 |
-
var $description;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Date and time in GMT
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
var $date;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Date and time in GMT
|
39 |
-
* @var [type]
|
40 |
-
*/
|
41 |
-
var $date_epoch;
|
42 |
-
var $expires;
|
43 |
-
var $expires_epoch;
|
44 |
-
var $tz_short;
|
45 |
-
var $tz_long;
|
46 |
-
var $message;
|
47 |
-
var $phenomena;
|
48 |
-
var $significance;
|
49 |
-
|
50 |
-
var $ZONES;
|
51 |
-
var $StormBased;
|
52 |
-
|
53 |
-
// European cities only
|
54 |
-
var $wtype_meteoalarm;
|
55 |
-
/**
|
56 |
-
* Title
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
var $wtype_meteoalarm_name;
|
60 |
-
|
61 |
-
var $level_meteoalarm;
|
62 |
-
var $level_meteoalarm_name;
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Full description
|
66 |
-
* @var string
|
67 |
-
*/
|
68 |
-
var $level_meteoalarm_description;
|
69 |
-
|
70 |
-
function __construct( $alert ) {
|
71 |
-
|
72 |
-
foreach ($alert as $key => $value) {
|
73 |
-
$this->{$key} = $value;
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
}
|
17 |
}
|
18 |
|
19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/class-request.php
CHANGED
@@ -188,7 +188,7 @@ class Wunderground_Request {
|
|
188 |
http://www.wunderground.com/personal-weather-station/dashboard?ID=I75003PA1*/
|
189 |
|
190 |
// If the location is a link, we don't need to turn it...wait for it...into a link.
|
191 |
-
$location_path = preg_match( '/\/q\//ism', $location ) ? $location : '/q/'.
|
192 |
|
193 |
// Combine into one URL
|
194 |
$url = sprintf('%s/%s/v:2.0/%s/%s/%s%s.json', $this->apiUrl, $this->apiKey, $language, $units, $features, $location_path );
|
188 |
http://www.wunderground.com/personal-weather-station/dashboard?ID=I75003PA1*/
|
189 |
|
190 |
// If the location is a link, we don't need to turn it...wait for it...into a link.
|
191 |
+
$location_path = preg_match( '/\/q\//ism', $location ) ? $location : '/q/'.rawurlencode($location);
|
192 |
|
193 |
// Combine into one URL
|
194 |
$url = sprintf('%s/%s/v:2.0/%s/%s/%s%s.json', $this->apiUrl, $this->apiKey, $language, $units, $features, $location_path );
|
inc/class-widget.php
CHANGED
@@ -61,8 +61,8 @@ class Wunderground_Forecast_Widget extends WP_Widget {
|
|
61 |
/**
|
62 |
* Generate and output the widget
|
63 |
*
|
64 |
-
*
|
65 |
-
*
|
66 |
* @param array $args Widget args
|
67 |
* @param array $instance Widget settings
|
68 |
*/
|
@@ -108,6 +108,9 @@ class Wunderground_Forecast_Widget extends WP_Widget {
|
|
108 |
echo $before_title . $title . $after_title;
|
109 |
}
|
110 |
|
|
|
|
|
|
|
111 |
do_action('wunderground_render_template', $instance['layout'], $data );
|
112 |
|
113 |
echo $after_widget;
|
@@ -215,7 +218,7 @@ class Wunderground_Forecast_Widget extends WP_Widget {
|
|
215 |
<img src="%s/clear.gif" alt="" />
|
216 |
</span>
|
217 |
</label>
|
218 |
-
</li>', $name, $this->get_field_name('iconset'), $this->get_field_id('iconset'), $checked, $name, wunderground_get_icon( $name ) );
|
219 |
}
|
220 |
?>
|
221 |
</ul>
|
@@ -267,7 +270,7 @@ class Wunderground_Forecast_Widget extends WP_Widget {
|
|
267 |
),
|
268 |
'alerts' => array(
|
269 |
'label' => __('Weather Alerts & Warnings', 'wunderground'),
|
270 |
-
'description' => __('
|
271 |
),
|
272 |
);
|
273 |
foreach ($boxes as $value => $box) {
|
61 |
/**
|
62 |
* Generate and output the widget
|
63 |
*
|
64 |
+
* @see Wunderground_Template in class-template.php to generate data
|
65 |
+
*
|
66 |
* @param array $args Widget args
|
67 |
* @param array $instance Widget settings
|
68 |
*/
|
108 |
echo $before_title . $title . $after_title;
|
109 |
}
|
110 |
|
111 |
+
/**
|
112 |
+
* @see Wunderground_Template in class-template.php
|
113 |
+
*/
|
114 |
do_action('wunderground_render_template', $instance['layout'], $data );
|
115 |
|
116 |
echo $after_widget;
|
218 |
<img src="%s/clear.gif" alt="" />
|
219 |
</span>
|
220 |
</label>
|
221 |
+
</li>', $name, $this->get_field_name('iconset'), $this->get_field_id('iconset'), $checked, esc_html( $name ), wunderground_get_icon( $name ) );
|
222 |
}
|
223 |
?>
|
224 |
</ul>
|
270 |
),
|
271 |
'alerts' => array(
|
272 |
'label' => __('Weather Alerts & Warnings', 'wunderground'),
|
273 |
+
'description' => __('Display Severe Weather alerts and warnings.', 'wunderground'),
|
274 |
),
|
275 |
);
|
276 |
foreach ($boxes as $value => $box) {
|
inc/functions.php
CHANGED
@@ -128,7 +128,7 @@ function wunderground_get_icon( $icon = 'Incredible' ) {
|
|
128 |
$icons = wunderground_get_icons();
|
129 |
$output = false;
|
130 |
|
131 |
-
$icon_formatted =
|
132 |
|
133 |
if( isset( $icons[ $icon_formatted ] ) ) {
|
134 |
$output = plugins_url( sprintf('assets/img/icons/%s', $icons[ $icon_formatted ]), Wunderground_Plugin::$file );
|
128 |
$icons = wunderground_get_icons();
|
129 |
$output = false;
|
130 |
|
131 |
+
$icon_formatted = ucwords( strtolower( $icon ) );
|
132 |
|
133 |
if( isset( $icons[ $icon_formatted ] ) ) {
|
134 |
$output = plugins_url( sprintf('assets/img/icons/%s', $icons[ $icon_formatted ]), Wunderground_Plugin::$file );
|
languages/wunderground-ach.mo
ADDED
Binary file
|
languages/wunderground-ach.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Acoli (http://www.transifex.com/projects/p/wunderground/language/ach/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: ach\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-bs_BA.mo
ADDED
Binary file
|
languages/wunderground-bs_BA.po
ADDED
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
# Marko Saraba <marko.saraba@gmail.com>, 2014
|
4 |
+
msgid ""
|
5 |
+
msgstr ""
|
6 |
+
"Project-Id-Version: Wunderground\n"
|
7 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
8 |
+
"PO-Revision-Date: 2014-12-31 19:41+0000\n"
|
9 |
+
"Last-Translator: Marko Saraba <marko.saraba@gmail.com>\n"
|
10 |
+
"Language-Team: Bosnian (Bosnia and Herzegovina) (http://www.transifex.com/projects/p/wunderground/language/bs_BA/)\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"Language: bs_BA\n"
|
15 |
+
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
16 |
+
"X-Generator: Poedit 1.7beta3\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
+
|
22 |
+
#: inc/class-template.php:67
|
23 |
+
#, php-format
|
24 |
+
msgid "Statement as of %s"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: inc/class-template.php:68
|
28 |
+
msgid "The location could not be found."
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: inc/class-template.php:69
|
32 |
+
#, php-format
|
33 |
+
msgid "%s%%"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: inc/class-template.php:70
|
37 |
+
#, php-format
|
38 |
+
msgid "%s%% Chance of Precipitation"
|
39 |
+
msgstr ""
|
40 |
+
|
41 |
+
#: inc/class-template.php:71
|
42 |
+
msgid "Currently"
|
43 |
+
msgstr "Trenutno"
|
44 |
+
|
45 |
+
#: inc/class-template.php:72
|
46 |
+
#, php-format
|
47 |
+
msgid "High %d°"
|
48 |
+
msgstr "Max %d°"
|
49 |
+
|
50 |
+
#: inc/class-template.php:73
|
51 |
+
#, php-format
|
52 |
+
msgid "Low %d°"
|
53 |
+
msgstr "Min %d°"
|
54 |
+
|
55 |
+
#: inc/class-template.php:74
|
56 |
+
#, php-format
|
57 |
+
msgid "%d°"
|
58 |
+
msgstr "%d°"
|
59 |
+
|
60 |
+
#: inc/class-template.php:75
|
61 |
+
#, php-format
|
62 |
+
msgid "View the %s forecast on Wunderground.com"
|
63 |
+
msgstr "Pogledajte %s prognozu na Wunderground.com"
|
64 |
+
|
65 |
+
#: inc/class-template.php:76
|
66 |
+
msgctxt "Weather alert issued date/time"
|
67 |
+
msgid "Issued:"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: inc/class-template.php:77
|
71 |
+
msgctxt "Weather alert expires date/time"
|
72 |
+
msgid "Expires:"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: inc/class-template.php:149
|
76 |
+
msgid "Current Conditions"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: inc/class-template.php:150
|
80 |
+
msgid "Simple display of the current conditions."
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: inc/class-template.php:155
|
84 |
+
msgid "Grid Forecast"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: inc/class-template.php:156
|
88 |
+
msgid "Scales to any screen size."
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: inc/class-template.php:161
|
92 |
+
msgid "Details Table"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: inc/class-template.php:162
|
96 |
+
msgid ""
|
97 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
98 |
+
"display."
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: inc/class-template.php:167
|
102 |
+
msgid "Horizontal Table"
|
103 |
+
msgstr ""
|
104 |
+
|
105 |
+
#: inc/class-template.php:168
|
106 |
+
msgid ""
|
107 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: inc/class-widget.php:43
|
111 |
+
msgid "Add a Wunderground.com forecast"
|
112 |
+
msgstr ""
|
113 |
+
|
114 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
115 |
+
msgid "Wunderground"
|
116 |
+
msgstr ""
|
117 |
+
|
118 |
+
#: inc/class-widget.php:152
|
119 |
+
msgid "Title"
|
120 |
+
msgstr ""
|
121 |
+
|
122 |
+
#: inc/class-widget.php:153
|
123 |
+
msgid "Leave empty to hide the widget title."
|
124 |
+
msgstr ""
|
125 |
+
|
126 |
+
#: inc/class-widget.php:159
|
127 |
+
msgid "Location"
|
128 |
+
msgstr ""
|
129 |
+
|
130 |
+
#: inc/class-widget.php:160
|
131 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
132 |
+
msgstr ""
|
133 |
+
|
134 |
+
#: inc/class-widget.php:161
|
135 |
+
msgid "Enter the name of a location."
|
136 |
+
msgstr ""
|
137 |
+
|
138 |
+
#: inc/class-widget.php:168
|
139 |
+
msgid "Location Title"
|
140 |
+
msgstr ""
|
141 |
+
|
142 |
+
#: inc/class-widget.php:169
|
143 |
+
msgid "Change how the location is displayed in the widget search field."
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: inc/class-widget.php:170
|
147 |
+
msgid "Leave empty to use the location name."
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: inc/class-widget.php:171
|
151 |
+
msgid ""
|
152 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
153 |
+
"set the Location Title as \"Denver\", which is simpler."
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: inc/class-widget.php:180
|
157 |
+
msgid "# of Days in Forecast"
|
158 |
+
msgstr ""
|
159 |
+
|
160 |
+
#: inc/class-widget.php:186
|
161 |
+
msgid "Include Current Conditions"
|
162 |
+
msgstr ""
|
163 |
+
|
164 |
+
#: inc/class-widget.php:187
|
165 |
+
msgid "Add the current conditions to the forecast."
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: inc/class-widget.php:193
|
169 |
+
msgid "Include Night Forecasts"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: inc/class-widget.php:194
|
173 |
+
msgid "This will result in double the number of forecasts shown."
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: inc/class-widget.php:200
|
177 |
+
msgid "Icon Set"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: inc/class-widget.php:201
|
181 |
+
msgid ""
|
182 |
+
"Choose the look and feel of the images that will represent the weather."
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: inc/class-widget.php:229
|
186 |
+
msgid "Widget Template"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: inc/class-widget.php:230
|
190 |
+
msgid "Choose how you would like to display the forecast."
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: inc/class-widget.php:235
|
194 |
+
msgid "Show in Forecast"
|
195 |
+
msgstr ""
|
196 |
+
|
197 |
+
#: inc/class-widget.php:240
|
198 |
+
msgid "Search Form"
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: inc/class-widget.php:241
|
202 |
+
msgid "Allow searching weather forecasts."
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: inc/class-widget.php:244
|
206 |
+
msgid "Weekday Labels"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: inc/class-widget.php:245
|
210 |
+
msgid "Show the names of the days of the week."
|
211 |
+
msgstr ""
|
212 |
+
|
213 |
+
#: inc/class-widget.php:248
|
214 |
+
msgid "Date"
|
215 |
+
msgstr ""
|
216 |
+
|
217 |
+
#: inc/class-widget.php:249
|
218 |
+
msgid "Display the date numerically (\"09/14\")."
|
219 |
+
msgstr ""
|
220 |
+
|
221 |
+
#: inc/class-widget.php:252
|
222 |
+
msgid "Weather Icon"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: inc/class-widget.php:253
|
226 |
+
msgid "Icon representing the forecast conditions."
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: inc/class-widget.php:256
|
230 |
+
msgid "Chance of Rain"
|
231 |
+
msgstr ""
|
232 |
+
|
233 |
+
#: inc/class-widget.php:257
|
234 |
+
msgid "Display the percent chance of rain."
|
235 |
+
msgstr ""
|
236 |
+
|
237 |
+
#: inc/class-widget.php:260
|
238 |
+
msgid "High & Low Temp"
|
239 |
+
msgstr ""
|
240 |
+
|
241 |
+
#: inc/class-widget.php:261
|
242 |
+
msgid "Show the high & low temperatures for forecast."
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: inc/class-widget.php:264
|
246 |
+
msgid "Condition Title"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: inc/class-widget.php:265
|
250 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: inc/class-widget.php:268
|
254 |
+
msgid "Forecast Text"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: inc/class-widget.php:269
|
258 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: inc/class-widget.php:272
|
262 |
+
msgid "Weather Alerts & Warnings"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: inc/class-widget.php:273
|
266 |
+
msgid ""
|
267 |
+
"This functionality is currently not working; we are working with "
|
268 |
+
"Wunderground.com to restore it."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: inc/class-widget.php:289
|
272 |
+
msgid "Forecast Language"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: inc/class-widget.php:300
|
276 |
+
msgid "Measurements"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: inc/class-widget.php:303
|
280 |
+
msgid "Fahrenheit & Inches"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: inc/class-widget.php:306
|
284 |
+
msgid "Celsius & Meters"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: inc/functions.php:44
|
288 |
+
msgid "Weather Forecast"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: inc/functions.php:161 inc/functions.php:178
|
292 |
+
msgid "Incredible"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: inc/functions.php:162 inc/functions.php:177
|
296 |
+
msgid "Elemental"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: inc/functions.php:163 inc/functions.php:179
|
300 |
+
msgid "Helen"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: inc/functions.php:164 inc/functions.php:181
|
304 |
+
msgid "Default"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: inc/functions.php:165 inc/functions.php:182
|
308 |
+
msgid "Smiley"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: inc/functions.php:166 inc/functions.php:183
|
312 |
+
msgid "Generic"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: inc/functions.php:167 inc/functions.php:184
|
316 |
+
msgid "Old School"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: inc/functions.php:168 inc/functions.php:185
|
320 |
+
msgid "Cartoon"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: inc/functions.php:169 inc/functions.php:186
|
324 |
+
msgid "Mobile"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: inc/functions.php:170 inc/functions.php:187
|
328 |
+
msgid "Simple"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: inc/functions.php:171 inc/functions.php:188
|
332 |
+
msgid "Contemporary"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: inc/functions.php:363
|
336 |
+
msgid "Afrikaans"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: inc/functions.php:368
|
340 |
+
msgid "Albanian"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: inc/functions.php:373
|
344 |
+
msgid "Arabic"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: inc/functions.php:379
|
348 |
+
msgid "Armenian"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: inc/functions.php:384
|
352 |
+
msgid "Azerbaijani"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: inc/functions.php:389
|
356 |
+
msgid "Basque"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: inc/functions.php:394
|
360 |
+
msgid "Belarusian"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: inc/functions.php:399
|
364 |
+
msgid "Bulgarian"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: inc/functions.php:404
|
368 |
+
msgid "British English"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: inc/functions.php:409
|
372 |
+
msgid "Burmese"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: inc/functions.php:414
|
376 |
+
msgid "Catalan"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: inc/functions.php:419
|
380 |
+
msgid "Chinese - Simplified"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: inc/functions.php:424
|
384 |
+
msgid "Chinese - Traditional"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: inc/functions.php:429
|
388 |
+
msgid "Croatian"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: inc/functions.php:434
|
392 |
+
msgid "Czech"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: inc/functions.php:439
|
396 |
+
msgid "Danish"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: inc/functions.php:444
|
400 |
+
msgid "Dhivehi"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: inc/functions.php:450
|
404 |
+
msgid "Dutch"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: inc/functions.php:455
|
408 |
+
msgid "English"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: inc/functions.php:460
|
412 |
+
msgid "Esperanto"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: inc/functions.php:465
|
416 |
+
msgid "Estonian"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: inc/functions.php:470
|
420 |
+
msgid "Farsi"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: inc/functions.php:475
|
424 |
+
msgid "Finnish"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: inc/functions.php:480
|
428 |
+
msgid "French"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: inc/functions.php:485
|
432 |
+
msgid "French Canadian"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: inc/functions.php:490
|
436 |
+
msgid "Galician"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: inc/functions.php:495
|
440 |
+
msgid "German"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: inc/functions.php:500
|
444 |
+
msgid "Georgian"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: inc/functions.php:505
|
448 |
+
msgid "Greek"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: inc/functions.php:510
|
452 |
+
msgid "Gujarati"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: inc/functions.php:515
|
456 |
+
msgid "Haitian Creole"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: inc/functions.php:520
|
460 |
+
msgid "Hebrew"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: inc/functions.php:526
|
464 |
+
msgid "Hindi"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: inc/functions.php:531
|
468 |
+
msgid "Hungarian"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: inc/functions.php:536
|
472 |
+
msgid "Icelandic"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: inc/functions.php:541
|
476 |
+
msgid "Ido"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: inc/functions.php:546
|
480 |
+
msgid "Indonesian"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: inc/functions.php:551
|
484 |
+
msgid "Irish Gaelic"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: inc/functions.php:556
|
488 |
+
msgid "Italian"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: inc/functions.php:561
|
492 |
+
msgid "Japanese"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: inc/functions.php:566
|
496 |
+
msgid "Javanese"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: inc/functions.php:571
|
500 |
+
msgid "Khmer"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: inc/functions.php:576
|
504 |
+
msgid "Korean"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: inc/functions.php:581
|
508 |
+
msgid "Kurdish"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: inc/functions.php:587
|
512 |
+
msgid "Latin"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: inc/functions.php:592
|
516 |
+
msgid "Latvian"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: inc/functions.php:597
|
520 |
+
msgid "Lithuanian"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: inc/functions.php:602
|
524 |
+
msgid "Low German"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: inc/functions.php:607
|
528 |
+
msgid "Macedonian"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: inc/functions.php:612
|
532 |
+
msgid "Maltese"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: inc/functions.php:617
|
536 |
+
msgid "Mandinka"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: inc/functions.php:622
|
540 |
+
msgid "Maori"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: inc/functions.php:627
|
544 |
+
msgid "Marathi"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: inc/functions.php:632
|
548 |
+
msgid "Mongolian"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: inc/functions.php:637
|
552 |
+
msgid "Norwegian"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: inc/functions.php:642
|
556 |
+
msgid "Occitan"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: inc/functions.php:647
|
560 |
+
msgid "Pashto"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: inc/functions.php:653
|
564 |
+
msgid "Plautdietsch"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: inc/functions.php:658
|
568 |
+
msgid "Polish"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: inc/functions.php:663
|
572 |
+
msgid "Portuguese"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: inc/functions.php:668
|
576 |
+
msgid "Punjabi"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: inc/functions.php:674
|
580 |
+
msgid "Romanian"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: inc/functions.php:679
|
584 |
+
msgid "Russian"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: inc/functions.php:684
|
588 |
+
msgid "Serbian"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: inc/functions.php:689
|
592 |
+
msgid "Slovak"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: inc/functions.php:694
|
596 |
+
msgid "Slovenian"
|
597 |
+
msgstr ""
|
598 |
+
|
599 |
+
#: inc/functions.php:699
|
600 |
+
msgid "Spanish"
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: inc/functions.php:704
|
604 |
+
msgid "Swahili"
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: inc/functions.php:709
|
608 |
+
msgid "Swedish"
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: inc/functions.php:714
|
612 |
+
msgid "Swiss"
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: inc/functions.php:719
|
616 |
+
msgid "Tagalog"
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: inc/functions.php:724
|
620 |
+
msgid "Tatarish"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: inc/functions.php:729
|
624 |
+
msgid "Thai"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: inc/functions.php:734
|
628 |
+
msgid "Turkish"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: inc/functions.php:739
|
632 |
+
msgid "Turkmen"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: inc/functions.php:744
|
636 |
+
msgid "Ukrainian"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: inc/functions.php:749
|
640 |
+
msgid "Uzbek"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: inc/functions.php:754
|
644 |
+
msgid "Vietnamese"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: inc/functions.php:759
|
648 |
+
msgid "Welsh"
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: inc/functions.php:764
|
652 |
+
msgid "Wolof"
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: inc/functions.php:769
|
656 |
+
msgid "Yiddish - transliterated"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: inc/functions.php:774
|
660 |
+
msgid "Yiddish - unicode"
|
661 |
+
msgstr ""
|
languages/wunderground-ca.mo
ADDED
Binary file
|
languages/wunderground-ca.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Catalan (http://www.transifex.com/projects/p/wunderground/language/ca/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: ca\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-fa.mo
ADDED
Binary file
|
languages/wunderground-fa.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Persian (http://www.transifex.com/projects/p/wunderground/language/fa/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: fa\n"
|
14 |
+
"Plural-Forms: nplurals=1; plural=0;\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-fr.mo
ADDED
Binary file
|
languages/wunderground-fr.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: French (http://www.transifex.com/projects/p/wunderground/language/fr/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: fr\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-is.mo
ADDED
Binary file
|
languages/wunderground-is.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Icelandic (http://www.transifex.com/projects/p/wunderground/language/is/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: is\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-nb_NO.mo
ADDED
Binary file
|
languages/wunderground-nb_NO.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/projects/p/wunderground/language/nb_NO/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: nb_NO\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-pl_PL.mo
ADDED
Binary file
|
languages/wunderground-pl_PL.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Polish (Poland) (http://www.transifex.com/projects/p/wunderground/language/pl_PL/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: pl_PL\n"
|
14 |
+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-sl.mo
ADDED
Binary file
|
languages/wunderground-sl.po
ADDED
@@ -0,0 +1,660 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Wunderground\n"
|
6 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
7 |
+
"PO-Revision-Date: 2014-06-06 15:48+0000\n"
|
8 |
+
"Last-Translator: Katz Web Services, Inc. <support@katz.co>\n"
|
9 |
+
"Language-Team: Slovenian (http://www.transifex.com/projects/p/wunderground/language/sl/)\n"
|
10 |
+
"MIME-Version: 1.0\n"
|
11 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
+
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"Language: sl\n"
|
14 |
+
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
15 |
+
"X-Generator: Poedit 1.7beta3\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
18 |
+
"X-Poedit-SearchPath-0: .\n"
|
19 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
20 |
+
|
21 |
+
#: inc/class-template.php:67
|
22 |
+
#, php-format
|
23 |
+
msgid "Statement as of %s"
|
24 |
+
msgstr ""
|
25 |
+
|
26 |
+
#: inc/class-template.php:68
|
27 |
+
msgid "The location could not be found."
|
28 |
+
msgstr ""
|
29 |
+
|
30 |
+
#: inc/class-template.php:69
|
31 |
+
#, php-format
|
32 |
+
msgid "%s%%"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: inc/class-template.php:70
|
36 |
+
#, php-format
|
37 |
+
msgid "%s%% Chance of Precipitation"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: inc/class-template.php:71
|
41 |
+
msgid "Currently"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: inc/class-template.php:72
|
45 |
+
#, php-format
|
46 |
+
msgid "High %d°"
|
47 |
+
msgstr ""
|
48 |
+
|
49 |
+
#: inc/class-template.php:73
|
50 |
+
#, php-format
|
51 |
+
msgid "Low %d°"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: inc/class-template.php:74
|
55 |
+
#, php-format
|
56 |
+
msgid "%d°"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: inc/class-template.php:75
|
60 |
+
#, php-format
|
61 |
+
msgid "View the %s forecast on Wunderground.com"
|
62 |
+
msgstr ""
|
63 |
+
|
64 |
+
#: inc/class-template.php:76
|
65 |
+
msgctxt "Weather alert issued date/time"
|
66 |
+
msgid "Issued:"
|
67 |
+
msgstr ""
|
68 |
+
|
69 |
+
#: inc/class-template.php:77
|
70 |
+
msgctxt "Weather alert expires date/time"
|
71 |
+
msgid "Expires:"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: inc/class-template.php:149
|
75 |
+
msgid "Current Conditions"
|
76 |
+
msgstr ""
|
77 |
+
|
78 |
+
#: inc/class-template.php:150
|
79 |
+
msgid "Simple display of the current conditions."
|
80 |
+
msgstr ""
|
81 |
+
|
82 |
+
#: inc/class-template.php:155
|
83 |
+
msgid "Grid Forecast"
|
84 |
+
msgstr ""
|
85 |
+
|
86 |
+
#: inc/class-template.php:156
|
87 |
+
msgid "Scales to any screen size."
|
88 |
+
msgstr ""
|
89 |
+
|
90 |
+
#: inc/class-template.php:161
|
91 |
+
msgid "Details Table"
|
92 |
+
msgstr ""
|
93 |
+
|
94 |
+
#: inc/class-template.php:162
|
95 |
+
msgid ""
|
96 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
97 |
+
"display."
|
98 |
+
msgstr ""
|
99 |
+
|
100 |
+
#: inc/class-template.php:167
|
101 |
+
msgid "Horizontal Table"
|
102 |
+
msgstr ""
|
103 |
+
|
104 |
+
#: inc/class-template.php:168
|
105 |
+
msgid ""
|
106 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
107 |
+
msgstr ""
|
108 |
+
|
109 |
+
#: inc/class-widget.php:43
|
110 |
+
msgid "Add a Wunderground.com forecast"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
114 |
+
msgid "Wunderground"
|
115 |
+
msgstr ""
|
116 |
+
|
117 |
+
#: inc/class-widget.php:152
|
118 |
+
msgid "Title"
|
119 |
+
msgstr ""
|
120 |
+
|
121 |
+
#: inc/class-widget.php:153
|
122 |
+
msgid "Leave empty to hide the widget title."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: inc/class-widget.php:159
|
126 |
+
msgid "Location"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: inc/class-widget.php:160
|
130 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: inc/class-widget.php:161
|
134 |
+
msgid "Enter the name of a location."
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: inc/class-widget.php:168
|
138 |
+
msgid "Location Title"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: inc/class-widget.php:169
|
142 |
+
msgid "Change how the location is displayed in the widget search field."
|
143 |
+
msgstr ""
|
144 |
+
|
145 |
+
#: inc/class-widget.php:170
|
146 |
+
msgid "Leave empty to use the location name."
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: inc/class-widget.php:171
|
150 |
+
msgid ""
|
151 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
152 |
+
"set the Location Title as \"Denver\", which is simpler."
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: inc/class-widget.php:180
|
156 |
+
msgid "# of Days in Forecast"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: inc/class-widget.php:186
|
160 |
+
msgid "Include Current Conditions"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: inc/class-widget.php:187
|
164 |
+
msgid "Add the current conditions to the forecast."
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: inc/class-widget.php:193
|
168 |
+
msgid "Include Night Forecasts"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: inc/class-widget.php:194
|
172 |
+
msgid "This will result in double the number of forecasts shown."
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: inc/class-widget.php:200
|
176 |
+
msgid "Icon Set"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: inc/class-widget.php:201
|
180 |
+
msgid ""
|
181 |
+
"Choose the look and feel of the images that will represent the weather."
|
182 |
+
msgstr ""
|
183 |
+
|
184 |
+
#: inc/class-widget.php:229
|
185 |
+
msgid "Widget Template"
|
186 |
+
msgstr ""
|
187 |
+
|
188 |
+
#: inc/class-widget.php:230
|
189 |
+
msgid "Choose how you would like to display the forecast."
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: inc/class-widget.php:235
|
193 |
+
msgid "Show in Forecast"
|
194 |
+
msgstr ""
|
195 |
+
|
196 |
+
#: inc/class-widget.php:240
|
197 |
+
msgid "Search Form"
|
198 |
+
msgstr ""
|
199 |
+
|
200 |
+
#: inc/class-widget.php:241
|
201 |
+
msgid "Allow searching weather forecasts."
|
202 |
+
msgstr ""
|
203 |
+
|
204 |
+
#: inc/class-widget.php:244
|
205 |
+
msgid "Weekday Labels"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: inc/class-widget.php:245
|
209 |
+
msgid "Show the names of the days of the week."
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: inc/class-widget.php:248
|
213 |
+
msgid "Date"
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: inc/class-widget.php:249
|
217 |
+
msgid "Display the date numerically (\"09/14\")."
|
218 |
+
msgstr ""
|
219 |
+
|
220 |
+
#: inc/class-widget.php:252
|
221 |
+
msgid "Weather Icon"
|
222 |
+
msgstr ""
|
223 |
+
|
224 |
+
#: inc/class-widget.php:253
|
225 |
+
msgid "Icon representing the forecast conditions."
|
226 |
+
msgstr ""
|
227 |
+
|
228 |
+
#: inc/class-widget.php:256
|
229 |
+
msgid "Chance of Rain"
|
230 |
+
msgstr ""
|
231 |
+
|
232 |
+
#: inc/class-widget.php:257
|
233 |
+
msgid "Display the percent chance of rain."
|
234 |
+
msgstr ""
|
235 |
+
|
236 |
+
#: inc/class-widget.php:260
|
237 |
+
msgid "High & Low Temp"
|
238 |
+
msgstr ""
|
239 |
+
|
240 |
+
#: inc/class-widget.php:261
|
241 |
+
msgid "Show the high & low temperatures for forecast."
|
242 |
+
msgstr ""
|
243 |
+
|
244 |
+
#: inc/class-widget.php:264
|
245 |
+
msgid "Condition Title"
|
246 |
+
msgstr ""
|
247 |
+
|
248 |
+
#: inc/class-widget.php:265
|
249 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
250 |
+
msgstr ""
|
251 |
+
|
252 |
+
#: inc/class-widget.php:268
|
253 |
+
msgid "Forecast Text"
|
254 |
+
msgstr ""
|
255 |
+
|
256 |
+
#: inc/class-widget.php:269
|
257 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#: inc/class-widget.php:272
|
261 |
+
msgid "Weather Alerts & Warnings"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#: inc/class-widget.php:273
|
265 |
+
msgid ""
|
266 |
+
"This functionality is currently not working; we are working with "
|
267 |
+
"Wunderground.com to restore it."
|
268 |
+
msgstr ""
|
269 |
+
|
270 |
+
#: inc/class-widget.php:289
|
271 |
+
msgid "Forecast Language"
|
272 |
+
msgstr ""
|
273 |
+
|
274 |
+
#: inc/class-widget.php:300
|
275 |
+
msgid "Measurements"
|
276 |
+
msgstr ""
|
277 |
+
|
278 |
+
#: inc/class-widget.php:303
|
279 |
+
msgid "Fahrenheit & Inches"
|
280 |
+
msgstr ""
|
281 |
+
|
282 |
+
#: inc/class-widget.php:306
|
283 |
+
msgid "Celsius & Meters"
|
284 |
+
msgstr ""
|
285 |
+
|
286 |
+
#: inc/functions.php:44
|
287 |
+
msgid "Weather Forecast"
|
288 |
+
msgstr ""
|
289 |
+
|
290 |
+
#: inc/functions.php:161 inc/functions.php:178
|
291 |
+
msgid "Incredible"
|
292 |
+
msgstr ""
|
293 |
+
|
294 |
+
#: inc/functions.php:162 inc/functions.php:177
|
295 |
+
msgid "Elemental"
|
296 |
+
msgstr ""
|
297 |
+
|
298 |
+
#: inc/functions.php:163 inc/functions.php:179
|
299 |
+
msgid "Helen"
|
300 |
+
msgstr ""
|
301 |
+
|
302 |
+
#: inc/functions.php:164 inc/functions.php:181
|
303 |
+
msgid "Default"
|
304 |
+
msgstr ""
|
305 |
+
|
306 |
+
#: inc/functions.php:165 inc/functions.php:182
|
307 |
+
msgid "Smiley"
|
308 |
+
msgstr ""
|
309 |
+
|
310 |
+
#: inc/functions.php:166 inc/functions.php:183
|
311 |
+
msgid "Generic"
|
312 |
+
msgstr ""
|
313 |
+
|
314 |
+
#: inc/functions.php:167 inc/functions.php:184
|
315 |
+
msgid "Old School"
|
316 |
+
msgstr ""
|
317 |
+
|
318 |
+
#: inc/functions.php:168 inc/functions.php:185
|
319 |
+
msgid "Cartoon"
|
320 |
+
msgstr ""
|
321 |
+
|
322 |
+
#: inc/functions.php:169 inc/functions.php:186
|
323 |
+
msgid "Mobile"
|
324 |
+
msgstr ""
|
325 |
+
|
326 |
+
#: inc/functions.php:170 inc/functions.php:187
|
327 |
+
msgid "Simple"
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: inc/functions.php:171 inc/functions.php:188
|
331 |
+
msgid "Contemporary"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: inc/functions.php:363
|
335 |
+
msgid "Afrikaans"
|
336 |
+
msgstr ""
|
337 |
+
|
338 |
+
#: inc/functions.php:368
|
339 |
+
msgid "Albanian"
|
340 |
+
msgstr ""
|
341 |
+
|
342 |
+
#: inc/functions.php:373
|
343 |
+
msgid "Arabic"
|
344 |
+
msgstr ""
|
345 |
+
|
346 |
+
#: inc/functions.php:379
|
347 |
+
msgid "Armenian"
|
348 |
+
msgstr ""
|
349 |
+
|
350 |
+
#: inc/functions.php:384
|
351 |
+
msgid "Azerbaijani"
|
352 |
+
msgstr ""
|
353 |
+
|
354 |
+
#: inc/functions.php:389
|
355 |
+
msgid "Basque"
|
356 |
+
msgstr ""
|
357 |
+
|
358 |
+
#: inc/functions.php:394
|
359 |
+
msgid "Belarusian"
|
360 |
+
msgstr ""
|
361 |
+
|
362 |
+
#: inc/functions.php:399
|
363 |
+
msgid "Bulgarian"
|
364 |
+
msgstr ""
|
365 |
+
|
366 |
+
#: inc/functions.php:404
|
367 |
+
msgid "British English"
|
368 |
+
msgstr ""
|
369 |
+
|
370 |
+
#: inc/functions.php:409
|
371 |
+
msgid "Burmese"
|
372 |
+
msgstr ""
|
373 |
+
|
374 |
+
#: inc/functions.php:414
|
375 |
+
msgid "Catalan"
|
376 |
+
msgstr ""
|
377 |
+
|
378 |
+
#: inc/functions.php:419
|
379 |
+
msgid "Chinese - Simplified"
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: inc/functions.php:424
|
383 |
+
msgid "Chinese - Traditional"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: inc/functions.php:429
|
387 |
+
msgid "Croatian"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: inc/functions.php:434
|
391 |
+
msgid "Czech"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: inc/functions.php:439
|
395 |
+
msgid "Danish"
|
396 |
+
msgstr ""
|
397 |
+
|
398 |
+
#: inc/functions.php:444
|
399 |
+
msgid "Dhivehi"
|
400 |
+
msgstr ""
|
401 |
+
|
402 |
+
#: inc/functions.php:450
|
403 |
+
msgid "Dutch"
|
404 |
+
msgstr ""
|
405 |
+
|
406 |
+
#: inc/functions.php:455
|
407 |
+
msgid "English"
|
408 |
+
msgstr ""
|
409 |
+
|
410 |
+
#: inc/functions.php:460
|
411 |
+
msgid "Esperanto"
|
412 |
+
msgstr ""
|
413 |
+
|
414 |
+
#: inc/functions.php:465
|
415 |
+
msgid "Estonian"
|
416 |
+
msgstr ""
|
417 |
+
|
418 |
+
#: inc/functions.php:470
|
419 |
+
msgid "Farsi"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: inc/functions.php:475
|
423 |
+
msgid "Finnish"
|
424 |
+
msgstr ""
|
425 |
+
|
426 |
+
#: inc/functions.php:480
|
427 |
+
msgid "French"
|
428 |
+
msgstr ""
|
429 |
+
|
430 |
+
#: inc/functions.php:485
|
431 |
+
msgid "French Canadian"
|
432 |
+
msgstr ""
|
433 |
+
|
434 |
+
#: inc/functions.php:490
|
435 |
+
msgid "Galician"
|
436 |
+
msgstr ""
|
437 |
+
|
438 |
+
#: inc/functions.php:495
|
439 |
+
msgid "German"
|
440 |
+
msgstr ""
|
441 |
+
|
442 |
+
#: inc/functions.php:500
|
443 |
+
msgid "Georgian"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: inc/functions.php:505
|
447 |
+
msgid "Greek"
|
448 |
+
msgstr ""
|
449 |
+
|
450 |
+
#: inc/functions.php:510
|
451 |
+
msgid "Gujarati"
|
452 |
+
msgstr ""
|
453 |
+
|
454 |
+
#: inc/functions.php:515
|
455 |
+
msgid "Haitian Creole"
|
456 |
+
msgstr ""
|
457 |
+
|
458 |
+
#: inc/functions.php:520
|
459 |
+
msgid "Hebrew"
|
460 |
+
msgstr ""
|
461 |
+
|
462 |
+
#: inc/functions.php:526
|
463 |
+
msgid "Hindi"
|
464 |
+
msgstr ""
|
465 |
+
|
466 |
+
#: inc/functions.php:531
|
467 |
+
msgid "Hungarian"
|
468 |
+
msgstr ""
|
469 |
+
|
470 |
+
#: inc/functions.php:536
|
471 |
+
msgid "Icelandic"
|
472 |
+
msgstr ""
|
473 |
+
|
474 |
+
#: inc/functions.php:541
|
475 |
+
msgid "Ido"
|
476 |
+
msgstr ""
|
477 |
+
|
478 |
+
#: inc/functions.php:546
|
479 |
+
msgid "Indonesian"
|
480 |
+
msgstr ""
|
481 |
+
|
482 |
+
#: inc/functions.php:551
|
483 |
+
msgid "Irish Gaelic"
|
484 |
+
msgstr ""
|
485 |
+
|
486 |
+
#: inc/functions.php:556
|
487 |
+
msgid "Italian"
|
488 |
+
msgstr ""
|
489 |
+
|
490 |
+
#: inc/functions.php:561
|
491 |
+
msgid "Japanese"
|
492 |
+
msgstr ""
|
493 |
+
|
494 |
+
#: inc/functions.php:566
|
495 |
+
msgid "Javanese"
|
496 |
+
msgstr ""
|
497 |
+
|
498 |
+
#: inc/functions.php:571
|
499 |
+
msgid "Khmer"
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: inc/functions.php:576
|
503 |
+
msgid "Korean"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: inc/functions.php:581
|
507 |
+
msgid "Kurdish"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: inc/functions.php:587
|
511 |
+
msgid "Latin"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: inc/functions.php:592
|
515 |
+
msgid "Latvian"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: inc/functions.php:597
|
519 |
+
msgid "Lithuanian"
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: inc/functions.php:602
|
523 |
+
msgid "Low German"
|
524 |
+
msgstr ""
|
525 |
+
|
526 |
+
#: inc/functions.php:607
|
527 |
+
msgid "Macedonian"
|
528 |
+
msgstr ""
|
529 |
+
|
530 |
+
#: inc/functions.php:612
|
531 |
+
msgid "Maltese"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: inc/functions.php:617
|
535 |
+
msgid "Mandinka"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: inc/functions.php:622
|
539 |
+
msgid "Maori"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: inc/functions.php:627
|
543 |
+
msgid "Marathi"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: inc/functions.php:632
|
547 |
+
msgid "Mongolian"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: inc/functions.php:637
|
551 |
+
msgid "Norwegian"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: inc/functions.php:642
|
555 |
+
msgid "Occitan"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: inc/functions.php:647
|
559 |
+
msgid "Pashto"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: inc/functions.php:653
|
563 |
+
msgid "Plautdietsch"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: inc/functions.php:658
|
567 |
+
msgid "Polish"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: inc/functions.php:663
|
571 |
+
msgid "Portuguese"
|
572 |
+
msgstr ""
|
573 |
+
|
574 |
+
#: inc/functions.php:668
|
575 |
+
msgid "Punjabi"
|
576 |
+
msgstr ""
|
577 |
+
|
578 |
+
#: inc/functions.php:674
|
579 |
+
msgid "Romanian"
|
580 |
+
msgstr ""
|
581 |
+
|
582 |
+
#: inc/functions.php:679
|
583 |
+
msgid "Russian"
|
584 |
+
msgstr ""
|
585 |
+
|
586 |
+
#: inc/functions.php:684
|
587 |
+
msgid "Serbian"
|
588 |
+
msgstr ""
|
589 |
+
|
590 |
+
#: inc/functions.php:689
|
591 |
+
msgid "Slovak"
|
592 |
+
msgstr ""
|
593 |
+
|
594 |
+
#: inc/functions.php:694
|
595 |
+
msgid "Slovenian"
|
596 |
+
msgstr ""
|
597 |
+
|
598 |
+
#: inc/functions.php:699
|
599 |
+
msgid "Spanish"
|
600 |
+
msgstr ""
|
601 |
+
|
602 |
+
#: inc/functions.php:704
|
603 |
+
msgid "Swahili"
|
604 |
+
msgstr ""
|
605 |
+
|
606 |
+
#: inc/functions.php:709
|
607 |
+
msgid "Swedish"
|
608 |
+
msgstr ""
|
609 |
+
|
610 |
+
#: inc/functions.php:714
|
611 |
+
msgid "Swiss"
|
612 |
+
msgstr ""
|
613 |
+
|
614 |
+
#: inc/functions.php:719
|
615 |
+
msgid "Tagalog"
|
616 |
+
msgstr ""
|
617 |
+
|
618 |
+
#: inc/functions.php:724
|
619 |
+
msgid "Tatarish"
|
620 |
+
msgstr ""
|
621 |
+
|
622 |
+
#: inc/functions.php:729
|
623 |
+
msgid "Thai"
|
624 |
+
msgstr ""
|
625 |
+
|
626 |
+
#: inc/functions.php:734
|
627 |
+
msgid "Turkish"
|
628 |
+
msgstr ""
|
629 |
+
|
630 |
+
#: inc/functions.php:739
|
631 |
+
msgid "Turkmen"
|
632 |
+
msgstr ""
|
633 |
+
|
634 |
+
#: inc/functions.php:744
|
635 |
+
msgid "Ukrainian"
|
636 |
+
msgstr ""
|
637 |
+
|
638 |
+
#: inc/functions.php:749
|
639 |
+
msgid "Uzbek"
|
640 |
+
msgstr ""
|
641 |
+
|
642 |
+
#: inc/functions.php:754
|
643 |
+
msgid "Vietnamese"
|
644 |
+
msgstr ""
|
645 |
+
|
646 |
+
#: inc/functions.php:759
|
647 |
+
msgid "Welsh"
|
648 |
+
msgstr ""
|
649 |
+
|
650 |
+
#: inc/functions.php:764
|
651 |
+
msgid "Wolof"
|
652 |
+
msgstr ""
|
653 |
+
|
654 |
+
#: inc/functions.php:769
|
655 |
+
msgid "Yiddish - transliterated"
|
656 |
+
msgstr ""
|
657 |
+
|
658 |
+
#: inc/functions.php:774
|
659 |
+
msgid "Yiddish - unicode"
|
660 |
+
msgstr ""
|
languages/wunderground-sl_SI.mo
ADDED
Binary file
|
languages/wunderground-sl_SI.po
ADDED
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# Translators:
|
3 |
+
# Aleš Hočevar <ales.hocevar.1@gmail.com>, 2014
|
4 |
+
msgid ""
|
5 |
+
msgstr ""
|
6 |
+
"Project-Id-Version: Wunderground\n"
|
7 |
+
"POT-Creation-Date: 2014-12-04 13:11-0700\n"
|
8 |
+
"PO-Revision-Date: 2014-12-15 18:31+0000\n"
|
9 |
+
"Last-Translator: Aleš Hočevar <ales.hocevar.1@gmail.com>\n"
|
10 |
+
"Language-Team: Slovenian (Slovenia) (http://www.transifex.com/projects/p/wunderground/language/sl_SI/)\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"Language: sl_SI\n"
|
15 |
+
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n"
|
16 |
+
"X-Generator: Poedit 1.7beta3\n"
|
17 |
+
"X-Poedit-Basepath: ..\n"
|
18 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
21 |
+
|
22 |
+
#: inc/class-template.php:67
|
23 |
+
#, php-format
|
24 |
+
msgid "Statement as of %s"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: inc/class-template.php:68
|
28 |
+
msgid "The location could not be found."
|
29 |
+
msgstr "Lokacije ni mogoče najti."
|
30 |
+
|
31 |
+
#: inc/class-template.php:69
|
32 |
+
#, php-format
|
33 |
+
msgid "%s%%"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: inc/class-template.php:70
|
37 |
+
#, php-format
|
38 |
+
msgid "%s%% Chance of Precipitation"
|
39 |
+
msgstr "%s%% Možnost padavin"
|
40 |
+
|
41 |
+
#: inc/class-template.php:71
|
42 |
+
msgid "Currently"
|
43 |
+
msgstr "Trenutno"
|
44 |
+
|
45 |
+
#: inc/class-template.php:72
|
46 |
+
#, php-format
|
47 |
+
msgid "High %d°"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: inc/class-template.php:73
|
51 |
+
#, php-format
|
52 |
+
msgid "Low %d°"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: inc/class-template.php:74
|
56 |
+
#, php-format
|
57 |
+
msgid "%d°"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: inc/class-template.php:75
|
61 |
+
#, php-format
|
62 |
+
msgid "View the %s forecast on Wunderground.com"
|
63 |
+
msgstr "Poglej %s napoved na Wunderground.com"
|
64 |
+
|
65 |
+
#: inc/class-template.php:76
|
66 |
+
msgctxt "Weather alert issued date/time"
|
67 |
+
msgid "Issued:"
|
68 |
+
msgstr "Izdano:"
|
69 |
+
|
70 |
+
#: inc/class-template.php:77
|
71 |
+
msgctxt "Weather alert expires date/time"
|
72 |
+
msgid "Expires:"
|
73 |
+
msgstr "Poteče:"
|
74 |
+
|
75 |
+
#: inc/class-template.php:149
|
76 |
+
msgid "Current Conditions"
|
77 |
+
msgstr "Trenutne razmere"
|
78 |
+
|
79 |
+
#: inc/class-template.php:150
|
80 |
+
msgid "Simple display of the current conditions."
|
81 |
+
msgstr "Enostaven prikaz trenutnih razmer."
|
82 |
+
|
83 |
+
#: inc/class-template.php:155
|
84 |
+
msgid "Grid Forecast"
|
85 |
+
msgstr "Napoved v obliki mreže"
|
86 |
+
|
87 |
+
#: inc/class-template.php:156
|
88 |
+
msgid "Scales to any screen size."
|
89 |
+
msgstr "Prilagodi na vsako velikost zaslona"
|
90 |
+
|
91 |
+
#: inc/class-template.php:161
|
92 |
+
msgid "Details Table"
|
93 |
+
msgstr "Tabela s podrobnostmi"
|
94 |
+
|
95 |
+
#: inc/class-template.php:162
|
96 |
+
msgid ""
|
97 |
+
"Display the forecast in a table with rows. Great for in-depth forecast "
|
98 |
+
"display."
|
99 |
+
msgstr "Prikaži napoved v tabeli z vrsticami. Primerno za prikaz detajlne napovedi."
|
100 |
+
|
101 |
+
#: inc/class-template.php:167
|
102 |
+
msgid "Horizontal Table"
|
103 |
+
msgstr "Vodoravna tabela"
|
104 |
+
|
105 |
+
#: inc/class-template.php:168
|
106 |
+
msgid ""
|
107 |
+
"Display the forecast in a table with columns. Great for forecast summaries."
|
108 |
+
msgstr ""
|
109 |
+
|
110 |
+
#: inc/class-widget.php:43
|
111 |
+
msgid "Add a Wunderground.com forecast"
|
112 |
+
msgstr "Dodaj Wunderground.com vremensko napoved"
|
113 |
+
|
114 |
+
#: inc/class-widget.php:48 inc/functions.php:176
|
115 |
+
msgid "Wunderground"
|
116 |
+
msgstr "Wunderground"
|
117 |
+
|
118 |
+
#: inc/class-widget.php:152
|
119 |
+
msgid "Title"
|
120 |
+
msgstr "Naslov"
|
121 |
+
|
122 |
+
#: inc/class-widget.php:153
|
123 |
+
msgid "Leave empty to hide the widget title."
|
124 |
+
msgstr "Pusti prazno, če želite skriti gradnikov naslov"
|
125 |
+
|
126 |
+
#: inc/class-widget.php:159
|
127 |
+
msgid "Location"
|
128 |
+
msgstr "Lokacija"
|
129 |
+
|
130 |
+
#: inc/class-widget.php:160
|
131 |
+
msgid "Locations will autoload, but you may also define custom locations."
|
132 |
+
msgstr "Lokacija se bo naložila sama. Lahko tudi sami definirate poljubno lokacijo."
|
133 |
+
|
134 |
+
#: inc/class-widget.php:161
|
135 |
+
msgid "Enter the name of a location."
|
136 |
+
msgstr "Vnesi ime lokacija"
|
137 |
+
|
138 |
+
#: inc/class-widget.php:168
|
139 |
+
msgid "Location Title"
|
140 |
+
msgstr "Naslov lokacija"
|
141 |
+
|
142 |
+
#: inc/class-widget.php:169
|
143 |
+
msgid "Change how the location is displayed in the widget search field."
|
144 |
+
msgstr ""
|
145 |
+
|
146 |
+
#: inc/class-widget.php:170
|
147 |
+
msgid "Leave empty to use the location name."
|
148 |
+
msgstr ""
|
149 |
+
|
150 |
+
#: inc/class-widget.php:171
|
151 |
+
msgid ""
|
152 |
+
"Example: if the Location is set to \"Denver, Colorado\", you may prefer to "
|
153 |
+
"set the Location Title as \"Denver\", which is simpler."
|
154 |
+
msgstr ""
|
155 |
+
|
156 |
+
#: inc/class-widget.php:180
|
157 |
+
msgid "# of Days in Forecast"
|
158 |
+
msgstr "število dni vremenske napovedi"
|
159 |
+
|
160 |
+
#: inc/class-widget.php:186
|
161 |
+
msgid "Include Current Conditions"
|
162 |
+
msgstr "Dodaj trenutne razmere"
|
163 |
+
|
164 |
+
#: inc/class-widget.php:187
|
165 |
+
msgid "Add the current conditions to the forecast."
|
166 |
+
msgstr ""
|
167 |
+
|
168 |
+
#: inc/class-widget.php:193
|
169 |
+
msgid "Include Night Forecasts"
|
170 |
+
msgstr "Dodaj nočno napoved"
|
171 |
+
|
172 |
+
#: inc/class-widget.php:194
|
173 |
+
msgid "This will result in double the number of forecasts shown."
|
174 |
+
msgstr ""
|
175 |
+
|
176 |
+
#: inc/class-widget.php:200
|
177 |
+
msgid "Icon Set"
|
178 |
+
msgstr ""
|
179 |
+
|
180 |
+
#: inc/class-widget.php:201
|
181 |
+
msgid ""
|
182 |
+
"Choose the look and feel of the images that will represent the weather."
|
183 |
+
msgstr ""
|
184 |
+
|
185 |
+
#: inc/class-widget.php:229
|
186 |
+
msgid "Widget Template"
|
187 |
+
msgstr ""
|
188 |
+
|
189 |
+
#: inc/class-widget.php:230
|
190 |
+
msgid "Choose how you would like to display the forecast."
|
191 |
+
msgstr ""
|
192 |
+
|
193 |
+
#: inc/class-widget.php:235
|
194 |
+
msgid "Show in Forecast"
|
195 |
+
msgstr "Pokaži v napovedi"
|
196 |
+
|
197 |
+
#: inc/class-widget.php:240
|
198 |
+
msgid "Search Form"
|
199 |
+
msgstr "Iskalno polje"
|
200 |
+
|
201 |
+
#: inc/class-widget.php:241
|
202 |
+
msgid "Allow searching weather forecasts."
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: inc/class-widget.php:244
|
206 |
+
msgid "Weekday Labels"
|
207 |
+
msgstr ""
|
208 |
+
|
209 |
+
#: inc/class-widget.php:245
|
210 |
+
msgid "Show the names of the days of the week."
|
211 |
+
msgstr "Pokaži imena dni v tednu"
|
212 |
+
|
213 |
+
#: inc/class-widget.php:248
|
214 |
+
msgid "Date"
|
215 |
+
msgstr "Datum"
|
216 |
+
|
217 |
+
#: inc/class-widget.php:249
|
218 |
+
msgid "Display the date numerically (\"09/14\")."
|
219 |
+
msgstr "Prikaži datum numerično (\"14.09\")"
|
220 |
+
|
221 |
+
#: inc/class-widget.php:252
|
222 |
+
msgid "Weather Icon"
|
223 |
+
msgstr ""
|
224 |
+
|
225 |
+
#: inc/class-widget.php:253
|
226 |
+
msgid "Icon representing the forecast conditions."
|
227 |
+
msgstr ""
|
228 |
+
|
229 |
+
#: inc/class-widget.php:256
|
230 |
+
msgid "Chance of Rain"
|
231 |
+
msgstr "Možnost dežja"
|
232 |
+
|
233 |
+
#: inc/class-widget.php:257
|
234 |
+
msgid "Display the percent chance of rain."
|
235 |
+
msgstr "Prikaži % možnost dežja"
|
236 |
+
|
237 |
+
#: inc/class-widget.php:260
|
238 |
+
msgid "High & Low Temp"
|
239 |
+
msgstr "Dnevne in jutranje temperature"
|
240 |
+
|
241 |
+
#: inc/class-widget.php:261
|
242 |
+
msgid "Show the high & low temperatures for forecast."
|
243 |
+
msgstr ""
|
244 |
+
|
245 |
+
#: inc/class-widget.php:264
|
246 |
+
msgid "Condition Title"
|
247 |
+
msgstr ""
|
248 |
+
|
249 |
+
#: inc/class-widget.php:265
|
250 |
+
msgid "Short summary of conditions (\"Clear\", \"Partly Cloudy\", etc.)."
|
251 |
+
msgstr ""
|
252 |
+
|
253 |
+
#: inc/class-widget.php:268
|
254 |
+
msgid "Forecast Text"
|
255 |
+
msgstr ""
|
256 |
+
|
257 |
+
#: inc/class-widget.php:269
|
258 |
+
msgid "Display a description of the forecast, normally in sentence format."
|
259 |
+
msgstr ""
|
260 |
+
|
261 |
+
#: inc/class-widget.php:272
|
262 |
+
msgid "Weather Alerts & Warnings"
|
263 |
+
msgstr ""
|
264 |
+
|
265 |
+
#: inc/class-widget.php:273
|
266 |
+
msgid ""
|
267 |
+
"This functionality is currently not working; we are working with "
|
268 |
+
"Wunderground.com to restore it."
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: inc/class-widget.php:289
|
272 |
+
msgid "Forecast Language"
|
273 |
+
msgstr "Jezik"
|
274 |
+
|
275 |
+
#: inc/class-widget.php:300
|
276 |
+
msgid "Measurements"
|
277 |
+
msgstr "Merske enote"
|
278 |
+
|
279 |
+
#: inc/class-widget.php:303
|
280 |
+
msgid "Fahrenheit & Inches"
|
281 |
+
msgstr "Fahrenheit & Inches"
|
282 |
+
|
283 |
+
#: inc/class-widget.php:306
|
284 |
+
msgid "Celsius & Meters"
|
285 |
+
msgstr "Stopinje celzija & metri"
|
286 |
+
|
287 |
+
#: inc/functions.php:44
|
288 |
+
msgid "Weather Forecast"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: inc/functions.php:161 inc/functions.php:178
|
292 |
+
msgid "Incredible"
|
293 |
+
msgstr "Neverjetno"
|
294 |
+
|
295 |
+
#: inc/functions.php:162 inc/functions.php:177
|
296 |
+
msgid "Elemental"
|
297 |
+
msgstr "Osnovno"
|
298 |
+
|
299 |
+
#: inc/functions.php:163 inc/functions.php:179
|
300 |
+
msgid "Helen"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: inc/functions.php:164 inc/functions.php:181
|
304 |
+
msgid "Default"
|
305 |
+
msgstr "Privzeto"
|
306 |
+
|
307 |
+
#: inc/functions.php:165 inc/functions.php:182
|
308 |
+
msgid "Smiley"
|
309 |
+
msgstr "Smeškoti"
|
310 |
+
|
311 |
+
#: inc/functions.php:166 inc/functions.php:183
|
312 |
+
msgid "Generic"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: inc/functions.php:167 inc/functions.php:184
|
316 |
+
msgid "Old School"
|
317 |
+
msgstr "Staromodno"
|
318 |
+
|
319 |
+
#: inc/functions.php:168 inc/functions.php:185
|
320 |
+
msgid "Cartoon"
|
321 |
+
msgstr "Risano"
|
322 |
+
|
323 |
+
#: inc/functions.php:169 inc/functions.php:186
|
324 |
+
msgid "Mobile"
|
325 |
+
msgstr ""
|
326 |
+
|
327 |
+
#: inc/functions.php:170 inc/functions.php:187
|
328 |
+
msgid "Simple"
|
329 |
+
msgstr "Enostavno"
|
330 |
+
|
331 |
+
#: inc/functions.php:171 inc/functions.php:188
|
332 |
+
msgid "Contemporary"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: inc/functions.php:363
|
336 |
+
msgid "Afrikaans"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: inc/functions.php:368
|
340 |
+
msgid "Albanian"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: inc/functions.php:373
|
344 |
+
msgid "Arabic"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: inc/functions.php:379
|
348 |
+
msgid "Armenian"
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: inc/functions.php:384
|
352 |
+
msgid "Azerbaijani"
|
353 |
+
msgstr ""
|
354 |
+
|
355 |
+
#: inc/functions.php:389
|
356 |
+
msgid "Basque"
|
357 |
+
msgstr ""
|
358 |
+
|
359 |
+
#: inc/functions.php:394
|
360 |
+
msgid "Belarusian"
|
361 |
+
msgstr ""
|
362 |
+
|
363 |
+
#: inc/functions.php:399
|
364 |
+
msgid "Bulgarian"
|
365 |
+
msgstr ""
|
366 |
+
|
367 |
+
#: inc/functions.php:404
|
368 |
+
msgid "British English"
|
369 |
+
msgstr ""
|
370 |
+
|
371 |
+
#: inc/functions.php:409
|
372 |
+
msgid "Burmese"
|
373 |
+
msgstr ""
|
374 |
+
|
375 |
+
#: inc/functions.php:414
|
376 |
+
msgid "Catalan"
|
377 |
+
msgstr ""
|
378 |
+
|
379 |
+
#: inc/functions.php:419
|
380 |
+
msgid "Chinese - Simplified"
|
381 |
+
msgstr ""
|
382 |
+
|
383 |
+
#: inc/functions.php:424
|
384 |
+
msgid "Chinese - Traditional"
|
385 |
+
msgstr ""
|
386 |
+
|
387 |
+
#: inc/functions.php:429
|
388 |
+
msgid "Croatian"
|
389 |
+
msgstr ""
|
390 |
+
|
391 |
+
#: inc/functions.php:434
|
392 |
+
msgid "Czech"
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: inc/functions.php:439
|
396 |
+
msgid "Danish"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: inc/functions.php:444
|
400 |
+
msgid "Dhivehi"
|
401 |
+
msgstr ""
|
402 |
+
|
403 |
+
#: inc/functions.php:450
|
404 |
+
msgid "Dutch"
|
405 |
+
msgstr ""
|
406 |
+
|
407 |
+
#: inc/functions.php:455
|
408 |
+
msgid "English"
|
409 |
+
msgstr ""
|
410 |
+
|
411 |
+
#: inc/functions.php:460
|
412 |
+
msgid "Esperanto"
|
413 |
+
msgstr ""
|
414 |
+
|
415 |
+
#: inc/functions.php:465
|
416 |
+
msgid "Estonian"
|
417 |
+
msgstr ""
|
418 |
+
|
419 |
+
#: inc/functions.php:470
|
420 |
+
msgid "Farsi"
|
421 |
+
msgstr ""
|
422 |
+
|
423 |
+
#: inc/functions.php:475
|
424 |
+
msgid "Finnish"
|
425 |
+
msgstr ""
|
426 |
+
|
427 |
+
#: inc/functions.php:480
|
428 |
+
msgid "French"
|
429 |
+
msgstr ""
|
430 |
+
|
431 |
+
#: inc/functions.php:485
|
432 |
+
msgid "French Canadian"
|
433 |
+
msgstr ""
|
434 |
+
|
435 |
+
#: inc/functions.php:490
|
436 |
+
msgid "Galician"
|
437 |
+
msgstr ""
|
438 |
+
|
439 |
+
#: inc/functions.php:495
|
440 |
+
msgid "German"
|
441 |
+
msgstr ""
|
442 |
+
|
443 |
+
#: inc/functions.php:500
|
444 |
+
msgid "Georgian"
|
445 |
+
msgstr ""
|
446 |
+
|
447 |
+
#: inc/functions.php:505
|
448 |
+
msgid "Greek"
|
449 |
+
msgstr ""
|
450 |
+
|
451 |
+
#: inc/functions.php:510
|
452 |
+
msgid "Gujarati"
|
453 |
+
msgstr ""
|
454 |
+
|
455 |
+
#: inc/functions.php:515
|
456 |
+
msgid "Haitian Creole"
|
457 |
+
msgstr ""
|
458 |
+
|
459 |
+
#: inc/functions.php:520
|
460 |
+
msgid "Hebrew"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: inc/functions.php:526
|
464 |
+
msgid "Hindi"
|
465 |
+
msgstr ""
|
466 |
+
|
467 |
+
#: inc/functions.php:531
|
468 |
+
msgid "Hungarian"
|
469 |
+
msgstr ""
|
470 |
+
|
471 |
+
#: inc/functions.php:536
|
472 |
+
msgid "Icelandic"
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: inc/functions.php:541
|
476 |
+
msgid "Ido"
|
477 |
+
msgstr ""
|
478 |
+
|
479 |
+
#: inc/functions.php:546
|
480 |
+
msgid "Indonesian"
|
481 |
+
msgstr ""
|
482 |
+
|
483 |
+
#: inc/functions.php:551
|
484 |
+
msgid "Irish Gaelic"
|
485 |
+
msgstr ""
|
486 |
+
|
487 |
+
#: inc/functions.php:556
|
488 |
+
msgid "Italian"
|
489 |
+
msgstr ""
|
490 |
+
|
491 |
+
#: inc/functions.php:561
|
492 |
+
msgid "Japanese"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: inc/functions.php:566
|
496 |
+
msgid "Javanese"
|
497 |
+
msgstr ""
|
498 |
+
|
499 |
+
#: inc/functions.php:571
|
500 |
+
msgid "Khmer"
|
501 |
+
msgstr ""
|
502 |
+
|
503 |
+
#: inc/functions.php:576
|
504 |
+
msgid "Korean"
|
505 |
+
msgstr ""
|
506 |
+
|
507 |
+
#: inc/functions.php:581
|
508 |
+
msgid "Kurdish"
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: inc/functions.php:587
|
512 |
+
msgid "Latin"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: inc/functions.php:592
|
516 |
+
msgid "Latvian"
|
517 |
+
msgstr ""
|
518 |
+
|
519 |
+
#: inc/functions.php:597
|
520 |
+
msgid "Lithuanian"
|
521 |
+
msgstr ""
|
522 |
+
|
523 |
+
#: inc/functions.php:602
|
524 |
+
msgid "Low German"
|
525 |
+
msgstr ""
|
526 |
+
|
527 |
+
#: inc/functions.php:607
|
528 |
+
msgid "Macedonian"
|
529 |
+
msgstr ""
|
530 |
+
|
531 |
+
#: inc/functions.php:612
|
532 |
+
msgid "Maltese"
|
533 |
+
msgstr ""
|
534 |
+
|
535 |
+
#: inc/functions.php:617
|
536 |
+
msgid "Mandinka"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: inc/functions.php:622
|
540 |
+
msgid "Maori"
|
541 |
+
msgstr ""
|
542 |
+
|
543 |
+
#: inc/functions.php:627
|
544 |
+
msgid "Marathi"
|
545 |
+
msgstr ""
|
546 |
+
|
547 |
+
#: inc/functions.php:632
|
548 |
+
msgid "Mongolian"
|
549 |
+
msgstr ""
|
550 |
+
|
551 |
+
#: inc/functions.php:637
|
552 |
+
msgid "Norwegian"
|
553 |
+
msgstr ""
|
554 |
+
|
555 |
+
#: inc/functions.php:642
|
556 |
+
msgid "Occitan"
|
557 |
+
msgstr ""
|
558 |
+
|
559 |
+
#: inc/functions.php:647
|
560 |
+
msgid "Pashto"
|
561 |
+
msgstr ""
|
562 |
+
|
563 |
+
#: inc/functions.php:653
|
564 |
+
msgid "Plautdietsch"
|
565 |
+
msgstr ""
|
566 |
+
|
567 |
+
#: inc/functions.php:658
|
568 |
+
msgid "Polish"
|
569 |
+
msgstr ""
|
570 |
+
|
571 |
+
#: inc/functions.php:663
|
572 |
+
msgid "Portuguese"
|
573 |
+
msgstr ""
|
574 |
+
|
575 |
+
#: inc/functions.php:668
|
576 |
+
msgid "Punjabi"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: inc/functions.php:674
|
580 |
+
msgid "Romanian"
|
581 |
+
msgstr ""
|
582 |
+
|
583 |
+
#: inc/functions.php:679
|
584 |
+
msgid "Russian"
|
585 |
+
msgstr ""
|
586 |
+
|
587 |
+
#: inc/functions.php:684
|
588 |
+
msgid "Serbian"
|
589 |
+
msgstr ""
|
590 |
+
|
591 |
+
#: inc/functions.php:689
|
592 |
+
msgid "Slovak"
|
593 |
+
msgstr ""
|
594 |
+
|
595 |
+
#: inc/functions.php:694
|
596 |
+
msgid "Slovenian"
|
597 |
+
msgstr "Slovensko"
|
598 |
+
|
599 |
+
#: inc/functions.php:699
|
600 |
+
msgid "Spanish"
|
601 |
+
msgstr ""
|
602 |
+
|
603 |
+
#: inc/functions.php:704
|
604 |
+
msgid "Swahili"
|
605 |
+
msgstr ""
|
606 |
+
|
607 |
+
#: inc/functions.php:709
|
608 |
+
msgid "Swedish"
|
609 |
+
msgstr ""
|
610 |
+
|
611 |
+
#: inc/functions.php:714
|
612 |
+
msgid "Swiss"
|
613 |
+
msgstr ""
|
614 |
+
|
615 |
+
#: inc/functions.php:719
|
616 |
+
msgid "Tagalog"
|
617 |
+
msgstr ""
|
618 |
+
|
619 |
+
#: inc/functions.php:724
|
620 |
+
msgid "Tatarish"
|
621 |
+
msgstr ""
|
622 |
+
|
623 |
+
#: inc/functions.php:729
|
624 |
+
msgid "Thai"
|
625 |
+
msgstr ""
|
626 |
+
|
627 |
+
#: inc/functions.php:734
|
628 |
+
msgid "Turkish"
|
629 |
+
msgstr ""
|
630 |
+
|
631 |
+
#: inc/functions.php:739
|
632 |
+
msgid "Turkmen"
|
633 |
+
msgstr ""
|
634 |
+
|
635 |
+
#: inc/functions.php:744
|
636 |
+
msgid "Ukrainian"
|
637 |
+
msgstr ""
|
638 |
+
|
639 |
+
#: inc/functions.php:749
|
640 |
+
msgid "Uzbek"
|
641 |
+
msgstr ""
|
642 |
+
|
643 |
+
#: inc/functions.php:754
|
644 |
+
msgid "Vietnamese"
|
645 |
+
msgstr ""
|
646 |
+
|
647 |
+
#: inc/functions.php:759
|
648 |
+
msgid "Welsh"
|
649 |
+
msgstr ""
|
650 |
+
|
651 |
+
#: inc/functions.php:764
|
652 |
+
msgid "Wolof"
|
653 |
+
msgstr ""
|
654 |
+
|
655 |
+
#: inc/functions.php:769
|
656 |
+
msgid "Yiddish - transliterated"
|
657 |
+
msgstr ""
|
658 |
+
|
659 |
+
#: inc/functions.php:774
|
660 |
+
msgid "Yiddish - unicode"
|
661 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
=== Weather Underground ===
|
2 |
Tags: weather, weather.com, wunderground, weather underground, weatherbug, forecast, Yahoo! Weather, wp-weather, wp weather, local weather, weather man, weather widget, cool weather, accuweather, get weather, wordpress weather
|
3 |
Requires at least: 3.6
|
4 |
-
Tested up to: 4.
|
5 |
Stable tag: trunk
|
6 |
Contributors: katzwebdesign, katzwebservices
|
7 |
Donate link: https://katz.co
|
@@ -26,7 +26,7 @@ Learn about setting up the plugin, how to configure the shortcode, template over
|
|
26 |
|
27 |
#### About Weather Underground
|
28 |
|
29 |
-
>
|
30 |
|
31 |
*Weather Underground is a registered trademark of The Weather Channel, LLC. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, LLC.*
|
32 |
|
@@ -66,13 +66,16 @@ If your location isn't working any more, follow the steps below:
|
|
66 |
|
67 |
= How do I use my own icons? =
|
68 |
|
69 |
-
If you want to use your own icons, you would add a filter to the bottom of your theme's <code>functions.php</code> file. See a [list of icons you should have available](http://www.wunderground.com/weather/api/d/docs?d=resources/icon). Here's sample code:
|
70 |
|
71 |
<pre>
|
72 |
add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons', 10, 2 );
|
73 |
|
|
|
|
|
|
|
74 |
function use_custom_wunderground_icons( $url_base = '', $icon_name = '' ) {
|
75 |
-
return 'http://
|
76 |
}
|
77 |
</pre>
|
78 |
|
@@ -80,6 +83,11 @@ function use_custom_wunderground_icons( $url_base = '', $icon_name = '' ) {
|
|
80 |
|
81 |
Please see the "Using your own template" section on the [Plugin Github page](https://github.com/katzwebservices/Wunderground)
|
82 |
|
|
|
|
|
|
|
|
|
|
|
83 |
= What is the plugin license? =
|
84 |
|
85 |
This plugin is released under a GPL license. *Weather Underground is a registered trademark of The Weather Channel, LLC. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, LLC.*
|
@@ -89,9 +97,16 @@ Weather Underground has been very gracious and has provided the plugin with free
|
|
89 |
|
90 |
== Changelog ==
|
91 |
|
92 |
-
=
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
= 2.0.11 on December 4 =
|
97 |
* Fixed: Fatal error when no location is set in shortcode
|
1 |
=== Weather Underground ===
|
2 |
Tags: weather, weather.com, wunderground, weather underground, weatherbug, forecast, Yahoo! Weather, wp-weather, wp weather, local weather, weather man, weather widget, cool weather, accuweather, get weather, wordpress weather
|
3 |
Requires at least: 3.6
|
4 |
+
Tested up to: 4.2.1
|
5 |
Stable tag: trunk
|
6 |
Contributors: katzwebdesign, katzwebservices
|
7 |
Donate link: https://katz.co
|
26 |
|
27 |
#### About Weather Underground
|
28 |
|
29 |
+
> Weather Underground has challenged the conventions around how weather information is shared with the public since 1993. We're immensely proud of the unique products that our community and meteorologists have created to improve people's access to meaningful weather data from around the globe. As the Internet's 1st weather service, we consider ourselves pioneers within our field and we're constantly seeking new data sets and the next technologies that will help us share more data with more people.
|
30 |
|
31 |
*Weather Underground is a registered trademark of The Weather Channel, LLC. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, LLC.*
|
32 |
|
66 |
|
67 |
= How do I use my own icons? =
|
68 |
|
69 |
+
If you want to use your own icons, you would add a filter to the bottom of your theme's <code>functions.php</code> file. See a [list of icons you should have available](http://www.wunderground.com/weather/api/d/docs?d=resources/icon-sets). Here's sample code:
|
70 |
|
71 |
<pre>
|
72 |
add_filter('wp_wunderground_forecast_icon', 'use_custom_wunderground_icons', 10, 2 );
|
73 |
|
74 |
+
/**
|
75 |
+
* @return string URL to the root folder of the icon set.
|
76 |
+
*/
|
77 |
function use_custom_wunderground_icons( $url_base = '', $icon_name = '' ) {
|
78 |
+
return 'http://icons.wxug.com/i/c/a/';
|
79 |
}
|
80 |
</pre>
|
81 |
|
83 |
|
84 |
Please see the "Using your own template" section on the [Plugin Github page](https://github.com/katzwebservices/Wunderground)
|
85 |
|
86 |
+
= I'm making changes to the settings, but nothing changes =
|
87 |
+
The output of the widget is cached for speed. Add `?debug` to the URL and it will refresh.
|
88 |
+
|
89 |
+
You can also add `add_filter( 'wunderground_twig_debug' '__return_true' );` to your functions.php file to disable caching during development. Only disable caching when absolutely necessary; it will slow down your site.
|
90 |
+
|
91 |
= What is the plugin license? =
|
92 |
|
93 |
This plugin is released under a GPL license. *Weather Underground is a registered trademark of The Weather Channel, LLC. both in the United States and internationally. The Weather Underground Logo is a trademark of Weather Underground, LLC.*
|
97 |
|
98 |
== Changelog ==
|
99 |
|
100 |
+
= 2.1 on April 29, 2015 =
|
101 |
+
* Added: Now supports Weather Underground Severe Weather alerts & warnings
|
102 |
+
* Fixed: Issue using multi-word cities (thanks [@christianriley](https://github.com/christianriley)!)
|
103 |
+
* Fixed: Restored `alt` text for icon when using the Current template
|
104 |
+
* Fixed: Widget preview for "Old School" icon set
|
105 |
+
* Fixed: Fatal error if plugin or theme already used Twig template loader
|
106 |
+
* Fixed: Replace Icon Set FAQ code
|
107 |
+
* Updated: Translations - thanks to all the translators!
|
108 |
+
- Slovenian: Aleš Hočevar
|
109 |
+
- Bosnian: Marko Saraba
|
110 |
|
111 |
= 2.0.11 on December 4 =
|
112 |
* Fixed: Fatal error when no location is set in shortcode
|
templates/alert.html
CHANGED
@@ -3,13 +3,14 @@
|
|
3 |
Learn more at: http://twig.sensiolabs.org/doc/templates.html
|
4 |
#}
|
5 |
|
6 |
-
{% if showdata.alerts is not empty and
|
7 |
-
|
|
|
8 |
<div class="wu-alert wu-alert-{{ alert.type }}">
|
9 |
-
<h3>{{ alert.description }}</h3>
|
10 |
<dl>
|
11 |
-
<dt>{{ strings.alert_issued }}</dt><dd>{{ alert.
|
12 |
-
<dt>{{ strings.alert_expires }}</dt><dd>{{ alert.expires }}</dd>
|
13 |
</dl>
|
14 |
</div>
|
15 |
{% endfor %}
|
3 |
Learn more at: http://twig.sensiolabs.org/doc/templates.html
|
4 |
#}
|
5 |
|
6 |
+
{% if showdata.alerts is not empty and wunderground.alerts is not empty %}
|
7 |
+
|
8 |
+
{% for alert in wunderground.alerts.alerts %}
|
9 |
<div class="wu-alert wu-alert-{{ alert.type }}">
|
10 |
+
<h3><a href="{{alert.wuiurl}}">{{ alert.description }}</a></h3>
|
11 |
<dl>
|
12 |
+
<dt>{{ strings.alert_issued }}</dt><dd>{{ alert.issued.pretty }}</dd>
|
13 |
+
<dt>{{ strings.alert_expires }}</dt><dd>{{ alert.expires.pretty }}</dd>
|
14 |
</dl>
|
15 |
</div>
|
16 |
{% endfor %}
|
templates/snippets/icon.html
CHANGED
@@ -10,5 +10,5 @@
|
|
10 |
{% set iconsize = '50' %}
|
11 |
{% endif %}
|
12 |
|
13 |
-
<{{tag}} class="wu-icon"><img src="{{user_icon_url}}/{{icon}}.gif" alt="{{forecast.condition}}" width="{{iconsize}}" height="{{iconsize}}" /></{{tag}}>
|
14 |
{% endif %}
|
10 |
{% set iconsize = '50' %}
|
11 |
{% endif %}
|
12 |
|
13 |
+
<{{tag}} class="wu-icon"><img src="{{user_icon_url}}/{{icon}}.gif" alt="{{ forecast.condition ? forecast.condition|e : day.condition|e }}" width="{{iconsize}}" height="{{iconsize}}" /></{{tag}}>
|
14 |
{% endif %}
|
vendor/composer/ClassLoader.php
CHANGED
@@ -54,9 +54,15 @@ class ClassLoader
|
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
|
|
|
|
57 |
public function getPrefixes()
|
58 |
{
|
59 |
-
|
|
|
|
|
|
|
|
|
60 |
}
|
61 |
|
62 |
public function getPrefixesPsr4()
|
@@ -143,6 +149,8 @@ class ClassLoader
|
|
143 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
144 |
* @param array|string $paths The PSR-0 base directories
|
145 |
* @param bool $prepend Whether to prepend the directories
|
|
|
|
|
146 |
*/
|
147 |
public function addPsr4($prefix, $paths, $prepend = false)
|
148 |
{
|
@@ -202,10 +210,13 @@ class ClassLoader
|
|
202 |
* Registers a set of PSR-4 directories for a given namespace,
|
203 |
* replacing any others previously set for this namespace.
|
204 |
*
|
205 |
-
* @param string $prefix
|
206 |
-
* @param array|string $paths
|
|
|
|
|
207 |
*/
|
208 |
-
public function setPsr4($prefix, $paths)
|
|
|
209 |
if (!$prefix) {
|
210 |
$this->fallbackDirsPsr4 = (array) $paths;
|
211 |
} else {
|
@@ -239,6 +250,27 @@ class ClassLoader
|
|
239 |
return $this->useIncludePath;
|
240 |
}
|
241 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
/**
|
243 |
* Registers this instance as an autoloader.
|
244 |
*
|
@@ -290,6 +322,9 @@ class ClassLoader
|
|
290 |
if (isset($this->classMap[$class])) {
|
291 |
return $this->classMap[$class];
|
292 |
}
|
|
|
|
|
|
|
293 |
|
294 |
$file = $this->findFileWithExtension($class, '.php');
|
295 |
|
54 |
private $useIncludePath = false;
|
55 |
private $classMap = array();
|
56 |
|
57 |
+
private $classMapAuthoritative = false;
|
58 |
+
|
59 |
public function getPrefixes()
|
60 |
{
|
61 |
+
if (!empty($this->prefixesPsr0)) {
|
62 |
+
return call_user_func_array('array_merge', $this->prefixesPsr0);
|
63 |
+
}
|
64 |
+
|
65 |
+
return array();
|
66 |
}
|
67 |
|
68 |
public function getPrefixesPsr4()
|
149 |
* @param string $prefix The prefix/namespace, with trailing '\\'
|
150 |
* @param array|string $paths The PSR-0 base directories
|
151 |
* @param bool $prepend Whether to prepend the directories
|
152 |
+
*
|
153 |
+
* @throws \InvalidArgumentException
|
154 |
*/
|
155 |
public function addPsr4($prefix, $paths, $prepend = false)
|
156 |
{
|
210 |
* Registers a set of PSR-4 directories for a given namespace,
|
211 |
* replacing any others previously set for this namespace.
|
212 |
*
|
213 |
+
* @param string $prefix The prefix/namespace, with trailing '\\'
|
214 |
+
* @param array|string $paths The PSR-4 base directories
|
215 |
+
*
|
216 |
+
* @throws \InvalidArgumentException
|
217 |
*/
|
218 |
+
public function setPsr4($prefix, $paths)
|
219 |
+
{
|
220 |
if (!$prefix) {
|
221 |
$this->fallbackDirsPsr4 = (array) $paths;
|
222 |
} else {
|
250 |
return $this->useIncludePath;
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* Turns off searching the prefix and fallback directories for classes
|
255 |
+
* that have not been registered with the class map.
|
256 |
+
*
|
257 |
+
* @param bool $classMapAuthoritative
|
258 |
+
*/
|
259 |
+
public function setClassMapAuthoritative($classMapAuthoritative)
|
260 |
+
{
|
261 |
+
$this->classMapAuthoritative = $classMapAuthoritative;
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Should class lookup fail if not found in the current class map?
|
266 |
+
*
|
267 |
+
* @return bool
|
268 |
+
*/
|
269 |
+
public function isClassMapAuthoritative()
|
270 |
+
{
|
271 |
+
return $this->classMapAuthoritative;
|
272 |
+
}
|
273 |
+
|
274 |
/**
|
275 |
* Registers this instance as an autoloader.
|
276 |
*
|
322 |
if (isset($this->classMap[$class])) {
|
323 |
return $this->classMap[$class];
|
324 |
}
|
325 |
+
if ($this->classMapAuthoritative) {
|
326 |
+
return false;
|
327 |
+
}
|
328 |
|
329 |
$file = $this->findFileWithExtension($class, '.php');
|
330 |
|
vendor/composer/autoload_real.php
CHANGED
@@ -23,9 +23,6 @@ class ComposerAutoloaderInit7374dd036509d2ffae2282c2a10a41ce
|
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
spl_autoload_unregister(array('ComposerAutoloaderInit7374dd036509d2ffae2282c2a10a41ce', 'loadClassLoader'));
|
25 |
|
26 |
-
$vendorDir = dirname(__DIR__);
|
27 |
-
$baseDir = dirname($vendorDir);
|
28 |
-
|
29 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
30 |
foreach ($map as $namespace => $path) {
|
31 |
$loader->set($namespace, $path);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
spl_autoload_unregister(array('ComposerAutoloaderInit7374dd036509d2ffae2282c2a10a41ce', 'loadClassLoader'));
|
25 |
|
|
|
|
|
|
|
26 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
27 |
foreach ($map as $namespace => $path) {
|
28 |
$loader->set($namespace, $path);
|
vendor/composer/installed.json
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
[
|
2 |
{
|
3 |
"name": "twig/twig",
|
4 |
-
"version": "v1.
|
5 |
-
"version_normalized": "1.
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
-
"url": "https://github.com/
|
9 |
-
"reference": "
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
-
"url": "https://api.github.com/repos/
|
14 |
-
"reference": "
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
-
"php": ">=5.2.
|
19 |
},
|
20 |
-
"time": "
|
21 |
"type": "library",
|
22 |
"extra": {
|
23 |
"branch-alias": {
|
24 |
-
"dev-master": "1.
|
25 |
}
|
26 |
},
|
27 |
"installation-source": "dist",
|
@@ -48,7 +48,7 @@
|
|
48 |
},
|
49 |
{
|
50 |
"name": "Twig Team",
|
51 |
-
"homepage": "
|
52 |
"role": "Contributors"
|
53 |
}
|
54 |
],
|
1 |
[
|
2 |
{
|
3 |
"name": "twig/twig",
|
4 |
+
"version": "v1.18.1",
|
5 |
+
"version_normalized": "1.18.1.0",
|
6 |
"source": {
|
7 |
"type": "git",
|
8 |
+
"url": "https://github.com/twigphp/Twig.git",
|
9 |
+
"reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f"
|
10 |
},
|
11 |
"dist": {
|
12 |
"type": "zip",
|
13 |
+
"url": "https://api.github.com/repos/twigphp/Twig/zipball/9f70492f44398e276d1b81c1b43adfe6751c7b7f",
|
14 |
+
"reference": "9f70492f44398e276d1b81c1b43adfe6751c7b7f",
|
15 |
"shasum": ""
|
16 |
},
|
17 |
"require": {
|
18 |
+
"php": ">=5.2.7"
|
19 |
},
|
20 |
+
"time": "2015-04-19 08:30:27",
|
21 |
"type": "library",
|
22 |
"extra": {
|
23 |
"branch-alias": {
|
24 |
+
"dev-master": "1.18-dev"
|
25 |
}
|
26 |
},
|
27 |
"installation-source": "dist",
|
48 |
},
|
49 |
{
|
50 |
"name": "Twig Team",
|
51 |
+
"homepage": "http://twig.sensiolabs.org/contributors",
|
52 |
"role": "Contributors"
|
53 |
}
|
54 |
],
|
vendor/twig/twig/.gitignore
CHANGED
@@ -1,2 +1,5 @@
|
|
|
|
|
|
1 |
/ext/twig/autom4te.cache/
|
2 |
-
|
|
1 |
+
/build
|
2 |
+
/composer.lock
|
3 |
/ext/twig/autom4te.cache/
|
4 |
+
/phpunit.xml
|
5 |
+
/vendor
|
vendor/twig/twig/.travis.yml
CHANGED
@@ -5,7 +5,14 @@ php:
|
|
5 |
- 5.3
|
6 |
- 5.4
|
7 |
- 5.5
|
|
|
8 |
- hhvm
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
env:
|
11 |
- TWIG_EXT=no
|
@@ -19,3 +26,7 @@ matrix:
|
|
19 |
exclude:
|
20 |
- php: hhvm
|
21 |
env: TWIG_EXT=yes
|
|
|
|
|
|
|
|
5 |
- 5.3
|
6 |
- 5.4
|
7 |
- 5.5
|
8 |
+
- 5.6
|
9 |
- hhvm
|
10 |
+
- nightly
|
11 |
+
- hhvm-nightly
|
12 |
+
|
13 |
+
allow_failures:
|
14 |
+
- php: nightly
|
15 |
+
- php: hhvm-nightly
|
16 |
|
17 |
env:
|
18 |
- TWIG_EXT=no
|
26 |
exclude:
|
27 |
- php: hhvm
|
28 |
env: TWIG_EXT=yes
|
29 |
+
- php: hhvm-nightly
|
30 |
+
env: TWIG_EXT=yes
|
31 |
+
- php: nightly
|
32 |
+
env: TWIG_EXT=yes
|
vendor/twig/twig/CHANGELOG
CHANGED
@@ -1,4 +1,58 @@
|
|
1 |
-
* 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
* fixed the conversion of the special '0000-00-00 00:00' date
|
4 |
* added an error message when trying to import an undefined block from a trait
|
1 |
+
* 1.18.1 (2015-04-19)
|
2 |
+
|
3 |
+
* fixed memory leaks in the C extension
|
4 |
+
* deprecated Twig_Loader_String
|
5 |
+
* fixed the slice filter when used with a SimpleXMLElement object
|
6 |
+
* fixed filesystem loader when trying to load non-files (like directories)
|
7 |
+
|
8 |
+
* 1.18.0 (2015-01-25)
|
9 |
+
|
10 |
+
* fixed some error messages where the line was wrong (unknown variables or argument names)
|
11 |
+
* added a new way to customize the main Module node (via empty nodes)
|
12 |
+
* added Twig_Environment::createTemplate() to create a template from a string
|
13 |
+
* added a profiler
|
14 |
+
* fixed filesystem loader cache when different file paths are used for the same template
|
15 |
+
|
16 |
+
* 1.17.0 (2015-01-14)
|
17 |
+
|
18 |
+
* added a 'filename' autoescaping strategy, which dynamically chooses the
|
19 |
+
autoescaping strategy for a template based on template file extension.
|
20 |
+
|
21 |
+
* 1.16.3 (2014-12-25)
|
22 |
+
|
23 |
+
* fixed regression for dynamic parent templates
|
24 |
+
* fixed cache management with statcache
|
25 |
+
* fixed a regression in the slice filter
|
26 |
+
|
27 |
+
* 1.16.2 (2014-10-17)
|
28 |
+
|
29 |
+
* fixed timezone on dates as strings
|
30 |
+
* fixed 2-words test names when a custom node class is not used
|
31 |
+
* fixed macros when using an argument named like a PHP super global (like GET or POST)
|
32 |
+
* fixed date_modify when working with DateTimeImmutable
|
33 |
+
* optimized for loops
|
34 |
+
* fixed multi-byte characters handling in the split filter
|
35 |
+
* fixed a regression in the in operator
|
36 |
+
* fixed a regression in the slice filter
|
37 |
+
|
38 |
+
* 1.16.1 (2014-10-10)
|
39 |
+
|
40 |
+
* improved error reporting in a sandboxed template
|
41 |
+
* fixed missing error file/line information under certain circumstances
|
42 |
+
* fixed wrong error line number in some error messages
|
43 |
+
* fixed the in operator to use strict comparisons
|
44 |
+
* sped up the slice filter
|
45 |
+
* fixed for mb function overload mb_substr acting different
|
46 |
+
* fixed the attribute() function when passing a variable for the arguments
|
47 |
+
|
48 |
+
* 1.16.0 (2014-07-05)
|
49 |
+
|
50 |
+
* changed url_encode to always encode according to RFC 3986
|
51 |
+
* fixed inheritance in a 'use'-hierarchy
|
52 |
+
* removed the __toString policy check when the sandbox is disabled
|
53 |
+
* fixed recursively calling blocks in templates with inheritance
|
54 |
+
|
55 |
+
* 1.15.1 (2014-02-13)
|
56 |
|
57 |
* fixed the conversion of the special '0000-00-00 00:00' date
|
58 |
* added an error message when trying to import an undefined block from a trait
|
vendor/twig/twig/composer.json
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
},
|
15 |
{
|
16 |
"name": "Twig Team",
|
17 |
-
"homepage": "
|
18 |
"role": "Contributors"
|
19 |
},
|
20 |
{
|
@@ -27,7 +27,7 @@
|
|
27 |
"forum": "https://groups.google.com/forum/#!forum/twig-users"
|
28 |
},
|
29 |
"require": {
|
30 |
-
"php": ">=5.2.
|
31 |
},
|
32 |
"autoload": {
|
33 |
"psr-0" : {
|
@@ -36,7 +36,7 @@
|
|
36 |
},
|
37 |
"extra": {
|
38 |
"branch-alias": {
|
39 |
-
"dev-master": "1.
|
40 |
}
|
41 |
}
|
42 |
}
|
14 |
},
|
15 |
{
|
16 |
"name": "Twig Team",
|
17 |
+
"homepage": "http://twig.sensiolabs.org/contributors",
|
18 |
"role": "Contributors"
|
19 |
},
|
20 |
{
|
27 |
"forum": "https://groups.google.com/forum/#!forum/twig-users"
|
28 |
},
|
29 |
"require": {
|
30 |
+
"php": ">=5.2.7"
|
31 |
},
|
32 |
"autoload": {
|
33 |
"psr-0" : {
|
36 |
},
|
37 |
"extra": {
|
38 |
"branch-alias": {
|
39 |
+
"dev-master": "1.18-dev"
|
40 |
}
|
41 |
}
|
42 |
}
|
vendor/twig/twig/doc/advanced.rst
CHANGED
@@ -281,7 +281,7 @@ Tests allow you to create custom application specific logic for evaluating
|
|
281 |
boolean conditions. As a simple example, let's create a Twig test that checks if
|
282 |
objects are 'red'::
|
283 |
|
284 |
-
$twig = new Twig_Environment($loader)
|
285 |
$test = new Twig_SimpleTest('red', function ($value) {
|
286 |
if (isset($value->color) && $value->color == 'red') {
|
287 |
return true;
|
@@ -299,7 +299,7 @@ When creating tests you can use the ``node_class`` option to provide custom test
|
|
299 |
compilation. This is useful if your test can be compiled into PHP primitives.
|
300 |
This is used by many of the tests built into Twig::
|
301 |
|
302 |
-
$twig = new Twig_Environment($loader)
|
303 |
$test = new Twig_SimpleTest(
|
304 |
'odd',
|
305 |
null,
|
@@ -503,7 +503,7 @@ to host all the specific tags and filters you want to add to Twig.
|
|
503 |
.. note::
|
504 |
|
505 |
Before writing your own extensions, have a look at the Twig official
|
506 |
-
extension repository: http://github.com/
|
507 |
|
508 |
An extension is a class that implements the following interface::
|
509 |
|
@@ -830,5 +830,5 @@ Testing the node visitors can be complex, so extend your test cases from
|
|
830 |
|
831 |
.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
|
832 |
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
833 |
-
.. _`tests/Twig/Fixtures`: https://github.com/
|
834 |
-
.. _`tests/Twig/Node`: https://github.com/
|
281 |
boolean conditions. As a simple example, let's create a Twig test that checks if
|
282 |
objects are 'red'::
|
283 |
|
284 |
+
$twig = new Twig_Environment($loader);
|
285 |
$test = new Twig_SimpleTest('red', function ($value) {
|
286 |
if (isset($value->color) && $value->color == 'red') {
|
287 |
return true;
|
299 |
compilation. This is useful if your test can be compiled into PHP primitives.
|
300 |
This is used by many of the tests built into Twig::
|
301 |
|
302 |
+
$twig = new Twig_Environment($loader);
|
303 |
$test = new Twig_SimpleTest(
|
304 |
'odd',
|
305 |
null,
|
503 |
.. note::
|
504 |
|
505 |
Before writing your own extensions, have a look at the Twig official
|
506 |
+
extension repository: http://github.com/twigphp/Twig-extensions.
|
507 |
|
508 |
An extension is a class that implements the following interface::
|
509 |
|
830 |
|
831 |
.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
|
832 |
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
833 |
+
.. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
|
834 |
+
.. _`tests/Twig/Node`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node
|
vendor/twig/twig/doc/advanced_legacy.rst
CHANGED
@@ -529,7 +529,7 @@ to host all the specific tags and filters you want to add to Twig.
|
|
529 |
.. note::
|
530 |
|
531 |
Before writing your own extensions, have a look at the Twig official
|
532 |
-
extension repository: http://github.com/
|
533 |
|
534 |
An extension is a class that implements the following interface::
|
535 |
|
@@ -883,5 +883,5 @@ Testing the node visitors can be complex, so extend your test cases from
|
|
883 |
|
884 |
.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
|
885 |
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
886 |
-
.. _`tests/Twig/Fixtures`: https://github.com/
|
887 |
-
.. _`tests/Twig/Node`: https://github.com/
|
529 |
.. note::
|
530 |
|
531 |
Before writing your own extensions, have a look at the Twig official
|
532 |
+
extension repository: http://github.com/twigphp/Twig-extensions.
|
533 |
|
534 |
An extension is a class that implements the following interface::
|
535 |
|
883 |
|
884 |
.. _`spl_autoload_register()`: http://www.php.net/spl_autoload_register
|
885 |
.. _`rot13`: http://www.php.net/manual/en/function.str-rot13.php
|
886 |
+
.. _`tests/Twig/Fixtures`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Fixtures
|
887 |
+
.. _`tests/Twig/Node`: https://github.com/twigphp/Twig/tree/master/test/Twig/Tests/Node
|
vendor/twig/twig/doc/api.rst
CHANGED
@@ -94,14 +94,22 @@ The following options are available:
|
|
94 |
replace them with a ``null`` value. When set to ``true``, Twig throws an
|
95 |
exception instead (default to ``false``).
|
96 |
|
97 |
-
* ``autoescape``: If set to ``true``, auto-escaping will be enabled by
|
98 |
-
for all templates (default to ``true``).
|
99 |
-
|
100 |
-
As of Twig 1.
|
101 |
-
``
|
|
|
|
|
|
|
102 |
return the escaping strategy to use -- the callback cannot be a function name
|
103 |
to avoid collision with built-in escaping strategies).
|
104 |
|
|
|
|
|
|
|
|
|
|
|
105 |
* ``optimizations``: A flag that indicates which optimizations to apply
|
106 |
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
|
107 |
disable).
|
@@ -166,21 +174,6 @@ Namespaced templates can be accessed via the special
|
|
166 |
|
167 |
$twig->render('@admin/index.html', array());
|
168 |
|
169 |
-
``Twig_Loader_String``
|
170 |
-
......................
|
171 |
-
|
172 |
-
``Twig_Loader_String`` loads templates from strings. It's a dummy loader as
|
173 |
-
the template reference is the template source code::
|
174 |
-
|
175 |
-
$loader = new Twig_Loader_String();
|
176 |
-
$twig = new Twig_Environment($loader);
|
177 |
-
|
178 |
-
echo $twig->render('Hello {{ name }}!', array('name' => 'Fabien'));
|
179 |
-
|
180 |
-
This loader should only be used for unit testing as it has severe limitations:
|
181 |
-
several tags, like ``extends`` or ``include`` do not make sense to use as the
|
182 |
-
reference to the template is the template source code itself.
|
183 |
-
|
184 |
``Twig_Loader_Array``
|
185 |
.....................
|
186 |
|
@@ -214,7 +207,7 @@ projects where storing all templates in a single PHP file might make sense.
|
|
214 |
'base.html' => '{% block content %}{% endblock %}',
|
215 |
));
|
216 |
$loader2 = new Twig_Loader_Array(array(
|
217 |
-
'index.html' => '{% extends "base.
|
218 |
'base.html' => 'Will never be loaded',
|
219 |
));
|
220 |
|
@@ -268,26 +261,6 @@ All loaders implement the ``Twig_LoaderInterface``::
|
|
268 |
function isFresh($name, $time);
|
269 |
}
|
270 |
|
271 |
-
As an example, here is how the built-in ``Twig_Loader_String`` reads::
|
272 |
-
|
273 |
-
class Twig_Loader_String implements Twig_LoaderInterface
|
274 |
-
{
|
275 |
-
public function getSource($name)
|
276 |
-
{
|
277 |
-
return $name;
|
278 |
-
}
|
279 |
-
|
280 |
-
public function getCacheKey($name)
|
281 |
-
{
|
282 |
-
return $name;
|
283 |
-
}
|
284 |
-
|
285 |
-
public function isFresh($name, $time)
|
286 |
-
{
|
287 |
-
return false;
|
288 |
-
}
|
289 |
-
}
|
290 |
-
|
291 |
The ``isFresh()`` method must return ``true`` if the current cached template
|
292 |
is still fresh, given the last modification time, or ``false`` otherwise.
|
293 |
|
@@ -314,6 +287,9 @@ Twig comes bundled with the following extensions:
|
|
314 |
* *Twig_Extension_Sandbox*: Adds a sandbox mode to the default Twig
|
315 |
environment, making it safe to evaluate untrusted code.
|
316 |
|
|
|
|
|
|
|
317 |
* *Twig_Extension_Optimizer*: Optimizes the node tree before compilation.
|
318 |
|
319 |
The core, escaper, and optimizer extensions do not need to be added to the
|
@@ -482,6 +458,37 @@ the extension constructor::
|
|
482 |
|
483 |
$sandbox = new Twig_Extension_Sandbox($policy, true);
|
484 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
485 |
Optimizer Extension
|
486 |
~~~~~~~~~~~~~~~~~~~
|
487 |
|
94 |
replace them with a ``null`` value. When set to ``true``, Twig throws an
|
95 |
exception instead (default to ``false``).
|
96 |
|
97 |
+
* ``autoescape``: If set to ``true``, HTML auto-escaping will be enabled by
|
98 |
+
default for all templates (default to ``true``).
|
99 |
+
|
100 |
+
As of Twig 1.8, you can set the escaping strategy to use (``html``, ``js``,
|
101 |
+
``false`` to disable).
|
102 |
+
|
103 |
+
As of Twig 1.9, you can set the escaping strategy to use (``css``, ``url``,
|
104 |
+
``html_attr``, or a PHP callback that takes the template "filename" and must
|
105 |
return the escaping strategy to use -- the callback cannot be a function name
|
106 |
to avoid collision with built-in escaping strategies).
|
107 |
|
108 |
+
As of Twig 1.17, the ``filename`` escaping strategy determines the escaping
|
109 |
+
strategy to use for a template based on the template filename extension (this
|
110 |
+
strategy does not incur any overhead at runtime as auto-escaping is done at
|
111 |
+
compilation time.)
|
112 |
+
|
113 |
* ``optimizations``: A flag that indicates which optimizations to apply
|
114 |
(default to ``-1`` -- all optimizations are enabled; set it to ``0`` to
|
115 |
disable).
|
174 |
|
175 |
$twig->render('@admin/index.html', array());
|
176 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
``Twig_Loader_Array``
|
178 |
.....................
|
179 |
|
207 |
'base.html' => '{% block content %}{% endblock %}',
|
208 |
));
|
209 |
$loader2 = new Twig_Loader_Array(array(
|
210 |
+
'index.html' => '{% extends "base.html" %}{% block content %}Hello {{ name }}{% endblock %}',
|
211 |
'base.html' => 'Will never be loaded',
|
212 |
));
|
213 |
|
261 |
function isFresh($name, $time);
|
262 |
}
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
The ``isFresh()`` method must return ``true`` if the current cached template
|
265 |
is still fresh, given the last modification time, or ``false`` otherwise.
|
266 |
|
287 |
* *Twig_Extension_Sandbox*: Adds a sandbox mode to the default Twig
|
288 |
environment, making it safe to evaluate untrusted code.
|
289 |
|
290 |
+
* *Twig_Extension_Profiler*: Enabled the built-in Twig profiler (as of Twig
|
291 |
+
1.18).
|
292 |
+
|
293 |
* *Twig_Extension_Optimizer*: Optimizes the node tree before compilation.
|
294 |
|
295 |
The core, escaper, and optimizer extensions do not need to be added to the
|
458 |
|
459 |
$sandbox = new Twig_Extension_Sandbox($policy, true);
|
460 |
|
461 |
+
Profiler Extension
|
462 |
+
~~~~~~~~~~~~~~~~~~
|
463 |
+
|
464 |
+
.. versionadded:: 1.18
|
465 |
+
The Profile extension was added in Twig 1.18.
|
466 |
+
|
467 |
+
The ``profiler`` extension enables a profiler for Twig templates; it should
|
468 |
+
only be used on your development machines as it adds some overhead::
|
469 |
+
|
470 |
+
$profile = new Twig_Profiler_Profile();
|
471 |
+
$twig->addExtension(new Twig_Extension_Profiler($profile));
|
472 |
+
|
473 |
+
$dumper = new Twig_Profiler_Dumper_Text();
|
474 |
+
echo $dumper->dump($profile);
|
475 |
+
|
476 |
+
A profile contains information about time and memory consumption for template,
|
477 |
+
block, and macro executions.
|
478 |
+
|
479 |
+
You can also dump the data in a `Blackfire.io <https://blackfire.io/>`_
|
480 |
+
compatible format::
|
481 |
+
|
482 |
+
$dumper = new Twig_Profiler_Dumper_Blackfire();
|
483 |
+
file_put_contents('/path/to/profile.prof', $dumper->dump($profile));
|
484 |
+
|
485 |
+
Upload the profile to visualize it (create a `free account
|
486 |
+
<https://blackfire.io/signup>`_ first):
|
487 |
+
|
488 |
+
.. code-block:: sh
|
489 |
+
|
490 |
+
blackfire --slot=7 upload /path/to/profile.prof
|
491 |
+
|
492 |
Optimizer Extension
|
493 |
~~~~~~~~~~~~~~~~~~~
|
494 |
|
vendor/twig/twig/doc/deprecated.rst
CHANGED
@@ -23,8 +23,8 @@ Extensions
|
|
23 |
PEAR
|
24 |
----
|
25 |
|
26 |
-
PEAR support
|
27 |
-
provided. Use Composer instead.
|
28 |
|
29 |
Filters
|
30 |
-------
|
@@ -80,6 +80,12 @@ Tests
|
|
80 |
* The ``sameas`` and ``divisibleby`` tests are deprecated in favor of ``same
|
81 |
as`` and ``divisible by`` respectively.
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
Interfaces
|
84 |
----------
|
85 |
|
@@ -95,6 +101,12 @@ Interfaces
|
|
95 |
those constants Twig_Template::ANY_CALL, Twig_Template::ARRAY_CALL,
|
96 |
Twig_Template::METHOD_CALL)
|
97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
Globals
|
99 |
-------
|
100 |
|
23 |
PEAR
|
24 |
----
|
25 |
|
26 |
+
PEAR support has been discontinued in Twig 1.15.1, and no PEAR packages are
|
27 |
+
provided anymore. Use Composer instead.
|
28 |
|
29 |
Filters
|
30 |
-------
|
80 |
* The ``sameas`` and ``divisibleby`` tests are deprecated in favor of ``same
|
81 |
as`` and ``divisible by`` respectively.
|
82 |
|
83 |
+
Nodes
|
84 |
+
-----
|
85 |
+
|
86 |
+
* As of Twig 1.x, ``Node::toXml()`` is deprecated and will be removed in Twig
|
87 |
+
2.0.
|
88 |
+
|
89 |
Interfaces
|
90 |
----------
|
91 |
|
101 |
those constants Twig_Template::ANY_CALL, Twig_Template::ARRAY_CALL,
|
102 |
Twig_Template::METHOD_CALL)
|
103 |
|
104 |
+
Loaders
|
105 |
+
-------
|
106 |
+
|
107 |
+
* As of Twig 1.x, ``Twig_Loader_String`` is deprecated and will be removed in
|
108 |
+
2.0.
|
109 |
+
|
110 |
Globals
|
111 |
-------
|
112 |
|
vendor/twig/twig/doc/filters/batch.rst
CHANGED
@@ -2,10 +2,10 @@
|
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.12.3
|
5 |
-
The batch filter was added in Twig 1.12.3.
|
6 |
|
7 |
The ``batch`` filter "batches" items by returning a list of lists with the
|
8 |
-
given number of items.
|
9 |
missing items:
|
10 |
|
11 |
.. code-block:: jinja
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.12.3
|
5 |
+
The ``batch`` filter was added in Twig 1.12.3.
|
6 |
|
7 |
The ``batch`` filter "batches" items by returning a list of lists with the
|
8 |
+
given number of items. A second parameter can be provided and used to fill in
|
9 |
missing items:
|
10 |
|
11 |
.. code-block:: jinja
|
vendor/twig/twig/doc/filters/convert_encoding.rst
CHANGED
@@ -21,8 +21,8 @@ is the input charset:
|
|
21 |
Arguments
|
22 |
---------
|
23 |
|
24 |
-
* ``from``: The input charset
|
25 |
* ``to``: The output charset
|
|
|
26 |
|
27 |
.. _`iconv`: http://php.net/iconv
|
28 |
.. _`mbstring`: http://php.net/mbstring
|
21 |
Arguments
|
22 |
---------
|
23 |
|
|
|
24 |
* ``to``: The output charset
|
25 |
+
* ``from``: The input charset
|
26 |
|
27 |
.. _`iconv`: http://php.net/iconv
|
28 |
.. _`mbstring`: http://php.net/mbstring
|
vendor/twig/twig/doc/filters/first.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.12.2
|
5 |
-
The first filter was added in Twig 1.12.2.
|
6 |
|
7 |
The ``first`` filter returns the first "element" of a sequence, a mapping, or
|
8 |
a string:
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.12.2
|
5 |
+
The ``first`` filter was added in Twig 1.12.2.
|
6 |
|
7 |
The ``first`` filter returns the first "element" of a sequence, a mapping, or
|
8 |
a string:
|
vendor/twig/twig/doc/filters/index.rst
CHANGED
@@ -20,10 +20,9 @@ Filters
|
|
20 |
last
|
21 |
length
|
22 |
lower
|
|
|
23 |
nl2br
|
24 |
number_format
|
25 |
-
merge
|
26 |
-
upper
|
27 |
raw
|
28 |
replace
|
29 |
reverse
|
@@ -34,4 +33,5 @@ Filters
|
|
34 |
striptags
|
35 |
title
|
36 |
trim
|
|
|
37 |
url_encode
|
20 |
last
|
21 |
length
|
22 |
lower
|
23 |
+
merge
|
24 |
nl2br
|
25 |
number_format
|
|
|
|
|
26 |
raw
|
27 |
replace
|
28 |
reverse
|
33 |
striptags
|
34 |
title
|
35 |
trim
|
36 |
+
upper
|
37 |
url_encode
|
vendor/twig/twig/doc/filters/json_encode.rst
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
``json_encode``
|
2 |
===============
|
3 |
|
4 |
-
The ``json_encode`` filter returns the JSON representation of a
|
5 |
|
6 |
.. code-block:: jinja
|
7 |
|
1 |
``json_encode``
|
2 |
===============
|
3 |
|
4 |
+
The ``json_encode`` filter returns the JSON representation of a value:
|
5 |
|
6 |
.. code-block:: jinja
|
7 |
|
vendor/twig/twig/doc/filters/last.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.12.2
|
5 |
-
The last filter was added in Twig 1.12.2.
|
6 |
|
7 |
The ``last`` filter returns the last "element" of a sequence, a mapping, or
|
8 |
a string:
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.12.2
|
5 |
+
The ``last`` filter was added in Twig 1.12.2.
|
6 |
|
7 |
The ``last`` filter returns the last "element" of a sequence, a mapping, or
|
8 |
a string:
|
vendor/twig/twig/doc/filters/length.rst
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
``length``
|
2 |
==========
|
3 |
|
4 |
-
The ``length``
|
5 |
the length of a string:
|
6 |
|
7 |
.. code-block:: jinja
|
1 |
``length``
|
2 |
==========
|
3 |
|
4 |
+
The ``length`` filter returns the number of items of a sequence or mapping, or
|
5 |
the length of a string:
|
6 |
|
7 |
.. code-block:: jinja
|
vendor/twig/twig/doc/filters/merge.rst
CHANGED
@@ -39,3 +39,9 @@ overridden.
|
|
39 |
{% set items = { 'apple': 'unknown' }|merge(items) %}
|
40 |
|
41 |
{# items now contains { 'apple': 'fruit', 'orange': 'fruit' } #}
|
|
|
|
|
|
|
|
|
|
|
|
39 |
{% set items = { 'apple': 'unknown' }|merge(items) %}
|
40 |
|
41 |
{# items now contains { 'apple': 'fruit', 'orange': 'fruit' } #}
|
42 |
+
|
43 |
+
.. note::
|
44 |
+
|
45 |
+
Internally, Twig uses the PHP `array_merge`_ function.
|
46 |
+
|
47 |
+
.. _`array_merge`: http://php.net/array_merge
|
vendor/twig/twig/doc/filters/nl2br.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
-
The nl2br filter was added in Twig 1.5.
|
6 |
|
7 |
The ``nl2br`` filter inserts HTML line breaks before all newlines in a string:
|
8 |
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
+
The ``nl2br`` filter was added in Twig 1.5.
|
6 |
|
7 |
The ``nl2br`` filter inserts HTML line breaks before all newlines in a string:
|
8 |
|
vendor/twig/twig/doc/filters/number_format.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
=================
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
-
The number_format filter was added in Twig 1.5
|
6 |
|
7 |
The ``number_format`` filter formats numbers. It is a wrapper around PHP's
|
8 |
`number_format`_ function:
|
2 |
=================
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
+
The ``number_format`` filter was added in Twig 1.5
|
6 |
|
7 |
The ``number_format`` filter formats numbers. It is a wrapper around PHP's
|
8 |
`number_format`_ function:
|
vendor/twig/twig/doc/filters/raw.rst
CHANGED
@@ -10,3 +10,27 @@ if ``raw`` is the last filter applied to it:
|
|
10 |
{% autoescape %}
|
11 |
{{ var|raw }} {# var won't be escaped #}
|
12 |
{% endautoescape %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
{% autoescape %}
|
11 |
{{ var|raw }} {# var won't be escaped #}
|
12 |
{% endautoescape %}
|
13 |
+
|
14 |
+
.. note::
|
15 |
+
|
16 |
+
Be careful when using the ``raw`` filter inside expressions:
|
17 |
+
|
18 |
+
.. code-block:: jinja
|
19 |
+
|
20 |
+
{% autoescape %}
|
21 |
+
{% set hello = '<strong>Hello</strong>' %}
|
22 |
+
{% set hola = '<strong>Hola</strong>' %}
|
23 |
+
|
24 |
+
{{ false ? '<strong>Hola</strong>' : hello|raw }}
|
25 |
+
does not render the same as
|
26 |
+
{{ false ? hola : hello|raw }}
|
27 |
+
but renders the same as
|
28 |
+
{{ (false ? hola : hello)|raw }}
|
29 |
+
{% endautoescape %}
|
30 |
+
|
31 |
+
The first ternary statement is not escaped: ``hello`` is marked as being
|
32 |
+
safe and Twig does not escape static values (see
|
33 |
+
:doc:`escape<../tags/autoescape>`). In the second ternary statement, even
|
34 |
+
if ``hello`` is marked as safe, ``hola`` remains unsafe and so is the whole
|
35 |
+
expression. The third ternary statement is marked as safe and the result is
|
36 |
+
not escaped.
|
vendor/twig/twig/doc/filters/slice.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
===========
|
3 |
|
4 |
.. versionadded:: 1.6
|
5 |
-
The slice filter was added in Twig 1.6.
|
6 |
|
7 |
The ``slice`` filter extracts a slice of a sequence, a mapping, or a string:
|
8 |
|
@@ -32,7 +32,7 @@ As syntactic sugar, you can also use the ``[]`` notation:
|
|
32 |
{# ... #}
|
33 |
{% endfor %}
|
34 |
|
35 |
-
{{ '12345'[1:2] }}
|
36 |
|
37 |
{# you can omit the first argument -- which is the same as 0 #}
|
38 |
{{ '12345'[:2] }} {# will display "12" #}
|
@@ -41,7 +41,7 @@ As syntactic sugar, you can also use the ``[]`` notation:
|
|
41 |
{{ '12345'[2:] }} {# will display "345" #}
|
42 |
|
43 |
The ``slice`` filter works as the `array_slice`_ PHP function for arrays and
|
44 |
-
`
|
45 |
|
46 |
If the start is non-negative, the sequence will start at that start in the
|
47 |
variable. If start is negative, the sequence will start that far from the end
|
@@ -67,4 +67,5 @@ Arguments
|
|
67 |
|
68 |
.. _`Traversable`: http://php.net/manual/en/class.traversable.php
|
69 |
.. _`array_slice`: http://php.net/array_slice
|
|
|
70 |
.. _`substr`: http://php.net/substr
|
2 |
===========
|
3 |
|
4 |
.. versionadded:: 1.6
|
5 |
+
The ``slice`` filter was added in Twig 1.6.
|
6 |
|
7 |
The ``slice`` filter extracts a slice of a sequence, a mapping, or a string:
|
8 |
|
32 |
{# ... #}
|
33 |
{% endfor %}
|
34 |
|
35 |
+
{{ '12345'[1:2] }} {# will display "23" #}
|
36 |
|
37 |
{# you can omit the first argument -- which is the same as 0 #}
|
38 |
{{ '12345'[:2] }} {# will display "12" #}
|
41 |
{{ '12345'[2:] }} {# will display "345" #}
|
42 |
|
43 |
The ``slice`` filter works as the `array_slice`_ PHP function for arrays and
|
44 |
+
`mb_substr`_ for strings with a fallback to `substr`_.
|
45 |
|
46 |
If the start is non-negative, the sequence will start at that start in the
|
47 |
variable. If start is negative, the sequence will start that far from the end
|
67 |
|
68 |
.. _`Traversable`: http://php.net/manual/en/class.traversable.php
|
69 |
.. _`array_slice`: http://php.net/array_slice
|
70 |
+
.. _`mb_substr` : http://php.net/mb-substr
|
71 |
.. _`substr`: http://php.net/substr
|
vendor/twig/twig/doc/filters/split.rst
CHANGED
@@ -2,15 +2,15 @@
|
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.10.3
|
5 |
-
The split filter was added in Twig 1.10.3.
|
6 |
|
7 |
The ``split`` filter splits a string by the given delimiter and returns a list
|
8 |
of strings:
|
9 |
|
10 |
.. code-block:: jinja
|
11 |
|
12 |
-
{
|
13 |
-
{#
|
14 |
|
15 |
You can also pass a ``limit`` argument:
|
16 |
|
@@ -24,19 +24,19 @@ You can also pass a ``limit`` argument:
|
|
24 |
|
25 |
.. code-block:: jinja
|
26 |
|
27 |
-
{
|
28 |
-
{#
|
29 |
|
30 |
If the ``delimiter`` is an empty string, then value will be split by equal
|
31 |
chunks. Length is set by the ``limit`` argument (one character by default).
|
32 |
|
33 |
.. code-block:: jinja
|
34 |
|
35 |
-
{
|
36 |
-
{#
|
37 |
|
38 |
-
{
|
39 |
-
{#
|
40 |
|
41 |
.. note::
|
42 |
|
2 |
=========
|
3 |
|
4 |
.. versionadded:: 1.10.3
|
5 |
+
The ``split`` filter was added in Twig 1.10.3.
|
6 |
|
7 |
The ``split`` filter splits a string by the given delimiter and returns a list
|
8 |
of strings:
|
9 |
|
10 |
.. code-block:: jinja
|
11 |
|
12 |
+
{% set foo = "one,two,three"|split(',') %}
|
13 |
+
{# foo contains ['one', 'two', 'three'] #}
|
14 |
|
15 |
You can also pass a ``limit`` argument:
|
16 |
|
24 |
|
25 |
.. code-block:: jinja
|
26 |
|
27 |
+
{% set foo = "one,two,three,four,five"|split(',', 3) %}
|
28 |
+
{# foo contains ['one', 'two', 'three,four,five'] #}
|
29 |
|
30 |
If the ``delimiter`` is an empty string, then value will be split by equal
|
31 |
chunks. Length is set by the ``limit`` argument (one character by default).
|
32 |
|
33 |
.. code-block:: jinja
|
34 |
|
35 |
+
{% set foo = "123"|split('') %}
|
36 |
+
{# foo contains ['1', '2', '3'] #}
|
37 |
|
38 |
+
{% set bar = "aabbcc"|split('', 2) %}
|
39 |
+
{# bar contains ['aa', 'bb', 'cc'] #}
|
40 |
|
41 |
.. note::
|
42 |
|
vendor/twig/twig/doc/filters/trim.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.6.2
|
5 |
-
The trim filter was added in Twig 1.6.2.
|
6 |
|
7 |
The ``trim`` filter strips whitespace (or other characters) from the beginning
|
8 |
and end of a string:
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.6.2
|
5 |
+
The ``trim`` filter was added in Twig 1.6.2.
|
6 |
|
7 |
The ``trim`` filter strips whitespace (or other characters) from the beginning
|
8 |
and end of a string:
|
vendor/twig/twig/doc/filters/url_encode.rst
CHANGED
@@ -4,6 +4,10 @@
|
|
4 |
.. versionadded:: 1.12.3
|
5 |
Support for encoding an array as query string was added in Twig 1.12.3.
|
6 |
|
|
|
|
|
|
|
|
|
7 |
The ``url_encode`` filter percent encodes a given string as URL segment
|
8 |
or an array as query string:
|
9 |
|
@@ -12,7 +16,7 @@ or an array as query string:
|
|
12 |
{{ "path-seg*ment"|url_encode }}
|
13 |
{# outputs "path-seg%2Ament" #}
|
14 |
|
15 |
-
{{ "string with spaces"|url_encode
|
16 |
{# outputs "string%20with%20spaces" #}
|
17 |
|
18 |
{{ {'param': 'value', 'foo': 'bar'}|url_encode }}
|
@@ -21,7 +25,9 @@ or an array as query string:
|
|
21 |
.. note::
|
22 |
|
23 |
Internally, Twig uses the PHP `urlencode`_ (or `rawurlencode`_ if you pass
|
24 |
-
``true`` as the first parameter) or the `http_build_query`_ function.
|
|
|
|
|
25 |
|
26 |
.. _`urlencode`: http://php.net/urlencode
|
27 |
.. _`rawurlencode`: http://php.net/rawurlencode
|
4 |
.. versionadded:: 1.12.3
|
5 |
Support for encoding an array as query string was added in Twig 1.12.3.
|
6 |
|
7 |
+
.. versionadded:: 1.16.0
|
8 |
+
The ``raw`` argument was removed in Twig 1.16.0. Twig now always encodes
|
9 |
+
according to RFC 3986.
|
10 |
+
|
11 |
The ``url_encode`` filter percent encodes a given string as URL segment
|
12 |
or an array as query string:
|
13 |
|
16 |
{{ "path-seg*ment"|url_encode }}
|
17 |
{# outputs "path-seg%2Ament" #}
|
18 |
|
19 |
+
{{ "string with spaces"|url_encode }}
|
20 |
{# outputs "string%20with%20spaces" #}
|
21 |
|
22 |
{{ {'param': 'value', 'foo': 'bar'}|url_encode }}
|
25 |
.. note::
|
26 |
|
27 |
Internally, Twig uses the PHP `urlencode`_ (or `rawurlencode`_ if you pass
|
28 |
+
``true`` as the first parameter) or the `http_build_query`_ function. Note
|
29 |
+
that as of Twig 1.16.0, ``urlencode`` **always** uses ``rawurlencode`` (the
|
30 |
+
``raw`` argument was removed.)
|
31 |
|
32 |
.. _`urlencode`: http://php.net/urlencode
|
33 |
.. _`rawurlencode`: http://php.net/rawurlencode
|
vendor/twig/twig/doc/functions/date.rst
CHANGED
@@ -15,7 +15,7 @@ Converts an argument to a date to allow date comparison:
|
|
15 |
{# do something #}
|
16 |
{% endif %}
|
17 |
|
18 |
-
The argument must be in
|
19 |
|
20 |
You can pass a timezone as the second argument:
|
21 |
|
@@ -49,4 +49,4 @@ Arguments
|
|
49 |
* ``date``: The date
|
50 |
* ``timezone``: The timezone
|
51 |
|
52 |
-
.. _`date`: http://
|
15 |
{# do something #}
|
16 |
{% endif %}
|
17 |
|
18 |
+
The argument must be in one of PHP’s supported `date and time formats`_.
|
19 |
|
20 |
You can pass a timezone as the second argument:
|
21 |
|
49 |
* ``date``: The date
|
50 |
* ``timezone``: The timezone
|
51 |
|
52 |
+
.. _`date and time formats`: http://php.net/manual/en/datetime.formats.php
|
vendor/twig/twig/doc/functions/dump.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
-
The dump function was added in Twig 1.5.
|
6 |
|
7 |
The ``dump`` function dumps information about a template variable. This is
|
8 |
mostly useful to debug a template that does not behave as expected by
|
2 |
========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
+
The ``dump`` function was added in Twig 1.5.
|
6 |
|
7 |
The ``dump`` function dumps information about a template variable. This is
|
8 |
mostly useful to debug a template that does not behave as expected by
|
vendor/twig/twig/doc/functions/include.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
===========
|
3 |
|
4 |
.. versionadded:: 1.12
|
5 |
-
The include function was added in Twig 1.12.
|
6 |
|
7 |
The ``include`` function returns the rendered content of a template:
|
8 |
|
2 |
===========
|
3 |
|
4 |
.. versionadded:: 1.12
|
5 |
+
The ``include`` function was added in Twig 1.12.
|
6 |
|
7 |
The ``include`` function returns the rendered content of a template:
|
8 |
|
vendor/twig/twig/doc/functions/max.rst
CHANGED
@@ -15,5 +15,6 @@ When called with a mapping, max ignores keys and only compares values:
|
|
15 |
|
16 |
.. code-block:: jinja
|
17 |
|
18 |
-
{{ max({2: "
|
19 |
-
{#
|
|
15 |
|
16 |
.. code-block:: jinja
|
17 |
|
18 |
+
{{ max({2: "e", 1: "a", 3: "b", 5: "d", 4: "c"}) }}
|
19 |
+
{# returns "e" #}
|
20 |
+
|
vendor/twig/twig/doc/functions/min.rst
CHANGED
@@ -15,5 +15,6 @@ When called with a mapping, min ignores keys and only compares values:
|
|
15 |
|
16 |
.. code-block:: jinja
|
17 |
|
18 |
-
{{ min({2: "
|
19 |
-
{#
|
|
15 |
|
16 |
.. code-block:: jinja
|
17 |
|
18 |
+
{{ min({2: "e", 3: "a", 1: "b", 5: "d", 4: "c"}) }}
|
19 |
+
{# returns "a" #}
|
20 |
+
|
vendor/twig/twig/doc/functions/random.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
==========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
-
The random function was added in Twig 1.5.
|
6 |
|
7 |
.. versionadded:: 1.6
|
8 |
String and integer handling was added in Twig 1.6.
|
2 |
==========
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
+
The ``random`` function was added in Twig 1.5.
|
6 |
|
7 |
.. versionadded:: 1.6
|
8 |
String and integer handling was added in Twig 1.6.
|
vendor/twig/twig/doc/functions/source.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
==========
|
3 |
|
4 |
.. versionadded:: 1.15
|
5 |
-
The source function was added in Twig 1.15.
|
6 |
|
7 |
The ``source`` function returns the content of a template without rendering it:
|
8 |
|
2 |
==========
|
3 |
|
4 |
.. versionadded:: 1.15
|
5 |
+
The ``source`` function was added in Twig 1.15.
|
6 |
|
7 |
The ``source`` function returns the content of a template without rendering it:
|
8 |
|
vendor/twig/twig/doc/functions/template_from_string.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
========================
|
3 |
|
4 |
.. versionadded:: 1.11
|
5 |
-
The template_from_string function was added in Twig 1.11.
|
6 |
|
7 |
The ``template_from_string`` function loads a template from a string:
|
8 |
|
2 |
========================
|
3 |
|
4 |
.. versionadded:: 1.11
|
5 |
+
The ``template_from_string`` function was added in Twig 1.11.
|
6 |
|
7 |
The ``template_from_string`` function loads a template from a string:
|
8 |
|
vendor/twig/twig/doc/index.rst
CHANGED
@@ -5,15 +5,15 @@ Twig
|
|
5 |
:maxdepth: 2
|
6 |
|
7 |
intro
|
|
|
8 |
templates
|
9 |
api
|
10 |
advanced
|
11 |
internals
|
|
|
12 |
recipes
|
13 |
coding_standards
|
14 |
tags/index
|
15 |
filters/index
|
16 |
functions/index
|
17 |
tests/index
|
18 |
-
installation
|
19 |
-
deprecated
|
5 |
:maxdepth: 2
|
6 |
|
7 |
intro
|
8 |
+
installation
|
9 |
templates
|
10 |
api
|
11 |
advanced
|
12 |
internals
|
13 |
+
deprecated
|
14 |
recipes
|
15 |
coding_standards
|
16 |
tags/index
|
17 |
filters/index
|
18 |
functions/index
|
19 |
tests/index
|
|
|
|
vendor/twig/twig/doc/installation.rst
CHANGED
@@ -9,51 +9,39 @@ Installing the Twig PHP package
|
|
9 |
Installing via Composer (recommended)
|
10 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
11 |
|
12 |
-
|
13 |
|
14 |
.. code-block:: bash
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
2. Create a ``composer.json`` file in your project root:
|
19 |
-
|
20 |
-
.. code-block:: javascript
|
21 |
-
|
22 |
-
{
|
23 |
-
"require": {
|
24 |
-
"twig/twig": "1.*"
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
3. Install via Composer
|
29 |
-
|
30 |
-
.. code-block:: bash
|
31 |
-
|
32 |
-
php composer.phar install
|
33 |
-
|
34 |
-
.. note::
|
35 |
-
If you want to learn more about Composer, the ``composer.json`` file syntax
|
36 |
-
and its usage, you can read the `online documentation`_.
|
37 |
|
38 |
Installing from the tarball release
|
39 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
40 |
|
41 |
1. Download the most recent tarball from the `download page`_
|
42 |
-
2.
|
43 |
-
3.
|
|
|
44 |
|
45 |
Installing the development version
|
46 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
47 |
|
48 |
-
|
49 |
-
|
|
|
50 |
|
51 |
Installing the PEAR package
|
52 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
53 |
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
Installing the C extension
|
59 |
--------------------------
|
@@ -61,24 +49,34 @@ Installing the C extension
|
|
61 |
.. versionadded:: 1.4
|
62 |
The C extension was added in Twig 1.4.
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
Twig comes with a C extension that enhances the performance of the Twig
|
65 |
-
runtime engine
|
66 |
|
67 |
-
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
|
|
|
|
72 |
|
73 |
-
|
74 |
|
75 |
-
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
$ ./configure
|
80 |
-
$ make
|
81 |
-
$ make install
|
82 |
|
83 |
For Windows:
|
84 |
|
@@ -90,15 +88,15 @@ For Windows:
|
|
90 |
|
91 |
.. tip::
|
92 |
|
93 |
-
For Windows ZendServer,
|
94 |
FAQ`_.
|
95 |
|
96 |
-
You have to use
|
97 |
-
--enable-twig=shared
|
98 |
ZendServer.
|
99 |
|
100 |
The built DLL will be available in
|
101 |
-
C:\\php-sdk\\phpdev\\vcXX\\x86\\php-source-directory\\Release
|
102 |
|
103 |
Finally, enable the extension in your ``php.ini`` configuration file:
|
104 |
|
@@ -112,7 +110,7 @@ advantage of the C extension. Note that this extension does not replace the
|
|
112 |
PHP code but only provides an optimized version of the
|
113 |
``Twig_Template::getAttribute()`` method.
|
114 |
|
115 |
-
.. _`download page`:
|
116 |
-
.. _`
|
117 |
.. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
|
118 |
-
.. _`Zend Server FAQ`:
|
9 |
Installing via Composer (recommended)
|
10 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
11 |
|
12 |
+
Install `Composer`_ and run the following command to get the latest version:
|
13 |
|
14 |
.. code-block:: bash
|
15 |
|
16 |
+
composer require twig/twig:~1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
Installing from the tarball release
|
19 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
20 |
|
21 |
1. Download the most recent tarball from the `download page`_
|
22 |
+
2. Verify the integrity of the tarball http://fabien.potencier.org/article/73/signing-project-releases
|
23 |
+
3. Unpack the tarball
|
24 |
+
4. Move the files somewhere in your project
|
25 |
|
26 |
Installing the development version
|
27 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
28 |
|
29 |
+
.. code-block:: bash
|
30 |
+
|
31 |
+
git clone git://github.com/twigphp/Twig.git
|
32 |
|
33 |
Installing the PEAR package
|
34 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
35 |
|
36 |
+
.. note::
|
37 |
+
|
38 |
+
Using PEAR for installing Twig is deprecated and Twig 1.15.1 was the last
|
39 |
+
version published on the PEAR channel; use Composer instead.
|
40 |
+
|
41 |
+
.. code-block:: bash
|
42 |
+
|
43 |
+
pear channel-discover pear.twig-project.org
|
44 |
+
pear install twig/Twig
|
45 |
|
46 |
Installing the C extension
|
47 |
--------------------------
|
49 |
.. versionadded:: 1.4
|
50 |
The C extension was added in Twig 1.4.
|
51 |
|
52 |
+
.. note::
|
53 |
+
|
54 |
+
The C extension is **optional** but it brings some nice performance
|
55 |
+
improvements. Note that the extension is not a replacement for the PHP
|
56 |
+
code; it only implements a small part of the PHP code to improve the
|
57 |
+
performance at runtime; you must still install the regular PHP code.
|
58 |
+
|
59 |
Twig comes with a C extension that enhances the performance of the Twig
|
60 |
+
runtime engine; install it like any other PHP extensions:
|
61 |
|
62 |
+
.. code-block:: bash
|
63 |
|
64 |
+
cd ext/twig
|
65 |
+
phpize
|
66 |
+
./configure
|
67 |
+
make
|
68 |
+
make install
|
69 |
|
70 |
+
.. note::
|
71 |
|
72 |
+
You can also install the C extension via PEAR (note that this method is
|
73 |
+
deprecated and newer versions of Twig are not available on the PEAR
|
74 |
+
channel):
|
75 |
+
|
76 |
+
.. code-block:: bash
|
77 |
|
78 |
+
pear channel-discover pear.twig-project.org
|
79 |
+
pear install twig/CTwig
|
|
|
|
|
|
|
80 |
|
81 |
For Windows:
|
82 |
|
88 |
|
89 |
.. tip::
|
90 |
|
91 |
+
For Windows ZendServer, ZTS is not enabled as mentioned in `Zend Server
|
92 |
FAQ`_.
|
93 |
|
94 |
+
You have to use ``configure --disable-all --disable-zts --enable-cli
|
95 |
+
--enable-twig=shared`` to be able to build the twig C extension for
|
96 |
ZendServer.
|
97 |
|
98 |
The built DLL will be available in
|
99 |
+
``C:\\php-sdk\\phpdev\\vcXX\\x86\\php-source-directory\\Release``
|
100 |
|
101 |
Finally, enable the extension in your ``php.ini`` configuration file:
|
102 |
|
110 |
PHP code but only provides an optimized version of the
|
111 |
``Twig_Template::getAttribute()`` method.
|
112 |
|
113 |
+
.. _`download page`: https://github.com/twigphp/Twig/tags
|
114 |
+
.. _`Composer`: https://getcomposer.org/download/
|
115 |
.. _`PHP documentation`: https://wiki.php.net/internals/windows/stepbystepbuild
|
116 |
+
.. _`Zend Server FAQ`: http://www.zend.com/en/products/server/faq#faqD6
|
vendor/twig/twig/doc/internals.rst
CHANGED
@@ -124,7 +124,7 @@ using)::
|
|
124 |
{
|
125 |
// line 1
|
126 |
echo "Hello ";
|
127 |
-
echo twig_escape_filter($this->env, $this->getContext($context, "name"), "
|
128 |
}
|
129 |
|
130 |
// some more code
|
124 |
{
|
125 |
// line 1
|
126 |
echo "Hello ";
|
127 |
+
echo twig_escape_filter($this->env, $this->getContext($context, "name"), "html", null, true);
|
128 |
}
|
129 |
|
130 |
// some more code
|
vendor/twig/twig/doc/intro.rst
CHANGED
@@ -33,7 +33,7 @@ The recommended way to install Twig is via Composer:
|
|
33 |
|
34 |
.. code-block:: bash
|
35 |
|
36 |
-
composer require twig/twig
|
37 |
|
38 |
.. note::
|
39 |
|
@@ -50,12 +50,14 @@ This section gives you a brief introduction to the PHP API for Twig.
|
|
50 |
|
51 |
require_once '/path/to/vendor/autoload.php';
|
52 |
|
53 |
-
$loader = new
|
|
|
|
|
54 |
$twig = new Twig_Environment($loader);
|
55 |
|
56 |
-
echo $twig->render('
|
57 |
|
58 |
-
Twig uses a loader (``
|
59 |
environment (``Twig_Environment``) to store the configuration.
|
60 |
|
61 |
The ``render()`` method loads the template passed as a first argument and
|
33 |
|
34 |
.. code-block:: bash
|
35 |
|
36 |
+
composer require "twig/twig:~1.0"
|
37 |
|
38 |
.. note::
|
39 |
|
50 |
|
51 |
require_once '/path/to/vendor/autoload.php';
|
52 |
|
53 |
+
$loader = new Twig_Loader_Array(array(
|
54 |
+
'index' => 'Hello {{ name }}!',
|
55 |
+
));
|
56 |
$twig = new Twig_Environment($loader);
|
57 |
|
58 |
+
echo $twig->render('index', array('name' => 'Fabien'));
|
59 |
|
60 |
+
Twig uses a loader (``Twig_Loader_Array``) to locate templates, and an
|
61 |
environment (``Twig_Environment``) to store the configuration.
|
62 |
|
63 |
The ``render()`` method loads the template passed as a first argument and
|
vendor/twig/twig/doc/recipes.rst
CHANGED
@@ -242,7 +242,7 @@ does not return ``false``.
|
|
242 |
Validating the Template Syntax
|
243 |
------------------------------
|
244 |
|
245 |
-
When template code is
|
246 |
instance), it might be interesting to validate the template syntax before
|
247 |
saving it. If the template code is stored in a `$template` variable, here is
|
248 |
how you can do it::
|
@@ -316,56 +316,6 @@ This can be easily achieved with the following code::
|
|
316 |
return $node;
|
317 |
}
|
318 |
|
319 |
-
Using the Template name to set the default Escaping Strategy
|
320 |
-
------------------------------------------------------------
|
321 |
-
|
322 |
-
.. versionadded:: 1.8
|
323 |
-
This recipe requires Twig 1.8 or later.
|
324 |
-
|
325 |
-
The ``autoescape`` option determines the default escaping strategy to use when
|
326 |
-
no escaping is applied on a variable. When Twig is used to mostly generate
|
327 |
-
HTML files, you can set it to ``html`` and explicitly change it to ``js`` when
|
328 |
-
you have some dynamic JavaScript files thanks to the ``autoescape`` tag:
|
329 |
-
|
330 |
-
.. code-block:: jinja
|
331 |
-
|
332 |
-
{% autoescape 'js' %}
|
333 |
-
... some JS ...
|
334 |
-
{% endautoescape %}
|
335 |
-
|
336 |
-
But if you have many HTML and JS files, and if your template names follow some
|
337 |
-
conventions, you can instead determine the default escaping strategy to use
|
338 |
-
based on the template name. Let's say that your template names always end
|
339 |
-
with ``.html`` for HTML files, ``.js`` for JavaScript ones, and ``.css`` for
|
340 |
-
stylesheets, here is how you can configure Twig::
|
341 |
-
|
342 |
-
class TwigEscapingGuesser
|
343 |
-
{
|
344 |
-
function guess($filename)
|
345 |
-
{
|
346 |
-
// get the format
|
347 |
-
$format = substr($filename, strrpos($filename, '.') + 1);
|
348 |
-
|
349 |
-
switch ($format) {
|
350 |
-
case 'js':
|
351 |
-
return 'js';
|
352 |
-
case 'css':
|
353 |
-
return 'css';
|
354 |
-
case 'html':
|
355 |
-
default:
|
356 |
-
return 'html';
|
357 |
-
}
|
358 |
-
}
|
359 |
-
}
|
360 |
-
|
361 |
-
$loader = new Twig_Loader_Filesystem('/path/to/templates');
|
362 |
-
$twig = new Twig_Environment($loader, array(
|
363 |
-
'autoescape' => array(new TwigEscapingGuesser(), 'guess'),
|
364 |
-
));
|
365 |
-
|
366 |
-
This dynamic strategy does not incur any overhead at runtime as auto-escaping
|
367 |
-
is done at compilation time.
|
368 |
-
|
369 |
Using a Database to store Templates
|
370 |
-----------------------------------
|
371 |
|
242 |
Validating the Template Syntax
|
243 |
------------------------------
|
244 |
|
245 |
+
When template code is provided by a third-party (through a web interface for
|
246 |
instance), it might be interesting to validate the template syntax before
|
247 |
saving it. If the template code is stored in a `$template` variable, here is
|
248 |
how you can do it::
|
316 |
return $node;
|
317 |
}
|
318 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
Using a Database to store Templates
|
320 |
-----------------------------------
|
321 |
|
vendor/twig/twig/doc/tags/autoescape.rst
CHANGED
@@ -65,6 +65,18 @@ Functions returning template data (like :doc:`macros<macro>` and
|
|
65 |
Twig is smart enough to not escape an already escaped value by the
|
66 |
:doc:`escape<../filters/escape>` filter.
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
.. note::
|
69 |
|
70 |
The chapter :doc:`Twig for Developers<../api>` gives more information
|
65 |
Twig is smart enough to not escape an already escaped value by the
|
66 |
:doc:`escape<../filters/escape>` filter.
|
67 |
|
68 |
+
.. note::
|
69 |
+
|
70 |
+
Twig does not escape static expressions:
|
71 |
+
|
72 |
+
.. code-block:: jinja
|
73 |
+
|
74 |
+
{% set hello = "<strong>Hello</strong>" %}
|
75 |
+
{{ hello }}
|
76 |
+
{{ "<strong>world</strong>" }}
|
77 |
+
|
78 |
+
Will be rendered "<strong>Hello</strong> **world**".
|
79 |
+
|
80 |
.. note::
|
81 |
|
82 |
The chapter :doc:`Twig for Developers<../api>` gives more information
|
vendor/twig/twig/doc/tags/do.rst
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
======
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
-
The do tag was added in Twig 1.5.
|
6 |
|
7 |
The ``do`` tag works exactly like the regular variable expression (``{{ ...
|
8 |
}}``) just that it doesn't print anything:
|
2 |
======
|
3 |
|
4 |
.. versionadded:: 1.5
|
5 |
+
The ``do`` tag was added in Twig 1.5.
|
6 |
|
7 |
The ``do`` tag works exactly like the regular variable expression (``{{ ...
|
8 |
}}``) just that it doesn't print anything:
|
vendor/twig/twig/doc/tags/extends.rst
CHANGED
@@ -186,8 +186,8 @@ In this example, the template will extend the "minimum.html" layout template
|
|
186 |
if the ``standalone`` variable evaluates to ``true``, and "base.html"
|
187 |
otherwise.
|
188 |
|
189 |
-
How blocks work?
|
190 |
-
|
191 |
|
192 |
A block provides a way to change how a certain part of a template is rendered
|
193 |
but it does not interfere in any way with the logic around it.
|
186 |
if the ``standalone`` variable evaluates to ``true``, and "base.html"
|
187 |
otherwise.
|
188 |
|
189 |
+
How do blocks work?
|
190 |
+
-------------------
|
191 |
|
192 |
A block provides a way to change how a certain part of a template is rendered
|
193 |
but it does not interfere in any way with the logic around it.
|
vendor/twig/twig/doc/tags/if.rst
CHANGED
@@ -29,6 +29,14 @@ You can also test if an array is not empty:
|
|
29 |
If you want to test if the variable is defined, use ``if users is
|
30 |
defined`` instead.
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
For multiple branches ``elseif`` and ``else`` can be used like in PHP. You can use
|
33 |
more complex ``expressions`` there too:
|
34 |
|
@@ -41,3 +49,20 @@ more complex ``expressions`` there too:
|
|
41 |
{% else %}
|
42 |
Kenny looks okay --- so far
|
43 |
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
If you want to test if the variable is defined, use ``if users is
|
30 |
defined`` instead.
|
31 |
|
32 |
+
You can also use ``not`` to check for values that evaluate to ``false``:
|
33 |
+
|
34 |
+
.. code-block:: jinja
|
35 |
+
|
36 |
+
{% if not user.subscribed %}
|
37 |
+
<p>You are not subscribed to our mailing list.</p>
|
38 |
+
{% endif %}
|
39 |
+
|
40 |
For multiple branches ``elseif`` and ``else`` can be used like in PHP. You can use
|
41 |
more complex ``expressions`` there too:
|
42 |
|
49 |
{% else %}
|
50 |
Kenny looks okay --- so far
|
51 |
{% endif %}
|
52 |
+
|
53 |
+
.. note::
|
54 |
+
|
55 |
+
The rules to determine if an expression is ``true`` or ``false`` are the
|
56 |
+
same as in PHP; here are the edge cases rules:
|
57 |
+
|
58 |
+
====================== ====================
|
59 |
+
Value Boolean evaluation
|
60 |
+
====================== ====================
|
61 |
+
empty string false
|
62 |
+
numeric zero false
|
63 |
+
whitespace-only string true
|
64 |
+
empty array false
|
65 |
+
null false
|
66 |
+
non-empty array true
|
67 |
+
object true
|
68 |
+
====================== ====================
|
vendor/twig/twig/doc/tags/index.rst
CHANGED
@@ -6,10 +6,10 @@ Tags
|
|
6 |
|
7 |
autoescape
|
8 |
block
|
9 |
-
filter
|
10 |
do
|
11 |
embed
|
12 |
extends
|
|
|
13 |
flush
|
14 |
for
|
15 |
from
|
6 |
|
7 |
autoescape
|
8 |
block
|
|
|
9 |
do
|
10 |
embed
|
11 |
extends
|
12 |
+
filter
|
13 |
flush
|
14 |
for
|
15 |
from
|
vendor/twig/twig/doc/tags/use.rst
CHANGED
@@ -39,7 +39,8 @@ The ``use`` statement tells Twig to import the blocks defined in
|
|
39 |
|
40 |
.. code-block:: jinja
|
41 |
|
42 |
-
# blocks.html
|
|
|
43 |
{% block sidebar %}{% endblock %}
|
44 |
|
45 |
In this example, the ``use`` statement imports the ``sidebar`` block into the
|
39 |
|
40 |
.. code-block:: jinja
|
41 |
|
42 |
+
{# blocks.html #}
|
43 |
+
|
44 |
{% block sidebar %}{% endblock %}
|
45 |
|
46 |
In this example, the ``use`` statement imports the ``sidebar`` block into the
|
vendor/twig/twig/doc/templates.rst
CHANGED
@@ -15,7 +15,7 @@ A template contains **variables** or **expressions**, which get replaced with
|
|
15 |
values when the template is evaluated, and **tags**, which control the logic
|
16 |
of the template.
|
17 |
|
18 |
-
Below is a minimal template that illustrates a few basics. We will cover
|
19 |
details later on:
|
20 |
|
21 |
.. code-block:: html+jinja
|
@@ -58,14 +58,15 @@ Many IDEs support syntax highlighting and auto-completion for Twig:
|
|
58 |
* *Komodo* and *Komodo Edit* via the Twig highlight/syntax check mode
|
59 |
* *Notepad++* via the `Notepad++ Twig Highlighter`_
|
60 |
* *Emacs* via `web-mode.el`_
|
|
|
61 |
|
62 |
Variables
|
63 |
---------
|
64 |
|
65 |
-
The application passes variables to the templates
|
66 |
-
template. Variables may have attributes or elements
|
67 |
-
too.
|
68 |
-
|
69 |
|
70 |
You can use a dot (``.``) to access attributes of a variable (methods or
|
71 |
properties of a PHP object, or items of a PHP array), or the so-called
|
@@ -88,16 +89,16 @@ access the variable attribute:
|
|
88 |
.. note::
|
89 |
|
90 |
It's important to know that the curly braces are *not* part of the
|
91 |
-
variable but the print statement.
|
92 |
-
don't put the braces around.
|
93 |
|
94 |
-
If a variable or attribute does not exist, you will
|
95 |
-
when the ``strict_variables`` option is set to ``false
|
96 |
-
throw an error (see :ref:`environment options<environment_options>`).
|
97 |
|
98 |
.. sidebar:: Implementation
|
99 |
|
100 |
-
For convenience sake ``foo.bar`` does the following things on the PHP
|
101 |
layer:
|
102 |
|
103 |
* check if ``foo`` is an array and ``bar`` a valid element;
|
@@ -115,7 +116,7 @@ throw an error (see :ref:`environment options<environment_options>`).
|
|
115 |
|
116 |
.. note::
|
117 |
|
118 |
-
If you want to
|
119 |
:doc:`attribute<functions/attribute>` function instead.
|
120 |
|
121 |
Global Variables
|
@@ -161,7 +162,7 @@ example will join a list by commas:
|
|
161 |
|
162 |
{{ list|join(', ') }}
|
163 |
|
164 |
-
To apply a filter on a section of code, wrap it
|
165 |
:doc:`filter<tags/filter>` tag:
|
166 |
|
167 |
.. code-block:: jinja
|
@@ -170,7 +171,7 @@ To apply a filter on a section of code, wrap it with the
|
|
170 |
This text becomes uppercase
|
171 |
{% endfilter %}
|
172 |
|
173 |
-
Go to the :doc:`filters<filters/index>` page to learn more about
|
174 |
filters.
|
175 |
|
176 |
Functions
|
@@ -222,7 +223,7 @@ to change the default value:
|
|
222 |
{# the first argument is the date format, which defaults to the global date format if null is passed #}
|
223 |
{{ "now"|date(null, "Europe/Paris") }}
|
224 |
|
225 |
-
{# or skip the format value by using a named argument for the
|
226 |
{{ "now"|date(timezone="Europe/Paris") }}
|
227 |
|
228 |
You can also use both positional and named arguments in one call, in which
|
@@ -327,7 +328,7 @@ allows you to build a base "skeleton" template that contains all the common
|
|
327 |
elements of your site and defines **blocks** that child templates can
|
328 |
override.
|
329 |
|
330 |
-
Sounds complicated but is very basic. It's easier to understand it by
|
331 |
starting with an example.
|
332 |
|
333 |
Let's define a base template, ``base.html``, which defines a simple HTML
|
@@ -692,7 +693,7 @@ string:
|
|
692 |
|
693 |
.. code-block:: jinja
|
694 |
|
695 |
-
{% if phone matches '
|
696 |
{% endif %}
|
697 |
|
698 |
Containment Operator
|
@@ -865,9 +866,10 @@ Extension<creating_extensions>` chapter.
|
|
865 |
.. _`Twig syntax plugin`: http://plugins.netbeans.org/plugin/37069/php-twig
|
866 |
.. _`Twig plugin`: https://github.com/pulse00/Twig-Eclipse-Plugin
|
867 |
.. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language
|
868 |
-
.. _`extension repository`: http://github.com/
|
869 |
.. _`Twig syntax mode`: https://github.com/bobthecow/Twig-HTML.mode
|
870 |
.. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode
|
871 |
.. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
|
872 |
.. _`web-mode.el`: http://web-mode.org/
|
873 |
.. _`regular expressions`: http://php.net/manual/en/pcre.pattern.php
|
|
15 |
values when the template is evaluated, and **tags**, which control the logic
|
16 |
of the template.
|
17 |
|
18 |
+
Below is a minimal template that illustrates a few basics. We will cover further
|
19 |
details later on:
|
20 |
|
21 |
.. code-block:: html+jinja
|
58 |
* *Komodo* and *Komodo Edit* via the Twig highlight/syntax check mode
|
59 |
* *Notepad++* via the `Notepad++ Twig Highlighter`_
|
60 |
* *Emacs* via `web-mode.el`_
|
61 |
+
* *Atom* via the `PHP-twig for atom`_
|
62 |
|
63 |
Variables
|
64 |
---------
|
65 |
|
66 |
+
The application passes variables to the templates for manipulation in the
|
67 |
+
template. Variables may have attributes or elements you can access,
|
68 |
+
too. The visual representation of a variable depends heavily on the application providing
|
69 |
+
it.
|
70 |
|
71 |
You can use a dot (``.``) to access attributes of a variable (methods or
|
72 |
properties of a PHP object, or items of a PHP array), or the so-called
|
89 |
.. note::
|
90 |
|
91 |
It's important to know that the curly braces are *not* part of the
|
92 |
+
variable but the print statement. When accessing variables inside tags,
|
93 |
+
don't put the braces around them.
|
94 |
|
95 |
+
If a variable or attribute does not exist, you will receive a ``null`` value
|
96 |
+
when the ``strict_variables`` option is set to ``false``; alternatively, if ``strict_variables``
|
97 |
+
is set, Twig will throw an error (see :ref:`environment options<environment_options>`).
|
98 |
|
99 |
.. sidebar:: Implementation
|
100 |
|
101 |
+
For convenience's sake ``foo.bar`` does the following things on the PHP
|
102 |
layer:
|
103 |
|
104 |
* check if ``foo`` is an array and ``bar`` a valid element;
|
116 |
|
117 |
.. note::
|
118 |
|
119 |
+
If you want to access a dynamic attribute of a variable, use the
|
120 |
:doc:`attribute<functions/attribute>` function instead.
|
121 |
|
122 |
Global Variables
|
162 |
|
163 |
{{ list|join(', ') }}
|
164 |
|
165 |
+
To apply a filter on a section of code, wrap it in the
|
166 |
:doc:`filter<tags/filter>` tag:
|
167 |
|
168 |
.. code-block:: jinja
|
171 |
This text becomes uppercase
|
172 |
{% endfilter %}
|
173 |
|
174 |
+
Go to the :doc:`filters<filters/index>` page to learn more about built-in
|
175 |
filters.
|
176 |
|
177 |
Functions
|
223 |
{# the first argument is the date format, which defaults to the global date format if null is passed #}
|
224 |
{{ "now"|date(null, "Europe/Paris") }}
|
225 |
|
226 |
+
{# or skip the format value by using a named argument for the time zone #}
|
227 |
{{ "now"|date(timezone="Europe/Paris") }}
|
228 |
|
229 |
You can also use both positional and named arguments in one call, in which
|
328 |
elements of your site and defines **blocks** that child templates can
|
329 |
override.
|
330 |
|
331 |
+
Sounds complicated but it is very basic. It's easier to understand it by
|
332 |
starting with an example.
|
333 |
|
334 |
Let's define a base template, ``base.html``, which defines a simple HTML
|
693 |
|
694 |
.. code-block:: jinja
|
695 |
|
696 |
+
{% if phone matches '/^[\\d\\.]+$/' %}
|
697 |
{% endif %}
|
698 |
|
699 |
Containment Operator
|
866 |
.. _`Twig syntax plugin`: http://plugins.netbeans.org/plugin/37069/php-twig
|
867 |
.. _`Twig plugin`: https://github.com/pulse00/Twig-Eclipse-Plugin
|
868 |
.. _`Twig language definition`: https://github.com/gabrielcorpse/gedit-twig-template-language
|
869 |
+
.. _`extension repository`: http://github.com/twigphp/Twig-extensions
|
870 |
.. _`Twig syntax mode`: https://github.com/bobthecow/Twig-HTML.mode
|
871 |
.. _`other Twig syntax mode`: https://github.com/muxx/Twig-HTML.mode
|
872 |
.. _`Notepad++ Twig Highlighter`: https://github.com/Banane9/notepadplusplus-twig
|
873 |
.. _`web-mode.el`: http://web-mode.org/
|
874 |
.. _`regular expressions`: http://php.net/manual/en/pcre.pattern.php
|
875 |
+
.. _`PHP-twig for atom`: https://github.com/reesef/php-twig
|
vendor/twig/twig/doc/tests/sameas.rst
CHANGED
@@ -4,8 +4,8 @@
|
|
4 |
.. versionadded:: 1.14.2
|
5 |
The ``same as`` test was added in Twig 1.14.2 as an alias for ``sameas``.
|
6 |
|
7 |
-
``same as`` checks if a variable
|
8 |
-
|
9 |
|
10 |
.. code-block:: jinja
|
11 |
|
4 |
.. versionadded:: 1.14.2
|
5 |
The ``same as`` test was added in Twig 1.14.2 as an alias for ``sameas``.
|
6 |
|
7 |
+
``same as`` checks if a variable is the same as another variable.
|
8 |
+
This is the equivalent to ``===`` in PHP:
|
9 |
|
10 |
.. code-block:: jinja
|
11 |
|
vendor/twig/twig/ext/twig/LICENSE
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
Copyright (c) 2009-2013 by the Twig Team, see AUTHORS for more details.
|
2 |
-
|
3 |
-
Some rights reserved.
|
4 |
-
|
5 |
-
Redistribution and use in source and binary forms, with or without
|
6 |
-
modification, are permitted provided that the following conditions are
|
7 |
-
met:
|
8 |
-
|
9 |
-
* Redistributions of source code must retain the above copyright
|
10 |
-
notice, this list of conditions and the following disclaimer.
|
11 |
-
|
12 |
-
* Redistributions in binary form must reproduce the above
|
13 |
-
copyright notice, this list of conditions and the following
|
14 |
-
disclaimer in the documentation and/or other materials provided
|
15 |
-
with the distribution.
|
16 |
-
|
17 |
-
* The names of the contributors may not be used to endorse or
|
18 |
-
promote products derived from this software without specific
|
19 |
-
prior written permission.
|
20 |
-
|
21 |
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
22 |
-
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
23 |
-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
24 |
-
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
25 |
-
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
26 |
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
27 |
-
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
28 |
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
29 |
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
30 |
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
31 |
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/ext/twig/php_twig.h
CHANGED
@@ -15,17 +15,21 @@
|
|
15 |
#ifndef PHP_TWIG_H
|
16 |
#define PHP_TWIG_H
|
17 |
|
18 |
-
#define PHP_TWIG_VERSION "1.
|
19 |
|
20 |
#include "php.h"
|
21 |
|
22 |
extern zend_module_entry twig_module_entry;
|
23 |
#define phpext_twig_ptr &twig_module_entry
|
|
|
|
|
|
|
24 |
|
25 |
#ifdef ZTS
|
26 |
#include "TSRM.h"
|
27 |
#endif
|
28 |
|
29 |
PHP_FUNCTION(twig_template_get_attributes);
|
|
|
30 |
|
31 |
#endif
|
15 |
#ifndef PHP_TWIG_H
|
16 |
#define PHP_TWIG_H
|
17 |
|
18 |
+
#define PHP_TWIG_VERSION "1.18.1"
|
19 |
|
20 |
#include "php.h"
|
21 |
|
22 |
extern zend_module_entry twig_module_entry;
|
23 |
#define phpext_twig_ptr &twig_module_entry
|
24 |
+
#ifndef PHP_WIN32
|
25 |
+
zend_module_entry *get_module(void);
|
26 |
+
#endif
|
27 |
|
28 |
#ifdef ZTS
|
29 |
#include "TSRM.h"
|
30 |
#endif
|
31 |
|
32 |
PHP_FUNCTION(twig_template_get_attributes);
|
33 |
+
PHP_RSHUTDOWN_FUNCTION(twig);
|
34 |
|
35 |
#endif
|
vendor/twig/twig/ext/twig/twig.c
CHANGED
@@ -54,11 +54,22 @@ ZEND_BEGIN_ARG_INFO_EX(twig_template_get_attribute_args, ZEND_SEND_BY_VAL, ZEND_
|
|
54 |
ZEND_ARG_INFO(0, isDefinedTest)
|
55 |
ZEND_END_ARG_INFO()
|
56 |
|
57 |
-
|
|
|
|
|
|
|
|
|
58 |
PHP_FE(twig_template_get_attributes, twig_template_get_attribute_args)
|
59 |
-
|
60 |
};
|
61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
zend_module_entry twig_module_entry = {
|
64 |
STANDARD_MODULE_HEADER,
|
@@ -67,7 +78,7 @@ zend_module_entry twig_module_entry = {
|
|
67 |
NULL,
|
68 |
NULL,
|
69 |
NULL,
|
70 |
-
|
71 |
NULL,
|
72 |
PHP_TWIG_VERSION,
|
73 |
STANDARD_MODULE_PROPERTIES
|
@@ -78,7 +89,7 @@ zend_module_entry twig_module_entry = {
|
|
78 |
ZEND_GET_MODULE(twig)
|
79 |
#endif
|
80 |
|
81 |
-
int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key)
|
82 |
{
|
83 |
if (Z_TYPE_P(array) != IS_ARRAY) {
|
84 |
return 0;
|
@@ -100,7 +111,7 @@ int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key)
|
|
100 |
}
|
101 |
}
|
102 |
|
103 |
-
int TWIG_INSTANCE_OF(zval *object, zend_class_entry *interface TSRMLS_DC)
|
104 |
{
|
105 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
106 |
return 0;
|
@@ -108,7 +119,7 @@ int TWIG_INSTANCE_OF(zval *object, zend_class_entry *interface TSRMLS_DC)
|
|
108 |
return instanceof_function(Z_OBJCE_P(object), interface TSRMLS_CC);
|
109 |
}
|
110 |
|
111 |
-
int TWIG_INSTANCE_OF_USERLAND(zval *object, char *interface TSRMLS_DC)
|
112 |
{
|
113 |
zend_class_entry **pce;
|
114 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
@@ -120,7 +131,7 @@ int TWIG_INSTANCE_OF_USERLAND(zval *object, char *interface TSRMLS_DC)
|
|
120 |
return instanceof_function(Z_OBJCE_P(object), *pce TSRMLS_CC);
|
121 |
}
|
122 |
|
123 |
-
zval *TWIG_GET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
124 |
{
|
125 |
zend_class_entry *ce = Z_OBJCE_P(object);
|
126 |
zval *retval;
|
@@ -143,7 +154,7 @@ zval *TWIG_GET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
|
143 |
return NULL;
|
144 |
}
|
145 |
|
146 |
-
int TWIG_ISSET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
147 |
{
|
148 |
zend_class_entry *ce = Z_OBJCE_P(object);
|
149 |
zval *retval;
|
@@ -166,7 +177,7 @@ int TWIG_ISSET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
|
166 |
return 0;
|
167 |
}
|
168 |
|
169 |
-
char *TWIG_STRTOLOWER(const char *str, int str_len)
|
170 |
{
|
171 |
char *item_dup;
|
172 |
|
@@ -175,7 +186,7 @@ char *TWIG_STRTOLOWER(const char *str, int str_len)
|
|
175 |
return item_dup;
|
176 |
}
|
177 |
|
178 |
-
zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TSRMLS_DC)
|
179 |
{
|
180 |
zend_fcall_info fci;
|
181 |
zval ***args = NULL;
|
@@ -227,7 +238,7 @@ zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TS
|
|
227 |
return retval_ptr;
|
228 |
}
|
229 |
|
230 |
-
int TWIG_CALL_BOOLEAN(zval *object, char *functionName TSRMLS_DC)
|
231 |
{
|
232 |
zval *ret;
|
233 |
int res;
|
@@ -238,7 +249,7 @@ int TWIG_CALL_BOOLEAN(zval *object, char *functionName TSRMLS_DC)
|
|
238 |
return res;
|
239 |
}
|
240 |
|
241 |
-
zval *TWIG_GET_STATIC_PROPERTY(zval *class, char *prop_name TSRMLS_DC)
|
242 |
{
|
243 |
zval **tmp_zval;
|
244 |
zend_class_entry *ce;
|
@@ -256,7 +267,7 @@ zval *TWIG_GET_STATIC_PROPERTY(zval *class, char *prop_name TSRMLS_DC)
|
|
256 |
return *tmp_zval;
|
257 |
}
|
258 |
|
259 |
-
zval *TWIG_GET_ARRAY_ELEMENT_ZVAL(zval *class, zval *prop_name TSRMLS_DC)
|
260 |
{
|
261 |
zval **tmp_zval;
|
262 |
|
@@ -288,7 +299,7 @@ zval *TWIG_GET_ARRAY_ELEMENT_ZVAL(zval *class, zval *prop_name TSRMLS_DC)
|
|
288 |
return NULL;
|
289 |
}
|
290 |
|
291 |
-
zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length TSRMLS_DC)
|
292 |
{
|
293 |
zval **tmp_zval;
|
294 |
|
@@ -314,7 +325,7 @@ zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length
|
|
314 |
return NULL;
|
315 |
}
|
316 |
|
317 |
-
zval *TWIG_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
318 |
{
|
319 |
zval *tmp = NULL;
|
320 |
|
@@ -331,7 +342,7 @@ zval *TWIG_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
|
331 |
return tmp;
|
332 |
}
|
333 |
|
334 |
-
int TWIG_HAS_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
335 |
{
|
336 |
if (Z_OBJ_HT_P(object)->has_property) {
|
337 |
#if PHP_VERSION_ID >= 50400
|
@@ -343,7 +354,7 @@ int TWIG_HAS_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
|
343 |
return 0;
|
344 |
}
|
345 |
|
346 |
-
int TWIG_HAS_DYNAMIC_PROPERTY(zval *object, char *prop, int prop_len TSRMLS_DC)
|
347 |
{
|
348 |
if (Z_OBJ_HT_P(object)->get_properties) {
|
349 |
return zend_hash_quick_exists(
|
@@ -356,7 +367,7 @@ int TWIG_HAS_DYNAMIC_PROPERTY(zval *object, char *prop, int prop_len TSRMLS_DC)
|
|
356 |
return 0;
|
357 |
}
|
358 |
|
359 |
-
zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC)
|
360 |
{
|
361 |
zval *tmp_name_zval, *tmp;
|
362 |
|
@@ -367,12 +378,7 @@ zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC)
|
|
367 |
return tmp;
|
368 |
}
|
369 |
|
370 |
-
|
371 |
-
{
|
372 |
-
return 0;
|
373 |
-
}
|
374 |
-
|
375 |
-
zval *TWIG_CALL_S(zval *object, char *method, char *arg0 TSRMLS_DC)
|
376 |
{
|
377 |
zend_fcall_info fci;
|
378 |
zval **args[1];
|
@@ -410,7 +416,7 @@ zval *TWIG_CALL_S(zval *object, char *method, char *arg0 TSRMLS_DC)
|
|
410 |
return retval_ptr;
|
411 |
}
|
412 |
|
413 |
-
int TWIG_CALL_SB(zval *object, char *method, char *arg0 TSRMLS_DC)
|
414 |
{
|
415 |
zval *retval_ptr;
|
416 |
int success;
|
@@ -425,51 +431,7 @@ int TWIG_CALL_SB(zval *object, char *method, char *arg0 TSRMLS_DC)
|
|
425 |
return success;
|
426 |
}
|
427 |
|
428 |
-
int
|
429 |
-
{
|
430 |
-
zend_fcall_info fci;
|
431 |
-
zval **args[1];
|
432 |
-
zval *zfunction;
|
433 |
-
zval *retval_ptr;
|
434 |
-
int success;
|
435 |
-
|
436 |
-
args[0] = &arg1;
|
437 |
-
|
438 |
-
MAKE_STD_ZVAL(zfunction);
|
439 |
-
ZVAL_STRING(zfunction, method, 1);
|
440 |
-
fci.size = sizeof(fci);
|
441 |
-
fci.function_table = EG(function_table);
|
442 |
-
fci.function_name = zfunction;
|
443 |
-
fci.symbol_table = NULL;
|
444 |
-
#if PHP_VERSION_ID >= 50300
|
445 |
-
fci.object_ptr = object;
|
446 |
-
#else
|
447 |
-
fci.object_pp = &object;
|
448 |
-
#endif
|
449 |
-
fci.retval_ptr_ptr = &retval_ptr;
|
450 |
-
fci.param_count = 1;
|
451 |
-
fci.params = args;
|
452 |
-
fci.no_separation = 0;
|
453 |
-
|
454 |
-
if (zend_call_function(&fci, NULL TSRMLS_CC) == FAILURE) {
|
455 |
-
FREE_DTOR(zfunction);
|
456 |
-
if (retval_ptr) {
|
457 |
-
zval_ptr_dtor(&retval_ptr);
|
458 |
-
}
|
459 |
-
return 0;
|
460 |
-
}
|
461 |
-
|
462 |
-
FREE_DTOR(zfunction);
|
463 |
-
|
464 |
-
success = (retval_ptr && (Z_TYPE_P(retval_ptr) == IS_BOOL) && Z_LVAL_P(retval_ptr));
|
465 |
-
if (retval_ptr) {
|
466 |
-
zval_ptr_dtor(&retval_ptr);
|
467 |
-
}
|
468 |
-
|
469 |
-
return success;
|
470 |
-
}
|
471 |
-
|
472 |
-
int TWIG_CALL_ZZ(zval *object, char *method, zval *arg1, zval *arg2 TSRMLS_DC)
|
473 |
{
|
474 |
zend_fcall_info fci;
|
475 |
zval **args[2];
|
@@ -516,7 +478,7 @@ int TWIG_CALL_ZZ(zval *object, char *method, zval *arg1, zval *arg2 TSRMLS_DC)
|
|
516 |
# define Z_UNSET_ISREF_P(pz) pz->is_ref = 0
|
517 |
#endif
|
518 |
|
519 |
-
void TWIG_NEW(zval *object, char *class, zval *arg0, zval *arg1 TSRMLS_DC)
|
520 |
{
|
521 |
zend_class_entry **pce;
|
522 |
|
@@ -561,7 +523,7 @@ static int twig_add_array_key_to_string(void *pDest APPLY_TSRMLS_DC, int num_arg
|
|
561 |
return 0;
|
562 |
}
|
563 |
|
564 |
-
char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC)
|
565 |
{
|
566 |
smart_str collector = { 0, 0, 0 };
|
567 |
|
@@ -572,24 +534,6 @@ char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC)
|
|
572 |
return collector.c;
|
573 |
}
|
574 |
|
575 |
-
static void TWIG_THROW_EXCEPTION(char *exception_name TSRMLS_DC, char *message, ...)
|
576 |
-
{
|
577 |
-
char *buffer;
|
578 |
-
va_list args;
|
579 |
-
zend_class_entry **pce;
|
580 |
-
|
581 |
-
if (zend_lookup_class(exception_name, strlen(exception_name), &pce TSRMLS_CC) == FAILURE) {
|
582 |
-
return;
|
583 |
-
}
|
584 |
-
|
585 |
-
va_start(args, message);
|
586 |
-
vspprintf(&buffer, 0, message, args);
|
587 |
-
va_end(args);
|
588 |
-
|
589 |
-
zend_throw_exception_ex(*pce, 0 TSRMLS_CC, buffer);
|
590 |
-
efree(buffer);
|
591 |
-
}
|
592 |
-
|
593 |
static void TWIG_RUNTIME_ERROR(zval *template TSRMLS_DC, char *message, ...)
|
594 |
{
|
595 |
char *buffer;
|
@@ -794,6 +738,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
794 |
) {
|
795 |
|
796 |
if (isDefinedTest) {
|
|
|
797 |
RETURN_TRUE;
|
798 |
}
|
799 |
|
@@ -806,6 +751,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
806 |
if (free_ret) {
|
807 |
zval_ptr_dtor(&ret);
|
808 |
}
|
|
|
809 |
return;
|
810 |
}
|
811 |
/*
|
@@ -819,9 +765,11 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
819 |
*/
|
820 |
if (strcmp("array", type) == 0 || Z_TYPE_P(object) != IS_OBJECT) {
|
821 |
if (isDefinedTest) {
|
|
|
822 |
RETURN_FALSE;
|
823 |
}
|
824 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
|
|
825 |
return;
|
826 |
}
|
827 |
/*
|
@@ -830,7 +778,11 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
830 |
} elseif (is_object($object)) {
|
831 |
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface', $item, get_class($object));
|
832 |
} elseif (is_array($object)) {
|
833 |
-
|
|
|
|
|
|
|
|
|
834 |
} elseif (Twig_Template::ARRAY_CALL === $type) {
|
835 |
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
|
836 |
} else {
|
@@ -845,7 +797,13 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
845 |
} else if (Z_TYPE_P(object) == IS_OBJECT) {
|
846 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to access a key \"%s\" on an object of class \"%s\" that does not implement ArrayAccess interface", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
|
847 |
} else if (Z_TYPE_P(object) == IS_ARRAY) {
|
848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
849 |
} else {
|
850 |
char *type_name = zend_zval_type_name(object);
|
851 |
Z_ADDREF_P(object);
|
@@ -857,6 +815,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
857 |
item, type_name, Z_STRVAL_P(object));
|
858 |
zval_ptr_dtor(&object);
|
859 |
}
|
|
|
860 |
return;
|
861 |
}
|
862 |
}
|
@@ -870,6 +829,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
870 |
|
871 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
872 |
if (isDefinedTest) {
|
|
|
873 |
RETURN_FALSE;
|
874 |
}
|
875 |
/*
|
@@ -880,6 +840,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
880 |
}
|
881 |
*/
|
882 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
|
|
883 |
return;
|
884 |
}
|
885 |
|
@@ -890,7 +851,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
890 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a %s variable (\"%s\")", item, type_name, Z_STRVAL_P(object));
|
891 |
|
892 |
zval_ptr_dtor(&object);
|
893 |
-
|
894 |
return;
|
895 |
}
|
896 |
/*
|
@@ -931,16 +892,19 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
931 |
|
932 |
if (tmp_item || TWIG_HAS_PROPERTY(object, zitem TSRMLS_CC) || TWIG_HAS_DYNAMIC_PROPERTY(object, item, item_len TSRMLS_CC)) {
|
933 |
if (isDefinedTest) {
|
|
|
934 |
RETURN_TRUE;
|
935 |
}
|
936 |
if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "sandbox" TSRMLS_CC)) {
|
937 |
TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "sandbox" TSRMLS_CC), "checkPropertyAllowed", object, zitem TSRMLS_CC);
|
938 |
}
|
939 |
if (EG(exception)) {
|
|
|
940 |
return;
|
941 |
}
|
942 |
|
943 |
ret = TWIG_PROPERTY(object, zitem TSRMLS_CC);
|
|
|
944 |
RETURN_ZVAL(ret, 1, 0);
|
945 |
}
|
946 |
}
|
@@ -1013,19 +977,22 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
1013 |
efree(lcItem);
|
1014 |
|
1015 |
if (isDefinedTest) {
|
|
|
1016 |
RETURN_FALSE;
|
1017 |
}
|
1018 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
|
|
1019 |
return;
|
1020 |
}
|
1021 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Method \"%s\" for object \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
|
|
|
1022 |
return;
|
1023 |
}
|
1024 |
|
1025 |
if (isDefinedTest) {
|
1026 |
efree(tmp_method_name_get);
|
1027 |
efree(tmp_method_name_is);
|
1028 |
-
efree(lcItem);
|
1029 |
RETURN_TRUE;
|
1030 |
}
|
1031 |
/*
|
@@ -1038,11 +1005,11 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
1038 |
if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "sandbox" TSRMLS_CC)) {
|
1039 |
TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "sandbox" TSRMLS_CC), "checkMethodAllowed", object, zmethod TSRMLS_CC);
|
1040 |
}
|
|
|
1041 |
if (EG(exception)) {
|
1042 |
efree(tmp_method_name_get);
|
1043 |
efree(tmp_method_name_is);
|
1044 |
-
efree(lcItem);
|
1045 |
-
zval_ptr_dtor(&zmethod);
|
1046 |
return;
|
1047 |
}
|
1048 |
/*
|
@@ -1060,6 +1027,9 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
1060 |
ret = TWIG_CALL_USER_FUNC_ARRAY(object, method, arguments TSRMLS_CC);
|
1061 |
if (EG(exception) && TWIG_INSTANCE_OF(EG(exception), spl_ce_BadMethodCallException TSRMLS_CC)) {
|
1062 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
|
|
|
|
|
|
1063 |
zend_clear_exception(TSRMLS_C);
|
1064 |
return;
|
1065 |
}
|
@@ -1068,7 +1038,6 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
1068 |
efree(tmp_method_name_get);
|
1069 |
efree(tmp_method_name_is);
|
1070 |
efree(lcItem);
|
1071 |
-
zval_ptr_dtor(&zmethod);
|
1072 |
}
|
1073 |
/*
|
1074 |
// useful when calling a template method from a template
|
@@ -1079,6 +1048,7 @@ PHP_FUNCTION(twig_template_get_attributes)
|
|
1079 |
|
1080 |
return $ret;
|
1081 |
*/
|
|
|
1082 |
// ret can be null, if e.g. the called method throws an exception
|
1083 |
if (ret) {
|
1084 |
if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) {
|
54 |
ZEND_ARG_INFO(0, isDefinedTest)
|
55 |
ZEND_END_ARG_INFO()
|
56 |
|
57 |
+
#ifndef PHP_FE_END
|
58 |
+
#define PHP_FE_END { NULL, NULL, NULL, 0, 0 }
|
59 |
+
#endif
|
60 |
+
|
61 |
+
static const zend_function_entry twig_functions[] = {
|
62 |
PHP_FE(twig_template_get_attributes, twig_template_get_attribute_args)
|
63 |
+
PHP_FE_END
|
64 |
};
|
65 |
|
66 |
+
PHP_RSHUTDOWN_FUNCTION(twig)
|
67 |
+
{
|
68 |
+
#if ZEND_DEBUG
|
69 |
+
CG(unclean_shutdown) = 0; /* get rid of PHPUnit's exit() and report memleaks */
|
70 |
+
#endif
|
71 |
+
return SUCCESS;
|
72 |
+
}
|
73 |
|
74 |
zend_module_entry twig_module_entry = {
|
75 |
STANDARD_MODULE_HEADER,
|
78 |
NULL,
|
79 |
NULL,
|
80 |
NULL,
|
81 |
+
PHP_RSHUTDOWN(twig),
|
82 |
NULL,
|
83 |
PHP_TWIG_VERSION,
|
84 |
STANDARD_MODULE_PROPERTIES
|
89 |
ZEND_GET_MODULE(twig)
|
90 |
#endif
|
91 |
|
92 |
+
static int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key)
|
93 |
{
|
94 |
if (Z_TYPE_P(array) != IS_ARRAY) {
|
95 |
return 0;
|
111 |
}
|
112 |
}
|
113 |
|
114 |
+
static int TWIG_INSTANCE_OF(zval *object, zend_class_entry *interface TSRMLS_DC)
|
115 |
{
|
116 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
117 |
return 0;
|
119 |
return instanceof_function(Z_OBJCE_P(object), interface TSRMLS_CC);
|
120 |
}
|
121 |
|
122 |
+
static int TWIG_INSTANCE_OF_USERLAND(zval *object, char *interface TSRMLS_DC)
|
123 |
{
|
124 |
zend_class_entry **pce;
|
125 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
131 |
return instanceof_function(Z_OBJCE_P(object), *pce TSRMLS_CC);
|
132 |
}
|
133 |
|
134 |
+
static zval *TWIG_GET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
135 |
{
|
136 |
zend_class_entry *ce = Z_OBJCE_P(object);
|
137 |
zval *retval;
|
154 |
return NULL;
|
155 |
}
|
156 |
|
157 |
+
static int TWIG_ISSET_ARRAYOBJECT_ELEMENT(zval *object, zval *offset TSRMLS_DC)
|
158 |
{
|
159 |
zend_class_entry *ce = Z_OBJCE_P(object);
|
160 |
zval *retval;
|
177 |
return 0;
|
178 |
}
|
179 |
|
180 |
+
static char *TWIG_STRTOLOWER(const char *str, int str_len)
|
181 |
{
|
182 |
char *item_dup;
|
183 |
|
186 |
return item_dup;
|
187 |
}
|
188 |
|
189 |
+
static zval *TWIG_CALL_USER_FUNC_ARRAY(zval *object, char *function, zval *arguments TSRMLS_DC)
|
190 |
{
|
191 |
zend_fcall_info fci;
|
192 |
zval ***args = NULL;
|
238 |
return retval_ptr;
|
239 |
}
|
240 |
|
241 |
+
static int TWIG_CALL_BOOLEAN(zval *object, char *functionName TSRMLS_DC)
|
242 |
{
|
243 |
zval *ret;
|
244 |
int res;
|
249 |
return res;
|
250 |
}
|
251 |
|
252 |
+
static zval *TWIG_GET_STATIC_PROPERTY(zval *class, char *prop_name TSRMLS_DC)
|
253 |
{
|
254 |
zval **tmp_zval;
|
255 |
zend_class_entry *ce;
|
267 |
return *tmp_zval;
|
268 |
}
|
269 |
|
270 |
+
static zval *TWIG_GET_ARRAY_ELEMENT_ZVAL(zval *class, zval *prop_name TSRMLS_DC)
|
271 |
{
|
272 |
zval **tmp_zval;
|
273 |
|
299 |
return NULL;
|
300 |
}
|
301 |
|
302 |
+
static zval *TWIG_GET_ARRAY_ELEMENT(zval *class, char *prop_name, int prop_name_length TSRMLS_DC)
|
303 |
{
|
304 |
zval **tmp_zval;
|
305 |
|
325 |
return NULL;
|
326 |
}
|
327 |
|
328 |
+
static zval *TWIG_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
329 |
{
|
330 |
zval *tmp = NULL;
|
331 |
|
342 |
return tmp;
|
343 |
}
|
344 |
|
345 |
+
static int TWIG_HAS_PROPERTY(zval *object, zval *propname TSRMLS_DC)
|
346 |
{
|
347 |
if (Z_OBJ_HT_P(object)->has_property) {
|
348 |
#if PHP_VERSION_ID >= 50400
|
354 |
return 0;
|
355 |
}
|
356 |
|
357 |
+
static int TWIG_HAS_DYNAMIC_PROPERTY(zval *object, char *prop, int prop_len TSRMLS_DC)
|
358 |
{
|
359 |
if (Z_OBJ_HT_P(object)->get_properties) {
|
360 |
return zend_hash_quick_exists(
|
367 |
return 0;
|
368 |
}
|
369 |
|
370 |
+
static zval *TWIG_PROPERTY_CHAR(zval *object, char *propname TSRMLS_DC)
|
371 |
{
|
372 |
zval *tmp_name_zval, *tmp;
|
373 |
|
378 |
return tmp;
|
379 |
}
|
380 |
|
381 |
+
static zval *TWIG_CALL_S(zval *object, char *method, char *arg0 TSRMLS_DC)
|
|
|
|
|
|
|
|
|
|
|
382 |
{
|
383 |
zend_fcall_info fci;
|
384 |
zval **args[1];
|
416 |
return retval_ptr;
|
417 |
}
|
418 |
|
419 |
+
static int TWIG_CALL_SB(zval *object, char *method, char *arg0 TSRMLS_DC)
|
420 |
{
|
421 |
zval *retval_ptr;
|
422 |
int success;
|
431 |
return success;
|
432 |
}
|
433 |
|
434 |
+
static int TWIG_CALL_ZZ(zval *object, char *method, zval *arg1, zval *arg2 TSRMLS_DC)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
{
|
436 |
zend_fcall_info fci;
|
437 |
zval **args[2];
|
478 |
# define Z_UNSET_ISREF_P(pz) pz->is_ref = 0
|
479 |
#endif
|
480 |
|
481 |
+
static void TWIG_NEW(zval *object, char *class, zval *arg0, zval *arg1 TSRMLS_DC)
|
482 |
{
|
483 |
zend_class_entry **pce;
|
484 |
|
523 |
return 0;
|
524 |
}
|
525 |
|
526 |
+
static char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC)
|
527 |
{
|
528 |
smart_str collector = { 0, 0, 0 };
|
529 |
|
534 |
return collector.c;
|
535 |
}
|
536 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
537 |
static void TWIG_RUNTIME_ERROR(zval *template TSRMLS_DC, char *message, ...)
|
538 |
{
|
539 |
char *buffer;
|
738 |
) {
|
739 |
|
740 |
if (isDefinedTest) {
|
741 |
+
efree(item);
|
742 |
RETURN_TRUE;
|
743 |
}
|
744 |
|
751 |
if (free_ret) {
|
752 |
zval_ptr_dtor(&ret);
|
753 |
}
|
754 |
+
efree(item);
|
755 |
return;
|
756 |
}
|
757 |
/*
|
765 |
*/
|
766 |
if (strcmp("array", type) == 0 || Z_TYPE_P(object) != IS_OBJECT) {
|
767 |
if (isDefinedTest) {
|
768 |
+
efree(item);
|
769 |
RETURN_FALSE;
|
770 |
}
|
771 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
772 |
+
efree(item);
|
773 |
return;
|
774 |
}
|
775 |
/*
|
778 |
} elseif (is_object($object)) {
|
779 |
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface', $item, get_class($object));
|
780 |
} elseif (is_array($object)) {
|
781 |
+
if (empty($object)) {
|
782 |
+
$message = sprintf('Key "%s" does not exist as the array is empty', $arrayItem);
|
783 |
+
} else {
|
784 |
+
$message = sprintf('Key "%s" for array with keys "%s" does not exist', $arrayItem, implode(', ', array_keys($object)));
|
785 |
+
}
|
786 |
} elseif (Twig_Template::ARRAY_CALL === $type) {
|
787 |
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
|
788 |
} else {
|
797 |
} else if (Z_TYPE_P(object) == IS_OBJECT) {
|
798 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to access a key \"%s\" on an object of class \"%s\" that does not implement ArrayAccess interface", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
|
799 |
} else if (Z_TYPE_P(object) == IS_ARRAY) {
|
800 |
+
if (0 == zend_hash_num_elements(Z_ARRVAL_P(object))) {
|
801 |
+
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" does not exist as the array is empty", item);
|
802 |
+
} else {
|
803 |
+
char *array_keys = TWIG_IMPLODE_ARRAY_KEYS(", ", object TSRMLS_CC);
|
804 |
+
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Key \"%s\" for array with keys \"%s\" does not exist", item, array_keys);
|
805 |
+
efree(array_keys);
|
806 |
+
}
|
807 |
} else {
|
808 |
char *type_name = zend_zval_type_name(object);
|
809 |
Z_ADDREF_P(object);
|
815 |
item, type_name, Z_STRVAL_P(object));
|
816 |
zval_ptr_dtor(&object);
|
817 |
}
|
818 |
+
efree(item);
|
819 |
return;
|
820 |
}
|
821 |
}
|
829 |
|
830 |
if (Z_TYPE_P(object) != IS_OBJECT) {
|
831 |
if (isDefinedTest) {
|
832 |
+
efree(item);
|
833 |
RETURN_FALSE;
|
834 |
}
|
835 |
/*
|
840 |
}
|
841 |
*/
|
842 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
843 |
+
efree(item);
|
844 |
return;
|
845 |
}
|
846 |
|
851 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Impossible to invoke a method (\"%s\") on a %s variable (\"%s\")", item, type_name, Z_STRVAL_P(object));
|
852 |
|
853 |
zval_ptr_dtor(&object);
|
854 |
+
efree(item);
|
855 |
return;
|
856 |
}
|
857 |
/*
|
892 |
|
893 |
if (tmp_item || TWIG_HAS_PROPERTY(object, zitem TSRMLS_CC) || TWIG_HAS_DYNAMIC_PROPERTY(object, item, item_len TSRMLS_CC)) {
|
894 |
if (isDefinedTest) {
|
895 |
+
efree(item);
|
896 |
RETURN_TRUE;
|
897 |
}
|
898 |
if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "sandbox" TSRMLS_CC)) {
|
899 |
TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "sandbox" TSRMLS_CC), "checkPropertyAllowed", object, zitem TSRMLS_CC);
|
900 |
}
|
901 |
if (EG(exception)) {
|
902 |
+
efree(item);
|
903 |
return;
|
904 |
}
|
905 |
|
906 |
ret = TWIG_PROPERTY(object, zitem TSRMLS_CC);
|
907 |
+
efree(item);
|
908 |
RETURN_ZVAL(ret, 1, 0);
|
909 |
}
|
910 |
}
|
977 |
efree(lcItem);
|
978 |
|
979 |
if (isDefinedTest) {
|
980 |
+
efree(item);
|
981 |
RETURN_FALSE;
|
982 |
}
|
983 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
984 |
+
efree(item);
|
985 |
return;
|
986 |
}
|
987 |
TWIG_RUNTIME_ERROR(template TSRMLS_CC, "Method \"%s\" for object \"%s\" does not exist", item, TWIG_GET_CLASS_NAME(object TSRMLS_CC));
|
988 |
+
efree(item);
|
989 |
return;
|
990 |
}
|
991 |
|
992 |
if (isDefinedTest) {
|
993 |
efree(tmp_method_name_get);
|
994 |
efree(tmp_method_name_is);
|
995 |
+
efree(lcItem);efree(item);
|
996 |
RETURN_TRUE;
|
997 |
}
|
998 |
/*
|
1005 |
if (TWIG_CALL_SB(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "hasExtension", "sandbox" TSRMLS_CC)) {
|
1006 |
TWIG_CALL_ZZ(TWIG_CALL_S(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "getExtension", "sandbox" TSRMLS_CC), "checkMethodAllowed", object, zmethod TSRMLS_CC);
|
1007 |
}
|
1008 |
+
zval_ptr_dtor(&zmethod);
|
1009 |
if (EG(exception)) {
|
1010 |
efree(tmp_method_name_get);
|
1011 |
efree(tmp_method_name_is);
|
1012 |
+
efree(lcItem);efree(item);
|
|
|
1013 |
return;
|
1014 |
}
|
1015 |
/*
|
1027 |
ret = TWIG_CALL_USER_FUNC_ARRAY(object, method, arguments TSRMLS_CC);
|
1028 |
if (EG(exception) && TWIG_INSTANCE_OF(EG(exception), spl_ce_BadMethodCallException TSRMLS_CC)) {
|
1029 |
if (ignoreStrictCheck || !TWIG_CALL_BOOLEAN(TWIG_PROPERTY_CHAR(template, "env" TSRMLS_CC), "isStrictVariables" TSRMLS_CC)) {
|
1030 |
+
efree(tmp_method_name_get);
|
1031 |
+
efree(tmp_method_name_is);
|
1032 |
+
efree(lcItem);efree(item);
|
1033 |
zend_clear_exception(TSRMLS_C);
|
1034 |
return;
|
1035 |
}
|
1038 |
efree(tmp_method_name_get);
|
1039 |
efree(tmp_method_name_is);
|
1040 |
efree(lcItem);
|
|
|
1041 |
}
|
1042 |
/*
|
1043 |
// useful when calling a template method from a template
|
1048 |
|
1049 |
return $ret;
|
1050 |
*/
|
1051 |
+
efree(item);
|
1052 |
// ret can be null, if e.g. the called method throws an exception
|
1053 |
if (ret) {
|
1054 |
if (TWIG_INSTANCE_OF_USERLAND(object, "Twig_TemplateInterface" TSRMLS_CC)) {
|
vendor/twig/twig/lib/Twig/Autoloader.php
CHANGED
@@ -19,14 +19,14 @@ class Twig_Autoloader
|
|
19 |
/**
|
20 |
* Registers Twig_Autoloader as an SPL autoloader.
|
21 |
*
|
22 |
-
* @param
|
23 |
*/
|
24 |
public static function register($prepend = false)
|
25 |
{
|
26 |
-
if (
|
27 |
-
spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
|
28 |
-
} else {
|
29 |
spl_autoload_register(array(__CLASS__, 'autoload'));
|
|
|
|
|
30 |
}
|
31 |
}
|
32 |
|
19 |
/**
|
20 |
* Registers Twig_Autoloader as an SPL autoloader.
|
21 |
*
|
22 |
+
* @param bool $prepend Whether to prepend the autoloader or not.
|
23 |
*/
|
24 |
public static function register($prepend = false)
|
25 |
{
|
26 |
+
if (PHP_VERSION_ID < 50300) {
|
|
|
|
|
27 |
spl_autoload_register(array(__CLASS__, 'autoload'));
|
28 |
+
} else {
|
29 |
+
spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend);
|
30 |
}
|
31 |
}
|
32 |
|
vendor/twig/twig/lib/Twig/Compiler.php
CHANGED
@@ -66,7 +66,7 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
66 |
* Compiles a node.
|
67 |
*
|
68 |
* @param Twig_NodeInterface $node The node to compile
|
69 |
-
* @param
|
70 |
*
|
71 |
* @return Twig_Compiler The current compiler instance
|
72 |
*/
|
@@ -74,6 +74,7 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
74 |
{
|
75 |
$this->lastLine = null;
|
76 |
$this->source = '';
|
|
|
77 |
$this->sourceOffset = 0;
|
78 |
// source code starts at 1 (as we then increment it when we encounter new lines)
|
79 |
$this->sourceLine = 1;
|
@@ -181,14 +182,14 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
181 |
} elseif (is_array($value)) {
|
182 |
$this->raw('array(');
|
183 |
$first = true;
|
184 |
-
foreach ($value as $key => $
|
185 |
if (!$first) {
|
186 |
$this->raw(', ');
|
187 |
}
|
188 |
$first = false;
|
189 |
$this->repr($key);
|
190 |
$this->raw(' => ');
|
191 |
-
$this->repr($
|
192 |
}
|
193 |
$this->raw(')');
|
194 |
} else {
|
@@ -230,13 +231,15 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
230 |
|
231 |
public function getDebugInfo()
|
232 |
{
|
|
|
|
|
233 |
return $this->debugInfo;
|
234 |
}
|
235 |
|
236 |
/**
|
237 |
* Indents the generated code.
|
238 |
*
|
239 |
-
* @param
|
240 |
*
|
241 |
* @return Twig_Compiler The current compiler instance
|
242 |
*/
|
@@ -250,7 +253,7 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
250 |
/**
|
251 |
* Outdents the generated code.
|
252 |
*
|
253 |
-
* @param
|
254 |
*
|
255 |
* @return Twig_Compiler The current compiler instance
|
256 |
*
|
@@ -267,4 +270,9 @@ class Twig_Compiler implements Twig_CompilerInterface
|
|
267 |
|
268 |
return $this;
|
269 |
}
|
|
|
|
|
|
|
|
|
|
|
270 |
}
|
66 |
* Compiles a node.
|
67 |
*
|
68 |
* @param Twig_NodeInterface $node The node to compile
|
69 |
+
* @param int $indentation The current indentation
|
70 |
*
|
71 |
* @return Twig_Compiler The current compiler instance
|
72 |
*/
|
74 |
{
|
75 |
$this->lastLine = null;
|
76 |
$this->source = '';
|
77 |
+
$this->debugInfo = array();
|
78 |
$this->sourceOffset = 0;
|
79 |
// source code starts at 1 (as we then increment it when we encounter new lines)
|
80 |
$this->sourceLine = 1;
|
182 |
} elseif (is_array($value)) {
|
183 |
$this->raw('array(');
|
184 |
$first = true;
|
185 |
+
foreach ($value as $key => $v) {
|
186 |
if (!$first) {
|
187 |
$this->raw(', ');
|
188 |
}
|
189 |
$first = false;
|
190 |
$this->repr($key);
|
191 |
$this->raw(' => ');
|
192 |
+
$this->repr($v);
|
193 |
}
|
194 |
$this->raw(')');
|
195 |
} else {
|
231 |
|
232 |
public function getDebugInfo()
|
233 |
{
|
234 |
+
ksort($this->debugInfo);
|
235 |
+
|
236 |
return $this->debugInfo;
|
237 |
}
|
238 |
|
239 |
/**
|
240 |
* Indents the generated code.
|
241 |
*
|
242 |
+
* @param int $step The number of indentation to add
|
243 |
*
|
244 |
* @return Twig_Compiler The current compiler instance
|
245 |
*/
|
253 |
/**
|
254 |
* Outdents the generated code.
|
255 |
*
|
256 |
+
* @param int $step The number of indentation to remove
|
257 |
*
|
258 |
* @return Twig_Compiler The current compiler instance
|
259 |
*
|
270 |
|
271 |
return $this;
|
272 |
}
|
273 |
+
|
274 |
+
public function getVarName()
|
275 |
+
{
|
276 |
+
return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));
|
277 |
+
}
|
278 |
}
|
vendor/twig/twig/lib/Twig/CompilerInterface.php
CHANGED
@@ -13,7 +13,8 @@
|
|
13 |
* Interface implemented by compiler classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_CompilerInterface
|
19 |
{
|
13 |
* Interface implemented by compiler classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_CompilerInterface
|
20 |
{
|
vendor/twig/twig/lib/Twig/Environment.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
*/
|
17 |
class Twig_Environment
|
18 |
{
|
19 |
-
const VERSION = '1.
|
20 |
|
21 |
protected $charset;
|
22 |
protected $loader;
|
@@ -72,6 +72,7 @@ class Twig_Environment
|
|
72 |
* * false: disable auto-escaping
|
73 |
* * true: equivalent to html
|
74 |
* * html, js: set the autoescaping to one of the supported strategies
|
|
|
75 |
* * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename"
|
76 |
*
|
77 |
* * optimizations: A flag that indicates which optimizations to apply
|
@@ -154,7 +155,7 @@ class Twig_Environment
|
|
154 |
/**
|
155 |
* Checks if debug mode is enabled.
|
156 |
*
|
157 |
-
* @return
|
158 |
*/
|
159 |
public function isDebug()
|
160 |
{
|
@@ -180,7 +181,7 @@ class Twig_Environment
|
|
180 |
/**
|
181 |
* Checks if the auto_reload option is enabled.
|
182 |
*
|
183 |
-
* @return
|
184 |
*/
|
185 |
public function isAutoReload()
|
186 |
{
|
@@ -206,7 +207,7 @@ class Twig_Environment
|
|
206 |
/**
|
207 |
* Checks if the strict_variables option is enabled.
|
208 |
*
|
209 |
-
* @return
|
210 |
*/
|
211 |
public function isStrictVariables()
|
212 |
{
|
@@ -223,12 +224,12 @@ class Twig_Environment
|
|
223 |
return $this->cache;
|
224 |
}
|
225 |
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
public function setCache($cache)
|
233 |
{
|
234 |
$this->cache = $cache ? $cache : false;
|
@@ -255,8 +256,8 @@ class Twig_Environment
|
|
255 |
/**
|
256 |
* Gets the template class associated with the given string.
|
257 |
*
|
258 |
-
* @param string
|
259 |
-
* @param
|
260 |
*
|
261 |
* @return string The template class name
|
262 |
*/
|
@@ -310,8 +311,8 @@ class Twig_Environment
|
|
310 |
/**
|
311 |
* Loads a template by name.
|
312 |
*
|
313 |
-
* @param string
|
314 |
-
* @param
|
315 |
*
|
316 |
* @return Twig_TemplateInterface A template instance representing the given template name
|
317 |
*
|
@@ -345,6 +346,41 @@ class Twig_Environment
|
|
345 |
return $this->loadedTemplates[$cls] = new $cls($this);
|
346 |
}
|
347 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
/**
|
349 |
* Returns true if the template is still fresh.
|
350 |
*
|
@@ -352,10 +388,10 @@ class Twig_Environment
|
|
352 |
* this method also checks if the enabled extensions have
|
353 |
* not changed.
|
354 |
*
|
355 |
-
* @param string
|
356 |
-
* @param
|
357 |
*
|
358 |
-
* @return
|
359 |
*/
|
360 |
public function isTemplateFresh($name, $time)
|
361 |
{
|
@@ -626,7 +662,7 @@ class Twig_Environment
|
|
626 |
*
|
627 |
* @param string $name The extension name
|
628 |
*
|
629 |
-
* @return
|
630 |
*/
|
631 |
public function hasExtension($name)
|
632 |
{
|
@@ -1232,8 +1268,11 @@ class Twig_Environment
|
|
1232 |
{
|
1233 |
$dir = dirname($file);
|
1234 |
if (!is_dir($dir)) {
|
1235 |
-
if (false === @mkdir($dir, 0777, true)
|
1236 |
-
|
|
|
|
|
|
|
1237 |
}
|
1238 |
} elseif (!is_writable($dir)) {
|
1239 |
throw new RuntimeException(sprintf("Unable to write in the cache directory (%s).", $dir));
|
16 |
*/
|
17 |
class Twig_Environment
|
18 |
{
|
19 |
+
const VERSION = '1.18.1';
|
20 |
|
21 |
protected $charset;
|
22 |
protected $loader;
|
72 |
* * false: disable auto-escaping
|
73 |
* * true: equivalent to html
|
74 |
* * html, js: set the autoescaping to one of the supported strategies
|
75 |
+
* * filename: set the autoescaping strategy based on the template filename extension
|
76 |
* * PHP callback: a PHP callback that returns an escaping strategy based on the template "filename"
|
77 |
*
|
78 |
* * optimizations: A flag that indicates which optimizations to apply
|
155 |
/**
|
156 |
* Checks if debug mode is enabled.
|
157 |
*
|
158 |
+
* @return bool true if debug mode is enabled, false otherwise
|
159 |
*/
|
160 |
public function isDebug()
|
161 |
{
|
181 |
/**
|
182 |
* Checks if the auto_reload option is enabled.
|
183 |
*
|
184 |
+
* @return bool true if auto_reload is enabled, false otherwise
|
185 |
*/
|
186 |
public function isAutoReload()
|
187 |
{
|
207 |
/**
|
208 |
* Checks if the strict_variables option is enabled.
|
209 |
*
|
210 |
+
* @return bool true if strict_variables is enabled, false otherwise
|
211 |
*/
|
212 |
public function isStrictVariables()
|
213 |
{
|
224 |
return $this->cache;
|
225 |
}
|
226 |
|
227 |
+
/**
|
228 |
+
* Sets the cache directory or false if cache is disabled.
|
229 |
+
*
|
230 |
+
* @param string|false $cache The absolute path to the compiled templates,
|
231 |
+
* or false to disable cache
|
232 |
+
*/
|
233 |
public function setCache($cache)
|
234 |
{
|
235 |
$this->cache = $cache ? $cache : false;
|
256 |
/**
|
257 |
* Gets the template class associated with the given string.
|
258 |
*
|
259 |
+
* @param string $name The name for which to calculate the template class name
|
260 |
+
* @param int $index The index if it is an embedded template
|
261 |
*
|
262 |
* @return string The template class name
|
263 |
*/
|
311 |
/**
|
312 |
* Loads a template by name.
|
313 |
*
|
314 |
+
* @param string $name The template name
|
315 |
+
* @param int $index The index if it is an embedded template
|
316 |
*
|
317 |
* @return Twig_TemplateInterface A template instance representing the given template name
|
318 |
*
|
346 |
return $this->loadedTemplates[$cls] = new $cls($this);
|
347 |
}
|
348 |
|
349 |
+
/**
|
350 |
+
* Creates a template from source.
|
351 |
+
*
|
352 |
+
* This method should not be used as a generic way to load templates.
|
353 |
+
*
|
354 |
+
* @param string $name The template name
|
355 |
+
* @param int $index The index if it is an embedded template
|
356 |
+
*
|
357 |
+
* @return Twig_Template A template instance representing the given template name
|
358 |
+
*
|
359 |
+
* @throws Twig_Error_Loader When the template cannot be found
|
360 |
+
* @throws Twig_Error_Syntax When an error occurred during compilation
|
361 |
+
*/
|
362 |
+
public function createTemplate($template)
|
363 |
+
{
|
364 |
+
$name = sprintf('__string_template__%s', hash('sha256', uniqid(mt_rand(), true), false));
|
365 |
+
|
366 |
+
$loader = new Twig_Loader_Chain(array(
|
367 |
+
new Twig_Loader_Array(array($name => $template)),
|
368 |
+
$current = $this->getLoader(),
|
369 |
+
));
|
370 |
+
|
371 |
+
$this->setLoader($loader);
|
372 |
+
try {
|
373 |
+
$template = $this->loadTemplate($name);
|
374 |
+
} catch (Exception $e) {
|
375 |
+
$this->setLoader($current);
|
376 |
+
|
377 |
+
throw $e;
|
378 |
+
}
|
379 |
+
$this->setLoader($current);
|
380 |
+
|
381 |
+
return $template;
|
382 |
+
}
|
383 |
+
|
384 |
/**
|
385 |
* Returns true if the template is still fresh.
|
386 |
*
|
388 |
* this method also checks if the enabled extensions have
|
389 |
* not changed.
|
390 |
*
|
391 |
+
* @param string $name The template name
|
392 |
+
* @param int $time The last modification time of the cached template
|
393 |
*
|
394 |
+
* @return bool true if the template is fresh, false otherwise
|
395 |
*/
|
396 |
public function isTemplateFresh($name, $time)
|
397 |
{
|
662 |
*
|
663 |
* @param string $name The extension name
|
664 |
*
|
665 |
+
* @return bool Whether the extension is registered or not
|
666 |
*/
|
667 |
public function hasExtension($name)
|
668 |
{
|
1268 |
{
|
1269 |
$dir = dirname($file);
|
1270 |
if (!is_dir($dir)) {
|
1271 |
+
if (false === @mkdir($dir, 0777, true)) {
|
1272 |
+
clearstatcache(false, $dir);
|
1273 |
+
if (!is_dir($dir)) {
|
1274 |
+
throw new RuntimeException(sprintf("Unable to create the cache directory (%s).", $dir));
|
1275 |
+
}
|
1276 |
}
|
1277 |
} elseif (!is_writable($dir)) {
|
1278 |
throw new RuntimeException(sprintf("Unable to write in the cache directory (%s).", $dir));
|
vendor/twig/twig/lib/Twig/Error.php
CHANGED
@@ -51,13 +51,13 @@ class Twig_Error extends Exception
|
|
51 |
* By default, automatic guessing is enabled.
|
52 |
*
|
53 |
* @param string $message The error message
|
54 |
-
* @param
|
55 |
* @param string $filename The template file name where the error occurred
|
56 |
* @param Exception $previous The previous exception
|
57 |
*/
|
58 |
public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)
|
59 |
{
|
60 |
-
if (
|
61 |
$this->previous = $previous;
|
62 |
parent::__construct('');
|
63 |
} else {
|
@@ -111,7 +111,7 @@ class Twig_Error extends Exception
|
|
111 |
/**
|
112 |
* Gets the template line where the error occurred.
|
113 |
*
|
114 |
-
* @return
|
115 |
*/
|
116 |
public function getTemplateLine()
|
117 |
{
|
@@ -121,7 +121,7 @@ class Twig_Error extends Exception
|
|
121 |
/**
|
122 |
* Sets the template line where the error occurred.
|
123 |
*
|
124 |
-
* @param
|
125 |
*/
|
126 |
public function setTemplateLine($lineno)
|
127 |
{
|
@@ -188,7 +188,7 @@ class Twig_Error extends Exception
|
|
188 |
$template = null;
|
189 |
$templateClass = null;
|
190 |
|
191 |
-
if (
|
192 |
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
193 |
} else {
|
194 |
$backtrace = debug_backtrace();
|
@@ -229,6 +229,8 @@ class Twig_Error extends Exception
|
|
229 |
|
230 |
while ($e = array_pop($exceptions)) {
|
231 |
$traces = $e->getTrace();
|
|
|
|
|
232 |
while ($trace = array_shift($traces)) {
|
233 |
if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) {
|
234 |
continue;
|
51 |
* By default, automatic guessing is enabled.
|
52 |
*
|
53 |
* @param string $message The error message
|
54 |
+
* @param int $lineno The template line where the error occurred
|
55 |
* @param string $filename The template file name where the error occurred
|
56 |
* @param Exception $previous The previous exception
|
57 |
*/
|
58 |
public function __construct($message, $lineno = -1, $filename = null, Exception $previous = null)
|
59 |
{
|
60 |
+
if (PHP_VERSION_ID < 50300) {
|
61 |
$this->previous = $previous;
|
62 |
parent::__construct('');
|
63 |
} else {
|
111 |
/**
|
112 |
* Gets the template line where the error occurred.
|
113 |
*
|
114 |
+
* @return int The template line
|
115 |
*/
|
116 |
public function getTemplateLine()
|
117 |
{
|
121 |
/**
|
122 |
* Sets the template line where the error occurred.
|
123 |
*
|
124 |
+
* @param int $lineno The template line
|
125 |
*/
|
126 |
public function setTemplateLine($lineno)
|
127 |
{
|
188 |
$template = null;
|
189 |
$templateClass = null;
|
190 |
|
191 |
+
if (PHP_VERSION_ID >= 50306) {
|
192 |
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT);
|
193 |
} else {
|
194 |
$backtrace = debug_backtrace();
|
229 |
|
230 |
while ($e = array_pop($exceptions)) {
|
231 |
$traces = $e->getTrace();
|
232 |
+
array_unshift($traces, array('file' => $e->getFile(), 'line' => $e->getLine()));
|
233 |
+
|
234 |
while ($trace = array_shift($traces)) {
|
235 |
if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) {
|
236 |
continue;
|
vendor/twig/twig/lib/Twig/ExistsLoaderInterface.php
CHANGED
@@ -13,7 +13,8 @@
|
|
13 |
* Adds an exists() method for loaders.
|
14 |
*
|
15 |
* @author Florin Patan <florinpatan@gmail.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_ExistsLoaderInterface
|
19 |
{
|
@@ -22,7 +23,7 @@ interface Twig_ExistsLoaderInterface
|
|
22 |
*
|
23 |
* @param string $name The name of the template to check if we can load
|
24 |
*
|
25 |
-
* @return
|
26 |
*/
|
27 |
public function exists($name);
|
28 |
}
|
13 |
* Adds an exists() method for loaders.
|
14 |
*
|
15 |
* @author Florin Patan <florinpatan@gmail.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_ExistsLoaderInterface
|
20 |
{
|
23 |
*
|
24 |
* @param string $name The name of the template to check if we can load
|
25 |
*
|
26 |
+
* @return bool If the template source code is handled by this loader or not
|
27 |
*/
|
28 |
public function exists($name);
|
29 |
}
|
vendor/twig/twig/lib/Twig/ExpressionParser.php
CHANGED
@@ -164,6 +164,21 @@ class Twig_ExpressionParser
|
|
164 |
$this->parser->getStream()->next();
|
165 |
$node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine());
|
166 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
|
169 |
default:
|
@@ -318,7 +333,7 @@ class Twig_ExpressionParser
|
|
318 |
throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes)', $line, $this->parser->getFilename());
|
319 |
}
|
320 |
|
321 |
-
return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) :
|
322 |
default:
|
323 |
if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) {
|
324 |
$arguments = new Twig_Node_Expression_Array(array(), $line);
|
@@ -451,8 +466,8 @@ class Twig_ExpressionParser
|
|
451 |
/**
|
452 |
* Parses arguments.
|
453 |
*
|
454 |
-
* @param
|
455 |
-
* @param
|
456 |
*/
|
457 |
public function parseArguments($namedArguments = false, $definition = false)
|
458 |
{
|
@@ -583,7 +598,9 @@ class Twig_ExpressionParser
|
|
583 |
// checks that the node only contains "constant" elements
|
584 |
protected function checkConstantExpression(Twig_NodeInterface $node)
|
585 |
{
|
586 |
-
if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array
|
|
|
|
|
587 |
return false;
|
588 |
}
|
589 |
|
164 |
$this->parser->getStream()->next();
|
165 |
$node = new Twig_Node_Expression_Name($token->getValue(), $token->getLine());
|
166 |
break;
|
167 |
+
} elseif (isset($this->unaryOperators[$token->getValue()])) {
|
168 |
+
$class = $this->unaryOperators[$token->getValue()]['class'];
|
169 |
+
|
170 |
+
$ref = new ReflectionClass($class);
|
171 |
+
$negClass = 'Twig_Node_Expression_Unary_Neg';
|
172 |
+
$posClass = 'Twig_Node_Expression_Unary_Pos';
|
173 |
+
if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) {
|
174 |
+
throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s"', $token->getValue()), $token->getLine(), $this->parser->getFilename());
|
175 |
+
}
|
176 |
+
|
177 |
+
$this->parser->getStream()->next();
|
178 |
+
$expr = $this->parsePrimaryExpression();
|
179 |
+
|
180 |
+
$node = new $class($expr, $token->getLine());
|
181 |
+
break;
|
182 |
}
|
183 |
|
184 |
default:
|
333 |
throw new Twig_Error_Syntax('The "attribute" function takes at least two arguments (the variable and the attributes)', $line, $this->parser->getFilename());
|
334 |
}
|
335 |
|
336 |
+
return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : null, Twig_Template::ANY_CALL, $line);
|
337 |
default:
|
338 |
if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) {
|
339 |
$arguments = new Twig_Node_Expression_Array(array(), $line);
|
466 |
/**
|
467 |
* Parses arguments.
|
468 |
*
|
469 |
+
* @param bool $namedArguments Whether to allow named arguments or not
|
470 |
+
* @param bool $definition Whether we are parsing arguments for a function definition
|
471 |
*/
|
472 |
public function parseArguments($namedArguments = false, $definition = false)
|
473 |
{
|
598 |
// checks that the node only contains "constant" elements
|
599 |
protected function checkConstantExpression(Twig_NodeInterface $node)
|
600 |
{
|
601 |
+
if (!($node instanceof Twig_Node_Expression_Constant || $node instanceof Twig_Node_Expression_Array
|
602 |
+
|| $node instanceof Twig_Node_Expression_Unary_Neg || $node instanceof Twig_Node_Expression_Unary_Pos
|
603 |
+
)) {
|
604 |
return false;
|
605 |
}
|
606 |
|
vendor/twig/twig/lib/Twig/Extension/Core.php
CHANGED
@@ -95,9 +95,9 @@ class Twig_Extension_Core extends Twig_Extension
|
|
95 |
/**
|
96 |
* Sets the default format to be used by the number_format filter.
|
97 |
*
|
98 |
-
* @param
|
99 |
-
* @param string
|
100 |
-
* @param string
|
101 |
*/
|
102 |
public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
|
103 |
{
|
@@ -173,7 +173,7 @@ class Twig_Extension_Core extends Twig_Extension
|
|
173 |
|
174 |
// array helpers
|
175 |
new Twig_SimpleFilter('join', 'twig_join_filter'),
|
176 |
-
new Twig_SimpleFilter('split', 'twig_split_filter'),
|
177 |
new Twig_SimpleFilter('sort', 'twig_sort_filter'),
|
178 |
new Twig_SimpleFilter('merge', 'twig_array_merge'),
|
179 |
new Twig_SimpleFilter('batch', 'twig_array_batch'),
|
@@ -298,8 +298,8 @@ class Twig_Extension_Core extends Twig_Extension
|
|
298 |
public function parseTestExpression(Twig_Parser $parser, Twig_NodeInterface $node)
|
299 |
{
|
300 |
$stream = $parser->getStream();
|
301 |
-
$name = $
|
302 |
-
$class = $this->getTestNodeClass($parser, $name
|
303 |
$arguments = null;
|
304 |
if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
|
305 |
$arguments = $parser->getExpressionParser()->parseArguments(true);
|
@@ -308,33 +308,41 @@ class Twig_Extension_Core extends Twig_Extension
|
|
308 |
return new $class($node, $name, $arguments, $parser->getCurrentToken()->getLine());
|
309 |
}
|
310 |
|
311 |
-
protected function
|
312 |
{
|
|
|
|
|
313 |
$env = $parser->getEnvironment();
|
314 |
$testMap = $env->getTests();
|
315 |
-
|
316 |
if (isset($testMap[$name])) {
|
317 |
-
|
318 |
-
}
|
|
|
|
|
319 |
// try 2-words tests
|
320 |
$name = $name.' '.$parser->getCurrentToken()->getValue();
|
321 |
|
322 |
if (isset($testMap[$name])) {
|
323 |
$parser->getStream()->next();
|
324 |
|
325 |
-
|
326 |
}
|
327 |
}
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
$message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
|
333 |
-
}
|
334 |
-
|
335 |
-
throw new Twig_Error_Syntax($message, $line, $parser->getFilename());
|
336 |
}
|
337 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
338 |
if ($testMap[$name] instanceof Twig_SimpleTest) {
|
339 |
return $testMap[$name]->getNodeClass();
|
340 |
}
|
@@ -357,7 +365,7 @@ class Twig_Extension_Core extends Twig_Extension
|
|
357 |
* Cycles over a value.
|
358 |
*
|
359 |
* @param ArrayAccess|array $values An array or an ArrayAccess instance
|
360 |
-
* @param
|
361 |
*
|
362 |
* @return string The next value in the cycle
|
363 |
*/
|
@@ -377,7 +385,7 @@ function twig_cycle($values, $position)
|
|
377 |
* - a random integer between 0 and the integer parameter
|
378 |
*
|
379 |
* @param Twig_Environment $env A Twig_Environment instance
|
380 |
-
* @param Traversable|array|
|
381 |
*
|
382 |
* @throws Twig_Error_Runtime When $values is an empty array (does not apply to an empty string which is returned as is).
|
383 |
*
|
@@ -436,10 +444,10 @@ function twig_random(Twig_Environment $env, $values = null)
|
|
436 |
* {{ post.published_at|date("m/d/Y") }}
|
437 |
* </pre>
|
438 |
*
|
439 |
-
* @param Twig_Environment
|
440 |
-
* @param DateTime|DateInterval|string $date A date
|
441 |
-
* @param string
|
442 |
-
* @param DateTimeZone|string
|
443 |
*
|
444 |
* @return string The formatted date
|
445 |
*/
|
@@ -473,9 +481,12 @@ function twig_date_format_filter(Twig_Environment $env, $date, $format = null, $
|
|
473 |
function twig_date_modify_filter(Twig_Environment $env, $date, $modifier)
|
474 |
{
|
475 |
$date = twig_date_converter($env, $date, false);
|
476 |
-
$date->modify($modifier);
|
477 |
|
478 |
-
|
|
|
|
|
|
|
479 |
}
|
480 |
|
481 |
/**
|
@@ -487,32 +498,32 @@ function twig_date_modify_filter(Twig_Environment $env, $date, $modifier)
|
|
487 |
* {% endif %}
|
488 |
* </pre>
|
489 |
*
|
490 |
-
* @param Twig_Environment
|
491 |
-
* @param DateTime|string
|
492 |
-
* @param DateTimeZone|string
|
493 |
*
|
494 |
* @return DateTime A DateTime instance
|
495 |
*/
|
496 |
function twig_date_converter(Twig_Environment $env, $date = null, $timezone = null)
|
497 |
{
|
498 |
// determine the timezone
|
499 |
-
if (
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
}
|
506 |
|
507 |
// immutable dates
|
508 |
if ($date instanceof DateTimeImmutable) {
|
509 |
-
return false !== $timezone ? $date->setTimezone($
|
510 |
}
|
511 |
|
512 |
if ($date instanceof DateTime || $date instanceof DateTimeInterface) {
|
513 |
$date = clone $date;
|
514 |
if (false !== $timezone) {
|
515 |
-
$date->setTimezone($
|
516 |
}
|
517 |
|
518 |
return $date;
|
@@ -523,9 +534,9 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
|
|
523 |
$date = '@'.$date;
|
524 |
}
|
525 |
|
526 |
-
$date = new DateTime($date, $
|
527 |
if (false !== $timezone) {
|
528 |
-
$date->setTimezone($
|
529 |
}
|
530 |
|
531 |
return $date;
|
@@ -534,11 +545,11 @@ function twig_date_converter(Twig_Environment $env, $date = null, $timezone = nu
|
|
534 |
/**
|
535 |
* Rounds a number.
|
536 |
*
|
537 |
-
* @param
|
538 |
-
* @param
|
539 |
* @param string $method The method to use for rounding
|
540 |
*
|
541 |
-
* @return
|
542 |
*/
|
543 |
function twig_round($value, $precision = 0, $method = 'common')
|
544 |
{
|
@@ -562,7 +573,7 @@ function twig_round($value, $precision = 0, $method = 'common')
|
|
562 |
*
|
563 |
* @param Twig_Environment $env A Twig_Environment instance
|
564 |
* @param mixed $number A float/int/string of the number to format
|
565 |
-
* @param
|
566 |
* @param string $decimalPoint The character(s) to use for the decimal point.
|
567 |
* @param string $thousandSep The character(s) to use for the thousands separator.
|
568 |
*
|
@@ -587,32 +598,31 @@ function twig_number_format_filter(Twig_Environment $env, $number, $decimal = nu
|
|
587 |
}
|
588 |
|
589 |
/**
|
590 |
-
* URL encodes a string as a path segment or an array as a query string.
|
591 |
*
|
592 |
* @param string|array $url A URL or an array of query parameters
|
593 |
-
* @param Boolean $raw true to use rawurlencode() instead of urlencode
|
594 |
*
|
595 |
* @return string The URL encoded value
|
596 |
*/
|
597 |
-
function twig_urlencode_filter($url
|
598 |
{
|
599 |
if (is_array($url)) {
|
600 |
-
|
601 |
-
|
|
|
602 |
|
603 |
-
|
604 |
-
return rawurlencode($url);
|
605 |
}
|
606 |
|
607 |
-
return
|
608 |
}
|
609 |
|
610 |
-
if (
|
611 |
/**
|
612 |
* JSON encodes a variable.
|
613 |
*
|
614 |
-
* @param mixed
|
615 |
-
* @param
|
616 |
*
|
617 |
* @return mixed The JSON encoded value
|
618 |
*/
|
@@ -630,8 +640,8 @@ if (version_compare(PHP_VERSION, '5.3.0', '<')) {
|
|
630 |
/**
|
631 |
* JSON encodes a variable.
|
632 |
*
|
633 |
-
* @param mixed
|
634 |
-
* @param
|
635 |
*
|
636 |
* @return mixed The JSON encoded value
|
637 |
*/
|
@@ -673,7 +683,7 @@ function _twig_markup2string(&$value)
|
|
673 |
function twig_array_merge($arr1, $arr2)
|
674 |
{
|
675 |
if (!is_array($arr1) || !is_array($arr2)) {
|
676 |
-
throw new Twig_Error_Runtime('The merge filter only works with arrays or hashes.');
|
677 |
}
|
678 |
|
679 |
return array_merge($arr1, $arr2);
|
@@ -684,16 +694,28 @@ function twig_array_merge($arr1, $arr2)
|
|
684 |
*
|
685 |
* @param Twig_Environment $env A Twig_Environment instance
|
686 |
* @param mixed $item A variable
|
687 |
-
* @param
|
688 |
-
* @param
|
689 |
-
* @param
|
690 |
*
|
691 |
* @return mixed The sliced variable
|
692 |
*/
|
693 |
function twig_slice(Twig_Environment $env, $item, $start, $length = null, $preserveKeys = false)
|
694 |
{
|
695 |
if ($item instanceof Traversable) {
|
696 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
697 |
}
|
698 |
|
699 |
if (is_array($item)) {
|
@@ -703,10 +725,10 @@ function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese
|
|
703 |
$item = (string) $item;
|
704 |
|
705 |
if (function_exists('mb_get_info') && null !== $charset = $env->getCharset()) {
|
706 |
-
return mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset);
|
707 |
}
|
708 |
|
709 |
-
return null === $length ? substr($item, $start) : substr($item, $start, $length);
|
710 |
}
|
711 |
|
712 |
/**
|
@@ -785,17 +807,35 @@ function twig_join_filter($value, $glue = '')
|
|
785 |
*
|
786 |
* @param string $value A string
|
787 |
* @param string $delimiter The delimiter
|
788 |
-
* @param
|
789 |
*
|
790 |
* @return array The split string as an array
|
791 |
*/
|
792 |
-
function twig_split_filter($value, $delimiter, $limit = null)
|
793 |
{
|
794 |
-
if (empty($delimiter)) {
|
|
|
|
|
|
|
|
|
795 |
return str_split($value, null === $limit ? 1 : $limit);
|
796 |
}
|
797 |
|
798 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
799 |
}
|
800 |
|
801 |
// The '_default' filter is used internally to avoid using the ternary operator
|
@@ -843,7 +883,7 @@ function twig_get_array_keys_filter($array)
|
|
843 |
*
|
844 |
* @param Twig_Environment $env A Twig_Environment instance
|
845 |
* @param array|Traversable|string $item An array, a Traversable instance, or a string
|
846 |
-
* @param
|
847 |
*
|
848 |
* @return mixed The reversed input
|
849 |
*/
|
@@ -894,15 +934,11 @@ function twig_sort_filter($array)
|
|
894 |
function twig_in_filter($value, $compare)
|
895 |
{
|
896 |
if (is_array($compare)) {
|
897 |
-
return in_array($value, $compare, is_object($value));
|
898 |
-
} elseif (is_string($compare)) {
|
899 |
-
|
900 |
-
return empty($compare);
|
901 |
-
}
|
902 |
-
|
903 |
-
return false !== strpos($compare, (string) $value);
|
904 |
} elseif ($compare instanceof Traversable) {
|
905 |
-
return in_array($value, iterator_to_array($compare, false), is_object($value));
|
906 |
}
|
907 |
|
908 |
return false;
|
@@ -915,7 +951,7 @@ function twig_in_filter($value, $compare)
|
|
915 |
* @param string $string The value to be escaped
|
916 |
* @param string $strategy The escaping strategy
|
917 |
* @param string $charset The charset
|
918 |
-
* @param
|
919 |
*/
|
920 |
function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
|
921 |
{
|
@@ -945,7 +981,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
|
|
945 |
static $htmlspecialcharsCharsets;
|
946 |
|
947 |
if (null === $htmlspecialcharsCharsets) {
|
948 |
-
if ('
|
949 |
$htmlspecialcharsCharsets = array('utf-8' => true, 'UTF-8' => true);
|
950 |
} else {
|
951 |
$htmlspecialcharsCharsets = array(
|
@@ -1037,9 +1073,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html',
|
|
1037 |
return $string;
|
1038 |
|
1039 |
case 'url':
|
1040 |
-
|
1041 |
-
// at that point however PHP 5.2.* support can be removed
|
1042 |
-
if (PHP_VERSION < '5.3.0') {
|
1043 |
return str_replace('%7E', '~', rawurlencode($string));
|
1044 |
}
|
1045 |
|
@@ -1180,7 +1214,6 @@ function _twig_escape_html_attr_callback($matches)
|
|
1180 |
* Per OWASP recommendations, we'll use hex entities for any other
|
1181 |
* characters where a named entity does not exist.
|
1182 |
*/
|
1183 |
-
|
1184 |
return sprintf('&#x%s;', $hex);
|
1185 |
}
|
1186 |
|
@@ -1192,7 +1225,7 @@ if (function_exists('mb_get_info')) {
|
|
1192 |
* @param Twig_Environment $env A Twig_Environment instance
|
1193 |
* @param mixed $thing A variable
|
1194 |
*
|
1195 |
-
* @return
|
1196 |
*/
|
1197 |
function twig_length_filter(Twig_Environment $env, $thing)
|
1198 |
{
|
@@ -1276,7 +1309,7 @@ else {
|
|
1276 |
* @param Twig_Environment $env A Twig_Environment instance
|
1277 |
* @param mixed $thing A variable
|
1278 |
*
|
1279 |
-
* @return
|
1280 |
*/
|
1281 |
function twig_length_filter(Twig_Environment $env, $thing)
|
1282 |
{
|
@@ -1332,7 +1365,7 @@ function twig_ensure_traversable($seq)
|
|
1332 |
*
|
1333 |
* @param mixed $value A variable
|
1334 |
*
|
1335 |
-
* @return
|
1336 |
*/
|
1337 |
function twig_test_empty($value)
|
1338 |
{
|
@@ -1355,7 +1388,7 @@ function twig_test_empty($value)
|
|
1355 |
*
|
1356 |
* @param mixed $value A variable
|
1357 |
*
|
1358 |
-
* @return
|
1359 |
*/
|
1360 |
function twig_test_iterable($value)
|
1361 |
{
|
@@ -1367,9 +1400,9 @@ function twig_test_iterable($value)
|
|
1367 |
*
|
1368 |
* @param string|array $template The template to render or an array of templates to try consecutively
|
1369 |
* @param array $variables The variables to pass to the template
|
1370 |
-
* @param
|
1371 |
-
* @param
|
1372 |
-
* @param
|
1373 |
*
|
1374 |
* @return string The rendered template
|
1375 |
*/
|
@@ -1434,7 +1467,7 @@ function twig_constant($constant, $object = null)
|
|
1434 |
* Batches item.
|
1435 |
*
|
1436 |
* @param array $items An array of items
|
1437 |
-
* @param
|
1438 |
* @param mixed $fill A value used to fill missing items
|
1439 |
*
|
1440 |
* @return array
|
95 |
/**
|
96 |
* Sets the default format to be used by the number_format filter.
|
97 |
*
|
98 |
+
* @param int $decimal The number of decimal places to use.
|
99 |
+
* @param string $decimalPoint The character(s) to use for the decimal point.
|
100 |
+
* @param string $thousandSep The character(s) to use for the thousands separator.
|
101 |
*/
|
102 |
public function setNumberFormat($decimal, $decimalPoint, $thousandSep)
|
103 |
{
|
173 |
|
174 |
// array helpers
|
175 |
new Twig_SimpleFilter('join', 'twig_join_filter'),
|
176 |
+
new Twig_SimpleFilter('split', 'twig_split_filter', array('needs_environment' => true)),
|
177 |
new Twig_SimpleFilter('sort', 'twig_sort_filter'),
|
178 |
new Twig_SimpleFilter('merge', 'twig_array_merge'),
|
179 |
new Twig_SimpleFilter('batch', 'twig_array_batch'),
|
298 |
public function parseTestExpression(Twig_Parser $parser, Twig_NodeInterface $node)
|
299 |
{
|
300 |
$stream = $parser->getStream();
|
301 |
+
$name = $this->getTestName($parser, $node->getLine());
|
302 |
+
$class = $this->getTestNodeClass($parser, $name);
|
303 |
$arguments = null;
|
304 |
if ($stream->test(Twig_Token::PUNCTUATION_TYPE, '(')) {
|
305 |
$arguments = $parser->getExpressionParser()->parseArguments(true);
|
308 |
return new $class($node, $name, $arguments, $parser->getCurrentToken()->getLine());
|
309 |
}
|
310 |
|
311 |
+
protected function getTestName(Twig_Parser $parser, $line)
|
312 |
{
|
313 |
+
$stream = $parser->getStream();
|
314 |
+
$name = $stream->expect(Twig_Token::NAME_TYPE)->getValue();
|
315 |
$env = $parser->getEnvironment();
|
316 |
$testMap = $env->getTests();
|
317 |
+
|
318 |
if (isset($testMap[$name])) {
|
319 |
+
return $name;
|
320 |
+
}
|
321 |
+
|
322 |
+
if ($stream->test(Twig_Token::NAME_TYPE)) {
|
323 |
// try 2-words tests
|
324 |
$name = $name.' '.$parser->getCurrentToken()->getValue();
|
325 |
|
326 |
if (isset($testMap[$name])) {
|
327 |
$parser->getStream()->next();
|
328 |
|
329 |
+
return $name;
|
330 |
}
|
331 |
}
|
332 |
|
333 |
+
$message = sprintf('The test "%s" does not exist', $name);
|
334 |
+
if ($alternatives = $env->computeAlternatives($name, array_keys($testMap))) {
|
335 |
+
$message = sprintf('%s. Did you mean "%s"', $message, implode('", "', $alternatives));
|
|
|
|
|
|
|
|
|
336 |
}
|
337 |
|
338 |
+
throw new Twig_Error_Syntax($message, $line, $parser->getFilename());
|
339 |
+
}
|
340 |
+
|
341 |
+
protected function getTestNodeClass(Twig_Parser $parser, $name)
|
342 |
+
{
|
343 |
+
$env = $parser->getEnvironment();
|
344 |
+
$testMap = $env->getTests();
|
345 |
+
|
346 |
if ($testMap[$name] instanceof Twig_SimpleTest) {
|
347 |
return $testMap[$name]->getNodeClass();
|
348 |
}
|
365 |
* Cycles over a value.
|
366 |
*
|
367 |
* @param ArrayAccess|array $values An array or an ArrayAccess instance
|
368 |
+
* @param int $position The cycle position
|
369 |
*
|
370 |
* @return string The next value in the cycle
|
371 |
*/
|
385 |
* - a random integer between 0 and the integer parameter
|
386 |
*
|
387 |
* @param Twig_Environment $env A Twig_Environment instance
|
388 |
+
* @param Traversable|array|int|string $values The values to pick a random item from
|
389 |
*
|
390 |
* @throws Twig_Error_Runtime When $values is an empty array (does not apply to an empty string which is returned as is).
|
391 |
*
|
444 |
* {{ post.published_at|date("m/d/Y") }}
|
445 |
* </pre>
|
446 |
*
|
447 |
+
* @param Twig_Environment $env A Twig_Environment instance
|
448 |
+
* @param DateTime|DateTimeInterface|DateInterval|string $date A date
|
449 |
+
* @param string|null $format The target format, null to use the default
|
450 |
+
* @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
|
451 |
*
|
452 |
* @return string The formatted date
|
453 |
*/
|
481 |
function twig_date_modify_filter(Twig_Environment $env, $date, $modifier)
|
482 |
{
|
483 |
$date = twig_date_converter($env, $date, false);
|
484 |
+
$resultDate = $date->modify($modifier);
|
485 |
|
486 |
+
// This is a hack to ensure PHP 5.2 support and support for DateTimeImmutable
|
487 |
+
// DateTime::modify does not return the modified DateTime object < 5.3.0
|
488 |
+
// and DateTimeImmutable does not modify $date.
|
489 |
+
return null === $resultDate ? $date : $resultDate;
|
490 |
}
|
491 |
|
492 |
/**
|
498 |
* {% endif %}
|
499 |
* </pre>
|
500 |
*
|
501 |
+
* @param Twig_Environment $env A Twig_Environment instance
|
502 |
+
* @param DateTime|DateTimeInterface|string|null $date A date
|
503 |
+
* @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged
|
504 |
*
|
505 |
* @return DateTime A DateTime instance
|
506 |
*/
|
507 |
function twig_date_converter(Twig_Environment $env, $date = null, $timezone = null)
|
508 |
{
|
509 |
// determine the timezone
|
510 |
+
if (false !== $timezone) {
|
511 |
+
if (null === $timezone) {
|
512 |
+
$timezone = $env->getExtension('core')->getTimezone();
|
513 |
+
} elseif (!$timezone instanceof DateTimeZone) {
|
514 |
+
$timezone = new DateTimeZone($timezone);
|
515 |
+
}
|
516 |
}
|
517 |
|
518 |
// immutable dates
|
519 |
if ($date instanceof DateTimeImmutable) {
|
520 |
+
return false !== $timezone ? $date->setTimezone($timezone) : $date;
|
521 |
}
|
522 |
|
523 |
if ($date instanceof DateTime || $date instanceof DateTimeInterface) {
|
524 |
$date = clone $date;
|
525 |
if (false !== $timezone) {
|
526 |
+
$date->setTimezone($timezone);
|
527 |
}
|
528 |
|
529 |
return $date;
|
534 |
$date = '@'.$date;
|
535 |
}
|
536 |
|
537 |
+
$date = new DateTime($date, $env->getExtension('core')->getTimezone());
|
538 |
if (false !== $timezone) {
|
539 |
+
$date->setTimezone($timezone);
|
540 |
}
|
541 |
|
542 |
return $date;
|
545 |
/**
|
546 |
* Rounds a number.
|
547 |
*
|
548 |
+
* @param int|float $value The value to round
|
549 |
+
* @param int|float $precision The rounding precision
|
550 |
* @param string $method The method to use for rounding
|
551 |
*
|
552 |
+
* @return int|float The rounded number
|
553 |
*/
|
554 |
function twig_round($value, $precision = 0, $method = 'common')
|
555 |
{
|
573 |
*
|
574 |
* @param Twig_Environment $env A Twig_Environment instance
|
575 |
* @param mixed $number A float/int/string of the number to format
|
576 |
+
* @param int $decimal The number of decimal points to display.
|
577 |
* @param string $decimalPoint The character(s) to use for the decimal point.
|
578 |
* @param string $thousandSep The character(s) to use for the thousands separator.
|
579 |
*
|
598 |
}
|
599 |
|
600 |
/**
|
601 |
+
* URL encodes (RFC 3986) a string as a path segment or an array as a query string.
|
602 |
*
|
603 |
* @param string|array $url A URL or an array of query parameters
|
|
|
604 |
*
|
605 |
* @return string The URL encoded value
|
606 |
*/
|
607 |
+
function twig_urlencode_filter($url)
|
608 |
{
|
609 |
if (is_array($url)) {
|
610 |
+
if (defined('PHP_QUERY_RFC3986')) {
|
611 |
+
return http_build_query($url, '', '&', PHP_QUERY_RFC3986);
|
612 |
+
}
|
613 |
|
614 |
+
return http_build_query($url, '', '&');
|
|
|
615 |
}
|
616 |
|
617 |
+
return rawurlencode($url);
|
618 |
}
|
619 |
|
620 |
+
if (PHP_VERSION_ID < 50300) {
|
621 |
/**
|
622 |
* JSON encodes a variable.
|
623 |
*
|
624 |
+
* @param mixed $value The value to encode.
|
625 |
+
* @param int $options Not used on PHP 5.2.x
|
626 |
*
|
627 |
* @return mixed The JSON encoded value
|
628 |
*/
|
640 |
/**
|
641 |
* JSON encodes a variable.
|
642 |
*
|
643 |
+
* @param mixed $value The value to encode.
|
644 |
+
* @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT
|
645 |
*
|
646 |
* @return mixed The JSON encoded value
|
647 |
*/
|
683 |
function twig_array_merge($arr1, $arr2)
|
684 |
{
|
685 |
if (!is_array($arr1) || !is_array($arr2)) {
|
686 |
+
throw new Twig_Error_Runtime(sprintf('The merge filter only works with arrays or hashes; %s and %s given.', gettype($arr1), gettype($arr2)));
|
687 |
}
|
688 |
|
689 |
return array_merge($arr1, $arr2);
|
694 |
*
|
695 |
* @param Twig_Environment $env A Twig_Environment instance
|
696 |
* @param mixed $item A variable
|
697 |
+
* @param int $start Start of the slice
|
698 |
+
* @param int $length Size of the slice
|
699 |
+
* @param bool $preserveKeys Whether to preserve key or not (when the input is an array)
|
700 |
*
|
701 |
* @return mixed The sliced variable
|
702 |
*/
|
703 |
function twig_slice(Twig_Environment $env, $item, $start, $length = null, $preserveKeys = false)
|
704 |
{
|
705 |
if ($item instanceof Traversable) {
|
706 |
+
if ($item instanceof IteratorAggregate) {
|
707 |
+
$item = $item->getIterator();
|
708 |
+
}
|
709 |
+
|
710 |
+
if ($start >= 0 && $length >= 0 && $item instanceof Iterator) {
|
711 |
+
try {
|
712 |
+
return iterator_to_array(new LimitIterator($item, $start, $length === null ? -1 : $length), $preserveKeys);
|
713 |
+
} catch (OutOfBoundsException $exception) {
|
714 |
+
return array();
|
715 |
+
}
|
716 |
+
}
|
717 |
+
|
718 |
+
$item = iterator_to_array($item, $preserveKeys);
|
719 |
}
|
720 |
|
721 |
if (is_array($item)) {
|
725 |
$item = (string) $item;
|
726 |
|
727 |
if (function_exists('mb_get_info') && null !== $charset = $env->getCharset()) {
|
728 |
+
return (string) mb_substr($item, $start, null === $length ? mb_strlen($item, $charset) - $start : $length, $charset);
|
729 |
}
|
730 |
|
731 |
+
return (string) (null === $length ? substr($item, $start) : substr($item, $start, $length));
|
732 |
}
|
733 |
|
734 |
/**
|
807 |
*
|
808 |
* @param string $value A string
|
809 |
* @param string $delimiter The delimiter
|
810 |
+
* @param int $limit The limit
|
811 |
*
|
812 |
* @return array The split string as an array
|
813 |
*/
|
814 |
+
function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = null)
|
815 |
{
|
816 |
+
if (!empty($delimiter)) {
|
817 |
+
return null === $limit ? explode($delimiter, $value) : explode($delimiter, $value, $limit);
|
818 |
+
}
|
819 |
+
|
820 |
+
if (!function_exists('mb_get_info') || null === $charset = $env->getCharset()) {
|
821 |
return str_split($value, null === $limit ? 1 : $limit);
|
822 |
}
|
823 |
|
824 |
+
if ($limit <= 1) {
|
825 |
+
return preg_split('/(?<!^)(?!$)/u', $value);
|
826 |
+
}
|
827 |
+
|
828 |
+
$length = mb_strlen($value, $charset);
|
829 |
+
if ($length < $limit) {
|
830 |
+
return array($value);
|
831 |
+
}
|
832 |
+
|
833 |
+
$r = array();
|
834 |
+
for ($i = 0; $i < $length; $i += $limit) {
|
835 |
+
$r[] = mb_substr($value, $i, $limit, $charset);
|
836 |
+
}
|
837 |
+
|
838 |
+
return $r;
|
839 |
}
|
840 |
|
841 |
// The '_default' filter is used internally to avoid using the ternary operator
|
883 |
*
|
884 |
* @param Twig_Environment $env A Twig_Environment instance
|
885 |
* @param array|Traversable|string $item An array, a Traversable instance, or a string
|
886 |
+
* @param bool $preserveKeys Whether to preserve key or not
|
887 |
*
|
888 |
* @return mixed The reversed input
|
889 |
*/
|
934 |
function twig_in_filter($value, $compare)
|
935 |
{
|
936 |
if (is_array($compare)) {
|
937 |
+
return in_array($value, $compare, is_object($value) || is_resource($value));
|
938 |
+
} elseif (is_string($compare) && (is_string($value) || is_int($value) || is_float($value))) {
|
939 |
+
return '' === $value || false !== strpos($compare, (string) $value);
|
|
|
|
|
|
|
|
|
940 |
} elseif ($compare instanceof Traversable) {
|
941 |
+
return in_array($value, iterator_to_array($compare, false), is_object($value) || is_resource($value));
|
942 |
}
|
943 |
|
944 |
return false;
|
951 |
* @param string $string The value to be escaped
|
952 |
* @param string $strategy The escaping strategy
|
953 |
* @param string $charset The charset
|
954 |
+
* @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
|
955 |
*/
|
956 |
function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false)
|
957 |
{
|
981 |
static $htmlspecialcharsCharsets;
|
982 |
|
983 |
if (null === $htmlspecialcharsCharsets) {
|
984 |
+
if (defined('HHVM_VERSION')) {
|
985 |
$htmlspecialcharsCharsets = array('utf-8' => true, 'UTF-8' => true);
|
986 |
} else {
|
987 |
$htmlspecialcharsCharsets = array(
|
1073 |
return $string;
|
1074 |
|
1075 |
case 'url':
|
1076 |
+
if (PHP_VERSION_ID < 50300) {
|
|
|
|
|
1077 |
return str_replace('%7E', '~', rawurlencode($string));
|
1078 |
}
|
1079 |
|
1214 |
* Per OWASP recommendations, we'll use hex entities for any other
|
1215 |
* characters where a named entity does not exist.
|
1216 |
*/
|
|
|
1217 |
return sprintf('&#x%s;', $hex);
|
1218 |
}
|
1219 |
|
1225 |
* @param Twig_Environment $env A Twig_Environment instance
|
1226 |
* @param mixed $thing A variable
|
1227 |
*
|
1228 |
+
* @return int The length of the value
|
1229 |
*/
|
1230 |
function twig_length_filter(Twig_Environment $env, $thing)
|
1231 |
{
|
1309 |
* @param Twig_Environment $env A Twig_Environment instance
|
1310 |
* @param mixed $thing A variable
|
1311 |
*
|
1312 |
+
* @return int The length of the value
|
1313 |
*/
|
1314 |
function twig_length_filter(Twig_Environment $env, $thing)
|
1315 |
{
|
1365 |
*
|
1366 |
* @param mixed $value A variable
|
1367 |
*
|
1368 |
+
* @return bool true if the value is empty, false otherwise
|
1369 |
*/
|
1370 |
function twig_test_empty($value)
|
1371 |
{
|
1388 |
*
|
1389 |
* @param mixed $value A variable
|
1390 |
*
|
1391 |
+
* @return bool true if the value is traversable
|
1392 |
*/
|
1393 |
function twig_test_iterable($value)
|
1394 |
{
|
1400 |
*
|
1401 |
* @param string|array $template The template to render or an array of templates to try consecutively
|
1402 |
* @param array $variables The variables to pass to the template
|
1403 |
+
* @param bool $with_context Whether to pass the current context variables or not
|
1404 |
+
* @param bool $ignore_missing Whether to ignore missing templates or not
|
1405 |
+
* @param bool $sandboxed Whether to sandbox the template or not
|
1406 |
*
|
1407 |
* @return string The rendered template
|
1408 |
*/
|
1467 |
* Batches item.
|
1468 |
*
|
1469 |
* @param array $items An array of items
|
1470 |
+
* @param int $size The size of the batch
|
1471 |
* @param mixed $fill A value used to fill missing items
|
1472 |
*
|
1473 |
* @return array
|
vendor/twig/twig/lib/Twig/Extension/Escaper.php
CHANGED
@@ -64,6 +64,10 @@ class Twig_Extension_Escaper extends Twig_Extension
|
|
64 |
$defaultStrategy = 'html';
|
65 |
}
|
66 |
|
|
|
|
|
|
|
|
|
67 |
$this->defaultStrategy = $defaultStrategy;
|
68 |
}
|
69 |
|
64 |
$defaultStrategy = 'html';
|
65 |
}
|
66 |
|
67 |
+
if ('filename' === $defaultStrategy) {
|
68 |
+
$defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess');
|
69 |
+
}
|
70 |
+
|
71 |
$this->defaultStrategy = $defaultStrategy;
|
72 |
}
|
73 |
|
vendor/twig/twig/lib/Twig/Extension/Profiler.php
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Extension_Profiler extends Twig_Extension
|
13 |
+
{
|
14 |
+
private $actives;
|
15 |
+
|
16 |
+
public function __construct(Twig_Profiler_Profile $profile)
|
17 |
+
{
|
18 |
+
$this->actives = array($profile);
|
19 |
+
}
|
20 |
+
|
21 |
+
public function enter(Twig_Profiler_Profile $profile)
|
22 |
+
{
|
23 |
+
$this->actives[0]->addProfile($profile);
|
24 |
+
array_unshift($this->actives, $profile);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function leave(Twig_Profiler_Profile $profile)
|
28 |
+
{
|
29 |
+
$profile->leave();
|
30 |
+
array_shift($this->actives);
|
31 |
+
|
32 |
+
if (1 === count($this->actives)) {
|
33 |
+
$this->actives[0]->leave();
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* {@inheritdoc}
|
39 |
+
*/
|
40 |
+
public function getNodeVisitors()
|
41 |
+
{
|
42 |
+
return array(new Twig_Profiler_NodeVisitor_Profiler($this->getName()));
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* {@inheritdoc}
|
47 |
+
*/
|
48 |
+
public function getName()
|
49 |
+
{
|
50 |
+
return 'profiler';
|
51 |
+
}
|
52 |
+
}
|
vendor/twig/twig/lib/Twig/Extension/Sandbox.php
CHANGED
@@ -93,7 +93,7 @@ class Twig_Extension_Sandbox extends Twig_Extension
|
|
93 |
|
94 |
public function ensureToStringAllowed($obj)
|
95 |
{
|
96 |
-
if (is_object($obj)) {
|
97 |
$this->policy->checkMethodAllowed($obj, '__toString');
|
98 |
}
|
99 |
|
93 |
|
94 |
public function ensureToStringAllowed($obj)
|
95 |
{
|
96 |
+
if ($this->isSandboxed() && is_object($obj)) {
|
97 |
$this->policy->checkMethodAllowed($obj, '__toString');
|
98 |
}
|
99 |
|
vendor/twig/twig/lib/Twig/Extension/StringLoader.php
CHANGED
@@ -43,22 +43,5 @@ class Twig_Extension_StringLoader extends Twig_Extension
|
|
43 |
*/
|
44 |
function twig_template_from_string(Twig_Environment $env, $template)
|
45 |
{
|
46 |
-
$
|
47 |
-
|
48 |
-
$loader = new Twig_Loader_Chain(array(
|
49 |
-
new Twig_Loader_Array(array($name => $template)),
|
50 |
-
$current = $env->getLoader(),
|
51 |
-
));
|
52 |
-
|
53 |
-
$env->setLoader($loader);
|
54 |
-
try {
|
55 |
-
$template = $env->loadTemplate($name);
|
56 |
-
} catch (Exception $e) {
|
57 |
-
$env->setLoader($current);
|
58 |
-
|
59 |
-
throw $e;
|
60 |
-
}
|
61 |
-
$env->setLoader($current);
|
62 |
-
|
63 |
-
return $template;
|
64 |
}
|
43 |
*/
|
44 |
function twig_template_from_string(Twig_Environment $env, $template)
|
45 |
{
|
46 |
+
return $env->createTemplate($template);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Default autoescaping strategy based on file names.
|
14 |
+
*
|
15 |
+
* This strategy sets the HTML as the default autoescaping strategy,
|
16 |
+
* but changes it based on the filename.
|
17 |
+
*
|
18 |
+
* Note that there is no runtime performance impact as the
|
19 |
+
* default autoescaping strategy is set at compilation time.
|
20 |
+
*
|
21 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
22 |
+
*/
|
23 |
+
class Twig_FileExtensionEscapingStrategy
|
24 |
+
{
|
25 |
+
/**
|
26 |
+
* Guesses the best autoescaping strategy based on the file name.
|
27 |
+
*
|
28 |
+
* @param string $filename The template file name
|
29 |
+
*
|
30 |
+
* @return string The escaping strategy name to use
|
31 |
+
*/
|
32 |
+
public static function guess($filename)
|
33 |
+
{
|
34 |
+
if (!preg_match('{\.(js|css|txt)(?:\.[^/\\\\]+)?$}', $filename, $match)) {
|
35 |
+
return 'html';
|
36 |
+
}
|
37 |
+
|
38 |
+
switch ($match[1]) {
|
39 |
+
case 'js':
|
40 |
+
return 'js';
|
41 |
+
|
42 |
+
case 'css':
|
43 |
+
return 'css';
|
44 |
+
|
45 |
+
case 'txt':
|
46 |
+
return false;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
vendor/twig/twig/lib/Twig/Lexer.php
CHANGED
@@ -317,11 +317,9 @@ class Twig_Lexer implements Twig_LexerInterface
|
|
317 |
$this->pushToken(Twig_Token::INTERPOLATION_START_TYPE);
|
318 |
$this->moveCursor($match[0]);
|
319 |
$this->pushState(self::STATE_INTERPOLATION);
|
320 |
-
|
321 |
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, null, $this->cursor) && strlen($match[0]) > 0) {
|
322 |
$this->pushToken(Twig_Token::STRING_TYPE, stripcslashes($match[0]));
|
323 |
$this->moveCursor($match[0]);
|
324 |
-
|
325 |
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {
|
326 |
list($expect, $lineno) = array_pop($this->brackets);
|
327 |
if ($this->code[$this->cursor] != '"') {
|
317 |
$this->pushToken(Twig_Token::INTERPOLATION_START_TYPE);
|
318 |
$this->moveCursor($match[0]);
|
319 |
$this->pushState(self::STATE_INTERPOLATION);
|
|
|
320 |
} elseif (preg_match(self::REGEX_DQ_STRING_PART, $this->code, $match, null, $this->cursor) && strlen($match[0]) > 0) {
|
321 |
$this->pushToken(Twig_Token::STRING_TYPE, stripcslashes($match[0]));
|
322 |
$this->moveCursor($match[0]);
|
|
|
323 |
} elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) {
|
324 |
list($expect, $lineno) = array_pop($this->brackets);
|
325 |
if ($this->code[$this->cursor] != '"') {
|
vendor/twig/twig/lib/Twig/LexerInterface.php
CHANGED
@@ -13,7 +13,8 @@
|
|
13 |
* Interface implemented by lexer classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_LexerInterface
|
19 |
{
|
13 |
* Interface implemented by lexer classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_LexerInterface
|
20 |
{
|
vendor/twig/twig/lib/Twig/Loader/Array.php
CHANGED
@@ -17,6 +17,8 @@
|
|
17 |
* source code of the template). If you don't want to see your cache grows out of
|
18 |
* control, you need to take care of clearing the old cache file by yourself.
|
19 |
*
|
|
|
|
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
|
17 |
* source code of the template). If you don't want to see your cache grows out of
|
18 |
* control, you need to take care of clearing the old cache file by yourself.
|
19 |
*
|
20 |
+
* This loader should only be used for unit testing.
|
21 |
+
*
|
22 |
* @author Fabien Potencier <fabien@symfony.com>
|
23 |
*/
|
24 |
class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
|
vendor/twig/twig/lib/Twig/Loader/Filesystem.php
CHANGED
@@ -176,16 +176,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
|
|
176 |
|
177 |
$this->validateName($name);
|
178 |
|
179 |
-
$namespace =
|
180 |
-
$shortname = $name;
|
181 |
-
if (isset($name[0]) && '@' == $name[0]) {
|
182 |
-
if (false === $pos = strpos($name, '/')) {
|
183 |
-
throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
|
184 |
-
}
|
185 |
-
|
186 |
-
$namespace = substr($name, 1, $pos - 1);
|
187 |
-
$shortname = substr($name, $pos + 1);
|
188 |
-
}
|
189 |
|
190 |
if (!isset($this->paths[$namespace])) {
|
191 |
throw new Twig_Error_Loader(sprintf('There are no registered paths for namespace "%s".', $namespace));
|
@@ -193,6 +184,10 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
|
|
193 |
|
194 |
foreach ($this->paths[$namespace] as $path) {
|
195 |
if (is_file($path.'/'.$shortname)) {
|
|
|
|
|
|
|
|
|
196 |
return $this->cache[$name] = $path.'/'.$shortname;
|
197 |
}
|
198 |
}
|
@@ -200,6 +195,22 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI
|
|
200 |
throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])));
|
201 |
}
|
202 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
protected function normalizeName($name)
|
204 |
{
|
205 |
return preg_replace('#/{2,}#', '/', strtr((string) $name, '\\', '/'));
|
176 |
|
177 |
$this->validateName($name);
|
178 |
|
179 |
+
list($namespace, $shortname) = $this->parseName($name);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
|
181 |
if (!isset($this->paths[$namespace])) {
|
182 |
throw new Twig_Error_Loader(sprintf('There are no registered paths for namespace "%s".', $namespace));
|
184 |
|
185 |
foreach ($this->paths[$namespace] as $path) {
|
186 |
if (is_file($path.'/'.$shortname)) {
|
187 |
+
if (false !== $realpath = realpath($path.'/'.$shortname)) {
|
188 |
+
return $this->cache[$name] = $realpath;
|
189 |
+
}
|
190 |
+
|
191 |
return $this->cache[$name] = $path.'/'.$shortname;
|
192 |
}
|
193 |
}
|
195 |
throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace])));
|
196 |
}
|
197 |
|
198 |
+
protected function parseName($name, $default = self::MAIN_NAMESPACE)
|
199 |
+
{
|
200 |
+
if (isset($name[0]) && '@' == $name[0]) {
|
201 |
+
if (false === $pos = strpos($name, '/')) {
|
202 |
+
throw new Twig_Error_Loader(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
|
203 |
+
}
|
204 |
+
|
205 |
+
$namespace = substr($name, 1, $pos - 1);
|
206 |
+
$shortname = substr($name, $pos + 1);
|
207 |
+
|
208 |
+
return array($namespace, $shortname);
|
209 |
+
}
|
210 |
+
|
211 |
+
return array($default, $name);
|
212 |
+
}
|
213 |
+
|
214 |
protected function normalizeName($name)
|
215 |
{
|
216 |
return preg_replace('#/{2,}#', '/', strtr((string) $name, '\\', '/'));
|
vendor/twig/twig/lib/Twig/Loader/String.php
CHANGED
@@ -12,15 +12,15 @@
|
|
12 |
/**
|
13 |
* Loads a template from a string.
|
14 |
*
|
15 |
-
* This loader should
|
16 |
-
* (for instance, the include or extends tag does not make any sense for a string
|
17 |
-
* loader).
|
18 |
*
|
19 |
* When using this loader with a cache mechanism, you should know that a new cache
|
20 |
* key is generated each time a template content "changes" (the cache key being the
|
21 |
* source code of the template). If you don't want to see your cache grows out of
|
22 |
* control, you need to take care of clearing the old cache file by yourself.
|
23 |
*
|
|
|
|
|
24 |
* @author Fabien Potencier <fabien@symfony.com>
|
25 |
*/
|
26 |
class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
|
12 |
/**
|
13 |
* Loads a template from a string.
|
14 |
*
|
15 |
+
* This loader should NEVER be used. It only exists for Twig internal purposes.
|
|
|
|
|
16 |
*
|
17 |
* When using this loader with a cache mechanism, you should know that a new cache
|
18 |
* key is generated each time a template content "changes" (the cache key being the
|
19 |
* source code of the template). If you don't want to see your cache grows out of
|
20 |
* control, you need to take care of clearing the old cache file by yourself.
|
21 |
*
|
22 |
+
* @deprecated since 1.18.1 (to be removed in 2.0)
|
23 |
+
*
|
24 |
* @author Fabien Potencier <fabien@symfony.com>
|
25 |
*/
|
26 |
class Twig_Loader_String implements Twig_LoaderInterface, Twig_ExistsLoaderInterface
|
vendor/twig/twig/lib/Twig/LoaderInterface.php
CHANGED
@@ -44,7 +44,7 @@ interface Twig_LoaderInterface
|
|
44 |
* @param string $name The template name
|
45 |
* @param timestamp $time The last modification time of the cached template
|
46 |
*
|
47 |
-
* @return
|
48 |
*
|
49 |
* @throws Twig_Error_Loader When $name is not found
|
50 |
*/
|
44 |
* @param string $name The template name
|
45 |
* @param timestamp $time The last modification time of the cached template
|
46 |
*
|
47 |
+
* @return bool true if the template is fresh, false otherwise
|
48 |
*
|
49 |
* @throws Twig_Error_Loader When $name is not found
|
50 |
*/
|
vendor/twig/twig/lib/Twig/Node.php
CHANGED
@@ -28,10 +28,10 @@ class Twig_Node implements Twig_NodeInterface
|
|
28 |
* The nodes are automatically made available as properties ($this->node).
|
29 |
* The attributes are automatically made available as array items ($this['name']).
|
30 |
*
|
31 |
-
* @param array
|
32 |
-
* @param array
|
33 |
-
* @param
|
34 |
-
* @param string
|
35 |
*/
|
36 |
public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
|
37 |
{
|
@@ -69,6 +69,9 @@ class Twig_Node implements Twig_NodeInterface
|
|
69 |
return implode("\n", $repr);
|
70 |
}
|
71 |
|
|
|
|
|
|
|
72 |
public function toXml($asDom = false)
|
73 |
{
|
74 |
$dom = new DOMDocument('1.0', 'UTF-8');
|
@@ -121,7 +124,7 @@ class Twig_Node implements Twig_NodeInterface
|
|
121 |
*
|
122 |
* @param string The attribute name
|
123 |
*
|
124 |
-
* @return
|
125 |
*/
|
126 |
public function hasAttribute($name)
|
127 |
{
|
@@ -170,7 +173,7 @@ class Twig_Node implements Twig_NodeInterface
|
|
170 |
*
|
171 |
* @param string The node name
|
172 |
*
|
173 |
-
* @return
|
174 |
*/
|
175 |
public function hasNode($name)
|
176 |
{
|
28 |
* The nodes are automatically made available as properties ($this->node).
|
29 |
* The attributes are automatically made available as array items ($this['name']).
|
30 |
*
|
31 |
+
* @param array $nodes An array of named nodes
|
32 |
+
* @param array $attributes An array of attributes (should not be nodes)
|
33 |
+
* @param int $lineno The line number
|
34 |
+
* @param string $tag The tag name associated with the Node
|
35 |
*/
|
36 |
public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null)
|
37 |
{
|
69 |
return implode("\n", $repr);
|
70 |
}
|
71 |
|
72 |
+
/**
|
73 |
+
* @deprecated since 1.16.1 (to be removed in 2.0)
|
74 |
+
*/
|
75 |
public function toXml($asDom = false)
|
76 |
{
|
77 |
$dom = new DOMDocument('1.0', 'UTF-8');
|
124 |
*
|
125 |
* @param string The attribute name
|
126 |
*
|
127 |
+
* @return bool true if the attribute is defined, false otherwise
|
128 |
*/
|
129 |
public function hasAttribute($name)
|
130 |
{
|
173 |
*
|
174 |
* @param string The node name
|
175 |
*
|
176 |
+
* @return bool true if the node with the given name exists, false otherwise
|
177 |
*/
|
178 |
public function hasNode($name)
|
179 |
{
|
vendor/twig/twig/lib/Twig/Node/AutoEscape.php
CHANGED
@@ -30,7 +30,7 @@ class Twig_Node_AutoEscape extends Twig_Node
|
|
30 |
/**
|
31 |
* Compiles the node to PHP.
|
32 |
*
|
33 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
34 |
*/
|
35 |
public function compile(Twig_Compiler $compiler)
|
36 |
{
|
30 |
/**
|
31 |
* Compiles the node to PHP.
|
32 |
*
|
33 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
34 |
*/
|
35 |
public function compile(Twig_Compiler $compiler)
|
36 |
{
|
vendor/twig/twig/lib/Twig/Node/Block.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_Block extends Twig_Node
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/BlockReference.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_BlockReference extends Twig_Node implements Twig_NodeOutputInter
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/CheckSecurity.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Node_CheckSecurity extends Twig_Node
|
16 |
+
{
|
17 |
+
protected $usedFilters;
|
18 |
+
protected $usedTags;
|
19 |
+
protected $usedFunctions;
|
20 |
+
|
21 |
+
public function __construct(array $usedFilters, array $usedTags, array $usedFunctions)
|
22 |
+
{
|
23 |
+
$this->usedFilters = $usedFilters;
|
24 |
+
$this->usedTags = $usedTags;
|
25 |
+
$this->usedFunctions = $usedFunctions;
|
26 |
+
|
27 |
+
parent::__construct();
|
28 |
+
}
|
29 |
+
|
30 |
+
public function compile(Twig_Compiler $compiler)
|
31 |
+
{
|
32 |
+
$tags = $filters = $functions = array();
|
33 |
+
foreach (array('tags', 'filters', 'functions') as $type) {
|
34 |
+
foreach ($this->{'used'.ucfirst($type)} as $name => $node) {
|
35 |
+
if ($node instanceof Twig_Node) {
|
36 |
+
${$type}[$name] = $node->getLine();
|
37 |
+
} else {
|
38 |
+
${$type}[$node] = null;
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
$compiler
|
44 |
+
->write("\$tags = ")->repr(array_filter($tags))->raw(";\n")
|
45 |
+
->write("\$filters = ")->repr(array_filter($filters))->raw(";\n")
|
46 |
+
->write("\$functions = ")->repr(array_filter($functions))->raw(";\n\n")
|
47 |
+
->write("try {\n")
|
48 |
+
->indent()
|
49 |
+
->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")
|
50 |
+
->indent()
|
51 |
+
->write(!$tags ? "array(),\n" : "array('".implode("', '", array_keys($tags))."'),\n")
|
52 |
+
->write(!$filters ? "array(),\n" : "array('".implode("', '", array_keys($filters))."'),\n")
|
53 |
+
->write(!$functions ? "array()\n" : "array('".implode("', '", array_keys($functions))."')\n")
|
54 |
+
->outdent()
|
55 |
+
->write(");\n")
|
56 |
+
->outdent()
|
57 |
+
->write("} catch (Twig_Sandbox_SecurityError \$e) {\n")
|
58 |
+
->indent()
|
59 |
+
->write("\$e->setTemplateFile(\$this->getTemplateName());\n\n")
|
60 |
+
->write("if (\$e instanceof Twig_Sandbox_SecurityNotAllowedTagError && isset(\$tags[\$e->getTagName()])) {\n")
|
61 |
+
->indent()
|
62 |
+
->write("\$e->setTemplateLine(\$tags[\$e->getTagName()]);\n")
|
63 |
+
->outdent()
|
64 |
+
->write("} elseif (\$e instanceof Twig_Sandbox_SecurityNotAllowedFilterError && isset(\$filters[\$e->getFilterName()])) {\n")
|
65 |
+
->indent()
|
66 |
+
->write("\$e->setTemplateLine(\$filters[\$e->getFilterName()]);\n")
|
67 |
+
->outdent()
|
68 |
+
->write("} elseif (\$e instanceof Twig_Sandbox_SecurityNotAllowedFunctionError && isset(\$functions[\$e->getFunctionName()])) {\n")
|
69 |
+
->indent()
|
70 |
+
->write("\$e->setTemplateLine(\$functions[\$e->getFunctionName()]);\n")
|
71 |
+
->outdent()
|
72 |
+
->write("}\n\n")
|
73 |
+
->write("throw \$e;\n")
|
74 |
+
->outdent()
|
75 |
+
->write("}\n\n")
|
76 |
+
;
|
77 |
+
}
|
78 |
+
}
|
vendor/twig/twig/lib/Twig/Node/Do.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Do extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
vendor/twig/twig/lib/Twig/Node/Embed.php
CHANGED
@@ -28,9 +28,13 @@ class Twig_Node_Embed extends Twig_Node_Include
|
|
28 |
protected function addGetTemplate(Twig_Compiler $compiler)
|
29 |
{
|
30 |
$compiler
|
31 |
-
->write("\$this->
|
32 |
->string($this->getAttribute('filename'))
|
33 |
->raw(', ')
|
|
|
|
|
|
|
|
|
34 |
->string($this->getAttribute('index'))
|
35 |
->raw(")")
|
36 |
;
|
28 |
protected function addGetTemplate(Twig_Compiler $compiler)
|
29 |
{
|
30 |
$compiler
|
31 |
+
->write("\$this->loadTemplate(")
|
32 |
->string($this->getAttribute('filename'))
|
33 |
->raw(', ')
|
34 |
+
->repr($compiler->getFilename())
|
35 |
+
->raw(', ')
|
36 |
+
->repr($this->getLine())
|
37 |
+
->raw(', ')
|
38 |
->string($this->getAttribute('index'))
|
39 |
->raw(")")
|
40 |
;
|
vendor/twig/twig/lib/Twig/Node/Expression/Array.php
CHANGED
@@ -63,7 +63,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression
|
|
63 |
/**
|
64 |
* Compiles the node to PHP.
|
65 |
*
|
66 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
67 |
*/
|
68 |
public function compile(Twig_Compiler $compiler)
|
69 |
{
|
63 |
/**
|
64 |
* Compiles the node to PHP.
|
65 |
*
|
66 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
67 |
*/
|
68 |
public function compile(Twig_Compiler $compiler)
|
69 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/AssignName.php
CHANGED
@@ -15,7 +15,7 @@ class Twig_Node_Expression_AssignName extends Twig_Node_Expression_Name
|
|
15 |
/**
|
16 |
* Compiles the node to PHP.
|
17 |
*
|
18 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
19 |
*/
|
20 |
public function compile(Twig_Compiler $compiler)
|
21 |
{
|
15 |
/**
|
16 |
* Compiles the node to PHP.
|
17 |
*
|
18 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
19 |
*/
|
20 |
public function compile(Twig_Compiler $compiler)
|
21 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary.php
CHANGED
@@ -19,7 +19,7 @@ abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression
|
|
19 |
/**
|
20 |
* Compiles the node to PHP.
|
21 |
*
|
22 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
23 |
*/
|
24 |
public function compile(Twig_Compiler $compiler)
|
25 |
{
|
19 |
/**
|
20 |
* Compiles the node to PHP.
|
21 |
*
|
22 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
23 |
*/
|
24 |
public function compile(Twig_Compiler $compiler)
|
25 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/EndsWith.php
CHANGED
@@ -12,14 +12,14 @@ class Twig_Node_Expression_Binary_EndsWith extends Twig_Node_Expression_Binary
|
|
12 |
{
|
13 |
public function compile(Twig_Compiler $compiler)
|
14 |
{
|
|
|
|
|
15 |
$compiler
|
16 |
-
->raw('(
|
17 |
->subcompile($this->getNode('left'))
|
18 |
-
->raw(',
|
19 |
->subcompile($this->getNode('right'))
|
20 |
-
->raw(', -strlen(')
|
21 |
-
->subcompile($this->getNode('right'))
|
22 |
-
->raw(')))')
|
23 |
;
|
24 |
}
|
25 |
|
12 |
{
|
13 |
public function compile(Twig_Compiler $compiler)
|
14 |
{
|
15 |
+
$left = $compiler->getVarName();
|
16 |
+
$right = $compiler->getVarName();
|
17 |
$compiler
|
18 |
+
->raw(sprintf('(is_string($%s = ', $left))
|
19 |
->subcompile($this->getNode('left'))
|
20 |
+
->raw(sprintf(') && is_string($%s = ', $right))
|
21 |
->subcompile($this->getNode('right'))
|
22 |
+
->raw(sprintf(') && (\'\' === $%2$s || $%2$s === substr($%1$s, -strlen($%2$s))))', $left, $right))
|
|
|
|
|
23 |
;
|
24 |
}
|
25 |
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/FloorDiv.php
CHANGED
@@ -13,7 +13,7 @@ class Twig_Node_Expression_Binary_FloorDiv extends Twig_Node_Expression_Binary
|
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/In.php
CHANGED
@@ -13,7 +13,7 @@ class Twig_Node_Expression_Binary_In extends Twig_Node_Expression_Binary
|
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/NotIn.php
CHANGED
@@ -13,7 +13,7 @@ class Twig_Node_Expression_Binary_NotIn extends Twig_Node_Expression_Binary
|
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Power.php
CHANGED
@@ -13,7 +13,7 @@ class Twig_Node_Expression_Binary_Power extends Twig_Node_Expression_Binary
|
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/Range.php
CHANGED
@@ -13,7 +13,7 @@ class Twig_Node_Expression_Binary_Range extends Twig_Node_Expression_Binary
|
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
13 |
/**
|
14 |
* Compiles the node to PHP.
|
15 |
*
|
16 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
17 |
*/
|
18 |
public function compile(Twig_Compiler $compiler)
|
19 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Binary/StartsWith.php
CHANGED
@@ -12,12 +12,14 @@ class Twig_Node_Expression_Binary_StartsWith extends Twig_Node_Expression_Binary
|
|
12 |
{
|
13 |
public function compile(Twig_Compiler $compiler)
|
14 |
{
|
|
|
|
|
15 |
$compiler
|
16 |
-
->raw('(
|
17 |
->subcompile($this->getNode('left'))
|
18 |
-
->raw(',
|
19 |
->subcompile($this->getNode('right'))
|
20 |
-
->raw('))')
|
21 |
;
|
22 |
}
|
23 |
|
12 |
{
|
13 |
public function compile(Twig_Compiler $compiler)
|
14 |
{
|
15 |
+
$left = $compiler->getVarName();
|
16 |
+
$right = $compiler->getVarName();
|
17 |
$compiler
|
18 |
+
->raw(sprintf('(is_string($%s = ', $left))
|
19 |
->subcompile($this->getNode('left'))
|
20 |
+
->raw(sprintf(') && is_string($%s = ', $right))
|
21 |
->subcompile($this->getNode('right'))
|
22 |
+
->raw(sprintf(') && (\'\' === $%2$s || 0 === strpos($%1$s, $%2$s)))', $left, $right))
|
23 |
;
|
24 |
}
|
25 |
|
vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_Expression_BlockReference extends Twig_Node_Expression
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Call.php
CHANGED
@@ -12,10 +12,8 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
12 |
{
|
13 |
protected function compileCallable(Twig_Compiler $compiler)
|
14 |
{
|
15 |
-
$callable = $this->getAttribute('callable');
|
16 |
-
|
17 |
$closingParenthesis = false;
|
18 |
-
if ($callable) {
|
19 |
if (is_string($callable)) {
|
20 |
$compiler->raw($callable);
|
21 |
} elseif (is_array($callable) && $callable[0] instanceof Twig_ExtensionInterface) {
|
@@ -92,6 +90,9 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
92 |
|
93 |
protected function getArguments($callable, $arguments)
|
94 |
{
|
|
|
|
|
|
|
95 |
$parameters = array();
|
96 |
$named = false;
|
97 |
foreach ($arguments as $name => $node) {
|
@@ -99,7 +100,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
99 |
$named = true;
|
100 |
$name = $this->normalizeName($name);
|
101 |
} elseif ($named) {
|
102 |
-
throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $
|
103 |
}
|
104 |
|
105 |
$parameters[$name] = $node;
|
@@ -110,7 +111,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
110 |
}
|
111 |
|
112 |
if (!$callable) {
|
113 |
-
throw new LogicException(sprintf('Named arguments are not supported for %s "%s".', $
|
114 |
}
|
115 |
|
116 |
// manage named arguments
|
@@ -119,6 +120,8 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
119 |
} elseif (is_object($callable) && !$callable instanceof Closure) {
|
120 |
$r = new ReflectionObject($callable);
|
121 |
$r = $r->getMethod('__invoke');
|
|
|
|
|
122 |
} else {
|
123 |
$r = new ReflectionFunction($callable);
|
124 |
}
|
@@ -140,32 +143,61 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression
|
|
140 |
}
|
141 |
|
142 |
$arguments = array();
|
|
|
|
|
|
|
143 |
$pos = 0;
|
144 |
foreach ($definition as $param) {
|
145 |
-
$name = $this->normalizeName($param->name);
|
146 |
|
147 |
if (array_key_exists($name, $parameters)) {
|
148 |
if (array_key_exists($pos, $parameters)) {
|
149 |
-
throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
151 |
|
|
|
152 |
$arguments[] = $parameters[$name];
|
153 |
unset($parameters[$name]);
|
|
|
154 |
} elseif (array_key_exists($pos, $parameters)) {
|
|
|
155 |
$arguments[] = $parameters[$pos];
|
156 |
unset($parameters[$pos]);
|
|
|
157 |
++$pos;
|
158 |
} elseif ($param->isDefaultValueAvailable()) {
|
159 |
-
$
|
160 |
} elseif ($param->isOptional()) {
|
161 |
-
|
|
|
|
|
|
|
|
|
162 |
} else {
|
163 |
-
throw new Twig_Error_Syntax(sprintf('Value for argument "%s" is required for %s "%s".', $name, $
|
164 |
}
|
165 |
}
|
166 |
|
167 |
if (!empty($parameters)) {
|
168 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
}
|
170 |
|
171 |
return $arguments;
|
12 |
{
|
13 |
protected function compileCallable(Twig_Compiler $compiler)
|
14 |
{
|
|
|
|
|
15 |
$closingParenthesis = false;
|
16 |
+
if ($this->hasAttribute('callable') && $callable = $this->getAttribute('callable')) {
|
17 |
if (is_string($callable)) {
|
18 |
$compiler->raw($callable);
|
19 |
} elseif (is_array($callable) && $callable[0] instanceof Twig_ExtensionInterface) {
|
90 |
|
91 |
protected function getArguments($callable, $arguments)
|
92 |
{
|
93 |
+
$callType = $this->getAttribute('type');
|
94 |
+
$callName = $this->getAttribute('name');
|
95 |
+
|
96 |
$parameters = array();
|
97 |
$named = false;
|
98 |
foreach ($arguments as $name => $node) {
|
100 |
$named = true;
|
101 |
$name = $this->normalizeName($name);
|
102 |
} elseif ($named) {
|
103 |
+
throw new Twig_Error_Syntax(sprintf('Positional arguments cannot be used after named arguments for %s "%s".', $callType, $callName));
|
104 |
}
|
105 |
|
106 |
$parameters[$name] = $node;
|
111 |
}
|
112 |
|
113 |
if (!$callable) {
|
114 |
+
throw new LogicException(sprintf('Named arguments are not supported for %s "%s".', $callType, $callName));
|
115 |
}
|
116 |
|
117 |
// manage named arguments
|
120 |
} elseif (is_object($callable) && !$callable instanceof Closure) {
|
121 |
$r = new ReflectionObject($callable);
|
122 |
$r = $r->getMethod('__invoke');
|
123 |
+
} elseif (is_string($callable) && false !== strpos($callable, '::')) {
|
124 |
+
$r = new ReflectionMethod($callable);
|
125 |
} else {
|
126 |
$r = new ReflectionFunction($callable);
|
127 |
}
|
143 |
}
|
144 |
|
145 |
$arguments = array();
|
146 |
+
$names = array();
|
147 |
+
$missingArguments = array();
|
148 |
+
$optionalArguments = array();
|
149 |
$pos = 0;
|
150 |
foreach ($definition as $param) {
|
151 |
+
$names[] = $name = $this->normalizeName($param->name);
|
152 |
|
153 |
if (array_key_exists($name, $parameters)) {
|
154 |
if (array_key_exists($pos, $parameters)) {
|
155 |
+
throw new Twig_Error_Syntax(sprintf('Argument "%s" is defined twice for %s "%s".', $name, $callType, $callName));
|
156 |
+
}
|
157 |
+
|
158 |
+
if (!empty($missingArguments)) {
|
159 |
+
throw new Twig_Error_Syntax(sprintf(
|
160 |
+
'Argument "%s" could not be assigned for %s "%s(%s)" because it is mapped to an internal PHP function which cannot determine default value for optional argument%s "%s".',
|
161 |
+
$name, $callType, $callName, implode(', ', $names), count($missingArguments) > 1 ? 's' : '', implode('", "', $missingArguments))
|
162 |
+
);
|
163 |
}
|
164 |
|
165 |
+
$arguments = array_merge($arguments, $optionalArguments);
|
166 |
$arguments[] = $parameters[$name];
|
167 |
unset($parameters[$name]);
|
168 |
+
$optionalArguments = array();
|
169 |
} elseif (array_key_exists($pos, $parameters)) {
|
170 |
+
$arguments = array_merge($arguments, $optionalArguments);
|
171 |
$arguments[] = $parameters[$pos];
|
172 |
unset($parameters[$pos]);
|
173 |
+
$optionalArguments = array();
|
174 |
++$pos;
|
175 |
} elseif ($param->isDefaultValueAvailable()) {
|
176 |
+
$optionalArguments[] = new Twig_Node_Expression_Constant($param->getDefaultValue(), -1);
|
177 |
} elseif ($param->isOptional()) {
|
178 |
+
if (empty($parameters)) {
|
179 |
+
break;
|
180 |
+
} else {
|
181 |
+
$missingArguments[] = $name;
|
182 |
+
}
|
183 |
} else {
|
184 |
+
throw new Twig_Error_Syntax(sprintf('Value for argument "%s" is required for %s "%s".', $name, $callType, $callName));
|
185 |
}
|
186 |
}
|
187 |
|
188 |
if (!empty($parameters)) {
|
189 |
+
$unknownParameter = null;
|
190 |
+
foreach ($parameters as $parameter) {
|
191 |
+
if ($parameter instanceof Twig_Node) {
|
192 |
+
$unknownParameter = $parameter;
|
193 |
+
break;
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
throw new Twig_Error_Syntax(sprintf(
|
198 |
+
'Unknown argument%s "%s" for %s "%s(%s)".',
|
199 |
+
count($parameters) > 1 ? 's' : '', implode('", "', array_keys($parameters)), $callType, $callName, implode(', ', $names)
|
200 |
+
), $unknownParameter ? $unknownParameter->getLine() : -1);
|
201 |
}
|
202 |
|
203 |
return $arguments;
|
vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
*/
|
12 |
class Twig_Node_Expression_GetAttr extends Twig_Node_Expression
|
13 |
{
|
14 |
-
public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute,
|
15 |
{
|
16 |
parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno);
|
17 |
}
|
@@ -32,20 +32,30 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression
|
|
32 |
|
33 |
$compiler->raw(', ')->subcompile($this->getNode('attribute'));
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
|
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
$compiler->raw(')');
|
11 |
*/
|
12 |
class Twig_Node_Expression_GetAttr extends Twig_Node_Expression
|
13 |
{
|
14 |
+
public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno)
|
15 |
{
|
16 |
parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno);
|
17 |
}
|
32 |
|
33 |
$compiler->raw(', ')->subcompile($this->getNode('attribute'));
|
34 |
|
35 |
+
// only generate optional arguments when needed (to make generated code more readable)
|
36 |
+
$needFourth = $this->getAttribute('ignore_strict_check');
|
37 |
+
$needThird = $needFourth || $this->getAttribute('is_defined_test');
|
38 |
+
$needSecond = $needThird || Twig_Template::ANY_CALL !== $this->getAttribute('type');
|
39 |
+
$needFirst = $needSecond || null !== $this->getNode('arguments');
|
40 |
+
|
41 |
+
if ($needFirst) {
|
42 |
+
if (null !== $this->getNode('arguments')) {
|
43 |
+
$compiler->raw(', ')->subcompile($this->getNode('arguments'));
|
44 |
+
} else {
|
45 |
+
$compiler->raw(', array()');
|
46 |
}
|
47 |
+
}
|
48 |
|
49 |
+
if ($needSecond) {
|
50 |
+
$compiler->raw(', ')->repr($this->getAttribute('type'));
|
51 |
+
}
|
52 |
|
53 |
+
if ($needThird) {
|
54 |
+
$compiler->raw(', ')->repr($this->getAttribute('is_defined_test'));
|
55 |
+
}
|
56 |
+
|
57 |
+
if ($needFourth) {
|
58 |
+
$compiler->raw(', ')->repr($this->getAttribute('ignore_strict_check'));
|
59 |
}
|
60 |
|
61 |
$compiler->raw(')');
|
vendor/twig/twig/lib/Twig/Node/Expression/Name.php
CHANGED
@@ -26,6 +26,8 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression
|
|
26 |
{
|
27 |
$name = $this->getAttribute('name');
|
28 |
|
|
|
|
|
29 |
if ($this->getAttribute('is_defined_test')) {
|
30 |
if ($this->isSpecial()) {
|
31 |
$compiler->repr(true);
|
@@ -44,7 +46,7 @@ class Twig_Node_Expression_Name extends Twig_Node_Expression
|
|
44 |
// remove the non-PHP 5.4 version when PHP 5.3 support is dropped
|
45 |
// as the non-optimized version is just a workaround for slow ternary operator
|
46 |
// when the context has a lot of variables
|
47 |
-
if (
|
48 |
// PHP 5.4 ternary operator performance was optimized
|
49 |
$compiler
|
50 |
->raw('(isset($context[')
|
26 |
{
|
27 |
$name = $this->getAttribute('name');
|
28 |
|
29 |
+
$compiler->addDebugInfo($this);
|
30 |
+
|
31 |
if ($this->getAttribute('is_defined_test')) {
|
32 |
if ($this->isSpecial()) {
|
33 |
$compiler->repr(true);
|
46 |
// remove the non-PHP 5.4 version when PHP 5.3 support is dropped
|
47 |
// as the non-optimized version is just a workaround for slow ternary operator
|
48 |
// when the context has a lot of variables
|
49 |
+
if (PHP_VERSION_ID >= 50400) {
|
50 |
// PHP 5.4 ternary operator performance was optimized
|
51 |
$compiler
|
52 |
->raw('(isset($context[')
|
vendor/twig/twig/lib/Twig/Node/Expression/Parent.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_Expression_Parent extends Twig_Node_Expression
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/Expression/Test/Divisibleby.php
CHANGED
@@ -13,7 +13,7 @@
|
|
13 |
* Checks if a variable is divisible by a number.
|
14 |
*
|
15 |
* <pre>
|
16 |
-
* {% if loop.index is
|
17 |
* </pre>
|
18 |
*
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
13 |
* Checks if a variable is divisible by a number.
|
14 |
*
|
15 |
* <pre>
|
16 |
+
* {% if loop.index is divisible by(3) %}
|
17 |
* </pre>
|
18 |
*
|
19 |
* @author Fabien Potencier <fabien@symfony.com>
|
vendor/twig/twig/lib/Twig/Node/Expression/Unary.php
CHANGED
@@ -18,12 +18,9 @@ abstract class Twig_Node_Expression_Unary extends Twig_Node_Expression
|
|
18 |
|
19 |
public function compile(Twig_Compiler $compiler)
|
20 |
{
|
21 |
-
$compiler->raw('
|
22 |
$this->operator($compiler);
|
23 |
-
$compiler
|
24 |
-
->subcompile($this->getNode('node'))
|
25 |
-
->raw(')')
|
26 |
-
;
|
27 |
}
|
28 |
|
29 |
abstract public function operator(Twig_Compiler $compiler);
|
18 |
|
19 |
public function compile(Twig_Compiler $compiler)
|
20 |
{
|
21 |
+
$compiler->raw(' ');
|
22 |
$this->operator($compiler);
|
23 |
+
$compiler->subcompile($this->getNode('node'));
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
abstract public function operator(Twig_Compiler $compiler);
|
vendor/twig/twig/lib/Twig/Node/Flush.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Flush extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
vendor/twig/twig/lib/Twig/Node/For.php
CHANGED
@@ -33,7 +33,7 @@ class Twig_Node_For extends Twig_Node
|
|
33 |
/**
|
34 |
* Compiles the node to PHP.
|
35 |
*
|
36 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
37 |
*/
|
38 |
public function compile(Twig_Compiler $compiler)
|
39 |
{
|
33 |
/**
|
34 |
* Compiles the node to PHP.
|
35 |
*
|
36 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
37 |
*/
|
38 |
public function compile(Twig_Compiler $compiler)
|
39 |
{
|
vendor/twig/twig/lib/Twig/Node/ForLoop.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_ForLoop extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
vendor/twig/twig/lib/Twig/Node/If.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_If extends Twig_Node
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/Import.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Import extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
@@ -39,8 +39,12 @@ class Twig_Node_Import extends Twig_Node
|
|
39 |
$compiler->raw("\$this");
|
40 |
} else {
|
41 |
$compiler
|
42 |
-
->raw('$this->
|
43 |
->subcompile($this->getNode('expr'))
|
|
|
|
|
|
|
|
|
44 |
->raw(")")
|
45 |
;
|
46 |
}
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
39 |
$compiler->raw("\$this");
|
40 |
} else {
|
41 |
$compiler
|
42 |
+
->raw('$this->loadTemplate(')
|
43 |
->subcompile($this->getNode('expr'))
|
44 |
+
->raw(', ')
|
45 |
+
->repr($compiler->getFilename())
|
46 |
+
->raw(', ')
|
47 |
+
->repr($this->getLine())
|
48 |
->raw(")")
|
49 |
;
|
50 |
}
|
vendor/twig/twig/lib/Twig/Node/Include.php
CHANGED
@@ -19,13 +19,13 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface
|
|
19 |
{
|
20 |
public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null)
|
21 |
{
|
22 |
-
parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
@@ -60,40 +60,29 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface
|
|
60 |
|
61 |
protected function addGetTemplate(Twig_Compiler $compiler)
|
62 |
{
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
->subcompile($this->getNode('expr'))
|
73 |
-
->raw(");\n")
|
74 |
-
->write('$template')
|
75 |
-
;
|
76 |
-
}
|
77 |
}
|
78 |
|
79 |
protected function addTemplateArguments(Twig_Compiler $compiler)
|
80 |
{
|
81 |
-
if (
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
$
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
;
|
90 |
-
}
|
91 |
} else {
|
92 |
-
|
93 |
-
$compiler->raw('array()');
|
94 |
-
} else {
|
95 |
-
$compiler->subcompile($this->getNode('variables'));
|
96 |
-
}
|
97 |
}
|
98 |
}
|
99 |
}
|
19 |
{
|
20 |
public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null)
|
21 |
{
|
22 |
+
parent::__construct(array('expr' => $expr, 'variables' => $variables), array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag);
|
23 |
}
|
24 |
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
60 |
|
61 |
protected function addGetTemplate(Twig_Compiler $compiler)
|
62 |
{
|
63 |
+
$compiler
|
64 |
+
->write("\$this->loadTemplate(")
|
65 |
+
->subcompile($this->getNode('expr'))
|
66 |
+
->raw(', ')
|
67 |
+
->repr($compiler->getFilename())
|
68 |
+
->raw(', ')
|
69 |
+
->repr($this->getLine())
|
70 |
+
->raw(")")
|
71 |
+
;
|
|
|
|
|
|
|
|
|
|
|
72 |
}
|
73 |
|
74 |
protected function addTemplateArguments(Twig_Compiler $compiler)
|
75 |
{
|
76 |
+
if (null === $this->getNode('variables')) {
|
77 |
+
$compiler->raw(false === $this->getAttribute('only') ? '$context' : 'array()');
|
78 |
+
} elseif (false === $this->getAttribute('only')) {
|
79 |
+
$compiler
|
80 |
+
->raw('array_merge($context, ')
|
81 |
+
->subcompile($this->getNode('variables'))
|
82 |
+
->raw(')')
|
83 |
+
;
|
|
|
|
|
84 |
} else {
|
85 |
+
$compiler->subcompile($this->getNode('variables'));
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
}
|
88 |
}
|
vendor/twig/twig/lib/Twig/Node/Macro.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Macro extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
@@ -37,7 +37,7 @@ class Twig_Node_Macro extends Twig_Node
|
|
37 |
$pos = 0;
|
38 |
foreach ($this->getNode('arguments') as $name => $default) {
|
39 |
$compiler
|
40 |
-
->raw('$
|
41 |
->subcompile($default)
|
42 |
;
|
43 |
|
@@ -64,7 +64,7 @@ class Twig_Node_Macro extends Twig_Node
|
|
64 |
$compiler
|
65 |
->write('')
|
66 |
->string($name)
|
67 |
-
->raw(' => $
|
68 |
->raw(",\n")
|
69 |
;
|
70 |
}
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
37 |
$pos = 0;
|
38 |
foreach ($this->getNode('arguments') as $name => $default) {
|
39 |
$compiler
|
40 |
+
->raw('$__'.$name.'__ = ')
|
41 |
->subcompile($default)
|
42 |
;
|
43 |
|
64 |
$compiler
|
65 |
->write('')
|
66 |
->string($name)
|
67 |
+
->raw(' => $__'.$name.'__')
|
68 |
->raw(",\n")
|
69 |
;
|
70 |
}
|
vendor/twig/twig/lib/Twig/Node/Module.php
CHANGED
@@ -13,6 +13,10 @@
|
|
13 |
/**
|
14 |
* Represents a module node.
|
15 |
*
|
|
|
|
|
|
|
|
|
16 |
* @author Fabien Potencier <fabien@symfony.com>
|
17 |
*/
|
18 |
class Twig_Node_Module extends Twig_Node
|
@@ -20,7 +24,22 @@ class Twig_Node_Module extends Twig_Node
|
|
20 |
public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename)
|
21 |
{
|
22 |
// embedded templates are set as attributes so that they are only visited once by the visitors
|
23 |
-
parent::__construct(array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
|
26 |
public function setIndex($index)
|
@@ -31,7 +50,7 @@ class Twig_Node_Module extends Twig_Node
|
|
31 |
/**
|
32 |
* Compiles the node to PHP.
|
33 |
*
|
34 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
35 |
*/
|
36 |
public function compile(Twig_Compiler $compiler)
|
37 |
{
|
@@ -50,17 +69,20 @@ class Twig_Node_Module extends Twig_Node
|
|
50 |
|
51 |
$this->compileClassHeader($compiler);
|
52 |
|
53 |
-
if (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
$this->compileConstructor($compiler);
|
55 |
}
|
56 |
|
57 |
$this->compileGetParent($compiler);
|
58 |
|
59 |
-
$this->
|
60 |
-
|
61 |
-
$this->compileDisplayBody($compiler);
|
62 |
-
|
63 |
-
$this->compileDisplayFooter($compiler);
|
64 |
|
65 |
$compiler->subcompile($this->getNode('blocks'));
|
66 |
|
@@ -77,22 +99,27 @@ class Twig_Node_Module extends Twig_Node
|
|
77 |
|
78 |
protected function compileGetParent(Twig_Compiler $compiler)
|
79 |
{
|
80 |
-
if (null === $this->getNode('parent')) {
|
81 |
return;
|
82 |
}
|
83 |
|
84 |
$compiler
|
85 |
->write("protected function doGetParent(array \$context)\n", "{\n")
|
86 |
->indent()
|
|
|
87 |
->write("return ")
|
88 |
;
|
89 |
|
90 |
-
if ($
|
91 |
-
$compiler->subcompile($
|
92 |
} else {
|
93 |
$compiler
|
94 |
-
->raw("\$this->
|
95 |
-
->subcompile($
|
|
|
|
|
|
|
|
|
96 |
->raw(")")
|
97 |
;
|
98 |
}
|
@@ -104,20 +131,6 @@ class Twig_Node_Module extends Twig_Node
|
|
104 |
;
|
105 |
}
|
106 |
|
107 |
-
protected function compileDisplayBody(Twig_Compiler $compiler)
|
108 |
-
{
|
109 |
-
$compiler->subcompile($this->getNode('body'));
|
110 |
-
|
111 |
-
if (null !== $this->getNode('parent')) {
|
112 |
-
if ($this->getNode('parent') instanceof Twig_Node_Expression_Constant) {
|
113 |
-
$compiler->write("\$this->parent");
|
114 |
-
} else {
|
115 |
-
$compiler->write("\$this->getParent(\$context)");
|
116 |
-
}
|
117 |
-
$compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
protected function compileClassHeader(Twig_Compiler $compiler)
|
122 |
{
|
123 |
$compiler
|
@@ -136,17 +149,23 @@ class Twig_Node_Module extends Twig_Node
|
|
136 |
$compiler
|
137 |
->write("public function __construct(Twig_Environment \$env)\n", "{\n")
|
138 |
->indent()
|
|
|
139 |
->write("parent::__construct(\$env);\n\n")
|
140 |
;
|
141 |
|
142 |
// parent
|
143 |
-
if (null === $this->getNode('parent')) {
|
144 |
$compiler->write("\$this->parent = false;\n\n");
|
145 |
-
} elseif ($
|
146 |
$compiler
|
147 |
-
->
|
148 |
-
->
|
149 |
-
->
|
|
|
|
|
|
|
|
|
|
|
150 |
;
|
151 |
}
|
152 |
|
@@ -249,21 +268,32 @@ class Twig_Node_Module extends Twig_Node
|
|
249 |
->outdent()
|
250 |
->write(");\n")
|
251 |
->outdent()
|
252 |
-
->
|
|
|
253 |
;
|
254 |
}
|
255 |
|
256 |
-
protected function
|
257 |
{
|
258 |
$compiler
|
259 |
->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n")
|
260 |
->indent()
|
|
|
|
|
261 |
;
|
262 |
-
}
|
263 |
|
264 |
-
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
$compiler
|
|
|
267 |
->outdent()
|
268 |
->write("}\n\n")
|
269 |
;
|
@@ -272,6 +302,7 @@ class Twig_Node_Module extends Twig_Node
|
|
272 |
protected function compileClassFooter(Twig_Compiler $compiler)
|
273 |
{
|
274 |
$compiler
|
|
|
275 |
->outdent()
|
276 |
->write("}\n")
|
277 |
;
|
@@ -362,8 +393,12 @@ class Twig_Node_Module extends Twig_Node
|
|
362 |
{
|
363 |
if ($node instanceof Twig_Node_Expression_Constant) {
|
364 |
$compiler
|
365 |
-
->write(sprintf("%s = \$this->
|
366 |
->subcompile($node)
|
|
|
|
|
|
|
|
|
367 |
->raw(");\n")
|
368 |
;
|
369 |
} else {
|
@@ -374,7 +409,12 @@ class Twig_Node_Module extends Twig_Node
|
|
374 |
->write(sprintf("if (!%s", $var))
|
375 |
->raw(" instanceof Twig_Template) {\n")
|
376 |
->indent()
|
377 |
-
->write(sprintf("%s = \$this->
|
|
|
|
|
|
|
|
|
|
|
378 |
->outdent()
|
379 |
->write("}\n")
|
380 |
;
|
13 |
/**
|
14 |
* Represents a module node.
|
15 |
*
|
16 |
+
* Consider this class as being final. If you need to customize the behavior of
|
17 |
+
* the generated class, consider adding nodes to the following nodes: display_start,
|
18 |
+
* display_end, constructor_start, constructor_end, and class_end.
|
19 |
+
*
|
20 |
* @author Fabien Potencier <fabien@symfony.com>
|
21 |
*/
|
22 |
class Twig_Node_Module extends Twig_Node
|
24 |
public function __construct(Twig_NodeInterface $body, Twig_Node_Expression $parent = null, Twig_NodeInterface $blocks, Twig_NodeInterface $macros, Twig_NodeInterface $traits, $embeddedTemplates, $filename)
|
25 |
{
|
26 |
// embedded templates are set as attributes so that they are only visited once by the visitors
|
27 |
+
parent::__construct(array(
|
28 |
+
'parent' => $parent,
|
29 |
+
'body' => $body,
|
30 |
+
'blocks' => $blocks,
|
31 |
+
'macros' => $macros,
|
32 |
+
'traits' => $traits,
|
33 |
+
'display_start' => new Twig_Node(),
|
34 |
+
'display_end' => new Twig_Node(),
|
35 |
+
'constructor_start' => new Twig_Node(),
|
36 |
+
'constructor_end' => new Twig_Node(),
|
37 |
+
'class_end' => new Twig_Node(),
|
38 |
+
), array(
|
39 |
+
'filename' => $filename,
|
40 |
+
'index' => null,
|
41 |
+
'embedded_templates' => $embeddedTemplates,
|
42 |
+
), 1);
|
43 |
}
|
44 |
|
45 |
public function setIndex($index)
|
50 |
/**
|
51 |
* Compiles the node to PHP.
|
52 |
*
|
53 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
54 |
*/
|
55 |
public function compile(Twig_Compiler $compiler)
|
56 |
{
|
69 |
|
70 |
$this->compileClassHeader($compiler);
|
71 |
|
72 |
+
if (
|
73 |
+
count($this->getNode('blocks'))
|
74 |
+
|| count($this->getNode('traits'))
|
75 |
+
|| null === $this->getNode('parent')
|
76 |
+
|| $this->getNode('parent') instanceof Twig_Node_Expression_Constant
|
77 |
+
|| count($this->getNode('constructor_start'))
|
78 |
+
|| count($this->getNode('constructor_end'))
|
79 |
+
) {
|
80 |
$this->compileConstructor($compiler);
|
81 |
}
|
82 |
|
83 |
$this->compileGetParent($compiler);
|
84 |
|
85 |
+
$this->compileDisplay($compiler);
|
|
|
|
|
|
|
|
|
86 |
|
87 |
$compiler->subcompile($this->getNode('blocks'));
|
88 |
|
99 |
|
100 |
protected function compileGetParent(Twig_Compiler $compiler)
|
101 |
{
|
102 |
+
if (null === $parent = $this->getNode('parent')) {
|
103 |
return;
|
104 |
}
|
105 |
|
106 |
$compiler
|
107 |
->write("protected function doGetParent(array \$context)\n", "{\n")
|
108 |
->indent()
|
109 |
+
->addDebugInfo($parent)
|
110 |
->write("return ")
|
111 |
;
|
112 |
|
113 |
+
if ($parent instanceof Twig_Node_Expression_Constant) {
|
114 |
+
$compiler->subcompile($parent);
|
115 |
} else {
|
116 |
$compiler
|
117 |
+
->raw("\$this->loadTemplate(")
|
118 |
+
->subcompile($parent)
|
119 |
+
->raw(', ')
|
120 |
+
->repr($compiler->getFilename())
|
121 |
+
->raw(', ')
|
122 |
+
->repr($this->getNode('parent')->getLine())
|
123 |
->raw(")")
|
124 |
;
|
125 |
}
|
131 |
;
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
protected function compileClassHeader(Twig_Compiler $compiler)
|
135 |
{
|
136 |
$compiler
|
149 |
$compiler
|
150 |
->write("public function __construct(Twig_Environment \$env)\n", "{\n")
|
151 |
->indent()
|
152 |
+
->subcompile($this->getNode('constructor_start'))
|
153 |
->write("parent::__construct(\$env);\n\n")
|
154 |
;
|
155 |
|
156 |
// parent
|
157 |
+
if (null === $parent = $this->getNode('parent')) {
|
158 |
$compiler->write("\$this->parent = false;\n\n");
|
159 |
+
} elseif ($parent instanceof Twig_Node_Expression_Constant) {
|
160 |
$compiler
|
161 |
+
->addDebugInfo($parent)
|
162 |
+
->write("\$this->parent = \$this->loadTemplate(")
|
163 |
+
->subcompile($parent)
|
164 |
+
->raw(', ')
|
165 |
+
->repr($compiler->getFilename())
|
166 |
+
->raw(', ')
|
167 |
+
->repr($this->getNode('parent')->getLine())
|
168 |
+
->raw(");\n")
|
169 |
;
|
170 |
}
|
171 |
|
268 |
->outdent()
|
269 |
->write(");\n")
|
270 |
->outdent()
|
271 |
+
->subcompile($this->getNode('constructor_end'))
|
272 |
+
->write("}\n\n")
|
273 |
;
|
274 |
}
|
275 |
|
276 |
+
protected function compileDisplay(Twig_Compiler $compiler)
|
277 |
{
|
278 |
$compiler
|
279 |
->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n")
|
280 |
->indent()
|
281 |
+
->subcompile($this->getNode('display_start'))
|
282 |
+
->subcompile($this->getNode('body'))
|
283 |
;
|
|
|
284 |
|
285 |
+
if (null !== $parent = $this->getNode('parent')) {
|
286 |
+
$compiler->addDebugInfo($parent);
|
287 |
+
if ($parent instanceof Twig_Node_Expression_Constant) {
|
288 |
+
$compiler->write("\$this->parent");
|
289 |
+
} else {
|
290 |
+
$compiler->write("\$this->getParent(\$context)");
|
291 |
+
}
|
292 |
+
$compiler->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
|
293 |
+
}
|
294 |
+
|
295 |
$compiler
|
296 |
+
->subcompile($this->getNode('display_end'))
|
297 |
->outdent()
|
298 |
->write("}\n\n")
|
299 |
;
|
302 |
protected function compileClassFooter(Twig_Compiler $compiler)
|
303 |
{
|
304 |
$compiler
|
305 |
+
->subcompile($this->getNode('class_end'))
|
306 |
->outdent()
|
307 |
->write("}\n")
|
308 |
;
|
393 |
{
|
394 |
if ($node instanceof Twig_Node_Expression_Constant) {
|
395 |
$compiler
|
396 |
+
->write(sprintf("%s = \$this->loadTemplate(", $var))
|
397 |
->subcompile($node)
|
398 |
+
->raw(', ')
|
399 |
+
->repr($compiler->getFilename())
|
400 |
+
->raw(', ')
|
401 |
+
->repr($node->getLine())
|
402 |
->raw(");\n")
|
403 |
;
|
404 |
} else {
|
409 |
->write(sprintf("if (!%s", $var))
|
410 |
->raw(" instanceof Twig_Template) {\n")
|
411 |
->indent()
|
412 |
+
->write(sprintf("%s = \$this->loadTemplate(%s")
|
413 |
+
->raw(', ')
|
414 |
+
->repr($compiler->getFilename())
|
415 |
+
->raw(', ')
|
416 |
+
->repr($node->getLine())
|
417 |
+
->raw(");\n", $var, $var))
|
418 |
->outdent()
|
419 |
->write("}\n")
|
420 |
;
|
vendor/twig/twig/lib/Twig/Node/Print.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_Print extends Twig_Node implements Twig_NodeOutputInterface
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/Node/Sandbox.php
CHANGED
@@ -24,7 +24,7 @@ class Twig_Node_Sandbox extends Twig_Node
|
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
24 |
/**
|
25 |
* Compiles the node to PHP.
|
26 |
*
|
27 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
28 |
*/
|
29 |
public function compile(Twig_Compiler $compiler)
|
30 |
{
|
vendor/twig/twig/lib/Twig/Node/SandboxedModule.php
DELETED
@@ -1,60 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/*
|
4 |
-
* This file is part of Twig.
|
5 |
-
*
|
6 |
-
* (c) 2009 Fabien Potencier
|
7 |
-
* (c) 2009 Armin Ronacher
|
8 |
-
*
|
9 |
-
* For the full copyright and license information, please view the LICENSE
|
10 |
-
* file that was distributed with this source code.
|
11 |
-
*/
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Represents a module node.
|
15 |
-
*
|
16 |
-
* @author Fabien Potencier <fabien@symfony.com>
|
17 |
-
*/
|
18 |
-
class Twig_Node_SandboxedModule extends Twig_Node_Module
|
19 |
-
{
|
20 |
-
protected $usedFilters;
|
21 |
-
protected $usedTags;
|
22 |
-
protected $usedFunctions;
|
23 |
-
|
24 |
-
public function __construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions)
|
25 |
-
{
|
26 |
-
parent::__construct($node->getNode('body'), $node->getNode('parent'), $node->getNode('blocks'), $node->getNode('macros'), $node->getNode('traits'), $node->getAttribute('embedded_templates'), $node->getAttribute('filename'), $node->getLine(), $node->getNodeTag());
|
27 |
-
|
28 |
-
$this->setAttribute('index', $node->getAttribute('index'));
|
29 |
-
|
30 |
-
$this->usedFilters = $usedFilters;
|
31 |
-
$this->usedTags = $usedTags;
|
32 |
-
$this->usedFunctions = $usedFunctions;
|
33 |
-
}
|
34 |
-
|
35 |
-
protected function compileDisplayBody(Twig_Compiler $compiler)
|
36 |
-
{
|
37 |
-
$compiler->write("\$this->checkSecurity();\n");
|
38 |
-
|
39 |
-
parent::compileDisplayBody($compiler);
|
40 |
-
}
|
41 |
-
|
42 |
-
protected function compileDisplayFooter(Twig_Compiler $compiler)
|
43 |
-
{
|
44 |
-
parent::compileDisplayFooter($compiler);
|
45 |
-
|
46 |
-
$compiler
|
47 |
-
->write("protected function checkSecurity()\n", "{\n")
|
48 |
-
->indent()
|
49 |
-
->write("\$this->env->getExtension('sandbox')->checkSecurity(\n")
|
50 |
-
->indent()
|
51 |
-
->write(!$this->usedTags ? "array(),\n" : "array('".implode('\', \'', $this->usedTags)."'),\n")
|
52 |
-
->write(!$this->usedFilters ? "array(),\n" : "array('".implode('\', \'', $this->usedFilters)."'),\n")
|
53 |
-
->write(!$this->usedFunctions ? "array()\n" : "array('".implode('\', \'', $this->usedFunctions)."')\n")
|
54 |
-
->outdent()
|
55 |
-
->write(");\n")
|
56 |
-
->outdent()
|
57 |
-
->write("}\n\n")
|
58 |
-
;
|
59 |
-
}
|
60 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php
CHANGED
@@ -29,7 +29,7 @@ class Twig_Node_SandboxedPrint extends Twig_Node_Print
|
|
29 |
/**
|
30 |
* Compiles the node to PHP.
|
31 |
*
|
32 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
33 |
*/
|
34 |
public function compile(Twig_Compiler $compiler)
|
35 |
{
|
29 |
/**
|
30 |
* Compiles the node to PHP.
|
31 |
*
|
32 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
33 |
*/
|
34 |
public function compile(Twig_Compiler $compiler)
|
35 |
{
|
vendor/twig/twig/lib/Twig/Node/Set.php
CHANGED
@@ -39,7 +39,7 @@ class Twig_Node_Set extends Twig_Node
|
|
39 |
/**
|
40 |
* Compiles the node to PHP.
|
41 |
*
|
42 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
43 |
*/
|
44 |
public function compile(Twig_Compiler $compiler)
|
45 |
{
|
39 |
/**
|
40 |
* Compiles the node to PHP.
|
41 |
*
|
42 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
43 |
*/
|
44 |
public function compile(Twig_Compiler $compiler)
|
45 |
{
|
vendor/twig/twig/lib/Twig/Node/Spaceless.php
CHANGED
@@ -26,7 +26,7 @@ class Twig_Node_Spaceless extends Twig_Node
|
|
26 |
/**
|
27 |
* Compiles the node to PHP.
|
28 |
*
|
29 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
30 |
*/
|
31 |
public function compile(Twig_Compiler $compiler)
|
32 |
{
|
26 |
/**
|
27 |
* Compiles the node to PHP.
|
28 |
*
|
29 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
30 |
*/
|
31 |
public function compile(Twig_Compiler $compiler)
|
32 |
{
|
vendor/twig/twig/lib/Twig/Node/Text.php
CHANGED
@@ -25,7 +25,7 @@ class Twig_Node_Text extends Twig_Node implements Twig_NodeOutputInterface
|
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
25 |
/**
|
26 |
* Compiles the node to PHP.
|
27 |
*
|
28 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
29 |
*/
|
30 |
public function compile(Twig_Compiler $compiler)
|
31 |
{
|
vendor/twig/twig/lib/Twig/NodeInterface.php
CHANGED
@@ -13,14 +13,15 @@
|
|
13 |
* Represents a node in the AST.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_NodeInterface extends Countable, IteratorAggregate
|
19 |
{
|
20 |
/**
|
21 |
* Compiles the node to PHP.
|
22 |
*
|
23 |
-
* @param Twig_Compiler A Twig_Compiler instance
|
24 |
*/
|
25 |
public function compile(Twig_Compiler $compiler);
|
26 |
|
13 |
* Represents a node in the AST.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_NodeInterface extends Countable, IteratorAggregate
|
20 |
{
|
21 |
/**
|
22 |
* Compiles the node to PHP.
|
23 |
*
|
24 |
+
* @param Twig_Compiler $compiler A Twig_Compiler instance
|
25 |
*/
|
26 |
public function compile(Twig_Compiler $compiler);
|
27 |
|
vendor/twig/twig/lib/Twig/NodeTraverser.php
CHANGED
@@ -70,7 +70,7 @@ class Twig_NodeTraverser
|
|
70 |
protected function traverseForVisitor(Twig_NodeVisitorInterface $visitor, Twig_NodeInterface $node = null)
|
71 |
{
|
72 |
if (null === $node) {
|
73 |
-
return
|
74 |
}
|
75 |
|
76 |
$node = $visitor->enterNode($node, $this->env);
|
70 |
protected function traverseForVisitor(Twig_NodeVisitorInterface $visitor, Twig_NodeInterface $node = null)
|
71 |
{
|
72 |
if (null === $node) {
|
73 |
+
return;
|
74 |
}
|
75 |
|
76 |
$node = $visitor->enterNode($node, $this->env);
|
vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php
CHANGED
@@ -28,6 +28,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
28 |
const OPTIMIZE_VAR_ACCESS = 8;
|
29 |
|
30 |
protected $loops = array();
|
|
|
31 |
protected $optimizers;
|
32 |
protected $prependedNodes = array();
|
33 |
protected $inABody = false;
|
@@ -35,7 +36,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
35 |
/**
|
36 |
* Constructor.
|
37 |
*
|
38 |
-
* @param
|
39 |
*/
|
40 |
public function __construct($optimizers = -1)
|
41 |
{
|
@@ -55,7 +56,7 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
55 |
$this->enterOptimizeFor($node, $env);
|
56 |
}
|
57 |
|
58 |
-
if (
|
59 |
if ($this->inABody) {
|
60 |
if (!$node instanceof Twig_Node_Expression) {
|
61 |
if (get_class($node) !== 'Twig_Node') {
|
@@ -174,6 +175,8 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
174 |
// disable the loop variable by default
|
175 |
$node->setAttribute('with_loop', false);
|
176 |
array_unshift($this->loops, $node);
|
|
|
|
|
177 |
} elseif (!$this->loops) {
|
178 |
// we are outside a loop
|
179 |
return;
|
@@ -183,9 +186,15 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
183 |
|
184 |
// the loop variable is referenced for the current loop
|
185 |
elseif ($node instanceof Twig_Node_Expression_Name && 'loop' === $node->getAttribute('name')) {
|
|
|
186 |
$this->addLoopToCurrent();
|
187 |
}
|
188 |
|
|
|
|
|
|
|
|
|
|
|
189 |
// block reference
|
190 |
elseif ($node instanceof Twig_Node_BlockReference || $node instanceof Twig_Node_Expression_BlockReference) {
|
191 |
$this->addLoopToCurrent();
|
@@ -196,6 +205,16 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
196 |
$this->addLoopToAll();
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
// the loop variable is referenced via an attribute
|
200 |
elseif ($node instanceof Twig_Node_Expression_GetAttr
|
201 |
&& (!$node->getNode('attribute') instanceof Twig_Node_Expression_Constant
|
@@ -221,6 +240,8 @@ class Twig_NodeVisitor_Optimizer implements Twig_NodeVisitorInterface
|
|
221 |
{
|
222 |
if ($node instanceof Twig_Node_For) {
|
223 |
array_shift($this->loops);
|
|
|
|
|
224 |
}
|
225 |
}
|
226 |
|
28 |
const OPTIMIZE_VAR_ACCESS = 8;
|
29 |
|
30 |
protected $loops = array();
|
31 |
+
protected $loopsTargets = array();
|
32 |
protected $optimizers;
|
33 |
protected $prependedNodes = array();
|
34 |
protected $inABody = false;
|
36 |
/**
|
37 |
* Constructor.
|
38 |
*
|
39 |
+
* @param int $optimizers The optimizer mode
|
40 |
*/
|
41 |
public function __construct($optimizers = -1)
|
42 |
{
|
56 |
$this->enterOptimizeFor($node, $env);
|
57 |
}
|
58 |
|
59 |
+
if (PHP_VERSION_ID < 50400 && self::OPTIMIZE_VAR_ACCESS === (self::OPTIMIZE_VAR_ACCESS & $this->optimizers) && !$env->isStrictVariables() && !$env->hasExtension('sandbox')) {
|
60 |
if ($this->inABody) {
|
61 |
if (!$node instanceof Twig_Node_Expression) {
|
62 |
if (get_class($node) !== 'Twig_Node') {
|
175 |
// disable the loop variable by default
|
176 |
$node->setAttribute('with_loop', false);
|
177 |
array_unshift($this->loops, $node);
|
178 |
+
array_unshift($this->loopsTargets, $node->getNode('value_target')->getAttribute('name'));
|
179 |
+
array_unshift($this->loopsTargets, $node->getNode('key_target')->getAttribute('name'));
|
180 |
} elseif (!$this->loops) {
|
181 |
// we are outside a loop
|
182 |
return;
|
186 |
|
187 |
// the loop variable is referenced for the current loop
|
188 |
elseif ($node instanceof Twig_Node_Expression_Name && 'loop' === $node->getAttribute('name')) {
|
189 |
+
$node->setAttribute('always_defined', true);
|
190 |
$this->addLoopToCurrent();
|
191 |
}
|
192 |
|
193 |
+
// optimize access to loop targets
|
194 |
+
elseif ($node instanceof Twig_Node_Expression_Name && in_array($node->getAttribute('name'), $this->loopsTargets)) {
|
195 |
+
$node->setAttribute('always_defined', true);
|
196 |
+
}
|
197 |
+
|
198 |
// block reference
|
199 |
elseif ($node instanceof Twig_Node_BlockReference || $node instanceof Twig_Node_Expression_BlockReference) {
|
200 |
$this->addLoopToCurrent();
|
205 |
$this->addLoopToAll();
|
206 |
}
|
207 |
|
208 |
+
// include function without the with_context=false parameter
|
209 |
+
elseif ($node instanceof Twig_Node_Expression_Function
|
210 |
+
&& 'include' === $node->getAttribute('name')
|
211 |
+
&& (!$node->getNode('arguments')->hasNode('with_context')
|
212 |
+
|| false !== $node->getNode('arguments')->getNode('with_context')->getAttribute('value')
|
213 |
+
)
|
214 |
+
) {
|
215 |
+
$this->addLoopToAll();
|
216 |
+
}
|
217 |
+
|
218 |
// the loop variable is referenced via an attribute
|
219 |
elseif ($node instanceof Twig_Node_Expression_GetAttr
|
220 |
&& (!$node->getNode('attribute') instanceof Twig_Node_Expression_Constant
|
240 |
{
|
241 |
if ($node instanceof Twig_Node_For) {
|
242 |
array_shift($this->loops);
|
243 |
+
array_shift($this->loopsTargets);
|
244 |
+
array_shift($this->loopsTargets);
|
245 |
}
|
246 |
}
|
247 |
|
vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php
CHANGED
@@ -40,18 +40,18 @@ class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
|
|
40 |
return $node;
|
41 |
} elseif ($this->inAModule) {
|
42 |
// look for tags
|
43 |
-
if ($node->getNodeTag()) {
|
44 |
-
$this->tags[] = $node
|
45 |
}
|
46 |
|
47 |
// look for filters
|
48 |
-
if ($node instanceof Twig_Node_Expression_Filter) {
|
49 |
-
$this->filters[
|
50 |
}
|
51 |
|
52 |
// look for functions
|
53 |
-
if ($node instanceof Twig_Node_Expression_Function) {
|
54 |
-
$this->functions[
|
55 |
}
|
56 |
|
57 |
// wrap print to check __toString() calls
|
@@ -76,7 +76,7 @@ class Twig_NodeVisitor_Sandbox implements Twig_NodeVisitorInterface
|
|
76 |
if ($node instanceof Twig_Node_Module) {
|
77 |
$this->inAModule = false;
|
78 |
|
79 |
-
|
80 |
}
|
81 |
|
82 |
return $node;
|
40 |
return $node;
|
41 |
} elseif ($this->inAModule) {
|
42 |
// look for tags
|
43 |
+
if ($node->getNodeTag() && !isset($this->tags[$node->getNodeTag()])) {
|
44 |
+
$this->tags[$node->getNodeTag()] = $node;
|
45 |
}
|
46 |
|
47 |
// look for filters
|
48 |
+
if ($node instanceof Twig_Node_Expression_Filter && !isset($this->filters[$node->getNode('filter')->getAttribute('value')])) {
|
49 |
+
$this->filters[$node->getNode('filter')->getAttribute('value')] = $node;
|
50 |
}
|
51 |
|
52 |
// look for functions
|
53 |
+
if ($node instanceof Twig_Node_Expression_Function && !isset($this->functions[$node->getAttribute('name')])) {
|
54 |
+
$this->functions[$node->getAttribute('name')] = $node;
|
55 |
}
|
56 |
|
57 |
// wrap print to check __toString() calls
|
76 |
if ($node instanceof Twig_Node_Module) {
|
77 |
$this->inAModule = false;
|
78 |
|
79 |
+
$node->setNode('display_start', new Twig_Node(array(new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start'))));
|
80 |
}
|
81 |
|
82 |
return $node;
|
vendor/twig/twig/lib/Twig/NodeVisitorInterface.php
CHANGED
@@ -41,7 +41,7 @@ interface Twig_NodeVisitorInterface
|
|
41 |
*
|
42 |
* Priority should be between -10 and 10 (0 is the default).
|
43 |
*
|
44 |
-
* @return
|
45 |
*/
|
46 |
public function getPriority();
|
47 |
}
|
41 |
*
|
42 |
* Priority should be between -10 and 10 (0 is the default).
|
43 |
*
|
44 |
+
* @return int The priority level
|
45 |
*/
|
46 |
public function getPriority();
|
47 |
}
|
vendor/twig/twig/lib/Twig/ParserInterface.php
CHANGED
@@ -13,7 +13,8 @@
|
|
13 |
* Interface implemented by parser classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_ParserInterface
|
19 |
{
|
13 |
* Interface implemented by parser classes.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_ParserInterface
|
20 |
{
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Profiler_Dumper_Blackfire
|
16 |
+
{
|
17 |
+
public function dump(Twig_Profiler_Profile $profile)
|
18 |
+
{
|
19 |
+
$data = array();
|
20 |
+
$this->dumpProfile('main()', $profile, $data);
|
21 |
+
$this->dumpChildren('main()', $profile, $data);
|
22 |
+
|
23 |
+
$start = microtime(true);
|
24 |
+
$str = <<<EOF
|
25 |
+
file-format: BlackfireProbe
|
26 |
+
cost-dimensions: wt mu pmu
|
27 |
+
request-start: {$start}
|
28 |
+
|
29 |
+
|
30 |
+
EOF;
|
31 |
+
|
32 |
+
foreach ($data as $name => $values) {
|
33 |
+
$str .= "{$name}//{$values['ct']} {$values['wt']} {$values['mu']} {$values['pmu']}\n";
|
34 |
+
}
|
35 |
+
|
36 |
+
return $str;
|
37 |
+
}
|
38 |
+
|
39 |
+
private function dumpChildren($parent, Twig_Profiler_Profile $profile, &$data)
|
40 |
+
{
|
41 |
+
foreach ($profile as $p) {
|
42 |
+
if ($p->isTemplate()) {
|
43 |
+
$name = $p->getTemplate();
|
44 |
+
} else {
|
45 |
+
$name = sprintf('%s::%s(%s)', $p->getTemplate(), $p->getType(), $p->getName());
|
46 |
+
}
|
47 |
+
$this->dumpProfile(sprintf('%s==>%s', $parent, $name), $p, $data);
|
48 |
+
$this->dumpChildren($name, $p, $data);
|
49 |
+
}
|
50 |
+
}
|
51 |
+
|
52 |
+
private function dumpProfile($edge, Twig_Profiler_Profile $profile, &$data)
|
53 |
+
{
|
54 |
+
if (isset($data[$edge])) {
|
55 |
+
$data[$edge]['ct'] += 1;
|
56 |
+
$data[$edge]['wt'] += floor($profile->getDuration() * 1000000);
|
57 |
+
$data[$edge]['mu'] += $profile->getMemoryUsage();
|
58 |
+
$data[$edge]['pmu'] += $profile->getPeakMemoryUsage();
|
59 |
+
} else {
|
60 |
+
$data[$edge] = array(
|
61 |
+
'ct' => 1,
|
62 |
+
'wt' => floor($profile->getDuration() * 1000000),
|
63 |
+
'mu' => $profile->getMemoryUsage(),
|
64 |
+
'pmu' => $profile->getPeakMemoryUsage(),
|
65 |
+
);
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Text
|
16 |
+
{
|
17 |
+
static private $colors = array(
|
18 |
+
'block' => '#dfd',
|
19 |
+
'macro' => '#ddf',
|
20 |
+
'template' => '#ffd',
|
21 |
+
'big' => '#d44',
|
22 |
+
);
|
23 |
+
|
24 |
+
public function dump(Twig_Profiler_Profile $profile)
|
25 |
+
{
|
26 |
+
return '<pre>'.parent::dump($profile).'</pre>';
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
|
30 |
+
{
|
31 |
+
return sprintf('%s└ <span style="background-color: %s">%s</span>', $prefix, self::$colors['template'], $profile->getTemplate());
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
|
35 |
+
{
|
36 |
+
return sprintf('%s└ %s::%s(<span style="background-color: %s">%s</span>)', $prefix, $profile->getTemplate(), $profile->getType(), isset(self::$colors[$profile->getType()]) ? self::$colors[$profile->getType()] : 'auto', $profile->getName());
|
37 |
+
}
|
38 |
+
|
39 |
+
protected function formatTime(Twig_Profiler_Profile $profile, $percent)
|
40 |
+
{
|
41 |
+
return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>', $percent > 20 ? self::$colors['big'] : 'auto', $profile->getDuration() * 1000, $percent);
|
42 |
+
}
|
43 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Dumper/Text.php
ADDED
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Profiler_Dumper_Text
|
16 |
+
{
|
17 |
+
private $root;
|
18 |
+
|
19 |
+
public function dump(Twig_Profiler_Profile $profile)
|
20 |
+
{
|
21 |
+
return $this->dumpProfile($profile);
|
22 |
+
}
|
23 |
+
|
24 |
+
protected function formatTemplate(Twig_Profiler_Profile $profile, $prefix)
|
25 |
+
{
|
26 |
+
return sprintf('%s└ %s', $prefix, $profile->getTemplate());
|
27 |
+
}
|
28 |
+
|
29 |
+
protected function formatNonTemplate(Twig_Profiler_Profile $profile, $prefix)
|
30 |
+
{
|
31 |
+
return sprintf('%s└ %s::%s(%s)', $prefix, $profile->getTemplate(), $profile->getType(), $profile->getName());
|
32 |
+
}
|
33 |
+
|
34 |
+
protected function formatTime(Twig_Profiler_Profile $profile, $percent)
|
35 |
+
{
|
36 |
+
return sprintf('%.2fms/%.0f%%', $profile->getDuration() * 1000, $percent);
|
37 |
+
}
|
38 |
+
|
39 |
+
private function dumpProfile(Twig_Profiler_Profile $profile, $prefix = '', $sibling = false)
|
40 |
+
{
|
41 |
+
if ($profile->isRoot()) {
|
42 |
+
$this->root = $profile->getDuration();
|
43 |
+
$start = $profile->getName();
|
44 |
+
} else {
|
45 |
+
if ($profile->isTemplate()) {
|
46 |
+
$start = $this->formatTemplate($profile, $prefix);
|
47 |
+
} else {
|
48 |
+
$start = $this->formatNonTemplate($profile, $prefix);
|
49 |
+
}
|
50 |
+
$prefix .= $sibling ? '│ ' : ' ';
|
51 |
+
}
|
52 |
+
|
53 |
+
$percent = $this->root ? $profile->getDuration() / $this->root * 100 : 0;
|
54 |
+
|
55 |
+
if ($profile->getDuration() * 1000 < 1) {
|
56 |
+
$str = $start."\n";
|
57 |
+
} else {
|
58 |
+
$str = sprintf("%s %s\n", $start, $this->formatTime($profile, $percent));
|
59 |
+
}
|
60 |
+
|
61 |
+
$nCount = count($profile->getProfiles());
|
62 |
+
foreach ($profile as $i => $p) {
|
63 |
+
$str .= $this->dumpProfile($p, $prefix, $i + 1 !== $nCount);
|
64 |
+
}
|
65 |
+
|
66 |
+
return $str;
|
67 |
+
}
|
68 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a profile enter node.
|
14 |
+
*
|
15 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*/
|
17 |
+
class Twig_Profiler_Node_EnterProfile extends Twig_Node
|
18 |
+
{
|
19 |
+
public function __construct($extensionName, $type, $name, $varName)
|
20 |
+
{
|
21 |
+
parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName));
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* {@inheritdoc}
|
26 |
+
*/
|
27 |
+
public function compile(Twig_Compiler $compiler)
|
28 |
+
{
|
29 |
+
$compiler
|
30 |
+
->write(sprintf("\$%s = \$this->env->getExtension(", $this->getAttribute('var_name')))
|
31 |
+
->repr($this->getAttribute('extension_name'))
|
32 |
+
->raw(");\n")
|
33 |
+
->write(sprintf("\$%s->enter(\$%s = new Twig_Profiler_Profile(\$this->getTemplateName(), ", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
34 |
+
->repr($this->getAttribute('type'))
|
35 |
+
->raw(", ")
|
36 |
+
->repr($this->getAttribute('name'))
|
37 |
+
->raw("));\n\n")
|
38 |
+
;
|
39 |
+
}
|
40 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Represents a profile leave node.
|
14 |
+
*
|
15 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*/
|
17 |
+
class Twig_Profiler_Node_LeaveProfile extends Twig_Node
|
18 |
+
{
|
19 |
+
public function __construct($varName)
|
20 |
+
{
|
21 |
+
parent::__construct(array(), array('var_name' => $varName));
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* {@inheritdoc}
|
26 |
+
*/
|
27 |
+
public function compile(Twig_Compiler $compiler)
|
28 |
+
{
|
29 |
+
$compiler
|
30 |
+
->write("\n")
|
31 |
+
->write(sprintf("\$%s->leave(\$%s);\n\n", $this->getAttribute('var_name'), $this->getAttribute('var_name').'_prof'))
|
32 |
+
;
|
33 |
+
}
|
34 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php
ADDED
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Profiler_NodeVisitor_Profiler implements Twig_NodeVisitorInterface
|
16 |
+
{
|
17 |
+
private $extensionName;
|
18 |
+
|
19 |
+
public function __construct($extensionName)
|
20 |
+
{
|
21 |
+
$this->extensionName = $extensionName;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* {@inheritdoc}
|
26 |
+
*/
|
27 |
+
public function enterNode(Twig_NodeInterface $node, Twig_Environment $env)
|
28 |
+
{
|
29 |
+
return $node;
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* {@inheritdoc}
|
34 |
+
*/
|
35 |
+
public function leaveNode(Twig_NodeInterface $node, Twig_Environment $env)
|
36 |
+
{
|
37 |
+
if ($node instanceof Twig_Node_Module) {
|
38 |
+
$varName = $this->getVarName();
|
39 |
+
$node->setNode('display_start', new Twig_Node(array(new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getAttribute('filename'), $varName), $node->getNode('display_start'))));
|
40 |
+
$node->setNode('display_end', new Twig_Node(array(new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end'))));
|
41 |
+
} elseif ($node instanceof Twig_Node_Block) {
|
42 |
+
$varName = $this->getVarName();
|
43 |
+
$node->setNode('body', new Twig_Node_Body(array(
|
44 |
+
new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::BLOCK, $node->getAttribute('name'), $varName),
|
45 |
+
$node->getNode('body'),
|
46 |
+
new Twig_Profiler_Node_LeaveProfile($varName),
|
47 |
+
)));
|
48 |
+
} elseif ($node instanceof Twig_Node_Macro) {
|
49 |
+
$varName = $this->getVarName();
|
50 |
+
$node->setNode('body', new Twig_Node_Body(array(
|
51 |
+
new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::MACRO, $node->getAttribute('name'), $varName),
|
52 |
+
$node->getNode('body'),
|
53 |
+
new Twig_Profiler_Node_LeaveProfile($varName),
|
54 |
+
)));
|
55 |
+
}
|
56 |
+
|
57 |
+
return $node;
|
58 |
+
}
|
59 |
+
|
60 |
+
private function getVarName()
|
61 |
+
{
|
62 |
+
return sprintf('__internal_%s', hash('sha256', uniqid(mt_rand(), true), false));
|
63 |
+
}
|
64 |
+
|
65 |
+
/**
|
66 |
+
* {@inheritdoc}
|
67 |
+
*/
|
68 |
+
public function getPriority()
|
69 |
+
{
|
70 |
+
return 0;
|
71 |
+
}
|
72 |
+
}
|
vendor/twig/twig/lib/Twig/Profiler/Profile.php
ADDED
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2015 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* @author Fabien Potencier <fabien@symfony.com>
|
14 |
+
*/
|
15 |
+
class Twig_Profiler_Profile implements IteratorAggregate, Serializable
|
16 |
+
{
|
17 |
+
const ROOT = 'ROOT';
|
18 |
+
const BLOCK = 'block';
|
19 |
+
const TEMPLATE = 'template';
|
20 |
+
const MACRO = 'macro';
|
21 |
+
|
22 |
+
private $template;
|
23 |
+
private $name;
|
24 |
+
private $type;
|
25 |
+
private $starts = array();
|
26 |
+
private $ends = array();
|
27 |
+
private $profiles = array();
|
28 |
+
|
29 |
+
public function __construct($template = 'main', $type = Twig_Profiler_Profile::ROOT, $name = 'main')
|
30 |
+
{
|
31 |
+
$this->template = $template;
|
32 |
+
$this->type = $type;
|
33 |
+
$this->name = 0 === strpos($name, '__internal_') ? 'INTERNAL' : $name;
|
34 |
+
$this->enter();
|
35 |
+
}
|
36 |
+
|
37 |
+
public function getTemplate()
|
38 |
+
{
|
39 |
+
return $this->template;
|
40 |
+
}
|
41 |
+
|
42 |
+
public function getType()
|
43 |
+
{
|
44 |
+
return $this->type;
|
45 |
+
}
|
46 |
+
|
47 |
+
public function getName()
|
48 |
+
{
|
49 |
+
return $this->name;
|
50 |
+
}
|
51 |
+
|
52 |
+
public function isRoot()
|
53 |
+
{
|
54 |
+
return self::ROOT === $this->type;
|
55 |
+
}
|
56 |
+
|
57 |
+
public function isTemplate()
|
58 |
+
{
|
59 |
+
return self::TEMPLATE === $this->type;
|
60 |
+
}
|
61 |
+
|
62 |
+
public function isBlock()
|
63 |
+
{
|
64 |
+
return self::BLOCK === $this->type;
|
65 |
+
}
|
66 |
+
|
67 |
+
public function isMacro()
|
68 |
+
{
|
69 |
+
return self::MACRO === $this->type;
|
70 |
+
}
|
71 |
+
|
72 |
+
public function getProfiles()
|
73 |
+
{
|
74 |
+
return $this->profiles;
|
75 |
+
}
|
76 |
+
|
77 |
+
public function addProfile(Twig_Profiler_Profile $profile)
|
78 |
+
{
|
79 |
+
$this->profiles[] = $profile;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Returns the duration in microseconds.
|
84 |
+
*
|
85 |
+
* @return int
|
86 |
+
*/
|
87 |
+
public function getDuration()
|
88 |
+
{
|
89 |
+
return isset($this->ends['wt']) && isset($this->starts['wt']) ? $this->ends['wt'] - $this->starts['wt'] : 0;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Returns the memory usage in bytes.
|
94 |
+
*
|
95 |
+
* @return int
|
96 |
+
*/
|
97 |
+
public function getMemoryUsage()
|
98 |
+
{
|
99 |
+
return isset($this->ends['mu']) && isset($this->starts['mu']) ? $this->ends['mu'] - $this->starts['mu'] : 0;
|
100 |
+
}
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Returns the peak memory usage in bytes.
|
104 |
+
*
|
105 |
+
* @return int
|
106 |
+
*/
|
107 |
+
public function getPeakMemoryUsage()
|
108 |
+
{
|
109 |
+
return isset($this->ends['pmu']) && isset($this->starts['pmu']) ? $this->ends['pmu'] - $this->starts['pmu'] : 0;
|
110 |
+
}
|
111 |
+
|
112 |
+
/**
|
113 |
+
* Starts the profiling.
|
114 |
+
*/
|
115 |
+
public function enter()
|
116 |
+
{
|
117 |
+
$this->starts = array(
|
118 |
+
'wt' => microtime(true),
|
119 |
+
'mu' => memory_get_usage(),
|
120 |
+
'pmu' => memory_get_peak_usage(),
|
121 |
+
);
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
* Stops the profiling.
|
126 |
+
*/
|
127 |
+
public function leave()
|
128 |
+
{
|
129 |
+
$this->ends = array(
|
130 |
+
'wt' => microtime(true),
|
131 |
+
'mu' => memory_get_usage(),
|
132 |
+
'pmu' => memory_get_peak_usage(),
|
133 |
+
);
|
134 |
+
}
|
135 |
+
|
136 |
+
public function getIterator()
|
137 |
+
{
|
138 |
+
return new ArrayIterator($this->profiles);
|
139 |
+
}
|
140 |
+
|
141 |
+
public function serialize()
|
142 |
+
{
|
143 |
+
return serialize(array($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles));
|
144 |
+
}
|
145 |
+
|
146 |
+
public function unserialize($data)
|
147 |
+
{
|
148 |
+
list($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles) = unserialize($data);
|
149 |
+
}
|
150 |
+
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFilterError.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2009 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Exception thrown when a not allowed filter is used in a template.
|
14 |
+
*
|
15 |
+
* @author Martin Hasoň <martin.hason@gmail.com>
|
16 |
+
*/
|
17 |
+
class Twig_Sandbox_SecurityNotAllowedFilterError extends Twig_Sandbox_SecurityError
|
18 |
+
{
|
19 |
+
private $filterName;
|
20 |
+
|
21 |
+
public function __construct($message, $functionName, $lineno = -1, $filename = null, Exception $previous = null)
|
22 |
+
{
|
23 |
+
parent::__construct($message, $lineno, $filename, $previous);
|
24 |
+
$this->filterName = $functionName;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getFilterName()
|
28 |
+
{
|
29 |
+
return $this->filterName;
|
30 |
+
}
|
31 |
+
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedFunctionError.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2009 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Exception thrown when a not allowed function is used in a template.
|
14 |
+
*
|
15 |
+
* @author Martin Hasoň <martin.hason@gmail.com>
|
16 |
+
*/
|
17 |
+
class Twig_Sandbox_SecurityNotAllowedFunctionError extends Twig_Sandbox_SecurityError
|
18 |
+
{
|
19 |
+
private $functionName;
|
20 |
+
|
21 |
+
public function __construct($message, $functionName, $lineno = -1, $filename = null, Exception $previous = null)
|
22 |
+
{
|
23 |
+
parent::__construct($message, $lineno, $filename, $previous);
|
24 |
+
$this->functionName = $functionName;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getFunctionName()
|
28 |
+
{
|
29 |
+
return $this->functionName;
|
30 |
+
}
|
31 |
+
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) 2009 Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Exception thrown when a not allowed tag is used in a template.
|
14 |
+
*
|
15 |
+
* @author Martin Hasoň <martin.hason@gmail.com>
|
16 |
+
*/
|
17 |
+
class Twig_Sandbox_SecurityNotAllowedTagError extends Twig_Sandbox_SecurityError
|
18 |
+
{
|
19 |
+
private $tagName;
|
20 |
+
|
21 |
+
public function __construct($message, $tagName, $lineno = -1, $filename = null, Exception $previous = null)
|
22 |
+
{
|
23 |
+
parent::__construct($message, $lineno, $filename, $previous);
|
24 |
+
$this->tagName = $tagName;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function getTagName()
|
28 |
+
{
|
29 |
+
return $this->tagName;
|
30 |
+
}
|
31 |
+
}
|
vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php
CHANGED
@@ -63,19 +63,19 @@ class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterfac
|
|
63 |
{
|
64 |
foreach ($tags as $tag) {
|
65 |
if (!in_array($tag, $this->allowedTags)) {
|
66 |
-
throw new
|
67 |
}
|
68 |
}
|
69 |
|
70 |
foreach ($filters as $filter) {
|
71 |
if (!in_array($filter, $this->allowedFilters)) {
|
72 |
-
throw new
|
73 |
}
|
74 |
}
|
75 |
|
76 |
foreach ($functions as $function) {
|
77 |
if (!in_array($function, $this->allowedFunctions)) {
|
78 |
-
throw new
|
79 |
}
|
80 |
}
|
81 |
}
|
63 |
{
|
64 |
foreach ($tags as $tag) {
|
65 |
if (!in_array($tag, $this->allowedTags)) {
|
66 |
+
throw new Twig_Sandbox_SecurityNotAllowedTagError(sprintf('Tag "%s" is not allowed.', $tag), $tag);
|
67 |
}
|
68 |
}
|
69 |
|
70 |
foreach ($filters as $filter) {
|
71 |
if (!in_array($filter, $this->allowedFilters)) {
|
72 |
+
throw new Twig_Sandbox_SecurityNotAllowedFilterError(sprintf('Filter "%s" is not allowed.', $filter), $filter);
|
73 |
}
|
74 |
}
|
75 |
|
76 |
foreach ($functions as $function) {
|
77 |
if (!in_array($function, $this->allowedFunctions)) {
|
78 |
+
throw new Twig_Sandbox_SecurityNotAllowedFunctionError(sprintf('Function "%s" is not allowed.', $function), $function);
|
79 |
}
|
80 |
}
|
81 |
}
|
vendor/twig/twig/lib/Twig/Template.php
CHANGED
@@ -20,7 +20,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
20 |
protected static $cache = array();
|
21 |
|
22 |
protected $parent;
|
23 |
-
protected $parents;
|
24 |
protected $env;
|
25 |
protected $blocks;
|
26 |
protected $traits;
|
@@ -66,15 +66,25 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
66 |
return $this->parent;
|
67 |
}
|
68 |
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
|
80 |
return $this->parents[$parent];
|
@@ -105,9 +115,9 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
105 |
$name = (string) $name;
|
106 |
|
107 |
if (isset($this->traits[$name])) {
|
108 |
-
$this->traits[$name][0]->displayBlock($name, $context, $blocks);
|
109 |
} elseif (false !== $parent = $this->getParent($context)) {
|
110 |
-
$parent->displayBlock($name, $context, $blocks);
|
111 |
} else {
|
112 |
throw new Twig_Error_Runtime(sprintf('The template has no parent and no traits defining the "%s" block', $name), -1, $this->getTemplateName());
|
113 |
}
|
@@ -119,18 +129,18 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
119 |
* This method is for internal use only and should never be called
|
120 |
* directly.
|
121 |
*
|
122 |
-
* @param string $name
|
123 |
-
* @param array $context
|
124 |
-
* @param array $blocks
|
|
|
125 |
*/
|
126 |
-
public function displayBlock($name, array $context, array $blocks = array())
|
127 |
{
|
128 |
$name = (string) $name;
|
129 |
|
130 |
-
if (isset($blocks[$name])) {
|
131 |
$template = $blocks[$name][0];
|
132 |
$block = $blocks[$name][1];
|
133 |
-
unset($blocks[$name]);
|
134 |
} elseif (isset($this->blocks[$name])) {
|
135 |
$template = $this->blocks[$name][0];
|
136 |
$block = $this->blocks[$name][1];
|
@@ -148,7 +158,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
148 |
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getTemplateName(), $e);
|
149 |
}
|
150 |
} elseif (false !== $parent = $this->getParent($context)) {
|
151 |
-
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks));
|
152 |
}
|
153 |
}
|
154 |
|
@@ -178,16 +188,17 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
178 |
* This method is for internal use only and should never be called
|
179 |
* directly.
|
180 |
*
|
181 |
-
* @param string $name
|
182 |
-
* @param array $context
|
183 |
-
* @param array $blocks
|
|
|
184 |
*
|
185 |
* @return string The rendered block
|
186 |
*/
|
187 |
-
public function renderBlock($name, array $context, array $blocks = array())
|
188 |
{
|
189 |
ob_start();
|
190 |
-
$this->displayBlock($name, $context, $blocks);
|
191 |
|
192 |
return ob_get_clean();
|
193 |
}
|
@@ -207,7 +218,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
207 |
*
|
208 |
* @param string $name The block name
|
209 |
*
|
210 |
-
* @return
|
211 |
*/
|
212 |
public function hasBlock($name)
|
213 |
{
|
@@ -229,6 +240,30 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
229 |
return array_keys($this->blocks);
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
/**
|
233 |
* Returns all blocks.
|
234 |
*
|
@@ -249,7 +284,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
249 |
*/
|
250 |
public function display(array $context, array $blocks = array())
|
251 |
{
|
252 |
-
$this->displayWithErrorHandling($this->env->mergeGlobals($context), $blocks);
|
253 |
}
|
254 |
|
255 |
/**
|
@@ -313,9 +348,9 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
313 |
* access for versions of PHP before 5.4. This is not a way to override
|
314 |
* the way to get a variable value.
|
315 |
*
|
316 |
-
* @param array
|
317 |
-
* @param string
|
318 |
-
* @param
|
319 |
*
|
320 |
* @return The content of the context variable
|
321 |
*
|
@@ -325,7 +360,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
325 |
{
|
326 |
if (!array_key_exists($item, $context)) {
|
327 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
328 |
-
return
|
329 |
}
|
330 |
|
331 |
throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item), -1, $this->getTemplateName());
|
@@ -337,12 +372,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
337 |
/**
|
338 |
* Returns the attribute value for a given array/object.
|
339 |
*
|
340 |
-
* @param mixed
|
341 |
-
* @param mixed
|
342 |
-
* @param array
|
343 |
-
* @param string
|
344 |
-
* @param
|
345 |
-
* @param
|
346 |
*
|
347 |
* @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
|
348 |
*
|
@@ -370,7 +405,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
370 |
}
|
371 |
|
372 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
373 |
-
return
|
374 |
}
|
375 |
|
376 |
if ($object instanceof ArrayAccess) {
|
@@ -378,7 +413,11 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
378 |
} elseif (is_object($object)) {
|
379 |
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface', $item, get_class($object));
|
380 |
} elseif (is_array($object)) {
|
381 |
-
|
|
|
|
|
|
|
|
|
382 |
} elseif (Twig_Template::ARRAY_CALL === $type) {
|
383 |
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
|
384 |
} else {
|
@@ -395,14 +434,12 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
395 |
}
|
396 |
|
397 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
398 |
-
return
|
399 |
}
|
400 |
|
401 |
throw new Twig_Error_Runtime(sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object), -1, $this->getTemplateName());
|
402 |
}
|
403 |
|
404 |
-
$class = get_class($object);
|
405 |
-
|
406 |
// object property
|
407 |
if (Twig_Template::METHOD_CALL !== $type) {
|
408 |
if (isset($object->$item) || array_key_exists((string) $item, $object)) {
|
@@ -418,6 +455,8 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
418 |
}
|
419 |
}
|
420 |
|
|
|
|
|
421 |
// object method
|
422 |
if (!isset(self::$cache[$class]['methods'])) {
|
423 |
self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object)));
|
@@ -440,7 +479,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
440 |
}
|
441 |
|
442 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
443 |
-
return
|
444 |
}
|
445 |
|
446 |
throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName());
|
@@ -460,7 +499,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
460 |
$ret = call_user_func_array(array($object, $method), $arguments);
|
461 |
} catch (BadMethodCallException $e) {
|
462 |
if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
|
463 |
-
return
|
464 |
}
|
465 |
throw $e;
|
466 |
}
|
@@ -473,12 +512,4 @@ abstract class Twig_Template implements Twig_TemplateInterface
|
|
473 |
|
474 |
return $ret;
|
475 |
}
|
476 |
-
|
477 |
-
/**
|
478 |
-
* This method is only useful when testing Twig. Do not use it.
|
479 |
-
*/
|
480 |
-
public static function clearCache()
|
481 |
-
{
|
482 |
-
self::$cache = array();
|
483 |
-
}
|
484 |
}
|
20 |
protected static $cache = array();
|
21 |
|
22 |
protected $parent;
|
23 |
+
protected $parents = array();
|
24 |
protected $env;
|
25 |
protected $blocks;
|
26 |
protected $traits;
|
66 |
return $this->parent;
|
67 |
}
|
68 |
|
69 |
+
try {
|
70 |
+
$parent = $this->doGetParent($context);
|
71 |
+
|
72 |
+
if (false === $parent) {
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
+
if ($parent instanceof Twig_Template) {
|
77 |
+
return $this->parents[$parent->getTemplateName()] = $parent;
|
78 |
+
}
|
79 |
+
|
80 |
+
if (!isset($this->parents[$parent])) {
|
81 |
+
$this->parents[$parent] = $this->loadTemplate($parent);
|
82 |
+
}
|
83 |
+
} catch (Twig_Error_Loader $e) {
|
84 |
+
$e->setTemplateFile(null);
|
85 |
+
$e->guess();
|
86 |
+
|
87 |
+
throw $e;
|
88 |
}
|
89 |
|
90 |
return $this->parents[$parent];
|
115 |
$name = (string) $name;
|
116 |
|
117 |
if (isset($this->traits[$name])) {
|
118 |
+
$this->traits[$name][0]->displayBlock($name, $context, $blocks, false);
|
119 |
} elseif (false !== $parent = $this->getParent($context)) {
|
120 |
+
$parent->displayBlock($name, $context, $blocks, false);
|
121 |
} else {
|
122 |
throw new Twig_Error_Runtime(sprintf('The template has no parent and no traits defining the "%s" block', $name), -1, $this->getTemplateName());
|
123 |
}
|
129 |
* This method is for internal use only and should never be called
|
130 |
* directly.
|
131 |
*
|
132 |
+
* @param string $name The block name to display
|
133 |
+
* @param array $context The context
|
134 |
+
* @param array $blocks The current set of blocks
|
135 |
+
* @param bool $useBlocks Whether to use the current set of blocks
|
136 |
*/
|
137 |
+
public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true)
|
138 |
{
|
139 |
$name = (string) $name;
|
140 |
|
141 |
+
if ($useBlocks && isset($blocks[$name])) {
|
142 |
$template = $blocks[$name][0];
|
143 |
$block = $blocks[$name][1];
|
|
|
144 |
} elseif (isset($this->blocks[$name])) {
|
145 |
$template = $this->blocks[$name][0];
|
146 |
$block = $this->blocks[$name][1];
|
158 |
throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getTemplateName(), $e);
|
159 |
}
|
160 |
} elseif (false !== $parent = $this->getParent($context)) {
|
161 |
+
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
|
162 |
}
|
163 |
}
|
164 |
|
188 |
* This method is for internal use only and should never be called
|
189 |
* directly.
|
190 |
*
|
191 |
+
* @param string $name The block name to render
|
192 |
+
* @param array $context The context
|
193 |
+
* @param array $blocks The current set of blocks
|
194 |
+
* @param bool $useBlocks Whether to use the current set of blocks
|
195 |
*
|
196 |
* @return string The rendered block
|
197 |
*/
|
198 |
+
public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true)
|
199 |
{
|
200 |
ob_start();
|
201 |
+
$this->displayBlock($name, $context, $blocks, $useBlocks);
|
202 |
|
203 |
return ob_get_clean();
|
204 |
}
|
218 |
*
|
219 |
* @param string $name The block name
|
220 |
*
|
221 |
+
* @return bool true if the block exists, false otherwise
|
222 |
*/
|
223 |
public function hasBlock($name)
|
224 |
{
|
240 |
return array_keys($this->blocks);
|
241 |
}
|
242 |
|
243 |
+
protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
|
244 |
+
{
|
245 |
+
try {
|
246 |
+
if (is_array($template)) {
|
247 |
+
return $this->env->resolveTemplate($template);
|
248 |
+
}
|
249 |
+
|
250 |
+
if ($template instanceof Twig_Template) {
|
251 |
+
return $template;
|
252 |
+
}
|
253 |
+
|
254 |
+
return $this->env->loadTemplate($template, $index);
|
255 |
+
} catch (Twig_Error $e) {
|
256 |
+
$e->setTemplateFile($templateName ? $templateName : $this->getTemplateName());
|
257 |
+
if (!$line) {
|
258 |
+
$e->guess();
|
259 |
+
} else {
|
260 |
+
$e->setTemplateLine($line);
|
261 |
+
}
|
262 |
+
|
263 |
+
throw $e;
|
264 |
+
}
|
265 |
+
}
|
266 |
+
|
267 |
/**
|
268 |
* Returns all blocks.
|
269 |
*
|
284 |
*/
|
285 |
public function display(array $context, array $blocks = array())
|
286 |
{
|
287 |
+
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
|
288 |
}
|
289 |
|
290 |
/**
|
348 |
* access for versions of PHP before 5.4. This is not a way to override
|
349 |
* the way to get a variable value.
|
350 |
*
|
351 |
+
* @param array $context The context
|
352 |
+
* @param string $item The variable to return from the context
|
353 |
+
* @param bool $ignoreStrictCheck Whether to ignore the strict variable check or not
|
354 |
*
|
355 |
* @return The content of the context variable
|
356 |
*
|
360 |
{
|
361 |
if (!array_key_exists($item, $context)) {
|
362 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
363 |
+
return;
|
364 |
}
|
365 |
|
366 |
throw new Twig_Error_Runtime(sprintf('Variable "%s" does not exist', $item), -1, $this->getTemplateName());
|
372 |
/**
|
373 |
* Returns the attribute value for a given array/object.
|
374 |
*
|
375 |
+
* @param mixed $object The object or array from where to get the item
|
376 |
+
* @param mixed $item The item to get from the array or object
|
377 |
+
* @param array $arguments An array of arguments to pass if the item is an object method
|
378 |
+
* @param string $type The type of attribute (@see Twig_Template constants)
|
379 |
+
* @param bool $isDefinedTest Whether this is only a defined check
|
380 |
+
* @param bool $ignoreStrictCheck Whether to ignore the strict attribute check or not
|
381 |
*
|
382 |
* @return mixed The attribute value, or a Boolean when $isDefinedTest is true, or null when the attribute is not set and $ignoreStrictCheck is true
|
383 |
*
|
405 |
}
|
406 |
|
407 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
408 |
+
return;
|
409 |
}
|
410 |
|
411 |
if ($object instanceof ArrayAccess) {
|
413 |
} elseif (is_object($object)) {
|
414 |
$message = sprintf('Impossible to access a key "%s" on an object of class "%s" that does not implement ArrayAccess interface', $item, get_class($object));
|
415 |
} elseif (is_array($object)) {
|
416 |
+
if (empty($object)) {
|
417 |
+
$message = sprintf('Key "%s" does not exist as the array is empty', $arrayItem);
|
418 |
+
} else {
|
419 |
+
$message = sprintf('Key "%s" for array with keys "%s" does not exist', $arrayItem, implode(', ', array_keys($object)));
|
420 |
+
}
|
421 |
} elseif (Twig_Template::ARRAY_CALL === $type) {
|
422 |
$message = sprintf('Impossible to access a key ("%s") on a %s variable ("%s")', $item, gettype($object), $object);
|
423 |
} else {
|
434 |
}
|
435 |
|
436 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
437 |
+
return;
|
438 |
}
|
439 |
|
440 |
throw new Twig_Error_Runtime(sprintf('Impossible to invoke a method ("%s") on a %s variable ("%s")', $item, gettype($object), $object), -1, $this->getTemplateName());
|
441 |
}
|
442 |
|
|
|
|
|
443 |
// object property
|
444 |
if (Twig_Template::METHOD_CALL !== $type) {
|
445 |
if (isset($object->$item) || array_key_exists((string) $item, $object)) {
|
455 |
}
|
456 |
}
|
457 |
|
458 |
+
$class = get_class($object);
|
459 |
+
|
460 |
// object method
|
461 |
if (!isset(self::$cache[$class]['methods'])) {
|
462 |
self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object)));
|
479 |
}
|
480 |
|
481 |
if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
|
482 |
+
return;
|
483 |
}
|
484 |
|
485 |
throw new Twig_Error_Runtime(sprintf('Method "%s" for object "%s" does not exist', $item, get_class($object)), -1, $this->getTemplateName());
|
499 |
$ret = call_user_func_array(array($object, $method), $arguments);
|
500 |
} catch (BadMethodCallException $e) {
|
501 |
if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
|
502 |
+
return;
|
503 |
}
|
504 |
throw $e;
|
505 |
}
|
512 |
|
513 |
return $ret;
|
514 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
515 |
}
|
vendor/twig/twig/lib/Twig/TemplateInterface.php
CHANGED
@@ -13,7 +13,8 @@
|
|
13 |
* Interface implemented by all compiled templates.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
-
*
|
|
|
17 |
*/
|
18 |
interface Twig_TemplateInterface
|
19 |
{
|
13 |
* Interface implemented by all compiled templates.
|
14 |
*
|
15 |
* @author Fabien Potencier <fabien@symfony.com>
|
16 |
+
*
|
17 |
+
* @deprecated since 1.12 (to be removed in 3.0)
|
18 |
*/
|
19 |
interface Twig_TemplateInterface
|
20 |
{
|
vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php
CHANGED
@@ -123,7 +123,7 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
|
|
123 |
|
124 |
if (false !== $exception) {
|
125 |
list($class, ) = explode(':', $exception);
|
126 |
-
$this->assertThat(
|
127 |
}
|
128 |
|
129 |
$expected = trim($match[3], "\n ");
|
123 |
|
124 |
if (false !== $exception) {
|
125 |
list($class, ) = explode(':', $exception);
|
126 |
+
$this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class));
|
127 |
}
|
128 |
|
129 |
$expected = trim($match[3], "\n ");
|
vendor/twig/twig/lib/Twig/Test/NodeTestCase.php
CHANGED
@@ -38,13 +38,15 @@ abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
|
|
38 |
return new Twig_Environment();
|
39 |
}
|
40 |
|
41 |
-
protected function getVariableGetter($name)
|
42 |
{
|
43 |
-
|
44 |
-
|
|
|
|
|
45 |
}
|
46 |
|
47 |
-
return sprintf('$this->getContext($context, "%s")', $name);
|
48 |
}
|
49 |
|
50 |
protected function getAttributeGetter()
|
38 |
return new Twig_Environment();
|
39 |
}
|
40 |
|
41 |
+
protected function getVariableGetter($name, $line = false)
|
42 |
{
|
43 |
+
$line = $line > 0 ? "// line {$line}\n" : '';
|
44 |
+
|
45 |
+
if (PHP_VERSION_ID >= 50400) {
|
46 |
+
return sprintf('%s(isset($context["%s"]) ? $context["%s"] : null)', $line, $name, $name);
|
47 |
}
|
48 |
|
49 |
+
return sprintf('%s$this->getContext($context, "%s")', $line, $name);
|
50 |
}
|
51 |
|
52 |
protected function getAttributeGetter()
|
vendor/twig/twig/lib/Twig/Token.php
CHANGED
@@ -38,9 +38,9 @@ class Twig_Token
|
|
38 |
/**
|
39 |
* Constructor.
|
40 |
*
|
41 |
-
* @param
|
42 |
-
* @param string
|
43 |
-
* @param
|
44 |
*/
|
45 |
public function __construct($type, $value, $lineno)
|
46 |
{
|
@@ -67,10 +67,10 @@ class Twig_Token
|
|
67 |
* * type and value (or array of possible values)
|
68 |
* * just value (or array of possible values) (NAME_TYPE is used as type)
|
69 |
*
|
70 |
-
* @param array|
|
71 |
* @param array|string|null $values The token value
|
72 |
*
|
73 |
-
* @return
|
74 |
*/
|
75 |
public function test($type, $values = null)
|
76 |
{
|
@@ -89,7 +89,7 @@ class Twig_Token
|
|
89 |
/**
|
90 |
* Gets the line.
|
91 |
*
|
92 |
-
* @return
|
93 |
*/
|
94 |
public function getLine()
|
95 |
{
|
@@ -99,7 +99,7 @@ class Twig_Token
|
|
99 |
/**
|
100 |
* Gets the token type.
|
101 |
*
|
102 |
-
* @return
|
103 |
*/
|
104 |
public function getType()
|
105 |
{
|
@@ -119,8 +119,8 @@ class Twig_Token
|
|
119 |
/**
|
120 |
* Returns the constant representation (internal) of a given type.
|
121 |
*
|
122 |
-
* @param
|
123 |
-
* @param
|
124 |
*
|
125 |
* @return string The string representation
|
126 |
*/
|
@@ -176,7 +176,7 @@ class Twig_Token
|
|
176 |
/**
|
177 |
* Returns the english representation of a given type.
|
178 |
*
|
179 |
-
* @param
|
180 |
*
|
181 |
* @return string The string representation
|
182 |
*/
|
38 |
/**
|
39 |
* Constructor.
|
40 |
*
|
41 |
+
* @param int $type The type of the token
|
42 |
+
* @param string $value The token value
|
43 |
+
* @param int $lineno The line position in the source
|
44 |
*/
|
45 |
public function __construct($type, $value, $lineno)
|
46 |
{
|
67 |
* * type and value (or array of possible values)
|
68 |
* * just value (or array of possible values) (NAME_TYPE is used as type)
|
69 |
*
|
70 |
+
* @param array|int $type The type to test
|
71 |
* @param array|string|null $values The token value
|
72 |
*
|
73 |
+
* @return bool
|
74 |
*/
|
75 |
public function test($type, $values = null)
|
76 |
{
|
89 |
/**
|
90 |
* Gets the line.
|
91 |
*
|
92 |
+
* @return int The source line
|
93 |
*/
|
94 |
public function getLine()
|
95 |
{
|
99 |
/**
|
100 |
* Gets the token type.
|
101 |
*
|
102 |
+
* @return int The token type
|
103 |
*/
|
104 |
public function getType()
|
105 |
{
|
119 |
/**
|
120 |
* Returns the constant representation (internal) of a given type.
|
121 |
*
|
122 |
+
* @param int $type The type as an integer
|
123 |
+
* @param bool $short Whether to return a short representation or not
|
124 |
*
|
125 |
* @return string The string representation
|
126 |
*/
|
176 |
/**
|
177 |
* Returns the english representation of a given type.
|
178 |
*
|
179 |
+
* @param int $type The type as an integer
|
180 |
*
|
181 |
* @return string The string representation
|
182 |
*/
|
vendor/twig/twig/lib/Twig/TokenStream.php
CHANGED
@@ -101,7 +101,7 @@ class Twig_TokenStream
|
|
101 |
/**
|
102 |
* Looks at the next token.
|
103 |
*
|
104 |
-
* @param
|
105 |
*
|
106 |
* @return Twig_Token
|
107 |
*/
|
@@ -117,7 +117,7 @@ class Twig_TokenStream
|
|
117 |
/**
|
118 |
* Tests the current token
|
119 |
*
|
120 |
-
* @return
|
121 |
*/
|
122 |
public function test($primary, $secondary = null)
|
123 |
{
|
@@ -127,7 +127,7 @@ class Twig_TokenStream
|
|
127 |
/**
|
128 |
* Checks if end of stream was reached
|
129 |
*
|
130 |
-
* @return
|
131 |
*/
|
132 |
public function isEOF()
|
133 |
{
|
101 |
/**
|
102 |
* Looks at the next token.
|
103 |
*
|
104 |
+
* @param int $number
|
105 |
*
|
106 |
* @return Twig_Token
|
107 |
*/
|
117 |
/**
|
118 |
* Tests the current token
|
119 |
*
|
120 |
+
* @return bool
|
121 |
*/
|
122 |
public function test($primary, $secondary = null)
|
123 |
{
|
127 |
/**
|
128 |
* Checks if end of stream was reached
|
129 |
*
|
130 |
+
* @return bool
|
131 |
*/
|
132 |
public function isEOF()
|
133 |
{
|
vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php
CHANGED
@@ -46,15 +46,15 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
46 |
public function testGlobals()
|
47 |
{
|
48 |
// globals can be added after calling getGlobals
|
49 |
-
$twig = new Twig_Environment(
|
50 |
$twig->addGlobal('foo', 'foo');
|
51 |
-
$
|
52 |
$twig->addGlobal('foo', 'bar');
|
53 |
$globals = $twig->getGlobals();
|
54 |
$this->assertEquals('bar', $globals['foo']);
|
55 |
|
56 |
// globals can be modified after runtime init
|
57 |
-
$twig = new Twig_Environment(
|
58 |
$twig->addGlobal('foo', 'foo');
|
59 |
$globals = $twig->getGlobals();
|
60 |
$twig->initRuntime();
|
@@ -63,33 +63,33 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
63 |
$this->assertEquals('bar', $globals['foo']);
|
64 |
|
65 |
// globals can be modified after extensions init
|
66 |
-
$twig = new Twig_Environment(
|
67 |
$twig->addGlobal('foo', 'foo');
|
68 |
-
$
|
69 |
$twig->getFunctions();
|
70 |
$twig->addGlobal('foo', 'bar');
|
71 |
$globals = $twig->getGlobals();
|
72 |
$this->assertEquals('bar', $globals['foo']);
|
73 |
|
74 |
// globals can be modified after extensions and runtime init
|
75 |
-
$twig = new Twig_Environment(new
|
76 |
$twig->addGlobal('foo', 'foo');
|
77 |
-
$
|
78 |
$twig->getFunctions();
|
79 |
$twig->initRuntime();
|
80 |
$twig->addGlobal('foo', 'bar');
|
81 |
$globals = $twig->getGlobals();
|
82 |
$this->assertEquals('bar', $globals['foo']);
|
83 |
|
84 |
-
$twig = new Twig_Environment(
|
85 |
$twig->getGlobals();
|
86 |
$twig->addGlobal('foo', 'bar');
|
87 |
-
$template = $twig->loadTemplate('
|
88 |
$this->assertEquals('bar', $template->render(array()));
|
89 |
|
90 |
/* to be uncomment in Twig 2.0
|
91 |
// globals cannot be added after runtime init
|
92 |
-
$twig = new Twig_Environment(
|
93 |
$twig->addGlobal('foo', 'foo');
|
94 |
$globals = $twig->getGlobals();
|
95 |
$twig->initRuntime();
|
@@ -101,7 +101,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
101 |
}
|
102 |
|
103 |
// globals cannot be added after extensions init
|
104 |
-
$twig = new Twig_Environment(
|
105 |
$twig->addGlobal('foo', 'foo');
|
106 |
$globals = $twig->getGlobals();
|
107 |
$twig->getFunctions();
|
@@ -113,7 +113,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
113 |
}
|
114 |
|
115 |
// globals cannot be added after extensions and runtime init
|
116 |
-
$twig = new Twig_Environment(
|
117 |
$twig->addGlobal('foo', 'foo');
|
118 |
$globals = $twig->getGlobals();
|
119 |
$twig->getFunctions();
|
@@ -126,7 +126,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
126 |
}
|
127 |
|
128 |
// test adding globals after initRuntime without call to getGlobals
|
129 |
-
$twig = new Twig_Environment(
|
130 |
$twig->initRuntime();
|
131 |
try {
|
132 |
$twig->addGlobal('bar', 'bar');
|
@@ -142,17 +142,17 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
142 |
$options = array('cache' => sys_get_temp_dir().'/twig', 'auto_reload' => false, 'debug' => false);
|
143 |
|
144 |
// force compilation
|
145 |
-
$twig = new Twig_Environment(new
|
146 |
-
$cache = $twig->getCacheFilename('
|
147 |
if (!is_dir(dirname($cache))) {
|
148 |
mkdir(dirname($cache), 0777, true);
|
149 |
}
|
150 |
-
file_put_contents($cache, $twig->compileSource('{{ foo }}', '
|
151 |
|
152 |
// check that extensions won't be initialized when rendering a template that is already in the cache
|
153 |
$twig = $this
|
154 |
->getMockBuilder('Twig_Environment')
|
155 |
-
->setConstructorArgs(array(
|
156 |
->setMethods(array('initExtensions'))
|
157 |
->getMock()
|
158 |
;
|
@@ -160,7 +160,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
160 |
$twig->expects($this->never())->method('initExtensions');
|
161 |
|
162 |
// render template
|
163 |
-
$output = $twig->render('
|
164 |
$this->assertEquals('bar', $output);
|
165 |
|
166 |
unlink($cache);
|
@@ -168,7 +168,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
168 |
|
169 |
public function testAddExtension()
|
170 |
{
|
171 |
-
$twig = new Twig_Environment(
|
172 |
$twig->addExtension(new Twig_Tests_EnvironmentTest_Extension());
|
173 |
|
174 |
$this->assertArrayHasKey('test', $twig->getTags());
|
@@ -184,7 +184,7 @@ class Twig_Tests_EnvironmentTest extends PHPUnit_Framework_TestCase
|
|
184 |
|
185 |
public function testRemoveExtension()
|
186 |
{
|
187 |
-
$twig = new Twig_Environment(
|
188 |
$twig->addExtension(new Twig_Tests_EnvironmentTest_Extension());
|
189 |
$twig->removeExtension('environment_test');
|
190 |
|
46 |
public function testGlobals()
|
47 |
{
|
48 |
// globals can be added after calling getGlobals
|
49 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
50 |
$twig->addGlobal('foo', 'foo');
|
51 |
+
$twig->getGlobals();
|
52 |
$twig->addGlobal('foo', 'bar');
|
53 |
$globals = $twig->getGlobals();
|
54 |
$this->assertEquals('bar', $globals['foo']);
|
55 |
|
56 |
// globals can be modified after runtime init
|
57 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
58 |
$twig->addGlobal('foo', 'foo');
|
59 |
$globals = $twig->getGlobals();
|
60 |
$twig->initRuntime();
|
63 |
$this->assertEquals('bar', $globals['foo']);
|
64 |
|
65 |
// globals can be modified after extensions init
|
66 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
67 |
$twig->addGlobal('foo', 'foo');
|
68 |
+
$twig->getGlobals();
|
69 |
$twig->getFunctions();
|
70 |
$twig->addGlobal('foo', 'bar');
|
71 |
$globals = $twig->getGlobals();
|
72 |
$this->assertEquals('bar', $globals['foo']);
|
73 |
|
74 |
// globals can be modified after extensions and runtime init
|
75 |
+
$twig = new Twig_Environment($loader = new Twig_Loader_Array(array('index' => '{{foo}}')));
|
76 |
$twig->addGlobal('foo', 'foo');
|
77 |
+
$twig->getGlobals();
|
78 |
$twig->getFunctions();
|
79 |
$twig->initRuntime();
|
80 |
$twig->addGlobal('foo', 'bar');
|
81 |
$globals = $twig->getGlobals();
|
82 |
$this->assertEquals('bar', $globals['foo']);
|
83 |
|
84 |
+
$twig = new Twig_Environment($loader);
|
85 |
$twig->getGlobals();
|
86 |
$twig->addGlobal('foo', 'bar');
|
87 |
+
$template = $twig->loadTemplate('index');
|
88 |
$this->assertEquals('bar', $template->render(array()));
|
89 |
|
90 |
/* to be uncomment in Twig 2.0
|
91 |
// globals cannot be added after runtime init
|
92 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
93 |
$twig->addGlobal('foo', 'foo');
|
94 |
$globals = $twig->getGlobals();
|
95 |
$twig->initRuntime();
|
101 |
}
|
102 |
|
103 |
// globals cannot be added after extensions init
|
104 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
105 |
$twig->addGlobal('foo', 'foo');
|
106 |
$globals = $twig->getGlobals();
|
107 |
$twig->getFunctions();
|
113 |
}
|
114 |
|
115 |
// globals cannot be added after extensions and runtime init
|
116 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
117 |
$twig->addGlobal('foo', 'foo');
|
118 |
$globals = $twig->getGlobals();
|
119 |
$twig->getFunctions();
|
126 |
}
|
127 |
|
128 |
// test adding globals after initRuntime without call to getGlobals
|
129 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
130 |
$twig->initRuntime();
|
131 |
try {
|
132 |
$twig->addGlobal('bar', 'bar');
|
142 |
$options = array('cache' => sys_get_temp_dir().'/twig', 'auto_reload' => false, 'debug' => false);
|
143 |
|
144 |
// force compilation
|
145 |
+
$twig = new Twig_Environment($loader = new Twig_Loader_Array(array('index' => '{{ foo }}')), $options);
|
146 |
+
$cache = $twig->getCacheFilename('index');
|
147 |
if (!is_dir(dirname($cache))) {
|
148 |
mkdir(dirname($cache), 0777, true);
|
149 |
}
|
150 |
+
file_put_contents($cache, $twig->compileSource('{{ foo }}', 'index'));
|
151 |
|
152 |
// check that extensions won't be initialized when rendering a template that is already in the cache
|
153 |
$twig = $this
|
154 |
->getMockBuilder('Twig_Environment')
|
155 |
+
->setConstructorArgs(array($loader, $options))
|
156 |
->setMethods(array('initExtensions'))
|
157 |
->getMock()
|
158 |
;
|
160 |
$twig->expects($this->never())->method('initExtensions');
|
161 |
|
162 |
// render template
|
163 |
+
$output = $twig->render('index', array('foo' => 'bar'));
|
164 |
$this->assertEquals('bar', $output);
|
165 |
|
166 |
unlink($cache);
|
168 |
|
169 |
public function testAddExtension()
|
170 |
{
|
171 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
172 |
$twig->addExtension(new Twig_Tests_EnvironmentTest_Extension());
|
173 |
|
174 |
$this->assertArrayHasKey('test', $twig->getTags());
|
184 |
|
185 |
public function testRemoveExtension()
|
186 |
{
|
187 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
188 |
$twig->addExtension(new Twig_Tests_EnvironmentTest_Extension());
|
189 |
$twig->removeExtension('environment_test');
|
190 |
|
vendor/twig/twig/test/Twig/Tests/ErrorTest.php
CHANGED
@@ -112,7 +112,7 @@ class Twig_Tests_ErrorTest extends PHPUnit_Framework_TestCase
|
|
112 |
{% block content %}
|
113 |
{{ parent() }}
|
114 |
{% endblock %}",
|
115 |
-
'base' => '{% block content %}{{ foo.bar }}{% endblock %}'
|
116 |
),
|
117 |
'base', 1,
|
118 |
),
|
@@ -127,7 +127,7 @@ class Twig_Tests_ErrorTest extends PHPUnit_Framework_TestCase
|
|
127 |
{% block foo %}
|
128 |
{{ foo.bar }}
|
129 |
{% endblock %}",
|
130 |
-
'base' => '{% block content %}{% endblock %}'
|
131 |
),
|
132 |
'index', 3,
|
133 |
),
|
112 |
{% block content %}
|
113 |
{{ parent() }}
|
114 |
{% endblock %}",
|
115 |
+
'base' => '{% block content %}{{ foo.bar }}{% endblock %}',
|
116 |
),
|
117 |
'base', 1,
|
118 |
),
|
127 |
{% block foo %}
|
128 |
{{ foo.bar }}
|
129 |
{% endblock %}",
|
130 |
+
'base' => '{% block content %}{% endblock %}',
|
131 |
),
|
132 |
'index', 3,
|
133 |
),
|
vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php
CHANGED
@@ -17,7 +17,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
17 |
*/
|
18 |
public function testCanOnlyAssignToNames($template)
|
19 |
{
|
20 |
-
$env = new Twig_Environment(
|
21 |
$parser = new Twig_Parser($env);
|
22 |
|
23 |
$parser->parse($env->tokenize($template, 'index'));
|
@@ -32,7 +32,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
32 |
array('{% set 3 = "foo" %}'),
|
33 |
array('{% set 1 + 2 = "foo" %}'),
|
34 |
array('{% set "bar" = "foo" %}'),
|
35 |
-
array('{% set %}{% endset %}')
|
36 |
);
|
37 |
}
|
38 |
|
@@ -41,7 +41,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
41 |
*/
|
42 |
public function testArrayExpression($template, $expected)
|
43 |
{
|
44 |
-
$env = new Twig_Environment(
|
45 |
$stream = $env->tokenize($template, 'index');
|
46 |
$parser = new Twig_Parser($env);
|
47 |
|
@@ -54,7 +54,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
54 |
*/
|
55 |
public function testArraySyntaxError($template)
|
56 |
{
|
57 |
-
$env = new Twig_Environment(
|
58 |
$parser = new Twig_Parser($env);
|
59 |
|
60 |
$parser->parse($env->tokenize($template, 'index'));
|
@@ -149,7 +149,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
149 |
*/
|
150 |
public function testStringExpressionDoesNotConcatenateTwoConsecutiveStrings()
|
151 |
{
|
152 |
-
$env = new Twig_Environment(
|
153 |
$stream = $env->tokenize('{{ "a" "b" }}', 'index');
|
154 |
$parser = new Twig_Parser($env);
|
155 |
|
@@ -161,7 +161,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
161 |
*/
|
162 |
public function testStringExpression($template, $expected)
|
163 |
{
|
164 |
-
$env = new Twig_Environment(
|
165 |
$stream = $env->tokenize($template, 'index');
|
166 |
$parser = new Twig_Parser($env);
|
167 |
|
@@ -190,7 +190,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
190 |
),
|
191 |
new Twig_Node_Expression_Constant(' baz', 1),
|
192 |
1
|
193 |
-
)
|
194 |
),
|
195 |
|
196 |
array(
|
@@ -220,7 +220,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
220 |
*/
|
221 |
public function testAttributeCallDoesNotSupportNamedArguments()
|
222 |
{
|
223 |
-
$env = new Twig_Environment(
|
224 |
$parser = new Twig_Parser($env);
|
225 |
|
226 |
$parser->parse($env->tokenize('{{ foo.bar(name="Foo") }}', 'index'));
|
@@ -231,7 +231,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
231 |
*/
|
232 |
public function testMacroCallDoesNotSupportNamedArguments()
|
233 |
{
|
234 |
-
$env = new Twig_Environment(
|
235 |
$parser = new Twig_Parser($env);
|
236 |
|
237 |
$parser->parse($env->tokenize('{% from _self import foo %}{% macro foo() %}{% endmacro %}{{ foo(name="Foo") }}', 'index'));
|
@@ -243,7 +243,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
243 |
*/
|
244 |
public function testMacroDefinitionDoesNotSupportNonNameVariableName()
|
245 |
{
|
246 |
-
$env = new Twig_Environment(
|
247 |
$parser = new Twig_Parser($env);
|
248 |
|
249 |
$parser->parse($env->tokenize('{% macro foo("a") %}{% endmacro %}', 'index'));
|
@@ -256,7 +256,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
256 |
*/
|
257 |
public function testMacroDefinitionDoesNotSupportNonConstantDefaultValues($template)
|
258 |
{
|
259 |
-
$env = new Twig_Environment(
|
260 |
$parser = new Twig_Parser($env);
|
261 |
|
262 |
$parser->parse($env->tokenize($template, 'index'));
|
@@ -275,7 +275,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
275 |
*/
|
276 |
public function testMacroDefinitionSupportsConstantDefaultValues($template)
|
277 |
{
|
278 |
-
$env = new Twig_Environment(
|
279 |
$parser = new Twig_Parser($env);
|
280 |
|
281 |
$parser->parse($env->tokenize($template, 'index'));
|
@@ -300,7 +300,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
300 |
*/
|
301 |
public function testUnknownFunction()
|
302 |
{
|
303 |
-
$env = new Twig_Environment(
|
304 |
$parser = new Twig_Parser($env);
|
305 |
|
306 |
$parser->parse($env->tokenize('{{ cycl() }}', 'index'));
|
@@ -312,7 +312,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
312 |
*/
|
313 |
public function testUnknownFilter()
|
314 |
{
|
315 |
-
$env = new Twig_Environment(
|
316 |
$parser = new Twig_Parser($env);
|
317 |
|
318 |
$parser->parse($env->tokenize('{{ 1|lowe }}', 'index'));
|
@@ -324,7 +324,7 @@ class Twig_Tests_ExpressionParserTest extends PHPUnit_Framework_TestCase
|
|
324 |
*/
|
325 |
public function testUnknownTest()
|
326 |
{
|
327 |
-
$env = new Twig_Environment(
|
328 |
$parser = new Twig_Parser($env);
|
329 |
|
330 |
$parser->parse($env->tokenize('{{ 1 is nul }}', 'index'));
|
17 |
*/
|
18 |
public function testCanOnlyAssignToNames($template)
|
19 |
{
|
20 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
21 |
$parser = new Twig_Parser($env);
|
22 |
|
23 |
$parser->parse($env->tokenize($template, 'index'));
|
32 |
array('{% set 3 = "foo" %}'),
|
33 |
array('{% set 1 + 2 = "foo" %}'),
|
34 |
array('{% set "bar" = "foo" %}'),
|
35 |
+
array('{% set %}{% endset %}'),
|
36 |
);
|
37 |
}
|
38 |
|
41 |
*/
|
42 |
public function testArrayExpression($template, $expected)
|
43 |
{
|
44 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
45 |
$stream = $env->tokenize($template, 'index');
|
46 |
$parser = new Twig_Parser($env);
|
47 |
|
54 |
*/
|
55 |
public function testArraySyntaxError($template)
|
56 |
{
|
57 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
58 |
$parser = new Twig_Parser($env);
|
59 |
|
60 |
$parser->parse($env->tokenize($template, 'index'));
|
149 |
*/
|
150 |
public function testStringExpressionDoesNotConcatenateTwoConsecutiveStrings()
|
151 |
{
|
152 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false, 'optimizations' => 0));
|
153 |
$stream = $env->tokenize('{{ "a" "b" }}', 'index');
|
154 |
$parser = new Twig_Parser($env);
|
155 |
|
161 |
*/
|
162 |
public function testStringExpression($template, $expected)
|
163 |
{
|
164 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false, 'optimizations' => 0));
|
165 |
$stream = $env->tokenize($template, 'index');
|
166 |
$parser = new Twig_Parser($env);
|
167 |
|
190 |
),
|
191 |
new Twig_Node_Expression_Constant(' baz', 1),
|
192 |
1
|
193 |
+
),
|
194 |
),
|
195 |
|
196 |
array(
|
220 |
*/
|
221 |
public function testAttributeCallDoesNotSupportNamedArguments()
|
222 |
{
|
223 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
224 |
$parser = new Twig_Parser($env);
|
225 |
|
226 |
$parser->parse($env->tokenize('{{ foo.bar(name="Foo") }}', 'index'));
|
231 |
*/
|
232 |
public function testMacroCallDoesNotSupportNamedArguments()
|
233 |
{
|
234 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
235 |
$parser = new Twig_Parser($env);
|
236 |
|
237 |
$parser->parse($env->tokenize('{% from _self import foo %}{% macro foo() %}{% endmacro %}{{ foo(name="Foo") }}', 'index'));
|
243 |
*/
|
244 |
public function testMacroDefinitionDoesNotSupportNonNameVariableName()
|
245 |
{
|
246 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
247 |
$parser = new Twig_Parser($env);
|
248 |
|
249 |
$parser->parse($env->tokenize('{% macro foo("a") %}{% endmacro %}', 'index'));
|
256 |
*/
|
257 |
public function testMacroDefinitionDoesNotSupportNonConstantDefaultValues($template)
|
258 |
{
|
259 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
260 |
$parser = new Twig_Parser($env);
|
261 |
|
262 |
$parser->parse($env->tokenize($template, 'index'));
|
275 |
*/
|
276 |
public function testMacroDefinitionSupportsConstantDefaultValues($template)
|
277 |
{
|
278 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
279 |
$parser = new Twig_Parser($env);
|
280 |
|
281 |
$parser->parse($env->tokenize($template, 'index'));
|
300 |
*/
|
301 |
public function testUnknownFunction()
|
302 |
{
|
303 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
304 |
$parser = new Twig_Parser($env);
|
305 |
|
306 |
$parser->parse($env->tokenize('{{ cycl() }}', 'index'));
|
312 |
*/
|
313 |
public function testUnknownFilter()
|
314 |
{
|
315 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
316 |
$parser = new Twig_Parser($env);
|
317 |
|
318 |
$parser->parse($env->tokenize('{{ 1|lowe }}', 'index'));
|
324 |
*/
|
325 |
public function testUnknownTest()
|
326 |
{
|
327 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
328 |
$parser = new Twig_Parser($env);
|
329 |
|
330 |
$parser->parse($env->tokenize('{{ 1 is nul }}', 'index'));
|
vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php
CHANGED
@@ -130,6 +130,24 @@ class Twig_Tests_Extension_CoreTest extends PHPUnit_Framework_TestCase
|
|
130 |
{
|
131 |
twig_escape_filter(new Twig_Environment(), 'foo', 'bar');
|
132 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
135 |
function foo_escaper_for_test(Twig_Environment $env, $string, $charset)
|
130 |
{
|
131 |
twig_escape_filter(new Twig_Environment(), 'foo', 'bar');
|
132 |
}
|
133 |
+
|
134 |
+
public function testTwigFirst()
|
135 |
+
{
|
136 |
+
$twig = new Twig_Environment();
|
137 |
+
$this->assertEquals('a', twig_first($twig, 'abc'));
|
138 |
+
$this->assertEquals(1, twig_first($twig, array(1, 2, 3)));
|
139 |
+
$this->assertSame('', twig_first($twig, null));
|
140 |
+
$this->assertSame('', twig_first($twig, ''));
|
141 |
+
}
|
142 |
+
|
143 |
+
public function testTwigLast()
|
144 |
+
{
|
145 |
+
$twig = new Twig_Environment();
|
146 |
+
$this->assertEquals('c', twig_last($twig, 'abc'));
|
147 |
+
$this->assertEquals(3, twig_last($twig, array(1, 2, 3)));
|
148 |
+
$this->assertSame('', twig_last($twig, null));
|
149 |
+
$this->assertSame('', twig_last($twig, ''));
|
150 |
+
}
|
151 |
}
|
152 |
|
153 |
function foo_escaper_for_test(Twig_Environment $env, $string, $charset)
|
vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php
CHANGED
@@ -33,13 +33,13 @@ class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase
|
|
33 |
'1_basic9' => '{{ obj.foobar }}{{ obj.fooBar }}',
|
34 |
'1_basic' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}',
|
35 |
'1_layout' => '{% block content %}{% endblock %}',
|
36 |
-
'1_child' =>
|
37 |
);
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
* @expectedException Twig_Sandbox_SecurityError
|
42 |
-
* @expectedExceptionMessage Filter "json_encode" is not allowed in "1_child".
|
43 |
*/
|
44 |
public function testSandboxWithInheritance()
|
45 |
{
|
@@ -111,6 +111,11 @@ class Twig_Tests_Extension_SandboxTest extends PHPUnit_Framework_TestCase
|
|
111 |
$this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allow some methods');
|
112 |
$this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once');
|
113 |
|
|
|
|
|
|
|
|
|
|
|
114 |
$twig = $this->getEnvironment(true, array(), self::$templates, array(), array('upper'));
|
115 |
$this->assertEquals('FABIEN', $twig->loadTemplate('1_basic2')->render(self::$params), 'Sandbox allow some filters');
|
116 |
|
33 |
'1_basic9' => '{{ obj.foobar }}{{ obj.fooBar }}',
|
34 |
'1_basic' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}',
|
35 |
'1_layout' => '{% block content %}{% endblock %}',
|
36 |
+
'1_child' => "{% extends \"1_layout\" %}\n{% block content %}\n{{ \"a\"|json_encode }}\n{% endblock %}",
|
37 |
);
|
38 |
}
|
39 |
|
40 |
/**
|
41 |
* @expectedException Twig_Sandbox_SecurityError
|
42 |
+
* @expectedExceptionMessage Filter "json_encode" is not allowed in "1_child" at line 3.
|
43 |
*/
|
44 |
public function testSandboxWithInheritance()
|
45 |
{
|
111 |
$this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allow some methods');
|
112 |
$this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once');
|
113 |
|
114 |
+
$twig = $this->getEnvironment(false, array(), self::$templates);
|
115 |
+
FooObject::reset();
|
116 |
+
$this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allows __toString when sandbox disabled');
|
117 |
+
$this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once');
|
118 |
+
|
119 |
$twig = $this->getEnvironment(true, array(), self::$templates, array(), array('upper'));
|
120 |
$this->assertEquals('FABIEN', $twig->loadTemplate('1_basic2')->render(self::$params), 'Sandbox allow some filters');
|
121 |
|
vendor/twig/twig/test/Twig/Tests/FileCachingTest.php
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
<?php
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
|
4 |
{
|
5 |
protected $fileName;
|
@@ -17,7 +26,7 @@ class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
|
|
17 |
$this->markTestSkipped(sprintf('Unable to run the tests as "%s" is not writable.', $this->tmpDir));
|
18 |
}
|
19 |
|
20 |
-
$this->env = new Twig_Environment(new
|
21 |
}
|
22 |
|
23 |
public function tearDown()
|
@@ -31,8 +40,8 @@ class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
|
|
31 |
|
32 |
public function testWritingCacheFiles()
|
33 |
{
|
34 |
-
$name = '
|
35 |
-
$
|
36 |
$cacheFileName = $this->env->getCacheFilename($name);
|
37 |
|
38 |
$this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
|
@@ -41,8 +50,8 @@ class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
|
|
41 |
|
42 |
public function testClearingCacheFiles()
|
43 |
{
|
44 |
-
$name = '
|
45 |
-
$
|
46 |
$cacheFileName = $this->env->getCacheFilename($name);
|
47 |
|
48 |
$this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
|
1 |
<?php
|
2 |
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
class Twig_Tests_FileCachingTest extends PHPUnit_Framework_TestCase
|
13 |
{
|
14 |
protected $fileName;
|
26 |
$this->markTestSkipped(sprintf('Unable to run the tests as "%s" is not writable.', $this->tmpDir));
|
27 |
}
|
28 |
|
29 |
+
$this->env = new Twig_Environment(new Twig_Loader_Array(array('index' => 'index', 'index2' => 'index2')), array('cache' => $this->tmpDir));
|
30 |
}
|
31 |
|
32 |
public function tearDown()
|
40 |
|
41 |
public function testWritingCacheFiles()
|
42 |
{
|
43 |
+
$name = 'index';
|
44 |
+
$this->env->loadTemplate($name);
|
45 |
$cacheFileName = $this->env->getCacheFilename($name);
|
46 |
|
47 |
$this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
|
50 |
|
51 |
public function testClearingCacheFiles()
|
52 |
{
|
53 |
+
$name = 'index2';
|
54 |
+
$this->env->loadTemplate($name);
|
55 |
$cacheFileName = $this->env->getCacheFilename($name);
|
56 |
|
57 |
$this->assertTrue(file_exists($cacheFileName), 'Cache file does not exist.');
|
vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Tests_FileExtensionEscapingStrategyTest extends PHPUnit_Framework_TestCase
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @dataProvider getGuessData
|
16 |
+
*/
|
17 |
+
public function testGuess($strategy, $filename)
|
18 |
+
{
|
19 |
+
$this->assertEquals($strategy, Twig_FileExtensionEscapingStrategy::guess($filename));
|
20 |
+
}
|
21 |
+
|
22 |
+
public function getGuessData()
|
23 |
+
{
|
24 |
+
return array(
|
25 |
+
// default
|
26 |
+
array('html', 'foo.html'),
|
27 |
+
array('html', 'foo.html.twig'),
|
28 |
+
array('html', 'foo'),
|
29 |
+
array('html', 'foo.bar.twig'),
|
30 |
+
array('html', 'foo.txt/foo'),
|
31 |
+
array('html', 'foo.txt/foo.js/'),
|
32 |
+
|
33 |
+
// css
|
34 |
+
array('css', 'foo.css'),
|
35 |
+
array('css', 'foo.css.twig'),
|
36 |
+
array('css', 'foo.twig.css'),
|
37 |
+
|
38 |
+
// js
|
39 |
+
array('js', 'foo.js'),
|
40 |
+
array('js', 'foo.js.twig'),
|
41 |
+
array('js', 'foo.txt/foo.js'),
|
42 |
+
array('js', 'foo.txt.twig/foo.js'),
|
43 |
+
|
44 |
+
// txt
|
45 |
+
array(false, 'foo.txt'),
|
46 |
+
array(false, 'foo.txt.twig'),
|
47 |
+
);
|
48 |
+
}
|
49 |
+
}
|
vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_trait.test
CHANGED
@@ -6,4 +6,4 @@ Exception for an undefined trait
|
|
6 |
{% block bar %}
|
7 |
{% endblock %}
|
8 |
--EXCEPTION--
|
9 |
-
Twig_Error_Runtime: Block "foobar" is not defined in trait "foo" in "index.twig".
|
6 |
{% block bar %}
|
7 |
{% endblock %}
|
8 |
--EXCEPTION--
|
9 |
+
Twig_Error_Runtime: Block "foobar" is not defined in trait "foo" in "index.twig" at line 2.
|
vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test
CHANGED
@@ -4,7 +4,7 @@ Twig supports bitwise operations
|
|
4 |
{{ 1 b-and 5 }}
|
5 |
{{ 1 b-or 5 }}
|
6 |
{{ 1 b-xor 5 }}
|
7 |
-
{{ (1 and 0 b-or 0) is
|
8 |
--DATA--
|
9 |
return array()
|
10 |
--EXPECT--
|
4 |
{{ 1 b-and 5 }}
|
5 |
{{ 1 b-or 5 }}
|
6 |
{{ 1 b-xor 5 }}
|
7 |
+
{{ (1 and 0 b-or 0) is same as(1 and (0 b-or 0)) ? 'ok' : 'ko' }}
|
8 |
--DATA--
|
9 |
return array()
|
10 |
--EXPECT--
|
vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
--TEST--
|
2 |
Twig supports the "divisible by" operator
|
3 |
--TEMPLATE--
|
4 |
-
{{ 8 is divisibleby(2) ? 'OK' }}
|
5 |
-
{{ 8 is not divisibleby(3) ? 'OK' }}
|
6 |
{{ 8 is divisible by(2) ? 'OK' }}
|
7 |
{{ 8 is not divisible by(3) ? 'OK' }}
|
8 |
{{ 8 is divisible by (2) ? 'OK' }}
|
@@ -17,5 +15,3 @@ OK
|
|
17 |
OK
|
18 |
OK
|
19 |
OK
|
20 |
-
OK
|
21 |
-
OK
|
1 |
--TEST--
|
2 |
Twig supports the "divisible by" operator
|
3 |
--TEMPLATE--
|
|
|
|
|
4 |
{{ 8 is divisible by(2) ? 'OK' }}
|
5 |
{{ 8 is not divisible by(3) ? 'OK' }}
|
6 |
{{ 8 is divisible by (2) ? 'OK' }}
|
15 |
OK
|
16 |
OK
|
17 |
OK
|
|
|
|
vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test
CHANGED
@@ -4,9 +4,23 @@ Twig supports the "ends with" operator
|
|
4 |
{{ 'foo' ends with 'o' ? 'OK' : 'KO' }}
|
5 |
{{ not ('foo' ends with 'f') ? 'OK' : 'KO' }}
|
6 |
{{ not ('foo' ends with 'foowaytoolong') ? 'OK' : 'KO' }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
--DATA--
|
8 |
return array()
|
9 |
--EXPECT--
|
10 |
OK
|
11 |
OK
|
12 |
OK
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{{ 'foo' ends with 'o' ? 'OK' : 'KO' }}
|
5 |
{{ not ('foo' ends with 'f') ? 'OK' : 'KO' }}
|
6 |
{{ not ('foo' ends with 'foowaytoolong') ? 'OK' : 'KO' }}
|
7 |
+
{{ 'foo' ends with '' ? 'OK' : 'KO' }}
|
8 |
+
{{ '1' ends with true ? 'OK' : 'KO' }}
|
9 |
+
{{ 1 ends with true ? 'OK' : 'KO' }}
|
10 |
+
{{ 0 ends with false ? 'OK' : 'KO' }}
|
11 |
+
{{ '' ends with false ? 'OK' : 'KO' }}
|
12 |
+
{{ false ends with false ? 'OK' : 'KO' }}
|
13 |
+
{{ false ends with '' ? 'OK' : 'KO' }}
|
14 |
--DATA--
|
15 |
return array()
|
16 |
--EXPECT--
|
17 |
OK
|
18 |
OK
|
19 |
OK
|
20 |
+
OK
|
21 |
+
KO
|
22 |
+
KO
|
23 |
+
KO
|
24 |
+
KO
|
25 |
+
KO
|
26 |
+
KO
|
vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
--TEST--
|
2 |
Twig supports the "same as" operator
|
3 |
--TEMPLATE--
|
4 |
-
{{ 1 is
|
5 |
-
{{ 1 is not
|
6 |
{{ 1 is same as(1) ? 'OK' }}
|
7 |
{{ 1 is not same as(true) ? 'OK' }}
|
8 |
{{ 1 is same as (1) ? 'OK' }}
|
1 |
--TEST--
|
2 |
Twig supports the "same as" operator
|
3 |
--TEMPLATE--
|
4 |
+
{{ 1 is same as(1) ? 'OK' }}
|
5 |
+
{{ 1 is not same as(true) ? 'OK' }}
|
6 |
{{ 1 is same as(1) ? 'OK' }}
|
7 |
{{ 1 is not same as(true) ? 'OK' }}
|
8 |
{{ 1 is same as (1) ? 'OK' }}
|
vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test
CHANGED
@@ -7,6 +7,11 @@ Twig supports the "starts with" operator
|
|
7 |
{{ 'foo' starts with 'f' ? 'OK' : 'KO' }}
|
8 |
{{ 'foo' starts
|
9 |
with 'f' ? 'OK' : 'KO' }}
|
|
|
|
|
|
|
|
|
|
|
10 |
--DATA--
|
11 |
return array()
|
12 |
--EXPECT--
|
@@ -15,3 +20,8 @@ OK
|
|
15 |
OK
|
16 |
OK
|
17 |
OK
|
|
|
|
|
|
|
|
|
|
7 |
{{ 'foo' starts with 'f' ? 'OK' : 'KO' }}
|
8 |
{{ 'foo' starts
|
9 |
with 'f' ? 'OK' : 'KO' }}
|
10 |
+
{{ 'foo' starts with '' ? 'OK' : 'KO' }}
|
11 |
+
{{ '1' starts with true ? 'OK' : 'KO' }}
|
12 |
+
{{ '' starts with false ? 'OK' : 'KO' }}
|
13 |
+
{{ 'a' starts with false ? 'OK' : 'KO' }}
|
14 |
+
{{ false starts with '' ? 'OK' : 'KO' }}
|
15 |
--DATA--
|
16 |
return array()
|
17 |
--EXPECT--
|
20 |
OK
|
21 |
OK
|
22 |
OK
|
23 |
+
OK
|
24 |
+
KO
|
25 |
+
KO
|
26 |
+
KO
|
27 |
+
KO
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test
CHANGED
@@ -31,6 +31,13 @@
|
|
31 |
{{ date6|date('e', false) }}
|
32 |
|
33 |
{{ date7|date }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
--DATA--
|
35 |
date_default_timezone_set('Europe/Paris');
|
36 |
return array(
|
@@ -40,7 +47,7 @@ return array(
|
|
40 |
'date4' => 1286199900, // DateTime::createFromFormat('Y-m-d H:i', '2010-10-04 13:45', new DateTimeZone('UTC'))->getTimestamp() -- A unixtimestamp is always GMT
|
41 |
'date5' => -189291360, // DateTime::createFromFormat('Y-m-d H:i', '1964-01-02 03:04', new DateTimeZone('UTC'))->getTimestamp(),
|
42 |
'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')),
|
43 |
-
'date7' => '2010-01-28T15:00:00+
|
44 |
'timezone1' => new DateTimeZone('America/New_York'),
|
45 |
)
|
46 |
--EXPECT--
|
@@ -73,4 +80,11 @@ January 2, 1964 04:04
|
|
73 |
Europe/Paris
|
74 |
America/New_York
|
75 |
|
76 |
-
January 28, 2010
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
{{ date6|date('e', false) }}
|
32 |
|
33 |
{{ date7|date }}
|
34 |
+
{{ date7|date(timezone='Europe/Paris') }}
|
35 |
+
{{ date7|date(timezone='Asia/Hong_Kong') }}
|
36 |
+
{{ date7|date(timezone=false) }}
|
37 |
+
{{ date7|date(timezone='Indian/Mauritius') }}
|
38 |
+
|
39 |
+
{{ '2010-01-28 15:00:00'|date(timezone="Europe/Paris") }}
|
40 |
+
{{ '2010-01-28 15:00:00'|date(timezone="Asia/Hong_Kong") }}
|
41 |
--DATA--
|
42 |
date_default_timezone_set('Europe/Paris');
|
43 |
return array(
|
47 |
'date4' => 1286199900, // DateTime::createFromFormat('Y-m-d H:i', '2010-10-04 13:45', new DateTimeZone('UTC'))->getTimestamp() -- A unixtimestamp is always GMT
|
48 |
'date5' => -189291360, // DateTime::createFromFormat('Y-m-d H:i', '1964-01-02 03:04', new DateTimeZone('UTC'))->getTimestamp(),
|
49 |
'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')),
|
50 |
+
'date7' => '2010-01-28T15:00:00+04:00',
|
51 |
'timezone1' => new DateTimeZone('America/New_York'),
|
52 |
)
|
53 |
--EXPECT--
|
80 |
Europe/Paris
|
81 |
America/New_York
|
82 |
|
83 |
+
January 28, 2010 12:00
|
84 |
+
January 28, 2010 12:00
|
85 |
+
January 28, 2010 19:00
|
86 |
+
January 28, 2010 15:00
|
87 |
+
January 28, 2010 15:00
|
88 |
+
|
89 |
+
January 28, 2010 15:00
|
90 |
+
January 28, 2010 22:00
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test
CHANGED
@@ -8,6 +8,7 @@ version_compare(phpversion(), '5.5.0', '>=')
|
|
8 |
{{ date1|date('d/m/Y H:i:s', 'Asia/Hong_Kong') }}
|
9 |
{{ date1|date('d/m/Y H:i:s', timezone1) }}
|
10 |
{{ date1|date('d/m/Y H:i:s') }}
|
|
|
11 |
|
12 |
{{ date2|date('d/m/Y H:i:s P', 'Europe/Paris') }}
|
13 |
{{ date2|date('d/m/Y H:i:s P', 'Asia/Hong_Kong') }}
|
@@ -27,6 +28,7 @@ October 4, 2010 13:45
|
|
27 |
04/10/2010 19:45:00
|
28 |
04/10/2010 07:45:00
|
29 |
04/10/2010 13:45:00
|
|
|
30 |
|
31 |
04/10/2010 19:45:00 +02:00
|
32 |
05/10/2010 01:45:00 +08:00
|
8 |
{{ date1|date('d/m/Y H:i:s', 'Asia/Hong_Kong') }}
|
9 |
{{ date1|date('d/m/Y H:i:s', timezone1) }}
|
10 |
{{ date1|date('d/m/Y H:i:s') }}
|
11 |
+
{{ date1|date_modify('+1 hour')|date('d/m/Y H:i:s') }}
|
12 |
|
13 |
{{ date2|date('d/m/Y H:i:s P', 'Europe/Paris') }}
|
14 |
{{ date2|date('d/m/Y H:i:s P', 'Asia/Hong_Kong') }}
|
28 |
04/10/2010 19:45:00
|
29 |
04/10/2010 07:45:00
|
30 |
04/10/2010 13:45:00
|
31 |
+
04/10/2010 14:45:00
|
32 |
|
33 |
04/10/2010 19:45:00 +02:00
|
34 |
05/10/2010 01:45:00 +08:00
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test
CHANGED
@@ -2,42 +2,42 @@
|
|
2 |
"default" filter
|
3 |
--TEMPLATE--
|
4 |
Variable:
|
5 |
-
{{ definedVar |default('default') is
|
6 |
-
{{ zeroVar |default('default') is
|
7 |
-
{{ emptyVar |default('default') is
|
8 |
-
{{ nullVar |default('default') is
|
9 |
-
{{ undefinedVar |default('default') is
|
10 |
Array access:
|
11 |
-
{{ nested.definedVar |default('default') is
|
12 |
-
{{ nested['definedVar'] |default('default') is
|
13 |
-
{{ nested.zeroVar |default('default') is
|
14 |
-
{{ nested.emptyVar |default('default') is
|
15 |
-
{{ nested.nullVar |default('default') is
|
16 |
-
{{ nested.undefinedVar |default('default') is
|
17 |
-
{{ nested['undefinedVar'] |default('default') is
|
18 |
-
{{ undefinedVar.foo |default('default') is
|
19 |
Plain values:
|
20 |
-
{{ 'defined' |default('default') is
|
21 |
-
{{ 0 |default('default') is
|
22 |
-
{{ '' |default('default') is
|
23 |
-
{{ null |default('default') is
|
24 |
Precedence:
|
25 |
{{ 'o' ~ nullVar |default('k') }}
|
26 |
{{ 'o' ~ nested.nullVar |default('k') }}
|
27 |
Object methods:
|
28 |
-
{{ object.foo |default('default') is
|
29 |
-
{{ object.undefinedMethod |default('default') is
|
30 |
-
{{ object.getFoo() |default('default') is
|
31 |
-
{{ object.getFoo('a') |default('default') is
|
32 |
-
{{ object.undefinedMethod() |default('default') is
|
33 |
-
{{ object.undefinedMethod('a') |default('default') is
|
34 |
Deep nested:
|
35 |
-
{{ nested.undefinedVar.foo.bar |default('default') is
|
36 |
-
{{ nested.definedArray.0 |default('default') is
|
37 |
-
{{ nested['definedArray'][0] |default('default') is
|
38 |
-
{{ object.self.foo |default('default') is
|
39 |
-
{{ object.self.undefinedMethod |default('default') is
|
40 |
-
{{ object.undefinedMethod.self |default('default') is
|
41 |
--DATA--
|
42 |
return array(
|
43 |
'definedVar' => 'defined',
|
2 |
"default" filter
|
3 |
--TEMPLATE--
|
4 |
Variable:
|
5 |
+
{{ definedVar |default('default') is same as('default') ? 'ko' : 'ok' }}
|
6 |
+
{{ zeroVar |default('default') is same as('default') ? 'ko' : 'ok' }}
|
7 |
+
{{ emptyVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
8 |
+
{{ nullVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
9 |
+
{{ undefinedVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
10 |
Array access:
|
11 |
+
{{ nested.definedVar |default('default') is same as('default') ? 'ko' : 'ok' }}
|
12 |
+
{{ nested['definedVar'] |default('default') is same as('default') ? 'ko' : 'ok' }}
|
13 |
+
{{ nested.zeroVar |default('default') is same as('default') ? 'ko' : 'ok' }}
|
14 |
+
{{ nested.emptyVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
15 |
+
{{ nested.nullVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
16 |
+
{{ nested.undefinedVar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
17 |
+
{{ nested['undefinedVar'] |default('default') is same as('default') ? 'ok' : 'ko' }}
|
18 |
+
{{ undefinedVar.foo |default('default') is same as('default') ? 'ok' : 'ko' }}
|
19 |
Plain values:
|
20 |
+
{{ 'defined' |default('default') is same as('default') ? 'ko' : 'ok' }}
|
21 |
+
{{ 0 |default('default') is same as('default') ? 'ko' : 'ok' }}
|
22 |
+
{{ '' |default('default') is same as('default') ? 'ok' : 'ko' }}
|
23 |
+
{{ null |default('default') is same as('default') ? 'ok' : 'ko' }}
|
24 |
Precedence:
|
25 |
{{ 'o' ~ nullVar |default('k') }}
|
26 |
{{ 'o' ~ nested.nullVar |default('k') }}
|
27 |
Object methods:
|
28 |
+
{{ object.foo |default('default') is same as('default') ? 'ko' : 'ok' }}
|
29 |
+
{{ object.undefinedMethod |default('default') is same as('default') ? 'ok' : 'ko' }}
|
30 |
+
{{ object.getFoo() |default('default') is same as('default') ? 'ko' : 'ok' }}
|
31 |
+
{{ object.getFoo('a') |default('default') is same as('default') ? 'ko' : 'ok' }}
|
32 |
+
{{ object.undefinedMethod() |default('default') is same as('default') ? 'ok' : 'ko' }}
|
33 |
+
{{ object.undefinedMethod('a') |default('default') is same as('default') ? 'ok' : 'ko' }}
|
34 |
Deep nested:
|
35 |
+
{{ nested.undefinedVar.foo.bar |default('default') is same as('default') ? 'ok' : 'ko' }}
|
36 |
+
{{ nested.definedArray.0 |default('default') is same as('default') ? 'ko' : 'ok' }}
|
37 |
+
{{ nested['definedArray'][0] |default('default') is same as('default') ? 'ko' : 'ok' }}
|
38 |
+
{{ object.self.foo |default('default') is same as('default') ? 'ko' : 'ok' }}
|
39 |
+
{{ object.self.undefinedMethod |default('default') is same as('default') ? 'ok' : 'ko' }}
|
40 |
+
{{ object.undefinedMethod.self |default('default') is same as('default') ? 'ok' : 'ko' }}
|
41 |
--DATA--
|
42 |
return array(
|
43 |
'definedVar' => 'defined',
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
{{ '1234'|first }}
|
7 |
{{ arr|first }}
|
8 |
{{ 'Ä€é'|first }}
|
|
|
9 |
--DATA--
|
10 |
return array('arr' => new ArrayObject(array(1, 2, 3, 4)))
|
11 |
--EXPECT--
|
6 |
{{ '1234'|first }}
|
7 |
{{ arr|first }}
|
8 |
{{ 'Ä€é'|first }}
|
9 |
+
{{ ''|first }}
|
10 |
--DATA--
|
11 |
return array('arr' => new ArrayObject(array(1, 2, 3, 4)))
|
12 |
--EXPECT--
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
{{ '1234'|last }}
|
7 |
{{ arr|last }}
|
8 |
{{ 'Ä€é'|last }}
|
|
|
9 |
--DATA--
|
10 |
return array('arr' => new ArrayObject(array(1, 2, 3, 4)))
|
11 |
--EXPECT--
|
6 |
{{ '1234'|last }}
|
7 |
{{ arr|last }}
|
8 |
{{ 'Ä€é'|last }}
|
9 |
+
{{ ''|last }}
|
10 |
--DATA--
|
11 |
return array('arr' => new ArrayObject(array(1, 2, 3, 4)))
|
12 |
--EXPECT--
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test
CHANGED
@@ -13,14 +13,20 @@
|
|
13 |
{{ '1234'[1:2] }}
|
14 |
{{ arr|slice(1, 2)|join('') }}
|
15 |
{{ arr[1:2]|join('') }}
|
|
|
|
|
16 |
|
17 |
{{ [1, 2, 3, 4]|slice(1)|join('') }}
|
18 |
{{ [1, 2, 3, 4][1:]|join('') }}
|
19 |
{{ '1234'|slice(1) }}
|
20 |
{{ '1234'[1:] }}
|
21 |
{{ '1234'[:1] }}
|
|
|
|
|
|
|
|
|
22 |
--DATA--
|
23 |
-
return array('start' => 1, 'length' => 2, 'arr' => new ArrayObject(array(1, 2, 3, 4)))
|
24 |
--EXPECT--
|
25 |
23
|
26 |
23
|
@@ -35,8 +41,14 @@ bc
|
|
35 |
23
|
36 |
23
|
37 |
|
|
|
|
|
38 |
234
|
39 |
234
|
40 |
234
|
41 |
234
|
42 |
1
|
|
|
|
|
|
|
|
13 |
{{ '1234'[1:2] }}
|
14 |
{{ arr|slice(1, 2)|join('') }}
|
15 |
{{ arr[1:2]|join('') }}
|
16 |
+
{{ arr[4:1]|join('') }}
|
17 |
+
{{ arr[3:2]|join('') }}
|
18 |
|
19 |
{{ [1, 2, 3, 4]|slice(1)|join('') }}
|
20 |
{{ [1, 2, 3, 4][1:]|join('') }}
|
21 |
{{ '1234'|slice(1) }}
|
22 |
{{ '1234'[1:] }}
|
23 |
{{ '1234'[:1] }}
|
24 |
+
|
25 |
+
{{ arr|slice(3)|join('') }}
|
26 |
+
{{ arr[2:]|join('') }}
|
27 |
+
{{ xml|slice(1)|join('')}}
|
28 |
--DATA--
|
29 |
+
return array('start' => 1, 'length' => 2, 'arr' => new ArrayObject(array(1, 2, 3, 4)), 'xml' => new SimpleXMLElement('<items><item>1</item><item>2</item></items>'))
|
30 |
--EXPECT--
|
31 |
23
|
32 |
23
|
41 |
23
|
42 |
23
|
43 |
|
44 |
+
4
|
45 |
+
|
46 |
234
|
47 |
234
|
48 |
234
|
49 |
234
|
50 |
1
|
51 |
+
|
52 |
+
4
|
53 |
+
34
|
54 |
+
2
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
{{ foo|split(',')|join('-') }}
|
6 |
{{ foo|split(',', 3)|join('-') }}
|
7 |
{{ baz|split('')|join('-') }}
|
|
|
8 |
{{ baz|split('', 2)|join('-') }}
|
9 |
{{ foo|split(',', -2)|join('-') }}
|
10 |
--DATA--
|
@@ -14,5 +15,6 @@ one-two-three-four-five
|
|
14 |
one-two-three-four-five
|
15 |
one-two-three,four,five
|
16 |
1-2-3-4-5
|
|
|
17 |
12-34-5
|
18 |
one-two-three
|
5 |
{{ foo|split(',')|join('-') }}
|
6 |
{{ foo|split(',', 3)|join('-') }}
|
7 |
{{ baz|split('')|join('-') }}
|
8 |
+
{{ baz|split('', 1)|join('-') }}
|
9 |
{{ baz|split('', 2)|join('-') }}
|
10 |
{{ foo|split(',', -2)|join('-') }}
|
11 |
--DATA--
|
15 |
one-two-three-four-five
|
16 |
one-two-three,four,five
|
17 |
1-2-3-4-5
|
18 |
+
1-2-3-4-5
|
19 |
12-34-5
|
20 |
one-two-three
|
vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test
CHANGED
@@ -1,12 +1,16 @@
|
|
1 |
--TEST--
|
2 |
"url_encode" filter
|
|
|
|
|
3 |
--TEMPLATE--
|
4 |
{{ {foo: "bar", number: 3, "spéßi%l": "e%c0d@d", "spa ce": ""}|url_encode }}
|
5 |
{{ {foo: "bar", number: 3, "spéßi%l": "e%c0d@d", "spa ce": ""}|url_encode|raw }}
|
6 |
{{ {}|url_encode|default("default") }}
|
|
|
7 |
--DATA--
|
8 |
return array()
|
9 |
--EXPECT--
|
10 |
-
foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa
|
11 |
-
foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa
|
12 |
default
|
|
1 |
--TEST--
|
2 |
"url_encode" filter
|
3 |
+
--CONDITION--
|
4 |
+
defined('PHP_QUERY_RFC3986')
|
5 |
--TEMPLATE--
|
6 |
{{ {foo: "bar", number: 3, "spéßi%l": "e%c0d@d", "spa ce": ""}|url_encode }}
|
7 |
{{ {foo: "bar", number: 3, "spéßi%l": "e%c0d@d", "spa ce": ""}|url_encode|raw }}
|
8 |
{{ {}|url_encode|default("default") }}
|
9 |
+
{{ 'spéßi%le%c0d@dspa ce'|url_encode }}
|
10 |
--DATA--
|
11 |
return array()
|
12 |
--EXPECT--
|
13 |
+
foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce=
|
14 |
+
foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce=
|
15 |
default
|
16 |
+
sp%C3%A9%C3%9Fi%25le%25c0d%40dspa%20ce
|
vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test
CHANGED
@@ -4,13 +4,15 @@
|
|
4 |
{{ attribute(obj, method) }}
|
5 |
{{ attribute(array, item) }}
|
6 |
{{ attribute(obj, "bar", ["a", "b"]) }}
|
|
|
7 |
{{ attribute(obj, method) is defined ? 'ok' : 'ko' }}
|
8 |
{{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }}
|
9 |
--DATA--
|
10 |
-
return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx')
|
11 |
--EXPECT--
|
12 |
foo
|
13 |
bar
|
14 |
bar_a-b
|
|
|
15 |
ok
|
16 |
ko
|
4 |
{{ attribute(obj, method) }}
|
5 |
{{ attribute(array, item) }}
|
6 |
{{ attribute(obj, "bar", ["a", "b"]) }}
|
7 |
+
{{ attribute(obj, "bar", arguments) }}
|
8 |
{{ attribute(obj, method) is defined ? 'ok' : 'ko' }}
|
9 |
{{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }}
|
10 |
--DATA--
|
11 |
+
return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => array('a', 'b'))
|
12 |
--EXPECT--
|
13 |
foo
|
14 |
bar
|
15 |
bar_a-b
|
16 |
+
bar_a-b
|
17 |
ok
|
18 |
ko
|
vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test
CHANGED
@@ -3,8 +3,11 @@
|
|
3 |
--TEMPLATE--
|
4 |
{{ include("foo.twig", sandboxed = true) }}
|
5 |
--TEMPLATE(foo.twig)--
|
|
|
|
|
|
|
6 |
{{ foo|e }}
|
7 |
--DATA--
|
8 |
return array()
|
9 |
--EXCEPTION--
|
10 |
-
|
3 |
--TEMPLATE--
|
4 |
{{ include("foo.twig", sandboxed = true) }}
|
5 |
--TEMPLATE(foo.twig)--
|
6 |
+
|
7 |
+
|
8 |
+
{{ foo|e }}
|
9 |
{{ foo|e }}
|
10 |
--DATA--
|
11 |
return array()
|
12 |
--EXCEPTION--
|
13 |
+
Twig_Sandbox_SecurityNotAllowedFilterError: Filter "e" is not allowed in "foo.twig" at line 4.
|
vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test
CHANGED
@@ -18,7 +18,7 @@ TRUE
|
|
18 |
{% if 'c' not in bar %}
|
19 |
TRUE
|
20 |
{% endif %}
|
21 |
-
{% if ''
|
22 |
TRUE
|
23 |
{% endif %}
|
24 |
{% if '' in '' %}
|
@@ -33,8 +33,47 @@ TRUE
|
|
33 |
{% if '0' in '0' %}
|
34 |
TRUE
|
35 |
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
--DATA--
|
37 |
-
return array('bar' => 'bar', 'foo' => array('bar' => 'bar'))
|
38 |
--EXPECT--
|
39 |
TRUE
|
40 |
TRUE
|
@@ -46,3 +85,42 @@ TRUE
|
|
46 |
TRUE
|
47 |
TRUE
|
48 |
TRUE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
{% if 'c' not in bar %}
|
19 |
TRUE
|
20 |
{% endif %}
|
21 |
+
{% if '' in bar %}
|
22 |
TRUE
|
23 |
{% endif %}
|
24 |
{% if '' in '' %}
|
33 |
{% if '0' in '0' %}
|
34 |
TRUE
|
35 |
{% endif %}
|
36 |
+
|
37 |
+
{{ false in [0, 1] ? 'TRUE' : 'FALSE' }}
|
38 |
+
{{ true in [0, 1] ? 'TRUE' : 'FALSE' }}
|
39 |
+
{{ '0' in [0, 1] ? 'TRUE' : 'FALSE' }}
|
40 |
+
{{ '' in [0, 1] ? 'TRUE' : 'FALSE' }}
|
41 |
+
{{ 0 in ['', 1] ? 'TRUE' : 'FALSE' }}
|
42 |
+
|
43 |
+
{{ '' in 'foo' ? 'TRUE' : 'FALSE' }}
|
44 |
+
{{ 0 in 'foo' ? 'TRUE' : 'FALSE' }}
|
45 |
+
{{ false in 'foo' ? 'TRUE' : 'FALSE' }}
|
46 |
+
{{ false in '100' ? 'TRUE' : 'FALSE' }}
|
47 |
+
{{ true in '100' ? 'TRUE' : 'FALSE' }}
|
48 |
+
|
49 |
+
{{ [] in [true, false] ? 'TRUE' : 'FALSE' }}
|
50 |
+
{{ [] in [true, ''] ? 'TRUE' : 'FALSE' }}
|
51 |
+
{{ [] in [true, []] ? 'TRUE' : 'FALSE' }}
|
52 |
+
|
53 |
+
{{ resource in 'foo'~resource ? 'TRUE' : 'FALSE' }}
|
54 |
+
{{ object in 'stdClass' ? 'TRUE' : 'FALSE' }}
|
55 |
+
{{ [] in 'Array' ? 'TRUE' : 'FALSE' }}
|
56 |
+
{{ dir_object in 'foo'~dir_object ? 'TRUE' : 'FALSE' }}
|
57 |
+
|
58 |
+
{{ ''~resource in resource ? 'TRUE' : 'FALSE' }}
|
59 |
+
{{ 'stdClass' in object ? 'TRUE' : 'FALSE' }}
|
60 |
+
{{ 'Array' in [] ? 'TRUE' : 'FALSE' }}
|
61 |
+
{{ ''~dir_object in dir_object ? 'TRUE' : 'FALSE' }}
|
62 |
+
|
63 |
+
{{ resource in [''~resource] ? 'TRUE' : 'FALSE' }}
|
64 |
+
{{ resource in [resource + 1 - 1] ? 'TRUE' : 'FALSE' }}
|
65 |
+
{{ dir_object in [''~dir_object] ? 'TRUE' : 'FALSE' }}
|
66 |
+
|
67 |
+
{{ 5 in 125 ? 'TRUE' : 'FALSE' }}
|
68 |
+
{{ 5 in '125' ? 'TRUE' : 'FALSE' }}
|
69 |
+
{{ '5' in 125 ? 'TRUE' : 'FALSE' }}
|
70 |
+
{{ '5' in '125' ? 'TRUE' : 'FALSE' }}
|
71 |
+
|
72 |
+
{{ 5.5 in 125.5 ? 'TRUE' : 'FALSE' }}
|
73 |
+
{{ 5.5 in '125.5' ? 'TRUE' : 'FALSE' }}
|
74 |
+
{{ '5.5' in 125.5 ? 'TRUE' : 'FALSE' }}
|
75 |
--DATA--
|
76 |
+
return array('bar' => 'bar', 'foo' => array('bar' => 'bar'), 'dir_object' => new SplFileInfo(dirname(__FILE__)), 'object' => new stdClass(), 'resource' => fopen(dirname(__FILE__), 'r'))
|
77 |
--EXPECT--
|
78 |
TRUE
|
79 |
TRUE
|
85 |
TRUE
|
86 |
TRUE
|
87 |
TRUE
|
88 |
+
|
89 |
+
TRUE
|
90 |
+
TRUE
|
91 |
+
TRUE
|
92 |
+
TRUE
|
93 |
+
TRUE
|
94 |
+
|
95 |
+
TRUE
|
96 |
+
FALSE
|
97 |
+
FALSE
|
98 |
+
FALSE
|
99 |
+
FALSE
|
100 |
+
|
101 |
+
TRUE
|
102 |
+
FALSE
|
103 |
+
TRUE
|
104 |
+
|
105 |
+
FALSE
|
106 |
+
FALSE
|
107 |
+
FALSE
|
108 |
+
FALSE
|
109 |
+
|
110 |
+
FALSE
|
111 |
+
FALSE
|
112 |
+
FALSE
|
113 |
+
FALSE
|
114 |
+
|
115 |
+
FALSE
|
116 |
+
FALSE
|
117 |
+
FALSE
|
118 |
+
|
119 |
+
FALSE
|
120 |
+
TRUE
|
121 |
+
FALSE
|
122 |
+
TRUE
|
123 |
+
|
124 |
+
FALSE
|
125 |
+
TRUE
|
126 |
+
FALSE
|
vendor/twig/twig/test/Twig/Tests/IntegrationTest.php
CHANGED
@@ -157,6 +157,13 @@ class TwigTestExtension extends Twig_Extension
|
|
157 |
);
|
158 |
}
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
public function §Filter($value)
|
161 |
{
|
162 |
return "§{$value}§";
|
@@ -210,6 +217,11 @@ class TwigTestExtension extends Twig_Extension
|
|
210 |
return '<br />';
|
211 |
}
|
212 |
|
|
|
|
|
|
|
|
|
|
|
213 |
public function getName()
|
214 |
{
|
215 |
return 'integration_test';
|
157 |
);
|
158 |
}
|
159 |
|
160 |
+
public function getTests()
|
161 |
+
{
|
162 |
+
return array(
|
163 |
+
new Twig_SimpleTest('multi word', array($this, 'is_multi_word')),
|
164 |
+
);
|
165 |
+
}
|
166 |
+
|
167 |
public function §Filter($value)
|
168 |
{
|
169 |
return "§{$value}§";
|
217 |
return '<br />';
|
218 |
}
|
219 |
|
220 |
+
public function is_multi_word($value)
|
221 |
+
{
|
222 |
+
return false !== strpos($value, ' ');
|
223 |
+
}
|
224 |
+
|
225 |
public function getName()
|
226 |
{
|
227 |
return 'integration_test';
|
vendor/twig/twig/test/Twig/Tests/LexerTest.php
CHANGED
@@ -46,7 +46,6 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
|
46 |
$stream = $lexer->tokenize($template);
|
47 |
|
48 |
$count = 0;
|
49 |
-
$tokens = array();
|
50 |
while (!$stream->isEOF()) {
|
51 |
$token = $stream->next();
|
52 |
if ($type === $token->getType()) {
|
@@ -114,7 +113,7 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
|
114 |
$template = '{% raw %}'.str_repeat('*', 100000).'{% endraw %}';
|
115 |
|
116 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
117 |
-
$
|
118 |
|
119 |
// should not throw an exception
|
120 |
}
|
@@ -124,7 +123,7 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
|
124 |
$template = '{{ '.str_repeat('x', 100000).' }}';
|
125 |
|
126 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
127 |
-
$
|
128 |
|
129 |
// should not throw an exception
|
130 |
}
|
@@ -134,17 +133,13 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
|
134 |
$template = '{% '.str_repeat('x', 100000).' %}';
|
135 |
|
136 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
137 |
-
$
|
138 |
|
139 |
// should not throw an exception
|
140 |
}
|
141 |
|
142 |
public function testBigNumbers()
|
143 |
{
|
144 |
-
if ('hiphop' === substr(PHP_VERSION, -6)) {
|
145 |
-
$this->markTestSkipped('hhvm thinks that the number is actually a T_CONSTANT_ENCAPSED_STRING!');
|
146 |
-
}
|
147 |
-
|
148 |
$template = '{{ 922337203685477580700 }}';
|
149 |
|
150 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
@@ -216,7 +211,7 @@ class Twig_Tests_LexerTest extends PHPUnit_Framework_TestCase
|
|
216 |
$template = '{{ "bar #{x" }}';
|
217 |
|
218 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
219 |
-
$
|
220 |
}
|
221 |
|
222 |
public function testStringWithNestedInterpolations()
|
@@ -281,7 +276,7 @@ bar
|
|
281 |
';
|
282 |
|
283 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
284 |
-
$
|
285 |
}
|
286 |
|
287 |
/**
|
@@ -300,6 +295,6 @@ bar
|
|
300 |
';
|
301 |
|
302 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
303 |
-
$
|
304 |
}
|
305 |
}
|
46 |
$stream = $lexer->tokenize($template);
|
47 |
|
48 |
$count = 0;
|
|
|
49 |
while (!$stream->isEOF()) {
|
50 |
$token = $stream->next();
|
51 |
if ($type === $token->getType()) {
|
113 |
$template = '{% raw %}'.str_repeat('*', 100000).'{% endraw %}';
|
114 |
|
115 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
116 |
+
$lexer->tokenize($template);
|
117 |
|
118 |
// should not throw an exception
|
119 |
}
|
123 |
$template = '{{ '.str_repeat('x', 100000).' }}';
|
124 |
|
125 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
126 |
+
$lexer->tokenize($template);
|
127 |
|
128 |
// should not throw an exception
|
129 |
}
|
133 |
$template = '{% '.str_repeat('x', 100000).' %}';
|
134 |
|
135 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
136 |
+
$lexer->tokenize($template);
|
137 |
|
138 |
// should not throw an exception
|
139 |
}
|
140 |
|
141 |
public function testBigNumbers()
|
142 |
{
|
|
|
|
|
|
|
|
|
143 |
$template = '{{ 922337203685477580700 }}';
|
144 |
|
145 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
211 |
$template = '{{ "bar #{x" }}';
|
212 |
|
213 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
214 |
+
$lexer->tokenize($template);
|
215 |
}
|
216 |
|
217 |
public function testStringWithNestedInterpolations()
|
276 |
';
|
277 |
|
278 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
279 |
+
$lexer->tokenize($template);
|
280 |
}
|
281 |
|
282 |
/**
|
295 |
';
|
296 |
|
297 |
$lexer = new Twig_Lexer(new Twig_Environment());
|
298 |
+
$lexer->tokenize($template);
|
299 |
}
|
300 |
}
|
vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php
CHANGED
@@ -60,6 +60,7 @@ class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase
|
|
60 |
$loader->addPath($basePath.'/named_ter', 'named');
|
61 |
$loader->addPath($basePath.'/normal_ter');
|
62 |
$loader->prependPath($basePath.'/normal_final');
|
|
|
63 |
$loader->prependPath($basePath.'/named_final', 'named');
|
64 |
|
65 |
$this->assertEquals(array(
|
@@ -70,11 +71,16 @@ class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase
|
|
70 |
), $loader->getPaths());
|
71 |
$this->assertEquals(array(
|
72 |
$basePath.'/named_final',
|
|
|
73 |
$basePath.'/named',
|
74 |
$basePath.'/named_bis',
|
75 |
$basePath.'/named_ter',
|
76 |
), $loader->getPaths('named'));
|
77 |
|
|
|
|
|
|
|
|
|
78 |
$this->assertEquals("path (final)\n", $loader->getSource('index.html'));
|
79 |
$this->assertEquals("path (final)\n", $loader->getSource('@__main__/index.html'));
|
80 |
$this->assertEquals("named path (final)\n", $loader->getSource('@named/index.html'));
|
@@ -140,4 +146,30 @@ class Twig_Tests_Loader_FilesystemTest extends PHPUnit_Framework_TestCase
|
|
140 |
$template = $twig->loadTemplate('blocks.html.twig');
|
141 |
$this->assertSame('block from theme 2', $template->renderBlock('b2', array()));
|
142 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
}
|
60 |
$loader->addPath($basePath.'/named_ter', 'named');
|
61 |
$loader->addPath($basePath.'/normal_ter');
|
62 |
$loader->prependPath($basePath.'/normal_final');
|
63 |
+
$loader->prependPath($basePath.'/named/../named_quater', 'named');
|
64 |
$loader->prependPath($basePath.'/named_final', 'named');
|
65 |
|
66 |
$this->assertEquals(array(
|
71 |
), $loader->getPaths());
|
72 |
$this->assertEquals(array(
|
73 |
$basePath.'/named_final',
|
74 |
+
$basePath.'/named/../named_quater',
|
75 |
$basePath.'/named',
|
76 |
$basePath.'/named_bis',
|
77 |
$basePath.'/named_ter',
|
78 |
), $loader->getPaths('named'));
|
79 |
|
80 |
+
$this->assertEquals(
|
81 |
+
$basePath.'/named_quater/named_absolute.html',
|
82 |
+
$loader->getCacheKey('@named/named_absolute.html')
|
83 |
+
);
|
84 |
$this->assertEquals("path (final)\n", $loader->getSource('index.html'));
|
85 |
$this->assertEquals("path (final)\n", $loader->getSource('@__main__/index.html'));
|
86 |
$this->assertEquals("named path (final)\n", $loader->getSource('@named/index.html'));
|
146 |
$template = $twig->loadTemplate('blocks.html.twig');
|
147 |
$this->assertSame('block from theme 2', $template->renderBlock('b2', array()));
|
148 |
}
|
149 |
+
|
150 |
+
public function getArrayInheritanceTests()
|
151 |
+
{
|
152 |
+
return array(
|
153 |
+
'valid array inheritance' => array('array_inheritance_valid_parent.html.twig'),
|
154 |
+
'array inheritance with null first template' => array('array_inheritance_null_parent.html.twig'),
|
155 |
+
'array inheritance with empty first template' => array('array_inheritance_empty_parent.html.twig'),
|
156 |
+
'array inheritance with non-existent first template' => array('array_inheritance_nonexistent_parent.html.twig'),
|
157 |
+
);
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* @dataProvider getArrayInheritanceTests
|
162 |
+
*
|
163 |
+
* @param $templateName string Template name with array inheritance
|
164 |
+
*/
|
165 |
+
public function testArrayInheritance($templateName)
|
166 |
+
{
|
167 |
+
$loader = new Twig_Loader_Filesystem(array());
|
168 |
+
$loader->addPath(dirname(__FILE__).'/Fixtures/inheritance');
|
169 |
+
|
170 |
+
$twig = new Twig_Environment($loader);
|
171 |
+
|
172 |
+
$template = $twig->loadTemplate($templateName);
|
173 |
+
$this->assertSame('VALID Child', $template->renderBlock('body', array()));
|
174 |
+
}
|
175 |
}
|
vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php
CHANGED
@@ -13,19 +13,19 @@ class Twig_Tests_NativeExtensionTest extends PHPUnit_Framework_TestCase
|
|
13 |
{
|
14 |
public function testGetProperties()
|
15 |
{
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
'debug' => true,
|
18 |
'cache' => false,
|
19 |
-
'autoescape' => false
|
20 |
));
|
21 |
|
22 |
$d1 = new DateTime();
|
23 |
$d2 = new DateTime();
|
24 |
-
$output = $twig->render('
|
25 |
-
|
26 |
-
if ('hiphop' === substr(PHP_VERSION, -6)) {
|
27 |
-
$this->markTestSkipped('Skip under HHVM as the behavior is not the same as plain PHP (which is an edge case anyway)');
|
28 |
-
}
|
29 |
|
30 |
// If it fails, PHP will crash.
|
31 |
$this->assertEquals($output, $d1->date.$d2->date);
|
13 |
{
|
14 |
public function testGetProperties()
|
15 |
{
|
16 |
+
if (defined('HHVM_VERSION')) {
|
17 |
+
$this->markTestSkipped('Skip under HHVM as the behavior is not the same as plain PHP (which is an edge case anyway)');
|
18 |
+
}
|
19 |
+
|
20 |
+
$twig = new Twig_Environment(new Twig_Loader_Array(array('index' => '{{ d1.date }}{{ d2.date }}')), array(
|
21 |
'debug' => true,
|
22 |
'cache' => false,
|
23 |
+
'autoescape' => false,
|
24 |
));
|
25 |
|
26 |
$d1 = new DateTime();
|
27 |
$d2 = new DateTime();
|
28 |
+
$output = $twig->render('index', compact('d1', 'd2'));
|
|
|
|
|
|
|
|
|
29 |
|
30 |
// If it fails, PHP will crash.
|
31 |
$this->assertEquals($output, $d1->date.$d2->date);
|
vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_AutoEscape::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
|
@@ -23,15 +20,6 @@ class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase
|
|
23 |
$this->assertTrue($node->getAttribute('value'));
|
24 |
}
|
25 |
|
26 |
-
/**
|
27 |
-
* @covers Twig_Node_AutoEscape::compile
|
28 |
-
* @dataProvider getTests
|
29 |
-
*/
|
30 |
-
public function testCompile($node, $source, $environment = null)
|
31 |
-
{
|
32 |
-
parent::testCompile($node, $source, $environment);
|
33 |
-
}
|
34 |
-
|
35 |
public function getTests()
|
36 |
{
|
37 |
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
|
11 |
|
12 |
class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
|
20 |
$this->assertTrue($node->getAttribute('value'));
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
public function getTests()
|
24 |
{
|
25 |
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
|
vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_BlockReference::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_BlockReference('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_BlockReference::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
return array(
|
11 |
|
12 |
class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_BlockReference('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
return array(
|
vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Block::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node_Text('foo', 1);
|
@@ -23,15 +20,6 @@ class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase
|
|
23 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
24 |
}
|
25 |
|
26 |
-
/**
|
27 |
-
* @covers Twig_Node_Block::compile
|
28 |
-
* @dataProvider getTests
|
29 |
-
*/
|
30 |
-
public function testCompile($node, $source, $environment = null)
|
31 |
-
{
|
32 |
-
parent::testCompile($node, $source, $environment);
|
33 |
-
}
|
34 |
-
|
35 |
public function getTests()
|
36 |
{
|
37 |
$body = new Twig_Node_Text('foo', 1);
|
11 |
|
12 |
class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node_Text('foo', 1);
|
20 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
public function getTests()
|
24 |
{
|
25 |
$body = new Twig_Node_Text('foo', 1);
|
vendor/twig/twig/test/Twig/Tests/Node/DoTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_DoTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Do::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
@@ -22,15 +19,6 @@ class Twig_Tests_Node_DoTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($expr, $node->getNode('expr'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Do::compile
|
27 |
-
* @dataProvider getTests
|
28 |
-
*/
|
29 |
-
public function testCompile($node, $source, $environment = null)
|
30 |
-
{
|
31 |
-
parent::testCompile($node, $source, $environment);
|
32 |
-
}
|
33 |
-
|
34 |
public function getTests()
|
35 |
{
|
36 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_DoTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
19 |
$this->assertEquals($expr, $node->getNode('expr'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/ArrayTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Array::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$elements = array(new Twig_Node_Expression_Constant('foo', 1), $foo = new Twig_Node_Expression_Constant('bar', 1));
|
@@ -22,15 +19,6 @@ class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($foo, $node->getNode(1));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Expression_Array::compile
|
27 |
-
* @dataProvider getTests
|
28 |
-
*/
|
29 |
-
public function testCompile($node, $source, $environment = null)
|
30 |
-
{
|
31 |
-
parent::testCompile($node, $source, $environment);
|
32 |
-
}
|
33 |
-
|
34 |
public function getTests()
|
35 |
{
|
36 |
$elements = array(
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$elements = array(new Twig_Node_Expression_Constant('foo', 1), $foo = new Twig_Node_Expression_Constant('bar', 1));
|
19 |
$this->assertEquals($foo, $node->getNode(1));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$elements = array(
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_AssignName::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_Expression_AssignName('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_Expression_AssignName::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$node = new Twig_Node_Expression_AssignName('foo', 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_Expression_AssignName('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$node = new Twig_Node_Expression_AssignName('foo', 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Add::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Add::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Add::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_And::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_And::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_And::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Concat::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCas
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Concat::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Concat::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Div::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Div::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Div::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_FloorDiv::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestC
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_FloorDiv::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_FloorDiv::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Mod::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Mod::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Mod::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Mul::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Mul::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Mul::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Or::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Or::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Or::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Binary_Sub::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
@@ -24,16 +21,6 @@ class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($right, $node->getNode('right'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Binary_Sub::compile
|
29 |
-
* @covers Twig_Node_Expression_Binary_Sub::operator
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
21 |
$this->assertEquals($right, $node->getNode('right'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$left = new Twig_Node_Expression_Constant(1, 1);
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php
CHANGED
@@ -39,7 +39,7 @@ class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase
|
|
39 |
|
40 |
/**
|
41 |
* @expectedException Twig_Error_Syntax
|
42 |
-
* @expectedExceptionMessage Unknown argument "unknown" for function "date".
|
43 |
*/
|
44 |
public function testGetArgumentsWithWrongNamedArgumentName()
|
45 |
{
|
@@ -49,13 +49,48 @@ class Twig_Tests_Node_Expression_CallTest extends PHPUnit_Framework_TestCase
|
|
49 |
|
50 |
/**
|
51 |
* @expectedException Twig_Error_Syntax
|
52 |
-
* @expectedExceptionMessage Unknown arguments "unknown1", "unknown2" for function "date".
|
53 |
*/
|
54 |
public function testGetArgumentsWithWrongNamedArgumentNames()
|
55 |
{
|
56 |
$node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date'));
|
57 |
$node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => ''));
|
58 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
|
61 |
class Twig_Tests_Node_Expression_Call extends Twig_Node_Expression_Call
|
39 |
|
40 |
/**
|
41 |
* @expectedException Twig_Error_Syntax
|
42 |
+
* @expectedExceptionMessage Unknown argument "unknown" for function "date(format, timestamp)".
|
43 |
*/
|
44 |
public function testGetArgumentsWithWrongNamedArgumentName()
|
45 |
{
|
49 |
|
50 |
/**
|
51 |
* @expectedException Twig_Error_Syntax
|
52 |
+
* @expectedExceptionMessage Unknown arguments "unknown1", "unknown2" for function "date(format, timestamp)".
|
53 |
*/
|
54 |
public function testGetArgumentsWithWrongNamedArgumentNames()
|
55 |
{
|
56 |
$node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date'));
|
57 |
$node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => ''));
|
58 |
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* @expectedException Twig_Error_Syntax
|
62 |
+
* @expectedExceptionMessage Argument "case_sensitivity" could not be assigned for function "substr_compare(main_str, str, offset, length, case_sensitivity)" because it is mapped to an internal PHP function which cannot determine default value for optional argument "length".
|
63 |
+
*/
|
64 |
+
public function testResolveArgumentsWithMissingValueForOptionalArgument()
|
65 |
+
{
|
66 |
+
if (defined('HHVM_VERSION')) {
|
67 |
+
$this->markTestSkipped('Skip under HHVM as the behavior is not the same as plain PHP (which is an edge case anyway)');
|
68 |
+
}
|
69 |
+
|
70 |
+
$node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'substr_compare'));
|
71 |
+
$node->getArguments('substr_compare', array('abcd', 'bc', 'offset' => 1, 'case_sensitivity' => true));
|
72 |
+
}
|
73 |
+
|
74 |
+
public function testResolveArgumentsOnlyNecessaryArgumentsForCustomFunction()
|
75 |
+
{
|
76 |
+
$node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_function'));
|
77 |
+
|
78 |
+
$this->assertEquals(array('arg1'), $node->getArguments(array($this, 'customFunction'), array('arg1' => 'arg1')));
|
79 |
+
}
|
80 |
+
|
81 |
+
public function testGetArgumentsForStaticMethod()
|
82 |
+
{
|
83 |
+
$node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_static_function'));
|
84 |
+
$this->assertEquals(array('arg1'), $node->getArguments(__CLASS__.'::customStaticFunction', array('arg1' => 'arg1')));
|
85 |
+
}
|
86 |
+
|
87 |
+
public static function customStaticFunction($arg1, $arg2 = 'default', $arg3 = array())
|
88 |
+
{
|
89 |
+
}
|
90 |
+
|
91 |
+
public function customFunction($arg1, $arg2 = 'default', $arg3 = array())
|
92 |
+
{
|
93 |
+
}
|
94 |
}
|
95 |
|
96 |
class Twig_Tests_Node_Expression_Call extends Twig_Node_Expression_Call
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Conditional::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr1 = new Twig_Node_Expression_Constant(1, 1);
|
@@ -26,15 +23,6 @@ class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase
|
|
26 |
$this->assertEquals($expr3, $node->getNode('expr3'));
|
27 |
}
|
28 |
|
29 |
-
/**
|
30 |
-
* @covers Twig_Node_Expression_Conditional::compile
|
31 |
-
* @dataProvider getTests
|
32 |
-
*/
|
33 |
-
public function testCompile($node, $source, $environment = null)
|
34 |
-
{
|
35 |
-
parent::testCompile($node, $source, $environment);
|
36 |
-
}
|
37 |
-
|
38 |
public function getTests()
|
39 |
{
|
40 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr1 = new Twig_Node_Expression_Constant(1, 1);
|
23 |
$this->assertEquals($expr3, $node->getNode('expr3'));
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
public function getTests()
|
27 |
{
|
28 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Constant::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_Expression_Constant('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('value'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_Expression_Constant::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_Expression_Constant('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('value'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Filter::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
@@ -26,15 +23,6 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
|
26 |
$this->assertEquals($args, $node->getNode('arguments'));
|
27 |
}
|
28 |
|
29 |
-
/**
|
30 |
-
* @covers Twig_Node_Expression_Filter::compile
|
31 |
-
* @dataProvider getTests
|
32 |
-
*/
|
33 |
-
public function testCompile($node, $source, $environment = null)
|
34 |
-
{
|
35 |
-
parent::testCompile($node, $source, $environment);
|
36 |
-
}
|
37 |
-
|
38 |
public function getTests()
|
39 |
{
|
40 |
$tests = array();
|
@@ -76,7 +64,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
|
76 |
$tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)');
|
77 |
|
78 |
// filter as an anonymous function
|
79 |
-
if (
|
80 |
$node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 1), 'anonymous');
|
81 |
$tests[] = array($node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), array("foo"))');
|
82 |
}
|
@@ -86,7 +74,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
|
86 |
|
87 |
/**
|
88 |
* @expectedException Twig_Error_Syntax
|
89 |
-
* @expectedExceptionMessage Unknown argument "foobar" for filter "date".
|
90 |
*/
|
91 |
public function testCompileWithWrongNamedArgumentName()
|
92 |
{
|
@@ -124,7 +112,7 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
|
124 |
|
125 |
protected function getEnvironment()
|
126 |
{
|
127 |
-
if (
|
128 |
return include 'PHP53/FilterInclude.php';
|
129 |
}
|
130 |
|
11 |
|
12 |
class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
23 |
$this->assertEquals($args, $node->getNode('arguments'));
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
public function getTests()
|
27 |
{
|
28 |
$tests = array();
|
64 |
$tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)');
|
65 |
|
66 |
// filter as an anonymous function
|
67 |
+
if (PHP_VERSION_ID >= 50300) {
|
68 |
$node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 1), 'anonymous');
|
69 |
$tests[] = array($node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), array("foo"))');
|
70 |
}
|
74 |
|
75 |
/**
|
76 |
* @expectedException Twig_Error_Syntax
|
77 |
+
* @expectedExceptionMessage Unknown argument "foobar" for filter "date(format, timezone)" at line 1.
|
78 |
*/
|
79 |
public function testCompileWithWrongNamedArgumentName()
|
80 |
{
|
112 |
|
113 |
protected function getEnvironment()
|
114 |
{
|
115 |
+
if (PHP_VERSION_ID >= 50300) {
|
116 |
return include 'PHP53/FilterInclude.php';
|
117 |
}
|
118 |
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Function::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$name = 'function';
|
@@ -24,15 +21,6 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($args, $node->getNode('arguments'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Expression_Function::compile
|
29 |
-
* @dataProvider getTests
|
30 |
-
*/
|
31 |
-
public function testCompile($node, $source, $environment = null)
|
32 |
-
{
|
33 |
-
parent::testCompile($node, $source, $environment);
|
34 |
-
}
|
35 |
-
|
36 |
public function getTests()
|
37 |
{
|
38 |
$environment = new Twig_Environment();
|
@@ -75,7 +63,7 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
|
75 |
$tests[] = array($node, 'twig_date_converter($this->env, 0, "America/Chicago")');
|
76 |
|
77 |
// function as an anonymous function
|
78 |
-
if (
|
79 |
$node = $this->createFunction('anonymous', array(new Twig_Node_Expression_Constant('foo', 1)));
|
80 |
$tests[] = array($node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), array("foo"))');
|
81 |
}
|
@@ -90,7 +78,7 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
|
90 |
|
91 |
protected function getEnvironment()
|
92 |
{
|
93 |
-
if (
|
94 |
return include 'PHP53/FunctionInclude.php';
|
95 |
}
|
96 |
|
11 |
|
12 |
class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$name = 'function';
|
21 |
$this->assertEquals($args, $node->getNode('arguments'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$environment = new Twig_Environment();
|
63 |
$tests[] = array($node, 'twig_date_converter($this->env, 0, "America/Chicago")');
|
64 |
|
65 |
// function as an anonymous function
|
66 |
+
if (PHP_VERSION_ID >= 50300) {
|
67 |
$node = $this->createFunction('anonymous', array(new Twig_Node_Expression_Constant('foo', 1)));
|
68 |
$tests[] = array($node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), array("foo"))');
|
69 |
}
|
78 |
|
79 |
protected function getEnvironment()
|
80 |
{
|
81 |
+
if (PHP_VERSION_ID >= 50300) {
|
82 |
return include 'PHP53/FunctionInclude.php';
|
83 |
}
|
84 |
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_GetAttr::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Name('foo', 1);
|
@@ -29,15 +26,6 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase
|
|
29 |
$this->assertEquals(Twig_Template::ARRAY_CALL, $node->getAttribute('type'));
|
30 |
}
|
31 |
|
32 |
-
/**
|
33 |
-
* @covers Twig_Node_Expression_GetAttr::compile
|
34 |
-
* @dataProvider getTests
|
35 |
-
*/
|
36 |
-
public function testCompile($node, $source, $environment = null)
|
37 |
-
{
|
38 |
-
parent::testCompile($node, $source, $environment);
|
39 |
-
}
|
40 |
-
|
41 |
public function getTests()
|
42 |
{
|
43 |
$tests = array();
|
@@ -46,16 +34,16 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase
|
|
46 |
$attr = new Twig_Node_Expression_Constant('bar', 1);
|
47 |
$args = new Twig_Node_Expression_Array(array(), 1);
|
48 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ANY_CALL, 1);
|
49 |
-
$tests[] = array($node, sprintf('%s%s, "bar")', $this->getAttributeGetter(), $this->getVariableGetter('foo')));
|
50 |
|
51 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1);
|
52 |
-
$tests[] = array($node, sprintf('%s%s, "bar", array(), "array")', $this->getAttributeGetter(), $this->getVariableGetter('foo')));
|
53 |
|
54 |
$args = new Twig_Node_Expression_Array(array(), 1);
|
55 |
$args->addElement(new Twig_Node_Expression_Name('foo', 1));
|
56 |
$args->addElement(new Twig_Node_Expression_Constant('bar', 1));
|
57 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::METHOD_CALL, 1);
|
58 |
-
$tests[] = array($node, sprintf('%s%s, "bar", array(0 => %s, 1 => "bar"), "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo'), $this->getVariableGetter('foo')));
|
59 |
|
60 |
return $tests;
|
61 |
}
|
11 |
|
12 |
class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Name('foo', 1);
|
26 |
$this->assertEquals(Twig_Template::ARRAY_CALL, $node->getAttribute('type'));
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
public function getTests()
|
30 |
{
|
31 |
$tests = array();
|
34 |
$attr = new Twig_Node_Expression_Constant('bar', 1);
|
35 |
$args = new Twig_Node_Expression_Array(array(), 1);
|
36 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ANY_CALL, 1);
|
37 |
+
$tests[] = array($node, sprintf('%s%s, "bar", array())', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1)));
|
38 |
|
39 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1);
|
40 |
+
$tests[] = array($node, sprintf('%s%s, "bar", array(), "array")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1)));
|
41 |
|
42 |
$args = new Twig_Node_Expression_Array(array(), 1);
|
43 |
$args->addElement(new Twig_Node_Expression_Name('foo', 1));
|
44 |
$args->addElement(new Twig_Node_Expression_Constant('bar', 1));
|
45 |
$node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::METHOD_CALL, 1);
|
46 |
+
$tests[] = array($node, sprintf('%s%s, "bar", array(0 => %s, 1 => "bar"), "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1), $this->getVariableGetter('foo')));
|
47 |
|
48 |
return $tests;
|
49 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Name::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_Expression_Name('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_Expression_Name::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$node = new Twig_Node_Expression_Name('foo', 1);
|
@@ -40,10 +28,10 @@ class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase
|
|
40 |
$env1 = new Twig_Environment(null, array('strict_variables' => false));
|
41 |
|
42 |
return array(
|
43 |
-
|
44 |
-
array($node, $this->getVariableGetter('foo'), $env1),
|
45 |
-
array($self,
|
46 |
-
array($context,
|
47 |
);
|
48 |
}
|
49 |
}
|
11 |
|
12 |
class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_Expression_Name('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$node = new Twig_Node_Expression_Name('foo', 1);
|
28 |
$env1 = new Twig_Environment(null, array('strict_variables' => false));
|
29 |
|
30 |
return array(
|
31 |
+
array($node, "// line 1\n".(PHP_VERSION_ID >= 50400 ? '(isset($context["foo"]) ? $context["foo"] : $this->getContext($context, "foo"))' : '$this->getContext($context, "foo")'), $env),
|
32 |
+
array($node, $this->getVariableGetter('foo', 1), $env1),
|
33 |
+
array($self, "// line 1\n\$this"),
|
34 |
+
array($context, "// line 1\n\$context"),
|
35 |
);
|
36 |
}
|
37 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Parent::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_Expression_Parent('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_Expression_Parent::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_Expression_Parent('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Test::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
@@ -26,15 +23,6 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
|
26 |
$this->assertEquals($name, $node->getAttribute('name'));
|
27 |
}
|
28 |
|
29 |
-
/**
|
30 |
-
* @covers Twig_Node_Expression_Test::compile
|
31 |
-
* @dataProvider getTests
|
32 |
-
*/
|
33 |
-
public function testCompile($node, $source, $environment = null)
|
34 |
-
{
|
35 |
-
parent::testCompile($node, $source, $environment);
|
36 |
-
}
|
37 |
-
|
38 |
public function getTests()
|
39 |
{
|
40 |
$tests = array();
|
@@ -44,7 +32,7 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
|
44 |
$tests[] = array($node, '(null === "foo")');
|
45 |
|
46 |
// test as an anonymous function
|
47 |
-
if (
|
48 |
$node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', array(new Twig_Node_Expression_Constant('foo', 1)));
|
49 |
$tests[] = array($node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), array("foo", "foo"))');
|
50 |
}
|
@@ -59,7 +47,7 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
|
59 |
|
60 |
protected function getEnvironment()
|
61 |
{
|
62 |
-
if (
|
63 |
return include 'PHP53/TestInclude.php';
|
64 |
}
|
65 |
|
11 |
|
12 |
class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
23 |
$this->assertEquals($name, $node->getAttribute('name'));
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
public function getTests()
|
27 |
{
|
28 |
$tests = array();
|
32 |
$tests[] = array($node, '(null === "foo")');
|
33 |
|
34 |
// test as an anonymous function
|
35 |
+
if (PHP_VERSION_ID >= 50300) {
|
36 |
$node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', array(new Twig_Node_Expression_Constant('foo', 1)));
|
37 |
$tests[] = array($node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), array("foo", "foo"))');
|
38 |
}
|
47 |
|
48 |
protected function getEnvironment()
|
49 |
{
|
50 |
+
if (PHP_VERSION_ID >= 50300) {
|
51 |
return include 'PHP53/TestInclude.php';
|
52 |
}
|
53 |
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Unary_Neg::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
@@ -22,23 +19,14 @@ class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($expr, $node->getNode('node'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Expression_Unary_Neg::compile
|
27 |
-
* @covers Twig_Node_Expression_Unary_Neg::operator
|
28 |
-
* @dataProvider getTests
|
29 |
-
*/
|
30 |
-
public function testCompile($node, $source, $environment = null)
|
31 |
-
{
|
32 |
-
parent::testCompile($node, $source, $environment);
|
33 |
-
}
|
34 |
-
|
35 |
public function getTests()
|
36 |
{
|
37 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
38 |
$node = new Twig_Node_Expression_Unary_Neg($node, 1);
|
39 |
|
40 |
return array(
|
41 |
-
array($node, '
|
|
|
42 |
);
|
43 |
}
|
44 |
}
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
19 |
$this->assertEquals($expr, $node->getNode('node'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
25 |
$node = new Twig_Node_Expression_Unary_Neg($node, 1);
|
26 |
|
27 |
return array(
|
28 |
+
array($node, '-1'),
|
29 |
+
array(new Twig_Node_Expression_Unary_Neg($node, 1), '- -1'),
|
30 |
);
|
31 |
}
|
32 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Unary_Not::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
@@ -22,23 +19,13 @@ class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($expr, $node->getNode('node'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Expression_Unary_Not::compile
|
27 |
-
* @covers Twig_Node_Expression_Unary_Not::operator
|
28 |
-
* @dataProvider getTests
|
29 |
-
*/
|
30 |
-
public function testCompile($node, $source, $environment = null)
|
31 |
-
{
|
32 |
-
parent::testCompile($node, $source, $environment);
|
33 |
-
}
|
34 |
-
|
35 |
public function getTests()
|
36 |
{
|
37 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
38 |
$node = new Twig_Node_Expression_Unary_Not($node, 1);
|
39 |
|
40 |
return array(
|
41 |
-
array($node, '
|
42 |
);
|
43 |
}
|
44 |
}
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
19 |
$this->assertEquals($expr, $node->getNode('node'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
25 |
$node = new Twig_Node_Expression_Unary_Not($node, 1);
|
26 |
|
27 |
return array(
|
28 |
+
array($node, '!1'),
|
29 |
);
|
30 |
}
|
31 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Expression_Unary_Pos::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
@@ -22,23 +19,13 @@ class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($expr, $node->getNode('node'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Expression_Unary_Pos::compile
|
27 |
-
* @covers Twig_Node_Expression_Unary_Pos::operator
|
28 |
-
* @dataProvider getTests
|
29 |
-
*/
|
30 |
-
public function testCompile($node, $source, $environment = null)
|
31 |
-
{
|
32 |
-
parent::testCompile($node, $source, $environment);
|
33 |
-
}
|
34 |
-
|
35 |
public function getTests()
|
36 |
{
|
37 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
38 |
$node = new Twig_Node_Expression_Unary_Pos($node, 1);
|
39 |
|
40 |
return array(
|
41 |
-
array($node, '
|
42 |
);
|
43 |
}
|
44 |
}
|
11 |
|
12 |
class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant(1, 1);
|
19 |
$this->assertEquals($expr, $node->getNode('node'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$node = new Twig_Node_Expression_Constant(1, 1);
|
25 |
$node = new Twig_Node_Expression_Unary_Pos($node, 1);
|
26 |
|
27 |
return array(
|
28 |
+
array($node, '+1'),
|
29 |
);
|
30 |
}
|
31 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/ForTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_For::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$keyTarget = new Twig_Node_Expression_AssignName('key', 1);
|
@@ -39,15 +36,6 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase
|
|
39 |
$this->assertEquals($else, $node->getNode('else'));
|
40 |
}
|
41 |
|
42 |
-
/**
|
43 |
-
* @covers Twig_Node_For::compile
|
44 |
-
* @dataProvider getTests
|
45 |
-
*/
|
46 |
-
public function testCompile($node, $source, $environment = null)
|
47 |
-
{
|
48 |
-
parent::testCompile($node, $source, $environment);
|
49 |
-
}
|
50 |
-
|
51 |
public function getTests()
|
52 |
{
|
53 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$keyTarget = new Twig_Node_Expression_AssignName('key', 1);
|
36 |
$this->assertEquals($else, $node->getNode('else'));
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
public function getTests()
|
40 |
{
|
41 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/IfTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_If::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$t = new Twig_Node(array(
|
@@ -31,15 +28,6 @@ class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase
|
|
31 |
$this->assertEquals($else, $node->getNode('else'));
|
32 |
}
|
33 |
|
34 |
-
/**
|
35 |
-
* @covers Twig_Node_If::compile
|
36 |
-
* @dataProvider getTests
|
37 |
-
*/
|
38 |
-
public function testCompile($node, $source, $environment = null)
|
39 |
-
{
|
40 |
-
parent::testCompile($node, $source, $environment);
|
41 |
-
}
|
42 |
-
|
43 |
public function getTests()
|
44 |
{
|
45 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$t = new Twig_Node(array(
|
28 |
$this->assertEquals($else, $node->getNode('else'));
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
public function getTests()
|
32 |
{
|
33 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Import::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$macro = new Twig_Node_Expression_Constant('foo.twig', 1);
|
@@ -24,15 +21,6 @@ class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase
|
|
24 |
$this->assertEquals($var, $node->getNode('var'));
|
25 |
}
|
26 |
|
27 |
-
/**
|
28 |
-
* @covers Twig_Node_Import::compile
|
29 |
-
* @dataProvider getTests
|
30 |
-
*/
|
31 |
-
public function testCompile($node, $source, $environment = null)
|
32 |
-
{
|
33 |
-
parent::testCompile($node, $source, $environment);
|
34 |
-
}
|
35 |
-
|
36 |
public function getTests()
|
37 |
{
|
38 |
$tests = array();
|
@@ -43,7 +31,7 @@ class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase
|
|
43 |
|
44 |
$tests[] = array($node, <<<EOF
|
45 |
// line 1
|
46 |
-
\$context["macro"] = \$this->
|
47 |
EOF
|
48 |
);
|
49 |
|
11 |
|
12 |
class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$macro = new Twig_Node_Expression_Constant('foo.twig', 1);
|
21 |
$this->assertEquals($var, $node->getNode('var'));
|
22 |
}
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getTests()
|
25 |
{
|
26 |
$tests = array();
|
31 |
|
32 |
$tests[] = array($node, <<<EOF
|
33 |
// line 1
|
34 |
+
\$context["macro"] = \$this->loadTemplate("foo.twig", null, 1);
|
35 |
EOF
|
36 |
);
|
37 |
|
vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Include::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant('foo.twig', 1);
|
@@ -29,15 +26,6 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase
|
|
29 |
$this->assertTrue($node->getAttribute('only'));
|
30 |
}
|
31 |
|
32 |
-
/**
|
33 |
-
* @covers Twig_Node_Include::compile
|
34 |
-
* @dataProvider getTests
|
35 |
-
*/
|
36 |
-
public function testCompile($node, $source, $environment = null)
|
37 |
-
{
|
38 |
-
parent::testCompile($node, $source, $environment);
|
39 |
-
}
|
40 |
-
|
41 |
public function getTests()
|
42 |
{
|
43 |
$tests = array();
|
@@ -46,7 +34,7 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase
|
|
46 |
$node = new Twig_Node_Include($expr, null, false, false, 1);
|
47 |
$tests[] = array($node, <<<EOF
|
48 |
// line 1
|
49 |
-
\$this->
|
50 |
EOF
|
51 |
);
|
52 |
|
@@ -59,8 +47,7 @@ EOF
|
|
59 |
$node = new Twig_Node_Include($expr, null, false, false, 1);
|
60 |
$tests[] = array($node, <<<EOF
|
61 |
// line 1
|
62 |
-
\$
|
63 |
-
\$template->display(\$context);
|
64 |
EOF
|
65 |
);
|
66 |
|
@@ -69,14 +56,14 @@ EOF
|
|
69 |
$node = new Twig_Node_Include($expr, $vars, false, false, 1);
|
70 |
$tests[] = array($node, <<<EOF
|
71 |
// line 1
|
72 |
-
\$this->
|
73 |
EOF
|
74 |
);
|
75 |
|
76 |
$node = new Twig_Node_Include($expr, $vars, true, false, 1);
|
77 |
$tests[] = array($node, <<<EOF
|
78 |
// line 1
|
79 |
-
\$this->
|
80 |
EOF
|
81 |
);
|
82 |
|
@@ -84,7 +71,7 @@ EOF
|
|
84 |
$tests[] = array($node, <<<EOF
|
85 |
// line 1
|
86 |
try {
|
87 |
-
\$this->
|
88 |
} catch (Twig_Error_Loader \$e) {
|
89 |
// ignore missing template
|
90 |
}
|
11 |
|
12 |
class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant('foo.twig', 1);
|
26 |
$this->assertTrue($node->getAttribute('only'));
|
27 |
}
|
28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
public function getTests()
|
30 |
{
|
31 |
$tests = array();
|
34 |
$node = new Twig_Node_Include($expr, null, false, false, 1);
|
35 |
$tests[] = array($node, <<<EOF
|
36 |
// line 1
|
37 |
+
\$this->loadTemplate("foo.twig", null, 1)->display(\$context);
|
38 |
EOF
|
39 |
);
|
40 |
|
47 |
$node = new Twig_Node_Include($expr, null, false, false, 1);
|
48 |
$tests[] = array($node, <<<EOF
|
49 |
// line 1
|
50 |
+
\$this->loadTemplate(((true) ? ("foo") : ("foo")), null, 1)->display(\$context);
|
|
|
51 |
EOF
|
52 |
);
|
53 |
|
56 |
$node = new Twig_Node_Include($expr, $vars, false, false, 1);
|
57 |
$tests[] = array($node, <<<EOF
|
58 |
// line 1
|
59 |
+
\$this->loadTemplate("foo.twig", null, 1)->display(array_merge(\$context, array("foo" => true)));
|
60 |
EOF
|
61 |
);
|
62 |
|
63 |
$node = new Twig_Node_Include($expr, $vars, true, false, 1);
|
64 |
$tests[] = array($node, <<<EOF
|
65 |
// line 1
|
66 |
+
\$this->loadTemplate("foo.twig", null, 1)->display(array("foo" => true));
|
67 |
EOF
|
68 |
);
|
69 |
|
71 |
$tests[] = array($node, <<<EOF
|
72 |
// line 1
|
73 |
try {
|
74 |
+
\$this->loadTemplate("foo.twig", null, 1)->display(array("foo" => true));
|
75 |
} catch (Twig_Error_Loader \$e) {
|
76 |
// ignore missing template
|
77 |
}
|
vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Macro::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node_Text('foo', 1);
|
@@ -25,15 +22,6 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
|
|
25 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
26 |
}
|
27 |
|
28 |
-
/**
|
29 |
-
* @covers Twig_Node_Macro::compile
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$body = new Twig_Node_Text('foo', 1);
|
@@ -46,11 +34,11 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
|
|
46 |
return array(
|
47 |
array($node, <<<EOF
|
48 |
// line 1
|
49 |
-
public function getfoo(\$
|
50 |
{
|
51 |
\$context = \$this->env->mergeGlobals(array(
|
52 |
-
"foo" => \$
|
53 |
-
"bar" => \$
|
54 |
));
|
55 |
|
56 |
\$blocks = array();
|
11 |
|
12 |
class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node_Text('foo', 1);
|
22 |
$this->assertEquals('foo', $node->getAttribute('name'));
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
public function getTests()
|
26 |
{
|
27 |
$body = new Twig_Node_Text('foo', 1);
|
34 |
return array(
|
35 |
array($node, <<<EOF
|
36 |
// line 1
|
37 |
+
public function getfoo(\$__foo__ = null, \$__bar__ = "Foo")
|
38 |
{
|
39 |
\$context = \$this->env->mergeGlobals(array(
|
40 |
+
"foo" => \$__foo__,
|
41 |
+
"bar" => \$__bar__,
|
42 |
));
|
43 |
|
44 |
\$blocks = array();
|
vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Module::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node_Text('foo', 1);
|
@@ -31,25 +28,9 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase
|
|
31 |
$this->assertEquals($filename, $node->getAttribute('filename'));
|
32 |
}
|
33 |
|
34 |
-
/**
|
35 |
-
* @covers Twig_Node_Module::compile
|
36 |
-
* @covers Twig_Node_Module::compileTemplate
|
37 |
-
* @covers Twig_Node_Module::compileMacros
|
38 |
-
* @covers Twig_Node_Module::compileClassHeader
|
39 |
-
* @covers Twig_Node_Module::compileDisplayHeader
|
40 |
-
* @covers Twig_Node_Module::compileDisplayBody
|
41 |
-
* @covers Twig_Node_Module::compileDisplayFooter
|
42 |
-
* @covers Twig_Node_Module::compileClassFooter
|
43 |
-
* @dataProvider getTests
|
44 |
-
*/
|
45 |
-
public function testCompile($node, $source, $environment = null)
|
46 |
-
{
|
47 |
-
parent::testCompile($node, $source, $environment);
|
48 |
-
}
|
49 |
-
|
50 |
public function getTests()
|
51 |
{
|
52 |
-
$twig = new Twig_Environment(
|
53 |
|
54 |
$tests = array();
|
55 |
|
@@ -65,7 +46,7 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase
|
|
65 |
<?php
|
66 |
|
67 |
/* foo.twig */
|
68 |
-
class
|
69 |
{
|
70 |
public function __construct(Twig_Environment \$env)
|
71 |
{
|
@@ -96,7 +77,7 @@ class __TwigTemplate_a2bfbf7dd6ab85666684fe9297f69363a3fc2046d90f22a317d380c1863
|
|
96 |
EOF
|
97 |
, $twig);
|
98 |
|
99 |
-
$import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1),
|
100 |
|
101 |
$body = new Twig_Node(array($import));
|
102 |
$extends = new Twig_Node_Expression_Constant('layout.twig', 1);
|
@@ -106,14 +87,14 @@ EOF
|
|
106 |
<?php
|
107 |
|
108 |
/* foo.twig */
|
109 |
-
class
|
110 |
{
|
111 |
public function __construct(Twig_Environment \$env)
|
112 |
{
|
113 |
parent::__construct(\$env);
|
114 |
|
115 |
-
|
116 |
-
|
117 |
\$this->blocks = array(
|
118 |
);
|
119 |
}
|
@@ -125,8 +106,9 @@ class __TwigTemplate_a2bfbf7dd6ab85666684fe9297f69363a3fc2046d90f22a317d380c1863
|
|
125 |
|
126 |
protected function doDisplay(array \$context, array \$blocks = array())
|
127 |
{
|
|
|
|
|
128 |
// line 1
|
129 |
-
\$context["macro"] = \$this->env->loadTemplate("foo.twig");
|
130 |
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
|
131 |
}
|
132 |
|
@@ -142,18 +124,19 @@ class __TwigTemplate_a2bfbf7dd6ab85666684fe9297f69363a3fc2046d90f22a317d380c1863
|
|
142 |
|
143 |
public function getDebugInfo()
|
144 |
{
|
145 |
-
return array ( 24 => 1,);
|
146 |
}
|
147 |
}
|
148 |
EOF
|
149 |
, $twig);
|
150 |
|
151 |
-
$
|
|
|
152 |
$extends = new Twig_Node_Expression_Conditional(
|
153 |
-
new Twig_Node_Expression_Constant(true,
|
154 |
-
new Twig_Node_Expression_Constant('foo',
|
155 |
-
new Twig_Node_Expression_Constant('foo',
|
156 |
-
|
157 |
);
|
158 |
|
159 |
$node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $filename);
|
@@ -161,15 +144,19 @@ EOF
|
|
161 |
<?php
|
162 |
|
163 |
/* foo.twig */
|
164 |
-
class
|
165 |
{
|
166 |
protected function doGetParent(array \$context)
|
167 |
{
|
168 |
-
|
|
|
169 |
}
|
170 |
|
171 |
protected function doDisplay(array \$context, array \$blocks = array())
|
172 |
{
|
|
|
|
|
|
|
173 |
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
|
174 |
}
|
175 |
|
@@ -185,7 +172,7 @@ class __TwigTemplate_a2bfbf7dd6ab85666684fe9297f69363a3fc2046d90f22a317d380c1863
|
|
185 |
|
186 |
public function getDebugInfo()
|
187 |
{
|
188 |
-
return array ();
|
189 |
}
|
190 |
}
|
191 |
EOF
|
11 |
|
12 |
class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node_Text('foo', 1);
|
28 |
$this->assertEquals($filename, $node->getAttribute('filename'));
|
29 |
}
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
public function getTests()
|
32 |
{
|
33 |
+
$twig = new Twig_Environment($this->getMock('Twig_LoaderInterface'));
|
34 |
|
35 |
$tests = array();
|
36 |
|
46 |
<?php
|
47 |
|
48 |
/* foo.twig */
|
49 |
+
class __TwigTemplate_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 extends Twig_Template
|
50 |
{
|
51 |
public function __construct(Twig_Environment \$env)
|
52 |
{
|
77 |
EOF
|
78 |
, $twig);
|
79 |
|
80 |
+
$import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1), 2);
|
81 |
|
82 |
$body = new Twig_Node(array($import));
|
83 |
$extends = new Twig_Node_Expression_Constant('layout.twig', 1);
|
87 |
<?php
|
88 |
|
89 |
/* foo.twig */
|
90 |
+
class __TwigTemplate_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 extends Twig_Template
|
91 |
{
|
92 |
public function __construct(Twig_Environment \$env)
|
93 |
{
|
94 |
parent::__construct(\$env);
|
95 |
|
96 |
+
// line 1
|
97 |
+
\$this->parent = \$this->loadTemplate("layout.twig", "foo.twig", 1);
|
98 |
\$this->blocks = array(
|
99 |
);
|
100 |
}
|
106 |
|
107 |
protected function doDisplay(array \$context, array \$blocks = array())
|
108 |
{
|
109 |
+
// line 2
|
110 |
+
\$context["macro"] = \$this->loadTemplate("foo.twig", "foo.twig", 2);
|
111 |
// line 1
|
|
|
112 |
\$this->parent->display(\$context, array_merge(\$this->blocks, \$blocks));
|
113 |
}
|
114 |
|
124 |
|
125 |
public function getDebugInfo()
|
126 |
{
|
127 |
+
return array ( 26 => 1, 24 => 2, 11 => 1,);
|
128 |
}
|
129 |
}
|
130 |
EOF
|
131 |
, $twig);
|
132 |
|
133 |
+
$set = new Twig_Node_Set(false, new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 4))), new Twig_Node(array(new Twig_Node_Expression_Constant("foo", 4))), 4);
|
134 |
+
$body = new Twig_Node(array($set));
|
135 |
$extends = new Twig_Node_Expression_Conditional(
|
136 |
+
new Twig_Node_Expression_Constant(true, 2),
|
137 |
+
new Twig_Node_Expression_Constant('foo', 2),
|
138 |
+
new Twig_Node_Expression_Constant('foo', 2),
|
139 |
+
2
|
140 |
);
|
141 |
|
142 |
$node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $filename);
|
144 |
<?php
|
145 |
|
146 |
/* foo.twig */
|
147 |
+
class __TwigTemplate_e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 extends Twig_Template
|
148 |
{
|
149 |
protected function doGetParent(array \$context)
|
150 |
{
|
151 |
+
// line 2
|
152 |
+
return \$this->loadTemplate(((true) ? ("foo") : ("foo")), "foo.twig", 2);
|
153 |
}
|
154 |
|
155 |
protected function doDisplay(array \$context, array \$blocks = array())
|
156 |
{
|
157 |
+
// line 4
|
158 |
+
\$context["foo"] = "foo";
|
159 |
+
// line 2
|
160 |
\$this->getParent(\$context)->display(\$context, array_merge(\$this->blocks, \$blocks));
|
161 |
}
|
162 |
|
172 |
|
173 |
public function getDebugInfo()
|
174 |
{
|
175 |
+
return array ( 17 => 2, 15 => 4, 9 => 2,);
|
176 |
}
|
177 |
}
|
178 |
EOF
|
vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Print::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
@@ -22,15 +19,6 @@ class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($expr, $node->getNode('expr'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Print::compile
|
27 |
-
* @dataProvider getTests
|
28 |
-
*/
|
29 |
-
public function testCompile($node, $source, $environment = null)
|
30 |
-
{
|
31 |
-
parent::testCompile($node, $source, $environment);
|
32 |
-
}
|
33 |
-
|
34 |
public function getTests()
|
35 |
{
|
36 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$expr = new Twig_Node_Expression_Constant('foo', 1);
|
19 |
$this->assertEquals($expr, $node->getNode('expr'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Sandbox::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node_Text('foo', 1);
|
@@ -22,15 +19,6 @@ class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($body, $node->getNode('body'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Sandbox::compile
|
27 |
-
* @dataProvider getTests
|
28 |
-
*/
|
29 |
-
public function testCompile($node, $source, $environment = null)
|
30 |
-
{
|
31 |
-
parent::testCompile($node, $source, $environment);
|
32 |
-
}
|
33 |
-
|
34 |
public function getTests()
|
35 |
{
|
36 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node_Text('foo', 1);
|
19 |
$this->assertEquals($body, $node->getNode('body'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_SandboxedPrint::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_SandboxedPrint($expr = new Twig_Node_Expression_Constant('foo', 1), 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals($expr, $node->getNode('expr'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_SandboxedPrint::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_SandboxedPrint($expr = new Twig_Node_Expression_Constant('foo', 1), 1);
|
18 |
$this->assertEquals($expr, $node->getNode('expr'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/SetTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Set::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
|
@@ -25,15 +22,6 @@ class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase
|
|
25 |
$this->assertFalse($node->getAttribute('capture'));
|
26 |
}
|
27 |
|
28 |
-
/**
|
29 |
-
* @covers Twig_Node_Set::compile
|
30 |
-
* @dataProvider getTests
|
31 |
-
*/
|
32 |
-
public function testCompile($node, $source, $environment = null)
|
33 |
-
{
|
34 |
-
parent::testCompile($node, $source, $environment);
|
35 |
-
}
|
36 |
-
|
37 |
public function getTests()
|
38 |
{
|
39 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1);
|
22 |
$this->assertFalse($node->getAttribute('capture'));
|
23 |
}
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
public function getTests()
|
26 |
{
|
27 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Spaceless::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
|
@@ -22,15 +19,6 @@ class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase
|
|
22 |
$this->assertEquals($body, $node->getNode('body'));
|
23 |
}
|
24 |
|
25 |
-
/**
|
26 |
-
* @covers Twig_Node_Spaceless::compile
|
27 |
-
* @dataProvider getTests
|
28 |
-
*/
|
29 |
-
public function testCompile($node, $source, $environment = null)
|
30 |
-
{
|
31 |
-
parent::testCompile($node, $source, $environment);
|
32 |
-
}
|
33 |
-
|
34 |
public function getTests()
|
35 |
{
|
36 |
$body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
|
11 |
|
12 |
class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
|
19 |
$this->assertEquals($body, $node->getNode('body'));
|
20 |
}
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
public function getTests()
|
23 |
{
|
24 |
$body = new Twig_Node(array(new Twig_Node_Text('<div> <div> foo </div> </div>', 1)));
|
vendor/twig/twig/test/Twig/Tests/Node/TextTest.php
CHANGED
@@ -11,9 +11,6 @@
|
|
11 |
|
12 |
class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase
|
13 |
{
|
14 |
-
/**
|
15 |
-
* @covers Twig_Node_Text::__construct
|
16 |
-
*/
|
17 |
public function testConstructor()
|
18 |
{
|
19 |
$node = new Twig_Node_Text('foo', 1);
|
@@ -21,15 +18,6 @@ class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase
|
|
21 |
$this->assertEquals('foo', $node->getAttribute('data'));
|
22 |
}
|
23 |
|
24 |
-
/**
|
25 |
-
* @covers Twig_Node_Text::compile
|
26 |
-
* @dataProvider getTests
|
27 |
-
*/
|
28 |
-
public function testCompile($node, $source, $environment = null)
|
29 |
-
{
|
30 |
-
parent::testCompile($node, $source, $environment);
|
31 |
-
}
|
32 |
-
|
33 |
public function getTests()
|
34 |
{
|
35 |
$tests = array();
|
11 |
|
12 |
class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase
|
13 |
{
|
|
|
|
|
|
|
14 |
public function testConstructor()
|
15 |
{
|
16 |
$node = new Twig_Node_Text('foo', 1);
|
18 |
$this->assertEquals('foo', $node->getAttribute('data'));
|
19 |
}
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
public function getTests()
|
22 |
{
|
23 |
$tests = array();
|
vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php
CHANGED
@@ -12,7 +12,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
|
|
12 |
{
|
13 |
public function testRenderBlockOptimizer()
|
14 |
{
|
15 |
-
$env = new Twig_Environment(
|
16 |
|
17 |
$stream = $env->parse($env->tokenize('{{ block("foo") }}', 'index'));
|
18 |
|
@@ -24,7 +24,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
|
|
24 |
|
25 |
public function testRenderParentBlockOptimizer()
|
26 |
{
|
27 |
-
$env = new Twig_Environment(
|
28 |
|
29 |
$stream = $env->parse($env->tokenize('{% extends "foo" %}{% block content %}{{ parent() }}{% endblock %}', 'index'));
|
30 |
|
@@ -36,11 +36,11 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
|
|
36 |
|
37 |
public function testRenderVariableBlockOptimizer()
|
38 |
{
|
39 |
-
if (
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
-
$env = new Twig_Environment(
|
44 |
$stream = $env->parse($env->tokenize('{{ block(name|lower) }}', 'index'));
|
45 |
|
46 |
$node = $stream->getNode('body')->getNode(0)->getNode(1);
|
@@ -54,7 +54,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
|
|
54 |
*/
|
55 |
public function testForOptimizer($template, $expected)
|
56 |
{
|
57 |
-
$env = new Twig_Environment(
|
58 |
|
59 |
$stream = $env->parse($env->tokenize($template, 'index'));
|
60 |
|
@@ -89,6 +89,16 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
|
|
89 |
array('{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)),
|
90 |
|
91 |
array('{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
);
|
93 |
}
|
94 |
|
12 |
{
|
13 |
public function testRenderBlockOptimizer()
|
14 |
{
|
15 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
16 |
|
17 |
$stream = $env->parse($env->tokenize('{{ block("foo") }}', 'index'));
|
18 |
|
24 |
|
25 |
public function testRenderParentBlockOptimizer()
|
26 |
{
|
27 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
28 |
|
29 |
$stream = $env->parse($env->tokenize('{% extends "foo" %}{% block content %}{{ parent() }}{% endblock %}', 'index'));
|
30 |
|
36 |
|
37 |
public function testRenderVariableBlockOptimizer()
|
38 |
{
|
39 |
+
if (PHP_VERSION_ID >= 50400) {
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false, 'autoescape' => false));
|
44 |
$stream = $env->parse($env->tokenize('{{ block(name|lower) }}', 'index'));
|
45 |
|
46 |
$node = $stream->getNode('body')->getNode(0)->getNode(1);
|
54 |
*/
|
55 |
public function testForOptimizer($template, $expected)
|
56 |
{
|
57 |
+
$env = new Twig_Environment($this->getMock('Twig_LoaderInterface'), array('cache' => false));
|
58 |
|
59 |
$stream = $env->parse($env->tokenize($template, 'index'));
|
60 |
|
89 |
array('{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)),
|
90 |
|
91 |
array('{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)),
|
92 |
+
|
93 |
+
array('{% for i in foo %}{{ include("foo") }}{% endfor %}', array('i' => true)),
|
94 |
+
|
95 |
+
array('{% for i in foo %}{{ include("foo", with_context = false) }}{% endfor %}', array('i' => false)),
|
96 |
+
|
97 |
+
array('{% for i in foo %}{{ include("foo", with_context = true) }}{% endfor %}', array('i' => true)),
|
98 |
+
|
99 |
+
array('{% for i in foo %}{{ include("foo", { "foo": "bar" }, with_context = false) }}{% endfor %}', array('i' => false)),
|
100 |
+
|
101 |
+
array('{% for i in foo %}{{ include("foo", { "foo": loop.index }, with_context = false) }}{% endfor %}', array('i' => true)),
|
102 |
);
|
103 |
}
|
104 |
|
vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends PHPUnit_Framework_TestCase
|
13 |
+
{
|
14 |
+
protected function getProfile()
|
15 |
+
{
|
16 |
+
$profile = new Twig_Profiler_Profile();
|
17 |
+
$index = new Twig_Profiler_Profile('index.twig', Twig_Profiler_Profile::TEMPLATE);
|
18 |
+
$profile->addProfile($index);
|
19 |
+
$body = new Twig_Profiler_Profile('embedded.twig', Twig_Profiler_Profile::BLOCK, 'body');
|
20 |
+
$body->leave();
|
21 |
+
$index->addProfile($body);
|
22 |
+
$embedded = new Twig_Profiler_Profile('embedded.twig', Twig_Profiler_Profile::TEMPLATE);
|
23 |
+
$included = new Twig_Profiler_Profile('included.twig', Twig_Profiler_Profile::TEMPLATE);
|
24 |
+
$embedded->addProfile($included);
|
25 |
+
$index->addProfile($embedded);
|
26 |
+
$included->leave();
|
27 |
+
$embedded->leave();
|
28 |
+
|
29 |
+
$macro = new Twig_Profiler_Profile('index.twig', Twig_Profiler_Profile::MACRO, 'foo');
|
30 |
+
$macro->leave();
|
31 |
+
$index->addProfile($macro);
|
32 |
+
|
33 |
+
$embedded = clone $embedded;
|
34 |
+
$index->addProfile($embedded);
|
35 |
+
usleep(500);
|
36 |
+
$embedded->leave();
|
37 |
+
|
38 |
+
usleep(4500);
|
39 |
+
$index->leave();
|
40 |
+
|
41 |
+
$profile->leave();
|
42 |
+
|
43 |
+
return $profile;
|
44 |
+
}
|
45 |
+
}
|
vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/BlackfireTest.php
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Tests_Profiler_Dumper_BlackfireTest extends Twig_Tests_Profiler_Dumper_AbstractTest
|
13 |
+
{
|
14 |
+
public function testDump()
|
15 |
+
{
|
16 |
+
$dumper = new Twig_Profiler_Dumper_Blackfire();
|
17 |
+
|
18 |
+
$this->assertStringMatchesFormat(<<<EOF
|
19 |
+
file-format: BlackfireProbe
|
20 |
+
cost-dimensions: wt mu pmu
|
21 |
+
request-start: %d.%d
|
22 |
+
|
23 |
+
main()//1 %d %d %d
|
24 |
+
main()==>index.twig//1 %d %d %d
|
25 |
+
index.twig==>embedded.twig::block(body)//1 %d %d 0
|
26 |
+
index.twig==>embedded.twig//2 %d %d %d
|
27 |
+
embedded.twig==>included.twig//2 %d %d %d
|
28 |
+
index.twig==>index.twig::macro(foo)//1 %d %d %d
|
29 |
+
EOF
|
30 |
+
, $dumper->dump($this->getProfile()));
|
31 |
+
}
|
32 |
+
}
|
vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/HtmlTest.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Tests_Profiler_Dumper_HtmlTest extends Twig_Tests_Profiler_Dumper_AbstractTest
|
13 |
+
{
|
14 |
+
public function testDump()
|
15 |
+
{
|
16 |
+
$dumper = new Twig_Profiler_Dumper_Html();
|
17 |
+
$this->assertStringMatchesFormat(<<<EOF
|
18 |
+
<pre>main <span style="color: #d44">%d.%dms/%d%</span>
|
19 |
+
└ <span style="background-color: #ffd">index.twig</span> <span style="color: #d44">%d.%dms/%d%</span>
|
20 |
+
└ embedded.twig::block(<span style="background-color: #dfd">body</span>)
|
21 |
+
└ <span style="background-color: #ffd">embedded.twig</span>
|
22 |
+
│ └ <span style="background-color: #ffd">included.twig</span>
|
23 |
+
└ index.twig::macro(<span style="background-color: #ddf">foo</span>)
|
24 |
+
└ <span style="background-color: #ffd">embedded.twig</span>
|
25 |
+
└ <span style="background-color: #ffd">included.twig</span>
|
26 |
+
</pre>
|
27 |
+
EOF
|
28 |
+
, $dumper->dump($this->getProfile()));
|
29 |
+
}
|
30 |
+
}
|
vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/TextTest.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Tests_Profiler_Dumper_TextTest extends Twig_Tests_Profiler_Dumper_AbstractTest
|
13 |
+
{
|
14 |
+
public function testDump()
|
15 |
+
{
|
16 |
+
$dumper = new Twig_Profiler_Dumper_Text();
|
17 |
+
$this->assertStringMatchesFormat(<<<EOF
|
18 |
+
main %d.%dms/%d%
|
19 |
+
└ index.twig %d.%dms/%d%
|
20 |
+
└ embedded.twig::block(body)
|
21 |
+
└ embedded.twig
|
22 |
+
│ └ included.twig
|
23 |
+
└ index.twig::macro(foo)
|
24 |
+
└ embedded.twig
|
25 |
+
└ included.twig
|
26 |
+
|
27 |
+
EOF
|
28 |
+
, $dumper->dump($this->getProfile()));
|
29 |
+
}
|
30 |
+
}
|
vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* This file is part of Twig.
|
5 |
+
*
|
6 |
+
* (c) Fabien Potencier
|
7 |
+
*
|
8 |
+
* For the full copyright and license information, please view the LICENSE
|
9 |
+
* file that was distributed with this source code.
|
10 |
+
*/
|
11 |
+
|
12 |
+
class Twig_Tests_Profiler_ProfileTest extends PHPUnit_Framework_TestCase
|
13 |
+
{
|
14 |
+
public function testConstructor()
|
15 |
+
{
|
16 |
+
$profile = new Twig_Profiler_Profile('template', 'type', 'name');
|
17 |
+
|
18 |
+
$this->assertEquals('template', $profile->getTemplate());
|
19 |
+
$this->assertEquals('type', $profile->getType());
|
20 |
+
$this->assertEquals('name', $profile->getName());
|
21 |
+
}
|
22 |
+
|
23 |
+
public function testIsRoot()
|
24 |
+
{
|
25 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::ROOT);
|
26 |
+
$this->assertTrue($profile->isRoot());
|
27 |
+
|
28 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::TEMPLATE);
|
29 |
+
$this->assertFalse($profile->isRoot());
|
30 |
+
}
|
31 |
+
|
32 |
+
public function testIsTemplate()
|
33 |
+
{
|
34 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::TEMPLATE);
|
35 |
+
$this->assertTrue($profile->isTemplate());
|
36 |
+
|
37 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::ROOT);
|
38 |
+
$this->assertFalse($profile->isTemplate());
|
39 |
+
}
|
40 |
+
|
41 |
+
public function testIsBlock()
|
42 |
+
{
|
43 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::BLOCK);
|
44 |
+
$this->assertTrue($profile->isBlock());
|
45 |
+
|
46 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::ROOT);
|
47 |
+
$this->assertFalse($profile->isBlock());
|
48 |
+
}
|
49 |
+
|
50 |
+
public function testIsMacro()
|
51 |
+
{
|
52 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::MACRO);
|
53 |
+
$this->assertTrue($profile->isMacro());
|
54 |
+
|
55 |
+
$profile = new Twig_Profiler_Profile('template', Twig_Profiler_Profile::ROOT);
|
56 |
+
$this->assertFalse($profile->isMacro());
|
57 |
+
}
|
58 |
+
|
59 |
+
public function testGetAddProfile()
|
60 |
+
{
|
61 |
+
$profile = new Twig_Profiler_Profile();
|
62 |
+
$profile->addProfile($a = new Twig_Profiler_Profile());
|
63 |
+
$profile->addProfile($b = new Twig_Profiler_Profile());
|
64 |
+
|
65 |
+
$this->assertSame(array($a, $b), $profile->getProfiles());
|
66 |
+
$this->assertSame(array($a, $b), iterator_to_array($profile));
|
67 |
+
}
|
68 |
+
|
69 |
+
public function testGetDuration()
|
70 |
+
{
|
71 |
+
$profile = new Twig_Profiler_Profile();
|
72 |
+
usleep(1);
|
73 |
+
$profile->leave();
|
74 |
+
|
75 |
+
$this->assertTrue($profile->getDuration() > 0, sprintf('Expected duration > 0, got: %f', $profile->getDuration()));
|
76 |
+
}
|
77 |
+
|
78 |
+
public function testSerialize()
|
79 |
+
{
|
80 |
+
$profile = new Twig_Profiler_Profile('template', 'type', 'name');
|
81 |
+
$profile1 = new Twig_Profiler_Profile('template1', 'type1', 'name1');
|
82 |
+
$profile->addProfile($profile1);
|
83 |
+
$profile->leave();
|
84 |
+
$profile1->leave();
|
85 |
+
|
86 |
+
$profile2 = unserialize(serialize($profile));
|
87 |
+
$profiles = $profile->getProfiles();
|
88 |
+
$this->assertCount(1, $profiles);
|
89 |
+
$profile3 = $profiles[0];
|
90 |
+
|
91 |
+
$this->assertEquals($profile->getTemplate(), $profile2->getTemplate());
|
92 |
+
$this->assertEquals($profile->getType(), $profile2->getType());
|
93 |
+
$this->assertEquals($profile->getName(), $profile2->getName());
|
94 |
+
$this->assertEquals($profile->getDuration(), $profile2->getDuration());
|
95 |
+
|
96 |
+
$this->assertEquals($profile1->getTemplate(), $profile3->getTemplate());
|
97 |
+
$this->assertEquals($profile1->getType(), $profile3->getType());
|
98 |
+
$this->assertEquals($profile1->getName(), $profile3->getName());
|
99 |
+
}
|
100 |
+
}
|
vendor/twig/twig/test/Twig/Tests/TemplateTest.php
CHANGED
@@ -28,6 +28,7 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
|
|
28 |
|
29 |
$context = array(
|
30 |
'string' => 'foo',
|
|
|
31 |
'array' => array('foo' => 'foo'),
|
32 |
'array_access' => new Twig_TemplateArrayAccessObject(),
|
33 |
'magic_exception' => new Twig_TemplateMagicPropertyObjectWithException(),
|
@@ -46,10 +47,12 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
|
|
46 |
{
|
47 |
$tests = array(
|
48 |
array('{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1', false),
|
|
|
49 |
array('{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1', false),
|
50 |
array('{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
|
51 |
array('{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1', false),
|
52 |
array('{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1', false),
|
|
|
53 |
array('{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1', false),
|
54 |
array('{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1', false),
|
55 |
array('{{ array_access.a }}', 'Method "a" for object "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
|
@@ -307,7 +310,7 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
|
|
307 |
foreach ($basicTests as $test) {
|
308 |
// properties cannot be numbers
|
309 |
if (($testObject[0] instanceof stdClass || $testObject[0] instanceof Twig_TemplatePropertyObject) && is_numeric($test[2])) {
|
310 |
-
|
311 |
}
|
312 |
|
313 |
if ('+4' === $test[2] && $methodObject === $testObject[0]) {
|
@@ -344,7 +347,7 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
|
|
344 |
}
|
345 |
}
|
346 |
|
347 |
-
$methodAndPropObject = new Twig_TemplateMethodAndPropObject;
|
348 |
|
349 |
// additional method tests
|
350 |
$tests = array_merge($tests, array(
|
@@ -368,7 +371,7 @@ class Twig_Tests_TemplateTest extends PHPUnit_Framework_TestCase
|
|
368 |
$tests = array_merge($tests, array(
|
369 |
array(false, null, 42, 'a', array(), $anyType, false, 'Impossible to access an attribute ("a") on a integer variable ("42")'),
|
370 |
array(false, null, "string", 'a', array(), $anyType, false, 'Impossible to access an attribute ("a") on a string variable ("string")'),
|
371 |
-
array(false, null, array(), 'a', array(), $anyType, false, 'Key "a"
|
372 |
));
|
373 |
|
374 |
// add twig_template_get_attributes tests
|
@@ -393,7 +396,7 @@ class Twig_TemplateTest extends Twig_Template
|
|
393 |
{
|
394 |
parent::__construct($env);
|
395 |
$this->useExtGetAttribute = $useExtGetAttribute;
|
396 |
-
|
397 |
}
|
398 |
|
399 |
public function getZero()
|
@@ -585,7 +588,6 @@ class Twig_TemplateMethodObject
|
|
585 |
|
586 |
public function getNull()
|
587 |
{
|
588 |
-
return null;
|
589 |
}
|
590 |
|
591 |
public function isBar()
|
28 |
|
29 |
$context = array(
|
30 |
'string' => 'foo',
|
31 |
+
'empty_array' => array(),
|
32 |
'array' => array('foo' => 'foo'),
|
33 |
'array_access' => new Twig_TemplateArrayAccessObject(),
|
34 |
'magic_exception' => new Twig_TemplateMagicPropertyObjectWithException(),
|
47 |
{
|
48 |
$tests = array(
|
49 |
array('{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1', false),
|
50 |
+
array('{{ empty_array["a"] }}', 'Key "a" does not exist as the array is empty in "%s" at line 1', false),
|
51 |
array('{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1', false),
|
52 |
array('{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
|
53 |
array('{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1', false),
|
54 |
array('{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1', false),
|
55 |
+
array('{{ empty_array.a }}', 'Key "a" does not exist as the array is empty in "%s" at line 1', false),
|
56 |
array('{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1', false),
|
57 |
array('{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1', false),
|
58 |
array('{{ array_access.a }}', 'Method "a" for object "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1', false),
|
310 |
foreach ($basicTests as $test) {
|
311 |
// properties cannot be numbers
|
312 |
if (($testObject[0] instanceof stdClass || $testObject[0] instanceof Twig_TemplatePropertyObject) && is_numeric($test[2])) {
|
313 |
+
continue;
|
314 |
}
|
315 |
|
316 |
if ('+4' === $test[2] && $methodObject === $testObject[0]) {
|
347 |
}
|
348 |
}
|
349 |
|
350 |
+
$methodAndPropObject = new Twig_TemplateMethodAndPropObject();
|
351 |
|
352 |
// additional method tests
|
353 |
$tests = array_merge($tests, array(
|
371 |
$tests = array_merge($tests, array(
|
372 |
array(false, null, 42, 'a', array(), $anyType, false, 'Impossible to access an attribute ("a") on a integer variable ("42")'),
|
373 |
array(false, null, "string", 'a', array(), $anyType, false, 'Impossible to access an attribute ("a") on a string variable ("string")'),
|
374 |
+
array(false, null, array(), 'a', array(), $anyType, false, 'Key "a" does not exist as the array is empty'),
|
375 |
));
|
376 |
|
377 |
// add twig_template_get_attributes tests
|
396 |
{
|
397 |
parent::__construct($env);
|
398 |
$this->useExtGetAttribute = $useExtGetAttribute;
|
399 |
+
self::$cache = array();
|
400 |
}
|
401 |
|
402 |
public function getZero()
|
588 |
|
589 |
public function getNull()
|
590 |
{
|
|
|
591 |
}
|
592 |
|
593 |
public function isBar()
|
vendor/twig/twig/test/Twig/Tests/escapingTest.php
CHANGED
@@ -6,7 +6,6 @@
|
|
6 |
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
9 |
-
|
10 |
class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
11 |
{
|
12 |
/**
|
@@ -17,7 +16,7 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
|
17 |
'"' => '"',
|
18 |
'<' => '<',
|
19 |
'>' => '>',
|
20 |
-
'&' => '&'
|
21 |
);
|
22 |
|
23 |
protected $htmlAttrSpecialChars = array(
|
@@ -227,7 +226,7 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
|
227 |
/**
|
228 |
* Convert a Unicode Codepoint to a literal UTF-8 character.
|
229 |
*
|
230 |
-
* @param
|
231 |
* @return string UTF-8 literal string
|
232 |
*/
|
233 |
protected function codepointToUtf8($codepoint)
|
@@ -256,7 +255,7 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
|
256 |
public function testJavascriptEscapingEscapesOwaspRecommendedRanges()
|
257 |
{
|
258 |
$immune = array(',', '.', '_'); // Exceptions to escaping ranges
|
259 |
-
for ($chr=0; $chr < 0xFF; $chr++) {
|
260 |
if ($chr >= 0x30 && $chr <= 0x39
|
261 |
|| $chr >= 0x41 && $chr <= 0x5A
|
262 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
@@ -279,7 +278,7 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
|
279 |
public function testHtmlAttributeEscapingEscapesOwaspRecommendedRanges()
|
280 |
{
|
281 |
$immune = array(',', '.', '-', '_'); // Exceptions to escaping ranges
|
282 |
-
for ($chr=0; $chr < 0xFF; $chr++) {
|
283 |
if ($chr >= 0x30 && $chr <= 0x39
|
284 |
|| $chr >= 0x41 && $chr <= 0x5A
|
285 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
@@ -301,8 +300,8 @@ class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
|
301 |
|
302 |
public function testCssEscapingEscapesOwaspRecommendedRanges()
|
303 |
{
|
304 |
-
|
305 |
-
for ($chr=0; $chr < 0xFF; $chr++) {
|
306 |
if ($chr >= 0x30 && $chr <= 0x39
|
307 |
|| $chr >= 0x41 && $chr <= 0x5A
|
308 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
6 |
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
|
7 |
* @license http://framework.zend.com/license/new-bsd New BSD License
|
8 |
*/
|
|
|
9 |
class Twig_Test_EscapingTest extends PHPUnit_Framework_TestCase
|
10 |
{
|
11 |
/**
|
16 |
'"' => '"',
|
17 |
'<' => '<',
|
18 |
'>' => '>',
|
19 |
+
'&' => '&',
|
20 |
);
|
21 |
|
22 |
protected $htmlAttrSpecialChars = array(
|
226 |
/**
|
227 |
* Convert a Unicode Codepoint to a literal UTF-8 character.
|
228 |
*
|
229 |
+
* @param int $codepoint Unicode codepoint in hex notation
|
230 |
* @return string UTF-8 literal string
|
231 |
*/
|
232 |
protected function codepointToUtf8($codepoint)
|
255 |
public function testJavascriptEscapingEscapesOwaspRecommendedRanges()
|
256 |
{
|
257 |
$immune = array(',', '.', '_'); // Exceptions to escaping ranges
|
258 |
+
for ($chr = 0; $chr < 0xFF; $chr++) {
|
259 |
if ($chr >= 0x30 && $chr <= 0x39
|
260 |
|| $chr >= 0x41 && $chr <= 0x5A
|
261 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
278 |
public function testHtmlAttributeEscapingEscapesOwaspRecommendedRanges()
|
279 |
{
|
280 |
$immune = array(',', '.', '-', '_'); // Exceptions to escaping ranges
|
281 |
+
for ($chr = 0; $chr < 0xFF; $chr++) {
|
282 |
if ($chr >= 0x30 && $chr <= 0x39
|
283 |
|| $chr >= 0x41 && $chr <= 0x5A
|
284 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
300 |
|
301 |
public function testCssEscapingEscapesOwaspRecommendedRanges()
|
302 |
{
|
303 |
+
// CSS has no exceptions to escaping ranges
|
304 |
+
for ($chr = 0; $chr < 0xFF; $chr++) {
|
305 |
if ($chr >= 0x30 && $chr <= 0x39
|
306 |
|| $chr >= 0x41 && $chr <= 0x5A
|
307 |
|| $chr >= 0x61 && $chr <= 0x7A) {
|
wunderground.php
CHANGED
@@ -1,8 +1,9 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Weather Underground
|
|
|
4 |
* Description: Get accurate and beautiful weather forecasts powered by Wunderground.com for your content or your sidebar.
|
5 |
-
* Version: 2.
|
6 |
* License: GPLv2 or later
|
7 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
8 |
* Author: Katz Web Services, Inc.
|
@@ -16,17 +17,19 @@ class Wunderground_Plugin {
|
|
16 |
/**
|
17 |
* Version used to prime style and script caches
|
18 |
*/
|
19 |
-
const version = '2.
|
20 |
|
21 |
var $logger;
|
22 |
var $is_debug = false;
|
23 |
|
24 |
static $file;
|
|
|
25 |
static $dir_path;
|
26 |
|
27 |
function __construct() {
|
28 |
|
29 |
self::$file = __FILE__;
|
|
|
30 |
self::$dir_path = plugin_dir_path( __FILE__ );
|
31 |
|
32 |
// Fire AJAX requests immediately
|
@@ -72,7 +75,9 @@ class Wunderground_Plugin {
|
|
72 |
include_once self::$dir_path.'inc/functions.php';
|
73 |
|
74 |
// Twig template autoloader
|
75 |
-
|
|
|
|
|
76 |
|
77 |
// Twig template setup
|
78 |
include_once self::$dir_path.'inc/class-template.php';
|
@@ -85,6 +90,7 @@ class Wunderground_Plugin {
|
|
85 |
include_once self::$dir_path.'inc/class-current-observation.php';
|
86 |
include_once self::$dir_path.'inc/class-station.php';
|
87 |
include_once self::$dir_path.'inc/class-forecast.php';
|
|
|
88 |
include_once self::$dir_path.'inc/class-alerts.php';
|
89 |
|
90 |
// Load the Wunderground wrapper class
|
1 |
<?php
|
2 |
/*
|
3 |
* Plugin Name: Weather Underground
|
4 |
+
* Plugin URI: https://github.com/katzwebservices/Wunderground#setting-up-the-plugin
|
5 |
* Description: Get accurate and beautiful weather forecasts powered by Wunderground.com for your content or your sidebar.
|
6 |
+
* Version: 2.1
|
7 |
* License: GPLv2 or later
|
8 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
* Author: Katz Web Services, Inc.
|
17 |
/**
|
18 |
* Version used to prime style and script caches
|
19 |
*/
|
20 |
+
const version = '2.1';
|
21 |
|
22 |
var $logger;
|
23 |
var $is_debug = false;
|
24 |
|
25 |
static $file;
|
26 |
+
|
27 |
static $dir_path;
|
28 |
|
29 |
function __construct() {
|
30 |
|
31 |
self::$file = __FILE__;
|
32 |
+
|
33 |
self::$dir_path = plugin_dir_path( __FILE__ );
|
34 |
|
35 |
// Fire AJAX requests immediately
|
75 |
include_once self::$dir_path.'inc/functions.php';
|
76 |
|
77 |
// Twig template autoloader
|
78 |
+
if( !class_exists('Twig_Autoloader') ) {
|
79 |
+
require_once self::$dir_path . 'vendor/twig/twig/lib/Twig/Autoloader.php';
|
80 |
+
}
|
81 |
|
82 |
// Twig template setup
|
83 |
include_once self::$dir_path.'inc/class-template.php';
|
90 |
include_once self::$dir_path.'inc/class-current-observation.php';
|
91 |
include_once self::$dir_path.'inc/class-station.php';
|
92 |
include_once self::$dir_path.'inc/class-forecast.php';
|
93 |
+
include_once self::$dir_path.'inc/class-alert.php';
|
94 |
include_once self::$dir_path.'inc/class-alerts.php';
|
95 |
|
96 |
// Load the Wunderground wrapper class
|