Closed stouvoli closed 1 year ago
Hello, Nobody to help on this?
Hi @stouvoli - apologies for the late reply. In order for this type to be visible to your localizations, can you please try adding the following to your l10n.yaml
file:
header: |
import 'package:amplify_authenticator/amplify_authenticator.dart';
Alternatively you can pass this as a flag to the flutter gen-l10n
command:
$ flutter gen-l10n \
--header="import 'package:amplify_authenticator/amplify_authenticator.dart';" \
# ... other params
Hello @dnys1,
Thanks for your reply. I have just checked my project. I see today another error message no more related to enum AuthenticatorStep. I do not know why but this enum is now visible from the project files. The new error is related to a syntaxe error in the Autenticator package buttons_en.arb file. The select statement is not correct. But I can solve this one. Thanks
"backTo": "Back to {previousStep, select, signUp{Sign Up}, signIn{Sign In}, confirmSignUp{Confirm Sign-up}, confirmSignInMfa{Confirm Sign-in} confirmSignInNewPassword{Confirm Sign-in} sendCode{Send Code} resetPassword{Reset Password} verifyUser{Verify User} confirmVerifyUser{Confirm Verify User}}", "@backTo": { "description": "Label of button to return to the previous step", "placeholders": { "previousStep": { "type": "AuthenticatorStep", "example": "signIn", "description": "The title of the previous step." } } },
1st error
Generating synthetic localizations package failed with 1 error: Exception: Placeholders used in selects must be of type 'String'
2nd error
[app_fr.arb:backTo] ICU Syntax Error: Expected "}" but found ",".
3rd error
[app_fr.arb:backTo] ICU Syntax Error: Select expressions must have an "other" case.
Description
Running my application is not working. I get error message below saying 'AuthenticatorStep' not found and 'AuthenticatorStep' isn't a type. I have setup localization and it is working fine except when I add the line below in the arb file.
The amplify_authenticator package is apparently correctly configured but the AuthenticatorStep enum is not visible from the generated arb files .dart_tool/flutter_gen/gen_l10n/app_localizations.dart, .dart_tool/flutter_gen/gen_l10n/app_localizations_en.dart and .dart_tool/flutter_gen/gen_l10n/app_localizations_en.dart.
Error message;
Eveything esle is working except this backTo.
Categories
Steps to Reproduce
Try to run the app.
Screenshots
No response
Platforms
Android Device/Emulator API Level
API 30
Environment
Dependencies
Device
N/A
OS
N/A
Deployment Method
Amplify CLI
CLI Version
10.5.2
Additional Context
No response
Amplify Config