Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0a9d724

Browse filesBrowse files
Merge branch '4.2' into 4.3
* 4.2: [Translation] Fixed case sensitivity of lint:xliff command fix type hint for salt in PasswordEncoderInterface Simplify code - catch \Throwable capture all exceptions fix typo in PR #31802 update italian validator translation Add missing translations
2 parents 0bf50cf + 9fbfc4c commit 0a9d724
Copy full SHA for 0a9d724

File tree

Expand file treeCollapse file tree

8 files changed

+81
-11
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+81
-11
lines changed

‎src/Symfony/Component/Filesystem/Filesystem.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Filesystem/Filesystem.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,6 @@ private static function box($func)
751751

752752
return $result;
753753
} catch (\Throwable $e) {
754-
} catch (\Exception $e) {
755754
}
756755
\restore_error_handler();
757756

‎src/Symfony/Component/HttpKernel/Kernel.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/Kernel.php
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,6 @@ protected function initializeContainer()
494494
$fresh = true;
495495
}
496496
} catch (\Throwable $e) {
497-
} catch (\Exception $e) {
498497
} finally {
499498
error_reporting($errorLevel);
500499
}
@@ -563,7 +562,6 @@ protected function initializeContainer()
563562
try {
564563
$oldContainer = include $cache->getPath();
565564
} catch (\Throwable $e) {
566-
} catch (\Exception $e) {
567565
} finally {
568566
error_reporting($errorLevel);
569567
}

‎src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ protected function demergePasswordAndSalt($mergedPasswordSalt)
4848
/**
4949
* Merges a password and a salt.
5050
*
51-
* @param string $password The password to be used
52-
* @param string $salt The salt to be used
51+
* @param string $password The password to be used
52+
* @param string|null $salt The salt to be used
5353
*
5454
* @return string a merged password and salt
5555
*

‎src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Encoder/PasswordEncoderInterface.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ interface PasswordEncoderInterface
2323
/**
2424
* Encodes the raw password.
2525
*
26-
* @param string $raw The password to encode
27-
* @param string $salt The salt
26+
* @param string $raw The password to encode
27+
* @param string|null $salt The salt
2828
*
2929
* @return string The encoded password
3030
*
@@ -36,9 +36,9 @@ public function encodePassword($raw, $salt);
3636
/**
3737
* Checks a raw password against an encoded password.
3838
*
39-
* @param string $encoded An encoded password
40-
* @param string $raw A raw password
41-
* @param string $salt The salt
39+
* @param string $encoded An encoded password
40+
* @param string $raw A raw password
41+
* @param string|null $salt The salt
4242
*
4343
* @return bool true if the password is valid, false otherwise
4444
*

‎src/Symfony/Component/Translation/Command/XliffLintCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Command/XliffLintCommand.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ private function validate($content, $file = null)
124124
$normalizedLocale = preg_quote(str_replace('-', '_', $targetLanguage), '/');
125125
// strict file names require translation files to be named '____.locale.xlf'
126126
// otherwise, both '____.locale.xlf' and 'locale.____.xlf' are allowed
127-
$expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.%s\.xlf/', $normalizedLocale) : sprintf('/^(.*\.%s\.xlf|%s\..*\.xlf)/', $normalizedLocale, $normalizedLocale);
127+
// also, the regexp matching must be case-insensitive, as defined for 'target-language' values
128+
// http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#target-language
129+
$expectedFilenamePattern = $this->requireStrictFileNames ? sprintf('/^.*\.(?i:%s)\.xlf/', $normalizedLocale) : sprintf('/^(.*\.(?i:%s)\.xlf|(?i:%s)\..*\.xlf)/', $normalizedLocale, $normalizedLocale);
128130

129131
if (0 === preg_match($expectedFilenamePattern, basename($file))) {
130132
$errors[] = [

‎src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Command/XliffLintCommandTest.php
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,17 @@ public function testLintIncorrectTargetLanguage()
9494
$this->assertContains('There is a mismatch between the language included in the file name ("messages.en.xlf") and the "es" value used in the "target-language" attribute of the file.', trim($tester->getDisplay()));
9595
}
9696

97+
public function testLintTargetLanguageIsCaseInsensitive()
98+
{
99+
$tester = $this->createCommandTester();
100+
$filename = $this->createFile('note', 'zh-cn', 'messages.zh_CN.xlf');
101+
102+
$tester->execute(['filename' => $filename], ['decorated' => false]);
103+
104+
$this->assertEquals(0, $tester->getStatusCode());
105+
$this->assertContains('[OK] All 1 XLIFF files contain valid syntax.', trim($tester->getDisplay()));
106+
}
107+
97108
/**
98109
* @expectedException \RuntimeException
99110
*/

