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.
Dart blogconfluence-alternativecontent-managementcontent-servicesdocumentationflutternote-takingnotion-alternativeproject-managementtask-managementteam-collaborationwiki
chore: move language files to the root directory to share them with both Flutter and Tauri. (#2970)
Lucas.Xu3d72b6fa1279
diff --git a/frontend/appflowy_flutter/.gitignore b/frontend/appflowy_flutter/.gitignoreindex 52bcfb1538..bbf63caa3e 100644--- a/frontend/appflowy_flutter/.gitignore+++ b/frontend/appflowy_flutter/.gitignore@@ -75,3 +75,5 @@ windows/flutter/dart_ffi/coverage/**/failures/*.png++assets/translations/*.jsondiff --git a/frontend/appflowy_flutter/assets/translations/ar-SA.json b/frontend/resources/translations/ar-SA.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/ar-SA.jsonrename to frontend/resources/translations/ar-SA.jsondiff --git a/frontend/appflowy_flutter/assets/translations/ca-ES.json b/frontend/resources/translations/ca-ES.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/ca-ES.jsonrename to frontend/resources/translations/ca-ES.jsondiff --git a/frontend/appflowy_flutter/assets/translations/de-DE.json b/frontend/resources/translations/de-DE.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/de-DE.jsonrename to frontend/resources/translations/de-DE.jsondiff --git a/frontend/appflowy_flutter/assets/translations/en.json b/frontend/resources/translations/en.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/en.jsonrename to frontend/resources/translations/en.jsondiff --git a/frontend/appflowy_flutter/assets/translations/es-VE.json b/frontend/resources/translations/es-VE.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/es-VE.jsonrename to frontend/resources/translations/es-VE.jsondiff --git a/frontend/appflowy_flutter/assets/translations/eu-ES.json b/frontend/resources/translations/eu-ES.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/eu-ES.jsonrename to frontend/resources/translations/eu-ES.jsondiff --git a/frontend/appflowy_flutter/assets/translations/fr-CA.json b/frontend/resources/translations/fr-CA.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/fr-CA.jsonrename to frontend/resources/translations/fr-CA.jsondiff --git a/frontend/appflowy_flutter/assets/translations/fr-FR.json b/frontend/resources/translations/fr-FR.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/fr-FR.jsonrename to frontend/resources/translations/fr-FR.jsondiff --git a/frontend/appflowy_flutter/assets/translations/hu-HU.json b/frontend/resources/translations/hu-HU.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/hu-HU.jsonrename to frontend/resources/translations/hu-HU.jsondiff --git a/frontend/appflowy_flutter/assets/translations/id-ID.json b/frontend/resources/translations/id-ID.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/id-ID.jsonrename to frontend/resources/translations/id-ID.jsondiff --git a/frontend/appflowy_flutter/assets/translations/it-IT.json b/frontend/resources/translations/it-IT.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/it-IT.jsonrename to frontend/resources/translations/it-IT.jsondiff --git a/frontend/appflowy_flutter/assets/translations/ja-JP.json b/frontend/resources/translations/ja-JP.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/ja-JP.jsonrename to frontend/resources/translations/ja-JP.jsondiff --git a/frontend/appflowy_flutter/assets/translations/ko-KR.json b/frontend/resources/translations/ko-KR.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/ko-KR.jsonrename to frontend/resources/translations/ko-KR.jsondiff --git a/frontend/appflowy_flutter/assets/translations/pl-PL.json b/frontend/resources/translations/pl-PL.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/pl-PL.jsonrename to frontend/resources/translations/pl-PL.jsondiff --git a/frontend/appflowy_flutter/assets/translations/pt-BR.json b/frontend/resources/translations/pt-BR.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/pt-BR.jsonrename to frontend/resources/translations/pt-BR.jsondiff --git a/frontend/appflowy_flutter/assets/translations/pt-PT.json b/frontend/resources/translations/pt-PT.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/pt-PT.jsonrename to frontend/resources/translations/pt-PT.jsondiff --git a/frontend/appflowy_flutter/assets/translations/ru-RU.json b/frontend/resources/translations/ru-RU.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/ru-RU.jsonrename to frontend/resources/translations/ru-RU.jsondiff --git a/frontend/appflowy_flutter/assets/translations/sv.json b/frontend/resources/translations/sv.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/sv.jsonrename to frontend/resources/translations/sv.jsondiff --git a/frontend/appflowy_flutter/assets/translations/tr-TR.json b/frontend/resources/translations/tr-TR.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/tr-TR.jsonrename to frontend/resources/translations/tr-TR.jsondiff --git a/frontend/appflowy_flutter/assets/translations/zh-CN.json b/frontend/resources/translations/zh-CN.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/zh-CN.jsonrename to frontend/resources/translations/zh-CN.jsondiff --git a/frontend/appflowy_flutter/assets/translations/zh-TW.json b/frontend/resources/translations/zh-TW.jsonsimilarity index 100%rename from frontend/appflowy_flutter/assets/translations/zh-TW.jsonrename to frontend/resources/translations/zh-TW.jsondiff --git a/frontend/scripts/code_generation/language_files/generate_language_files.cmd b/frontend/scripts/code_generation/language_files/generate_language_files.cmdindex 146e8188e5..470f1654e5 100644--- a/frontend/scripts/code_generation/language_files/generate_language_files.cmd+++ b/frontend/scripts/code_generation/language_files/generate_language_files.cmd@@ -10,6 +10,11 @@ cd /d "%~dp0"cd ..\..\..\appflowy_flutter+REM copy the resources/translations folder to+REM the appflowy_flutter/assets/translation directory+echo Copying resources/translations to appflowy_flutter/assets/translations+xcopy /E /Y /I ..\resources\translations assets\translations+call flutter packages pub getecho Specifying source directory for AppFlowy Localizations.diff --git a/frontend/scripts/code_generation/language_files/generate_language_files.sh b/frontend/scripts/code_generation/language_files/generate_language_files.shindex dc624eb889..d3bdf7e9b3 100755--- a/frontend/scripts/code_generation/language_files/generate_language_files.sh+++ b/frontend/scripts/code_generation/language_files/generate_language_files.sh@@ -10,6 +10,10 @@ cd "$(dirname "$0")"# Navigate to the project rootcd ../../../appflowy_flutter+# copy the resources/translations folder to+# the appflowy_flutter/assets/translation directory+cp -r ../resources/translations assets/translations+flutter packages pub getecho "Specifying source directory for AppFlowy Localizations."diff --git a/inlang.config.js b/inlang.config.jsindex 69730af126..7cabab7896 100644--- a/inlang.config.js+++ b/inlang.config.js@@ -9,8 +9,8 @@ export async function defineConfig(env) {return {referenceLanguage: 'en',- plugins: [pluginJson({- pathPattern: './frontend/appflowy_flutter/assets/translations/{language}.json',+ plugins: [pluginJson({+ pathPattern: './frontend/resources/translations/{language}.json',variableReferencePattern: ["@:"]}), standardLintRules()]};