Skip to content

Commit

Permalink
chore: add state (on/off) in flash accessibility (#1369)
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Christophe Drouin <[email protected]>
  • Loading branch information
jcdrouin21 authored Dec 19, 2024
1 parent 054a63b commit 03a9d6d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const TorchButton: React.FC<Props> = ({ active, onPress, children }) => {
return (
<TouchableOpacity
accessible={true}
accessibilityLabel={t('Scan.Torch')}
accessibilityLabel={active? t('Scan.TorchOn'): t('Scan.TorchOff')}
accessibilityRole={'button'}
testID={testIdWithKey('ScanTorch')}
style={[styles.container, { backgroundColor: active ? theme.ColorPallet.grayscale.white : undefined }]}
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ const translation = {
"UnableToHandleRedirection": "Unable to handle redirection",
"Close": "Close",
"Torch": "Flash",
"TorchOn": "Flash On",
"TorchOff": "Flash Off",
"ScanHelp": "Scan Help",
"ScanNow": "Scan Now",
"WhatToScan": "What QR Codes can be scanned?",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ const translation = {
"UnableToHandleRedirection": "Impossible de traiter la redirection",
"Close": "Fermer",
"Torch": "Flash",
"TorchOn": "Flash activé",
"TorchOff": "Flash désactivé",
"ScanHelp": "Aide à la numérisation",
"ScanNow": "Numériser maintenant",
"ScanOnySpecial": "Seuls les codes QR spéciaux peuvent être scannés par Bifold Wallet.",
Expand Down
2 changes: 2 additions & 0 deletions packages/legacy/core/App/localization/pt-br/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,8 @@ const translation = {
"UnableToHandleRedirection": "Não foi possível tratar redirecionamento",
"Close": "Fechar",
"Torch": "Flash",
"TorchOn": "Flash ligado",
"TorchOff": "Flash desligado",
"ScanHelp": "Ajuda do Scan",
"ScanNow": "Scaneie Agora",
"ScanOnySpecial": "Apenas QR codes especiais podem ser escaneados pela Bifold Wallet.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Array [
}
/>
<View
accessibilityLabel="Scan.Torch"
accessibilityLabel="Scan.TorchOff"
accessibilityRole="button"
accessibilityState={
Object {
Expand Down

0 comments on commit 03a9d6d

Please sign in to comment.