[GH-ISSUE #5496] [BUG] lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart:32:15: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadButton'. #2447

Closed
opened 2026-03-23 21:22:28 +00:00 by mirror · 2 comments
Owner

Originally created by @lucasjinreal on GitHub (Jun 8, 2024).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5496

lib/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart:49:17: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeConfirmDeleteDialog'.
 - 'ThemeConfirmDeleteDialog' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'.
                LocaleKeys.button_cancel.tr(),
                ^^^^^^^^^^
lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart:32:15: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadButton'.
 - 'ThemeUploadButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'.
              LocaleKeys.settings_appearance_themeUpload_button.tr(),
              ^^^^^^^^^^
lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart:30:15: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadLearnMoreButton'.
 - 'ThemeUploadLearnMoreButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'.
              LocaleKeys.document_plugins_autoGeneratorLearnMore.tr(),
              ^^^^^^^^^^
lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart:44:25: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadLearnMoreButton'.
 - 'ThemeUploadLearnMoreButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'.
                        LocaleKeys
Originally created by @lucasjinreal on GitHub (Jun 8, 2024). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/5496 ``` lib/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart:49:17: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeConfirmDeleteDialog'. - 'ThemeConfirmDeleteDialog' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_confirm_delete_dialog.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'. LocaleKeys.button_cancel.tr(), ^^^^^^^^^^ lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart:32:15: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadButton'. - 'ThemeUploadButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_button.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'. LocaleKeys.settings_appearance_themeUpload_button.tr(), ^^^^^^^^^^ lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart:30:15: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadLearnMoreButton'. - 'ThemeUploadLearnMoreButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'. LocaleKeys.document_plugins_autoGeneratorLearnMore.tr(), ^^^^^^^^^^ lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart:44:25: Error: The getter 'LocaleKeys' isn't defined for the class 'ThemeUploadLearnMoreButton'. - 'ThemeUploadLearnMoreButton' is from 'package:appflowy/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart' ('lib/workspace/presentation/settings/widgets/theme_upload/theme_upload_learn_more_button.dart'). Try correcting the name to the name of an existing getter, or defining a getter or field named 'LocaleKeys'. LocaleKeys ```
Author
Owner

@Xazin commented on GitHub (Jun 9, 2024):

These errors appear when you haven't run the script to generate code for language keys. It's run as part of other scripts such as AF-Desktop: Clean and rebuild all.

The script is run like this

sh .\scripts\code_generation\language_files\generate_language_files

Notice that build_runner can fail, and in that case you would receive this error as well, if you didn't look at the output of the build command.

<!-- gh-comment-id:2156493736 --> @Xazin commented on GitHub (Jun 9, 2024): These errors appear when you haven't run the script to generate code for language keys. It's run as part of other scripts such as `AF-Desktop: Clean and rebuild all`. The script is run like this ```bash sh .\scripts\code_generation\language_files\generate_language_files ``` Notice that build_runner can fail, and in that case you would receive this error as well, if you didn't look at the output of the build command.
Author
Owner

@lucasjinreal commented on GitHub (Jun 10, 2024):

How a new eerorr got: :0: error: missing required module 'SwiftShims'

<!-- gh-comment-id:2157906163 --> @lucasjinreal commented on GitHub (Jun 10, 2024): How a new eerorr got: <unknown>:0: error: missing required module 'SwiftShims'
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#2447
No description provided.