Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

Remove generated files (#202)

Mike Wallacebda684052365
diff --git a/frontend/app_flowy/.gitignore b/frontend/app_flowy/.gitignore
index 3b89cfb188..b0edb07a9b 100644
--- a/frontend/app_flowy/.gitignore
+++ b/frontend/app_flowy/.gitignore
@@ -34,6 +34,9 @@
# Web related
lib/generated_plugin_registrant.dart
+# Language related generated files
+lib/generated/
+
# Symbolication related
app.*.symbols
diff --git a/frontend/app_flowy/.vscode/launch.json b/frontend/app_flowy/.vscode/launch.json
index adae73641b..d0b93e3b54 100644
--- a/frontend/app_flowy/.vscode/launch.json
+++ b/frontend/app_flowy/.vscode/launch.json
@@ -4,7 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
-
{
"name": "app_flowy",
"request": "launch",
@@ -19,5 +18,13 @@
"type": "dart",
"flutterMode": "profile"
},
+ {
+ "name": "Generate Language Files",
+ "request": "launch",
+ "program": "${workspaceRoot}/lib/main.dart",
+ "type": "dart",
+ "preLaunchTask": "Generate Language Files",
+ "cwd": "${workspaceRoot}"
+ },
]
}
\ No newline at end of file
diff --git a/frontend/app_flowy/.vscode/tasks.json b/frontend/app_flowy/.vscode/tasks.json
index 2c81e02c42..7aa58281ab 100644
--- a/frontend/app_flowy/.vscode/tasks.json
+++ b/frontend/app_flowy/.vscode/tasks.json
@@ -1,16 +1,16 @@
{
"version": "2.0.0",
// https://code.visualstudio.com/docs/editor/tasks
- //https://gist.github.com/deadalusai/9e13e36d61ec7fb72148
-
- // ${workspaceRoot}: the root folder of the team
- // ${file}: the current opened file
- // ${fileBasename}: the current opened file's basename
- // ${fileDirname}: the current opened file's dirname
- // ${fileExtname}: the current opened file's extension
- // ${cwd}: the current working directory of the spawned process
+ // https://gist.github.com/deadalusai/9e13e36d61ec7fb72148
+ // ${workspaceRoot}: the root folder of the team
+ // ${file}: the current opened file
+ // ${fileBasename}: the current opened file's basename
+ // ${fileDirname}: the current opened file's dirname
+ // ${fileExtname}: the current opened file's extension
+ // ${cwd}: the current working directory of the spawned process
"tasks": [
{
+ "label": "build_flowy_sdk",
"type": "shell",
"command": "sh ./scripts/build_sdk.sh",
"windows": {
@@ -21,7 +21,9 @@
"shell": {
"executable": "cmd.exe",
"args": [
- "/d", "/c", ".\\scripts\\build_sdk.cmd"
+ "/d",
+ "/c",
+ ".\\scripts\\build_sdk.cmd"
]
}
}
@@ -43,11 +45,31 @@
"group": "build",
"options": {
"cwd": "${workspaceFolder}/../"
- },
+ },
// "problemMatcher": [
- // "$rustc"
- // ],
- "label": "build_flowy_sdk"
+ // "$rustc"
+ // ],
+ },
+ {
+ "label": "Generate Language Files",
+ "type": "shell",
+ "command": "sh ./scripts/generate_language_files.sh",
+ "windows": {
+ "options": {
+ "shell": {
+ "executable": "cmd.exe",
+ "args": [
+ "/d",
+ "/c",
+ ".\\scripts\\generate_language_files.cmd"
+ ]
+ }
+ }
+ },
+ "group": "build",
+ "options": {
+ "cwd": "${workspaceFolder}/../"
+ },
}
]
}
\ No newline at end of file
diff --git a/frontend/app_flowy/lib/generated/codegen_loader.g.dart b/frontend/app_flowy/lib/generated/codegen_loader.g.dart
deleted file mode 100644
index ae47302061..0000000000
--- a/frontend/app_flowy/lib/generated/codegen_loader.g.dart
+++ /dev/null
@@ -1,399 +0,0 @@
-// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
-
-// ignore_for_file: prefer_single_quotes
-
-import 'dart:ui';
-
-import 'package:easy_localization/easy_localization.dart' show AssetLoader;
-
-class CodegenLoader extends AssetLoader{
- const CodegenLoader();
-
- @override
- Future<Map<String, dynamic>> load(String fullPath, Locale locale ) {
- return Future.value(mapLocales[locale.toString()]);
- }
-
- static const Map<String,dynamic> it_IT = {
- "appName": "AppFlowy",
- "defaultUsername": "Me",
- "welcomeText": "Benvenuto in @:appName",
- "githubStarText": "Vota su GitHub",
- "subscribeNewsletterText": "Sottoscrivi la Newsletter",
- "letsGoButtonText": "Andiamo",
- "title": "Titolo",
- "signUp": {
- "buttonText": "Registrati",
- "title": "Registrati per @:appName",
- "getStartedText": "Iniziamo",
- "emptyPasswordError": "La password non può essere vuota",
- "repeatPasswordEmptyError": "La password ripetuta non può essere vuota",
- "unmatchedPasswordError": "La password ripetuta non è uguale alla password",
- "alreadyHaveAnAccount": "Hai già un account?",
- "emailHint": "Email",
- "passwordHint": "Password",
- "repeatPasswordHint": "Ripeti password"
- },
- "signIn": {
- "loginTitle": "Accedi a @:appName",
- "loginButtonText": "Login",
- "buttonText": "Accedi",
- "forgotPassword": "Password Dimentica?",
- "emailHint": "Email",
- "passwordHint": "Password",
- "dontHaveAnAccount": "Non hai un account?",
- "repeatPasswordEmptyError": "La password ripetuta non può essere vuota",
- "unmatchedPasswordError": "La password ripetuta non è uguale alla password"
- },
- "workspace": {
- "create": "Crea spazio di lavoro",
- "hint": "spazio di lavoro",
- "notFoundError": "Spazio di lavoro non trovato"
- },
- "shareAction": {
- "buttonText": "Condividi",
- "workInProgress": "In corso",
- "markdown": "Markdown",
- "copyLink": "Copia Link"
- },
- "disclosureAction": {
- "rename": "Rinomina",
- "delete": "Cancella",
- "duplicate": "Duplica"
- },
- "blankPageTitle": "Pagina vuota",
- "newPageText": "Nuova pagina",
- "trash": {
- "text": "Cestino",
- "restoreAll": "Ripristina Tutto",
- "deleteAll": "Elimina Tutto",
- "pageHeader": {
- "fileName": "Nome file",
- "lastModified": "Ultima Modifica",
- "created": "Creato"
- }
- },
- "deletePagePrompt": {
- "text": "Questa pagina è nel Cestino",
- "restore": "Ripristina pagina",
- "deletePermanent": "Elimina definitivamente"
- },
- "dialogCreatePageNameHint": "Nome pagina",
- "questionBubble": {
- "whatsNew": "Cosa c'è di nuovo?",
- "help": "Aiuto & Supporto",
- "debug": {
- "name": "Informazioni di debug",
- "success": "Informazioni di debug copiate negli appunti!",
- "fail": "Impossibile copiare le informazioni di debug negli appunti"
- }
- },
- "menuAppHeader": {
- "addPageTooltip": "Aggiungi velocemente una pagina all'interno",
- "defaultNewPageName": "Senza titolo",
- "renameDialog": "Rinomina"
- },
- "toolbar": {
- "undo": "Undo",
- "redo": "Redo",
- "bold": "Grassetto",
- "italic": "Italico",
- "underline": "Sottolineato",
- "strike": "Barrato",
- "numList": "Lista numerata",
- "bulletList": "Lista a punti",
- "checkList": "Lista Controllo",
- "inlineCode": "Codice in linea",
- "quote": "Cita Blocco"
- },
- "contactsPage": {
- "title": "Contatti",
- "whatsHappening": "Cosa accadrà la prossima settimana?",
- "addContact": "Aggiungi Contatti",
- "editContact": "Modifica Contatti"
- },
- "button": {
- "OK": "OK",
- "Cancel": "Annulla",
- "signIn": "Accedi",
- "signOut": "Esci",
- "complete": "Completa",
- "save": "Salva"
- },
- "label": {
- "welcome": "Benvenuto!",
- "firstName": "Name",
- "middleName": "Secondo Name",
- "lastName": "Cognome",
- "stepX": "Passo {X}"
- },
- "oAuth": {
- "err": {
- "failedTitle": "Impossibile collegarsi al tuo account.",
- "failedMsg": "Si prega di verificare di aver completato il processo di iscrizione nel tuo browser."
- },
- "google": {
- "title": "GOOGLE SIGN-IN",
- "instruction1": "Al fine di importare i tuoi Contatti Google è necessario autorizzare questa applicaizone ad utilizzare il tuo beowser web.",
- "instruction2": "Copia questo codice nella tua clipboard premendo l'icona o selezionando il testo:",
- "instruction3": "Naviga sul seguente link con il tuo browser web e inserisci il codice seguente:",
- "instruction4": "Premi il bottono qui sotto quando hai completato l'iscrizione:"
- }
- }
-};
-static const Map<String,dynamic> en = {
- "appName": "AppFlowy",
- "defaultUsername": "Me",
- "welcomeText": "Welcome to @:appName",
- "githubStarText": "Star on GitHub",
- "subscribeNewsletterText": "Subscribe to Newsletter",
- "letsGoButtonText": "Let's Go",
- "title": "Title",
- "signUp": {
- "buttonText": "Sign Up",
- "title": "Sign Up to @:appName",
- "getStartedText": "Get Started",
- "emptyPasswordError": "Password can't be empty",
- "repeatPasswordEmptyError": "Repeat password can't be empty",
- "unmatchedPasswordError": "Repeat password is not the same as password",
- "alreadyHaveAnAccount": "Already have an account?",
- "emailHint": "Email",
- "passwordHint": "Password",
- "repeatPasswordHint": "Repeat password"
- },
- "signIn": {
- "loginTitle": "Login to @:appName",
- "loginButtonText": "Login",
- "buttonText": "Sign In",
- "forgotPassword": "Forgot Password?",
- "emailHint": "Email",
- "passwordHint": "Password",
- "dontHaveAnAccount": "Don't have an account?",
- "repeatPasswordEmptyError": "Repeat password can't be empty",
- "unmatchedPasswordError": "Repeat password is not the same as password"
- },
- "workspace": {
- "create": "Create workspace",
- "hint": "workspace",
- "notFoundError": "Workspace not found"
- },
- "shareAction": {
- "buttonText": "Share",
- "workInProgress": "Work in progress",
- "markdown": "Markdown",
- "copyLink": "Copy Link"
- },
- "disclosureAction": {
- "rename": "Rename",
- "delete": "Delete",
- "duplicate": "Duplicate"
- },
- "blankPageTitle": "Blank page",
- "newPageText": "New page",
- "trash": {
- "text": "Trash",
- "restoreAll": "Restore All",
- "deleteAll": "Delete All",
- "pageHeader": {
- "fileName": "File name",
- "lastModified": "Last Modified",
- "created": "Created"
- }
- },
- "deletePagePrompt": {
- "text": "This page is in Trash",
- "restore": "Restore page",
- "deletePermanent": "Delete permanently"
- },
- "dialogCreatePageNameHint": "Page name",
- "questionBubble": {
- "whatsNew": "What's new?",
- "help": "Help & Support",
- "debug": {
- "name": "Debug Info",
- "success": "Copied debug info to clipboard!",
- "fail": "Unable to copy debug info to clipboard"
- }
- },
- "menuAppHeader": {
- "addPageTooltip": "Quickly add a page inside",
- "defaultNewPageName": "Untitled",
- "renameDialog": "Rename"
- },
- "toolbar": {
- "undo": "Undo",
- "redo": "Redo",
- "bold": "Bold",
- "italic": "Italic",
- "underline": "Underline",
- "strike": "Strikethrough",
- "numList": "Numbered List",
- "bulletList": "Bulleted List",
- "checkList": "Check List",
- "inlineCode": "Inline Code",
- "quote": "Quote Block"
- },
- "contactsPage": {
- "title": "Contacts",
- "whatsHappening": "What's happening this week?",
- "addContact": "Add Contact",
- "editContact": "Edit Contact"
- },
- "button": {
- "OK": "OK",
- "Cancel": "Cancel",
- "signIn": "Sign In",
- "signOut": "Sign Out",
- "complete": "Complete",
- "save": "Save"
- },
- "label": {
- "welcome": "Welcome!",
- "firstName": "First Name",
- "middleName": "Middle Name",
- "lastName": "Last Name",
- "stepX": "Step {X}"
- },
- "oAuth": {
- "err": {
- "failedTitle": "Unable to connect to your account.",
- "failedMsg": "Please make sure you've completed the sign-in process in your browser."
- },
- "google": {
- "title": "GOOGLE SIGN-IN",
- "instruction1": "In order to import your Google Contacts, you'll need to authorize this application using your web browser.",
- "instruction2": "Copy this code to your clipboard by clicking the icon or selecting the text:",
- "instruction3": "Navigate to the following link in your web browser, and enter the above code:",
- "instruction4": "Press the button below when you've completed signup:"
- }
- }
-};
-static const Map<String,dynamic> zh_CN = {
- "appName": "Appflowy",
- "defaultUsername": "我",
- "welcomeText": "欢迎使用 @:appName",
- "githubStarText": "Star on GitHub",
- "subscribeNewsletterText": "消息订阅",
- "letsGoButtonText": "开始",
- "title": "标题",
- "signUp": {
- "buttonText": "注册",
- "title": "注册 @:appName 账户",
- "getStartedText": "开始",
- "emptyPasswordError": "密码不能为空",
- "repeatPasswordEmptyError": "确认密码不能为空",
- "unmatchedPasswordError": "两次密码输入不一致",
- "alreadyHaveAnAccount": "已有账户?",
- "emailHint": "邮箱",
- "passwordHint": "密码",
- "repeatPasswordHint": "确认密码"
- },
- "signIn": {
- "loginTitle": "登录 @:appName",
- "loginButtonText": "登录",
- "buttonText": "登录",
- "forgotPassword": "忘记密码?",
- "emailHint": "邮箱",
- "passwordHint": "密码",
- "dontHaveAnAccount": "没有已注册的账户?",
- "repeatPasswordEmptyError": "确认密码不能为空",
- "unmatchedPasswordError": "两次密码输入不一致"
- },
- "workspace": {
- "create": "新建空间",
- "hint": "空间",
- "notFoundError": "未知的空间"
- },
- "shareAction": {
- "buttonText": "分享",
- "workInProgress": "进行中",
- "markdown": "Markdown",
- "copyLink": "复制链接"
- },
- "disclosureAction": {
- "rename": "重命名",
- "delete": "删除",
- "duplicate": "复制"
- },
- "blankPageTitle": "空白页",
- "newPageText": "新页面",
- "trash": {
- "text": "回收站",
- "restoreAll": "全部恢复",
- "deleteAll": "全部删除",
- "pageHeader": {
- "fileName": "文件名",
- "lastModified": "最近修改",
- "created": "创建"
- }
- },
- "deletePagePrompt": {
- "text": "此页面已被移动至回收站",
- "restore": "恢复页面",
- "deletePermanent": "彻底删除"
- },
- "dialogCreatePageNameHint": "页面名称",
- "questionBubble": {
- "whatsNew": "新功能?",
- "help": "帮助 & 支持",
- "debug": {
- "name": "调试信息",
- "success": "将调试信息复制到剪贴板!",
- "fail": "无法将调试信息复制到剪贴板"
- }
- },
- "menuAppHeader": {
- "addPageTooltip": "在其中快速添加页面",
- "defaultNewPageName": "未命名页面",
- "renameDialog": "重命名"
- },
- "toolbar": {
- "undo": "撤销",
- "redo": "恢复",
- "bold": "加粗",
- "italic": "斜体",
- "underline": "下划线",
- "strike": "删除线",
- "numList": "有序列表",
- "bulletList": "无序列表",
- "checkList": "任务列表",
- "inlineCode": "内联代码",
- "quote": "块引用"
- },
- "contactsPage": {
- "title": "联系人",
- "whatsHappening": "这周发生了哪些事?",
- "addContact": "添加联系人",
- "editContact": "编辑联系人"
- },
- "button": {
- "OK": "确认",
- "Cancel": "取消",
- "signIn": "登录",
- "signOut": "登出",
- "complete": "完成",
- "save": "保存"
- },
- "label": {
- "welcome": "欢迎!",
- "firstName": "名",
- "middleName": "中间名",
- "lastName": "姓",
- "stepX": "第{X}步"
- },
- "oAuth": {
- "err": {
- "failedTitle": "无法连接到您的账户。",
- "failedMsg": "请确认您已在浏览器中完成登录。"
- },
- "google": {
- "title": "Google 账号登录",
- "instruction1": "为了导入您的 Google 联系人,您需要在浏览器中给予本程序授权。",
- "instruction2": "单击图标或选择文本复制到剪贴板:",
- "instruction3": "进入下面的链接,然后输入上面的代码:",
- "instruction4": "完成注册后,点击下面的按钮:"
- }
- }
-};
-static const Map<String, Map<String,dynamic>> mapLocales = {"it_IT": it_IT, "en": en, "zh_CN": zh_CN};
-}
diff --git a/frontend/app_flowy/lib/generated/locale_keys.g.dart b/frontend/app_flowy/lib/generated/locale_keys.g.dart
deleted file mode 100644
index 958e9b0e9e..0000000000
--- a/frontend/app_flowy/lib/generated/locale_keys.g.dart
+++ /dev/null
@@ -1,112 +0,0 @@
-// DO NOT EDIT. This is code generated via package:easy_localization/generate.dart
-
-abstract class LocaleKeys {
- static const appName = 'appName';
- static const defaultUsername = 'defaultUsername';
- static const welcomeText = 'welcomeText';
- static const githubStarText = 'githubStarText';
- static const subscribeNewsletterText = 'subscribeNewsletterText';
- static const letsGoButtonText = 'letsGoButtonText';
- static const title = 'title';
- static const signUp_buttonText = 'signUp.buttonText';
- static const signUp_title = 'signUp.title';
- static const signUp_getStartedText = 'signUp.getStartedText';
- static const signUp_emptyPasswordError = 'signUp.emptyPasswordError';
- static const signUp_repeatPasswordEmptyError = 'signUp.repeatPasswordEmptyError';
- static const signUp_unmatchedPasswordError = 'signUp.unmatchedPasswordError';
- static const signUp_alreadyHaveAnAccount = 'signUp.alreadyHaveAnAccount';
- static const signUp_emailHint = 'signUp.emailHint';
- static const signUp_passwordHint = 'signUp.passwordHint';
- static const signUp_repeatPasswordHint = 'signUp.repeatPasswordHint';
- static const signUp = 'signUp';
- static const signIn_loginTitle = 'signIn.loginTitle';
- static const signIn_loginButtonText = 'signIn.loginButtonText';
- static const signIn_buttonText = 'signIn.buttonText';
- static const signIn_forgotPassword = 'signIn.forgotPassword';
- static const signIn_emailHint = 'signIn.emailHint';
- static const signIn_passwordHint = 'signIn.passwordHint';
- static const signIn_dontHaveAnAccount = 'signIn.dontHaveAnAccount';
- static const signIn_repeatPasswordEmptyError = 'signIn.repeatPasswordEmptyError';
- static const signIn_unmatchedPasswordError = 'signIn.unmatchedPasswordError';
- static const signIn = 'signIn';
- static const workspace_create = 'workspace.create';
- static const workspace_hint = 'workspace.hint';
- static const workspace_notFoundError = 'workspace.notFoundError';
- static const workspace = 'workspace';
- static const shareAction_buttonText = 'shareAction.buttonText';
- static const shareAction_workInProgress = 'shareAction.workInProgress';
- static const shareAction_markdown = 'shareAction.markdown';
- static const shareAction_copyLink = 'shareAction.copyLink';
- static const shareAction = 'shareAction';
- static const disclosureAction_rename = 'disclosureAction.rename';
- static const disclosureAction_delete = 'disclosureAction.delete';
- static const disclosureAction_duplicate = 'disclosureAction.duplicate';
- static const disclosureAction = 'disclosureAction';
- static const blankPageTitle = 'blankPageTitle';
- static const newPageText = 'newPageText';
- static const trash_text = 'trash.text';
- static const trash_restoreAll = 'trash.restoreAll';
- static const trash_deleteAll = 'trash.deleteAll';
- static const trash_pageHeader_fileName = 'trash.pageHeader.fileName';
- static const trash_pageHeader_lastModified = 'trash.pageHeader.lastModified';
- static const trash_pageHeader_created = 'trash.pageHeader.created';
- static const trash_pageHeader = 'trash.pageHeader';
- static const trash = 'trash';
- static const deletePagePrompt_text = 'deletePagePrompt.text';
- static const deletePagePrompt_restore = 'deletePagePrompt.restore';
- static const deletePagePrompt_deletePermanent = 'deletePagePrompt.deletePermanent';
- static const deletePagePrompt = 'deletePagePrompt';
- static const dialogCreatePageNameHint = 'dialogCreatePageNameHint';
- static const questionBubble_whatsNew = 'questionBubble.whatsNew';
- static const questionBubble_help = 'questionBubble.help';
- static const questionBubble_debug_name = 'questionBubble.debug.name';
- static const questionBubble_debug_success = 'questionBubble.debug.success';
- static const questionBubble_debug_fail = 'questionBubble.debug.fail';
- static const questionBubble_debug = 'questionBubble.debug';
- static const questionBubble = 'questionBubble';
- static const menuAppHeader_addPageTooltip = 'menuAppHeader.addPageTooltip';
- static const menuAppHeader_defaultNewPageName = 'menuAppHeader.defaultNewPageName';
- static const menuAppHeader_renameDialog = 'menuAppHeader.renameDialog';
- static const menuAppHeader = 'menuAppHeader';
- static const toolbar_undo = 'toolbar.undo';
- static const toolbar_redo = 'toolbar.redo';
- static const toolbar_bold = 'toolbar.bold';
- static const toolbar_italic = 'toolbar.italic';
- static const toolbar_underline = 'toolbar.underline';
- static const toolbar_strike = 'toolbar.strike';
- static const toolbar_numList = 'toolbar.numList';
- static const toolbar_bulletList = 'toolbar.bulletList';
- static const toolbar_checkList = 'toolbar.checkList';
- static const toolbar_inlineCode = 'toolbar.inlineCode';
- static const toolbar_quote = 'toolbar.quote';
- static const toolbar = 'toolbar';
- static const contactsPage_title = 'contactsPage.title';
- static const contactsPage_whatsHappening = 'contactsPage.whatsHappening';
- static const contactsPage_addContact = 'contactsPage.addContact';
- static const contactsPage_editContact = 'contactsPage.editContact';
- static const contactsPage = 'contactsPage';
- static const button_OK = 'button.OK';
- static const button_Cancel = 'button.Cancel';
- static const button_signIn = 'button.signIn';
- static const button_signOut = 'button.signOut';
- static const button_complete = 'button.complete';
- static const button_save = 'button.save';
- static const button = 'button';
- static const label_welcome = 'label.welcome';
- static const label_firstName = 'label.firstName';
- static const label_middleName = 'label.middleName';
- static const label_lastName = 'label.lastName';
- static const label_stepX = 'label.stepX';
- static const label = 'label';
- static const oAuth_err_failedTitle = 'oAuth.err.failedTitle';
- static const oAuth_err_failedMsg = 'oAuth.err.failedMsg';
- static const oAuth_err = 'oAuth.err';
- static const oAuth_google_title = 'oAuth.google.title';
- static const oAuth_google_instruction1 = 'oAuth.google.instruction1';
- static const oAuth_google_instruction2 = 'oAuth.google.instruction2';
- static const oAuth_google_instruction3 = 'oAuth.google.instruction3';
- static const oAuth_google_instruction4 = 'oAuth.google.instruction4';
- static const oAuth_google = 'oAuth.google';
- static const oAuth = 'oAuth';
-
-}
diff --git a/frontend/scripts/generate_language_files.sh b/frontend/scripts/generate_language_files.sh
new file mode 100644
index 0000000000..6ef0b175f0
--- /dev/null
+++ b/frontend/scripts/generate_language_files.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+#!/usr/bin/env fish
+echo 'Generating language files'
+cd app_flowy
+flutter pub run easy_localization:generate -S assets/translations/
+flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations
diff --git a/frontend/scripts/makefile/flutter.toml b/frontend/scripts/makefile/flutter.toml
index f48c1e6255..20705fb81a 100644
--- a/frontend/scripts/makefile/flutter.toml
+++ b/frontend/scripts/makefile/flutter.toml
@@ -5,16 +5,16 @@ linux_alias = "appflowy-linux"
[tasks.appflowy-macos]
dependencies = ["flowy-sdk-release"]
-run_task = { name = ["flutter-build", "copy-to-product"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.appflowy-windows]
dependencies = ["flowy-sdk-release"]
-run_task = { name = ["flutter-build", "copy-to-product"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product"] }
[tasks.appflowy-linux]
dependencies = ["flowy-sdk-release"]
-run_task = { name = ["flutter-build", "copy-to-product", "create-release-archive"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product", "create-release-archive"] }
script_runner = "@shell"
[tasks.appflowy-dev]
@@ -24,16 +24,16 @@ linux_alias = "appflowy-linux-dev"
[tasks.appflowy-macos-dev]
dependencies = ["flowy-sdk-dev"]
-run_task = { name = ["flutter-build", "copy-to-product"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.appflowy-windows-dev]
dependencies = ["flowy-sdk-dev"]
-run_task = { name = ["flutter-build", "copy-to-product"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product"] }
[tasks.appflowy-linux-dev]
dependencies = ["flowy-sdk-dev"]
-run_task = { name = ["flutter-build", "copy-to-product"] }
+run_task = { name = ["generate_language_files", "flutter-build", "copy-to-product"] }
script_runner = "@shell"
[tasks.copy-to-product]
@@ -174,4 +174,15 @@ script = [
]
script_runner = "@shell"
+[tasks.generate_language_files]
+script = [
+ """
+ cd app_flowy/
+ flutter clean
+ flutter pub get
+ flutter pub run easy_localization:generate -S assets/translations/
+ flutter pub run easy_localization:generate -f keys -o locale_keys.g.dart -S assets/translations
+ """,
+]
+script_runner = "@shell"