8000 Merge branch '3.4' into 4.4 · phpfour/symfony@c4e47fd · GitHub
[go: up one dir, main page]

Skip to content

Commit c4e47fd

Browse files
Merge branch '3.4' into 4.4
* 3.4: Fix DBAL deprecation [Form] Fix ChoiceType translation domain Add Tagalog translations for new form messages [Form] Add missing vietnamese translations sync translations from master add vietnamese translation for html5 color validation
2 parents a10ff4c + 3ae61ec commit c4e47fd

File tree

10 files changed

+376
-17
lines changed

10 files changed

+376
-17
lines changed

src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ public function deleteTokenBySeries($series)
8181
$sql = 'DELETE FROM rememberme_token WH 8000 ERE series=:series';
8282
$paramValues = ['series' => $series];
8383
$paramTypes = ['series' => \PDO::PARAM_STR];
84-
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
84+
if (method_exists($this->conn, 'executeStatement')) {
85+
$this->conn->executeStatement($sql, $paramValues, $paramTypes);
86+
} else {
87+
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
88+
}
8589
}
8690

8791
/**
@@ -101,7 +105,11 @@ public function updateToken($series, $tokenValue, \DateTime $lastUsed)
101105
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
102106
'series' => \PDO::PARAM_STR,
103107
];
104-
$updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
108+
if (method_exists($this->conn, 'executeStatement')) {
109+
$updated = $this->conn->executeStatement($sql, $paramValues, $paramTypes);
110+
} else {
111+
$updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes);
112+
}
105113
if ($updated < 1) {
106114
throw new TokenNotFoundException('No token found.');
107115
}
@@ -129,6 +137,10 @@ public function createNewToken(PersistentTokenInterface $token)
129137
'value' => \PDO::PARAM_STR,
130138
'lastUsed' => self::$useDeprecatedConstants ? Type::DATETIME : Types::DATETIME_MUTABLE,
131139
];
132-
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
140+
if (method_exists($this->conn, 'executeStatement')) {
141+
$this->conn->executeStatement($sql, $paramValues, $paramTypes);
142+
} else {
143+
$this->conn->executeUpdate($sql, $paramValues, $paramTypes);
144+
}
133145
}
134146
}

src/Symfony/Bridge/Doctrine/Tests/Security/RememberMe/DoctrineTokenProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private function bootstrapProvider()
7272
'driver' => 'pdo_sqlite',
7373
'url' => 'sqlite:///:memory:',
7474
]);
75-
$connection->executeUpdate(<<< 'SQL'
75+
$connection->{method_exists($this->conn, 'executeStatement') ? 'executeStatement' : 'executeUpdate'}(<<< 'SQL'
7676
CREATE TABLE rememberme_token (
7777
series char(88) UNIQUE PRIMARY KEY NOT NULL,
7878
value char(88) NOT NULL,

src/Symfony/Component/Cache/Traits/PdoTrait.php

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ public function createTable()
113113
$table->setPrimaryKey([$this->idCol]);
114114

115115
foreach ($schema->toSql($conn->getDatabasePlatform()) as $sql) {
116-
$conn->exec($sql);
116+
if (method_exists($conn, 'executeStatement')) {
117+
$conn->executeStatement($sql);
118+
} else {
119+
$conn->exec($sql);
120+
}
117121
}
118122

119123
return;
@@ -144,7 +148,11 @@ public function createTable()
144148
throw new \DomainException(sprintf('Creating the cache table is currently not implemented for PDO driver "%s".', $this->driver));
145149
}
146150

147-
$conn->exec($sql);
151+
if (method_exists($conn, 'executeStatement')) {
152+
$conn->executeStatement($sql);
153+
} else {
154+
$conn->exec($sql);
155+
}
148156
}
149157

150158
/**
@@ -256,7 +264,11 @@ protected function doClear($namespace)
256264
}
257265

258266
try {
259-
$conn->exec($sql);
267+
if (method_exists($conn, 'executeStatement')) {
268+
$conn->executeStatement($sql);
269+
} else {
270+
$conn->exec($sql);
271+
}
260272
} catch (TableNotFoundException $e) {
261273
} catch (\PDOException $e) {
262274
}

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ private function addSubForm(FormBuilderInterface $builder, string $name, ChoiceV
368368
'value' => $choiceView->value,
369369
'label' => $choiceView->label,
370370
'attr' => $choiceView->attr,
371-
'translation_domain' => $options['translation_domain'],
371+
'translation_domain' => $options['choice_translation_domain'],
372372
'block_name' => 'entry',
373373
];
374374

src/Symfony/Component/Form/Resources/translations/validators.en.xlf

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,102 @@
1818
<source>This value is not a valid HTML5 color.</source>
1919
<target>This value is not a valid HTML5 color.</target>
2020
</trans-unit>
21+
<trans-unit id="100">
22+
<source>Please enter a valid birthdate.</source>
23+
<target>Please enter a valid birthdate.</target>
24+
</trans-unit>
25+
<trans-unit id="101">
26+
<source>The selected choice is invalid.</source>
27+
<target>The selected choice is invalid.</target>
28+
</trans-unit>
29+
<trans-unit id="102">
30+
<source>The collection is invalid.</source>
31+
<target>The collection is invalid.</target>
32+
</trans-unit>
33+
<trans-unit id="103">
34+
<source>Please select a valid color.</source>
35+
<target>Please select a valid color.</target>
36+
</trans-unit>
37+
<trans-unit id="104">
38+
<source>Please select a valid country.</source>
39+
<target>Please select a valid country.</target>
40+
</trans-unit>
41+
<trans-unit id="105">
42+
<source>Please select a valid currency.</source>
43+
<target>Please select a valid currency.</target>
44+
</trans-unit>
45+
<trans-unit id="106">
46+
<source>Please choose a valid date interval.</source>
47+
<target>Please choose a valid date interval.</target>
48+
</trans-unit>
49+
<trans-unit id="107">
50+
<source>Please enter a valid date and time.</source>
51+
<target>Please enter a valid date and time.</target>
52+
</trans-unit>
53+
<trans-unit id="108">
54+
<source>Please enter a valid date.</source>
55+
<target>Please enter a valid date.</target>
56+
</trans-unit>
57+
<trans-unit id="109">
58+
<source>Please select a valid file.</source>
59+
<target>Please select a valid file.</target>
60+
</trans-unit>
61+
<trans-unit id="110">
62+
<source>The hidden field is invalid.</source>
63+
<target>The hidden field is invalid.</target>
64+
</trans-unit>
65+
<trans-unit id="111">
66+
<source>Please enter an integer.</source>
67+
<target>Please enter an integer.</target>
68+
</trans-unit>
69+
<trans-unit id="112">
70+
<source>Please select a valid language.</source>
71+
<target>Please select a valid language.</target>
72+
</trans-unit>
73+
<trans-unit id="113">
74+
<source>Please select a valid locale.</source>
75+
<target>Please select a valid locale.</target>
76+
</trans-unit>
77+
<trans-unit id="114">
78+
<source>Please enter a valid money amount.</source>
79+
<target>Please enter a valid money amount.</target>
80+
</trans-unit>
81+
<trans-unit id="115">
82+
<source>Please enter a number.</source>
83+
<target>Please enter a number.</target>
84+
</trans-unit>
85+
<trans-unit id="116">
86+
<source>The password is invalid.</source>
87+
<target>The password is invalid.</target>
88+
</trans-unit>
89+
<trans-unit id="117">
90+
<source>Please enter a percentage value.</source>
91+
<target>Please enter a percentage value.</target>
92+
</trans-unit>
93+
<trans-unit id="118">
94+
<source>The values do not match.</source>
95+
<target>The values do not match.</target>
96+
</trans-unit>
97+
<trans-unit id="119">
98+
<source>Please enter a valid time.</source>
99+
<target>Please enter a valid time.</target>
100+
</trans-unit>
101+
<trans-unit id="120">
102+
<source>Please select a valid timezone.</source>
103+
<target>Please select a valid timezone.</target>
104+
</trans-unit>
105+
<trans-unit id="121">
106+
<source>Please enter a valid URL.</source>
107+
<target>Please enter a valid URL.</target>
108+
</trans-unit>
109+
<trans-unit id="122">
110+
<source>Please enter a valid search term.</source>
111+
<target>Please enter a valid search term.</target>
112+
</trans-unit>
113+
<trans-unit id="123">
114+
<source>Please provide a valid phone number.</source>
115+
<target>Please provide a valid phone number.</target>
116+
</trans-unit>
21117
</body>
22118
</file>
23119
</xliff>

src/Symfony/Component/Form/Resources/translations/validators.tl.xlf

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,106 @@
1414
<source>The CSRF token is invalid. Please try to resubmit the form.</source>
1515
<target>Hindi balido ang CSRF token. Maagpasa muli ng isang pang porma.</target>
1616
</trans-unit>
17+
<trans-unit id="99">
18+
<source>This value is not a valid HTML5 color.</source>
19+
<target>Ang halagang ito ay hindi wastong HTML5 color.</target>
20+
</trans-unit>
21+
<trans-unit id="100">
22+
<source>Please enter a valid birthdate.</source>
23+
<target>Pakilagay ang tamang petsa ng kapanganakan.</target>
24+
</trans-unit>
25+
<trans-unit id="101">
26+
<source>The selected choice is invalid.</source>
27+
<target>Ang pinagpiliang sagot ay hindi tama.</target>
28+
</trans-unit>
29+
<trans-unit id="102">
30+
<source>The collection is invalid.</source>
31+
<target>Hindi balido ang koleksyon.</target>
32+
</trans-unit>
33+
<trans-unit id="103">
34+
<source>Please select a valid color.</source>
35+
<target>Pakipiliin ang nararapat na kulay.</target>
36+
</trans-unit>
37+
<trans-unit id="104">
38+
<source>Please select a valid country.</source>
39+
<target>Pakipiliin ang nararapat na bansa.</target>
40+
</trans-unit>
41+
<trans-unit id="105">
42+
<source>Please select a valid currency.</source>
43+
<target>Pakipiliin ang tamang pananalapi.</target>
44+
</trans-unit>
45+
<trans-unit id="106">
46+
<source>Please choose a valid date interval.</source>
47+
<target>Piliin ang wastong agwat ng petsa.</target>
48+
</trans-unit>
49+
<trans-unit id="107">
50+
<source>Please enter a valid date and time.</source>
51+
<target>Piliin ang wastong petsa at oras.</target>
52+
</trans-unit>
53+
<trans-unit id="108">
54+
<source>Please enter a valid date.</source>
55+
<target>Ilagay ang wastong petsa.</target>
56+
</trans-unit>
57+
<trans-unit id="109">
58+
<source>Please select a valid file.</source>
59+
<target>Piliin ang balidong file.</target>
60+
</trans-unit>
61+
<trans-unit id="110">
62+
<source>The hidden field is invalid.</source>
63+
<target>Hindi balido ang field na nakatago.</target>
64+
</trans-unit>
65+
<trans-unit id="111">
66+
<source>Please enter an integer.</source>
67+
<target>Pakilagay ang integer.</target>
68+
</trans-unit>
69+
<trans-unit id="112">
70+
<source>Please select a valid language.</source>
71+
<target>Piliin ang nararapat na lengguwahe.</target>
72+
</trans-unit>
73+
<trans-unit id="113">
74+
<source>Please select a valid locale.</source>
75+
<target>Pakipili ang nararapat na locale.</target>
76+
</trans-unit>
77+
<trans-unit < D96B span class="pl-e">id="114">
78+
<source>Please enter a valid money amount.</source>
79+
<target>Pakilagay ang tamang halaga ng pera.</target>
80+
</trans-unit>
81+
<trans-unit id="115">
82+
<source>Please enter a number.</source>
83+
<target>Ilagay ang numero.</target>
84+
</trans-unit>
85+
<trans-unit id="116">
86+
<source>The password is invalid.</source>
87+
<target>Hindi balido ang password.</target>
88+
</trans-unit>
89+
<trans-unit id="117">
90+
<source>Please enter a percentage value.</source>
91+
<target>Pakilagay ang tamang porsyento ng halaga.</target>
92+
</trans-unit>
93+
<trans-unit id="118">
94+
<source>The values do not match.</source>
95+
<target>Hindi tugma ang mga halaga.</target>
96+
</trans-unit>
97+
<trans-unit id="119">
98+
<source>Please enter a valid time.</source>
99+
<target>Pakilagay ang tamang oras.</target>
100+
</trans-unit>
101+
<trans-unit id="120">
102+
<source>Please select a valid timezone.</source>
103+
<target>Pakilagay ang tamang sona ng oras.</target>
104+
</trans-unit>
105+
<trans-unit id="121">
106+
<source>Please enter a valid URL.</source>
107+
<target>Pakilagay ang balidong URL.</target>
108+
</trans-unit>
109+
<trans-unit id="122">
110+
<source>Please enter a valid search term.</source>
111+
<target>Pakilagay ang balidong katagang sinasaliksik.</target>
112+
</trans-unit>
113+
<trans-unit id="123">
114+
<source>Please provide a valid phone number.</source>
115+
<target>Pakilagay ang balidong numero ng telepono.</target>
116+
</trans-unit>
17117
</body>
18118
</file>
19119
</xliff>

0 commit comments

Comments
 (0)
0