Skip to content

Commit

Permalink
Check also keycode attributes for shortcuts (#979)
Browse files Browse the repository at this point in the history
  • Loading branch information
flodolo authored Feb 4, 2020
1 parent 7792072 commit 6b4800c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/models/commandkeys.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
$source = Utils::getRepoStrings($reference_locale, $repo);
$target = Utils::getRepoStrings($locale, $repo);

// Get string IDs in target ending with '.key' or '.commandkey'
// Get string IDs in target ending with '.key', '.keycode', or '.commandkey'
$commandkey_ids = array_filter(
array_keys($target),
function ($entity) {
return Strings::endsWith($entity, ['.key', '.commandkey']);
return Strings::endsWith($entity, ['.key', '.keycode', '.commandkey']);
}
);

Expand Down Expand Up @@ -84,10 +84,11 @@ function ($entity) {
}

if (mb_strtoupper($target_ak) != mb_strtoupper($source_ak)) {
// We want to display the original shortcut, not the cleaned up version
$commandkey_results[] = [
'id' => $commandkey_id,
'source_shortcut' => $source_ak,
'target_shortcut' => $target_ak,
'source_shortcut' => $source[$commandkey_id],
'target_shortcut' => $target[$commandkey_id],
];
}
}
Expand Down

0 comments on commit 6b4800c

Please sign in to comment.