Skip to content

Commit 0c6d648

Browse files
committed
Try and get a more consistent output by sorting the Twig-translations alphabetically
1 parent 5f1cf0c commit 0c6d648

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SimpleSAML/Command/UpdateTranslatableStringsCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use function array_merge;
3232
use function dirname;
3333
use function in_array;
34+
use function ksort;
3435
use function sprintf;
3536

3637
class UpdateTranslatableStringsCommand extends Command
@@ -128,6 +129,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
128129
foreach ($twigTranslations as $t) {
129130
$domain = array_key_first($t);
130131
$translation = $t[$domain];
132+
ksort($translation);
131133
$trans = Translations::create($domain);
132134
foreach ($translation as $s) {
133135
$trans->add(Translation::create(null, $s));

0 commit comments

Comments
 (0)