mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 04:46:56 +00:00
[PR #3593] [CLOSED] Update generate_language_files.cmd #5781
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#5781
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3593
Author: @rishi457
Created: 10/3/2023
Status: ❌ Closed
Base:
main← Head:patch-1📝 Commits (1)
65cc023Update generate_language_files.cmd📊 Changes
1 file changed (+32 additions, -10 deletions)
View changed files
📝
frontend/scripts/code_generation/language_files/generate_language_files.cmd(+32 -10)📄 Description
In this script, we've made several improvements to enhance its functionality and flexibility. Here's a breakdown of the changes:
Command-line Arguments: We've added the ability to specify source and destination directories as command-line arguments when running the script. This means you can customize the script's behavior without modifying the script itself.
Default Directories: To provide sensible defaults, we've defined default source and destination directories within the script. These defaults will be used if you don't specify custom directories as command-line arguments.
Dependency Checks: Before proceeding with the script's main tasks, we check if the required dependencies, namely Flutter and Dart, are available in the system's PATH. This ensures that the script doesn't run into issues due to missing dependencies.
Processing Command-line Arguments: We process the command-line arguments using
ifstatements. If you provide custom directories as arguments when running the script, those arguments will override the default directories defined in the script.Directory Formatting: To ensure that the provided directories end with a backslash, we add a backslash to the directory paths if they are missing it. This ensures consistency in directory paths and prevents potential issues during directory operations.
Copying Files: We use the
xcopycommand to efficiently copy the contents of the source directory to the destination directory. This step is performed after validating the directories.Running Localization Tasks: The script continues to execute Flutter and Dart commands for localization tasks as originally intended, specifying the source directory for AppFlowy Localizations and generating language files for AppFlowy.
Logging: We've retained informative log messages to keep you informed about each step of the script's execution.
Return to Original Directory: Finally, the script returns to the original working directory, ensuring that it doesn't leave you in a different directory after completion.
By incorporating these changes, the script becomes more versatile, user-friendly, and robust. You can easily adapt it to your specific project requirements by providing custom source and destination directories as needed.
Feature Preview
PR Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.