‎src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.hr.xlf
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,34 @@
334334
<source>This value should be valid JSON.</source>
335335
<target>Ova vrijednost treba biti validan JSON.</target>
336336
</trans-unit>
337+
<trans-unit id="87">
338+
<source>This collection should contain only unique elements.</source>
339+
<target>Ova kolekcija treba sadržavati samo unikatne elemente.</target>
340+
</trans-unit>
341+
<trans-unit id="88">
342+
<source>This value should be positive.</source>
343+
<target>Ova vrijednost treba biti pozitivna.</target>
344+
</trans-unit>
345+
<trans-unit id="89">
346+
<source>This value should be either positive or zero.</source>
347+
<target>Ova vrijednost treba biti pozitivna ili jednaka nuli.</target>
348+
</trans-unit>
349+
<trans-unit id="90">
350+
<source>This value should be negative.</source>
351+
<target>Ova vrijednost treba biti negativna.</target>
352+
</trans-unit>
353+
<trans-unit id="91">
354+
<source>This value should be either negative or zero.</source>
355+
<target>Ova vrijednost treba biti negativna ili jednaka nuli.</target>
356+
</trans-unit>
357+
<trans-unit id="92">
358+
<source>This value is not a valid timezone.</source>
359+
<target>Ova vrijednost nije validna vremenska zona.</target>
360+
</trans-unit>
361+
<trans-unit id="93">
362+
<source>This password has been leaked in a data breach, it must not be used. Please use another password.</source>
363+
<target>Ova lozinka je procurila u nekom od sigurnosnih propusta, te je potrebno koristiti drugu lozinku.</target>
364+
</trans-unit>
337365
</body>
338366
</file>
339367
</xliff>

‎src/Symfony/Component/Validator/Resources/translations/validators.it.xlf

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Resources/translations/validators.it.xlf
+32Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,38 @@
330330
<source>This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.</source>
331331
<target>Questo codice identificativo bancario (BIC) non è associato all'IBAN {{ iban }}.</target>
332332
</trans-unit>
333+
<trans-unit id="86">
334+
<source>This value should be valid JSON.</source>
335+
<target>Questo valore dovrebbe essere un JSON valido.</target>
336+
</trans-unit>
337+
<trans-unit id="87">
338+
<source>This collection should contain only unique elements.</source>
339+
<target>Questa collezione dovrebbe contenere solo elementi unici.</target>
340+
</trans-unit>
341+
<trans-unit id="88">
342+
<source>This value should be positive.</source>
343+
<target>Questo valore dovrebbe essere positivo.</target>
344+
</trans-unit>
345+
<trans-unit id="89">
346+
<source>This value should be either positive or zero.</source>
347+
<target>Questo valore dovrebbe essere positivo oppure zero.</target>
348+
</trans-unit>
349+
<trans-unit id="90">
350+
<source>This value should be negative.</source>
351+
<target>Questo valore dovrebbe essere negativo.</target>
352+
</trans-unit>
353+
<trans-unit id="91">
354+
<source>This value should be either negative or zero.</source>
355+
<target>Questo valore dovrebbe essere negativo oppure zero.</target>
356+
</trans-unit>
357+
<trans-unit id="92">
358+
<source>This value is not a valid timezone.</source>
359+
<target>Questo valore non è un fuso orario valido.</target>
360+
</trans-unit>
361+
<trans-unit id="93">
362+
<source>This password has been leaked in a data breach, it must not be used. Please use another password.</source>
363+
<target>Questa password è trapelata durante una compromissione di dati, non deve essere usata. Si prega di usare una password diversa.</target>
364+
</trans-unit>
333365
</body>
334366
</file>
335367
</xliff>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.