Skip to content

Commit

Permalink
fix: add translation to header title in AttemptLockout Screen (#1352)
Browse files Browse the repository at this point in the history
Signed-off-by: fc-santos <[email protected]>
  • Loading branch information
fc-santos authored Dec 10, 2024
1 parent 43b3ce6 commit fbf90c9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/legacy/core/App/localization/pt-br/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ const translation = {
"ChooseProofRequest": "Escolha um pedido de prova",
"ProofRequestUsageHistory": "Histórico de uso",
"CreateConnectionInvitation": "Criar um convite de conexão",
"AttemptLockout": "Temporarily Locked (PT-BR)",
"NameWallet": "Nomear sua carteira",
"RenameContact": "Editar nome do contato",
"HistorySettings": "History Settings",
Expand Down
43 changes: 33 additions & 10 deletions packages/legacy/core/App/navigators/OnboardingStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,44 @@ const OnboardingStack: React.FC = () => {
const theme = useTheme()
const OnboardingTheme = theme.OnboardingTheme
const carousel = createCarouselStyle(OnboardingTheme)
const [splash, pages, useBiometry, Onboarding, Developer, { screen: Terms }, onTutorialCompletedCurried, ScreenOptionsDictionary, Preface] = useServices([TOKENS.SCREEN_SPLASH, TOKENS.SCREEN_ONBOARDING_PAGES, TOKENS.SCREEN_USE_BIOMETRY, TOKENS.SCREEN_ONBOARDING, TOKENS.SCREEN_DEVELOPER, TOKENS.SCREEN_TERMS, TOKENS.FN_ONBOARDING_DONE, TOKENS.OBJECT_SCREEN_CONFIG, TOKENS.SCREEN_PREFACE])
const [
splash,
pages,
useBiometry,
Onboarding,
Developer,
{ screen: Terms },
onTutorialCompletedCurried,
ScreenOptionsDictionary,
Preface,
] = useServices([
TOKENS.SCREEN_SPLASH,
TOKENS.SCREEN_ONBOARDING_PAGES,
TOKENS.SCREEN_USE_BIOMETRY,
TOKENS.SCREEN_ONBOARDING,
TOKENS.SCREEN_DEVELOPER,
TOKENS.SCREEN_TERMS,
TOKENS.FN_ONBOARDING_DONE,
TOKENS.OBJECT_SCREEN_CONFIG,
TOKENS.SCREEN_PREFACE,
])
const defaultStackOptions = useDefaultStackOptions(theme)
const navigation = useNavigation<StackNavigationProp<AuthenticateStackParams>>()
const onTutorialCompleted = onTutorialCompletedCurried(dispatch, navigation)
const [{ disableOnboardingSkip }] = useServices([TOKENS.CONFIG])

const onAuthenticated = useCallback((status: boolean): void => {
if (!status) {
return
}
const onAuthenticated = useCallback(
(status: boolean): void => {
if (!status) {
return
}

dispatch({
type: DispatchAction.DID_AUTHENTICATE,
})
}, [dispatch])
dispatch({
type: DispatchAction.DID_AUTHENTICATE,
})
},
[dispatch]
)

const OnBoardingScreen = () => {
return (
Expand Down Expand Up @@ -164,7 +187,7 @@ const OnboardingStack: React.FC = () => {
{
name: Screens.AttemptLockout,
component: AttemptLockout,
options: () => ({ headerShown: true, headerLeft: () => null }),
options: () => ({ headerShown: true, headerLeft: () => null, title: t('Screens.AttemptLockout') }),
},
]

Expand Down

0 comments on commit fbf90c9

Please sign in to comment.