diff --git a/bin/assets/i18n/de.xml b/bin/assets/i18n/de.xml index 2a59daffe..875250b0c 100644 --- a/bin/assets/i18n/de.xml +++ b/bin/assets/i18n/de.xml @@ -202,7 +202,7 @@ Dateipfad: Angepasste Variablen Angepasste Variablen erlauben das Vereinfachen von Build-Befehlsschritten durch Hinzufügen eigener Variablen, die über die Build-Einstellungen in Befehlen, Argumenten und Arbeitsverzeichnissen angewendet werden können. Angepasste Variablen können mit ${variable_name} in beliebigen Befehlen aufgerufen werden. - Es gibt bereits vordefinierte angepasste Variablen zur Nutzung:
${project_root}: Ordner-/Projekt-Root-Verzeichnis.
${build_type}: Ausgewählter Build-Typ zur Projekterstellung.
${os}: Name des aktuellen Betriebssystems.
${arch}: Architektur des aktuellen Betriebssystems.
${nproc}: Anzahl logischer Prozessoreinheiten.
${current_doc}: Letzter oder aktueller Dokumentenpfad.
${current_doc_name}: Letzter oder aktueller Name fokussierten Dokuments (ohne Erweiterung).
${current_doc_dir}: Letztes oder gegenwärtig fokussiertes Projektverzeichnis. + Es gibt bereits vordefinierte angepasste Variablen zur Nutzung: ${project_root}: Das Projekt-Stammverzeichnis. ${build_type}: Der aktuell ausgewählte Build-Typ. ${os}: Der Name des aktuellen Betriebssystems. ${arch}: Die Architektur des aktuellen Betriebssystems. ${nproc}: Die Anzahl der logischen Prozessorkerne. ${current_doc}: Der Pfad des aktuell fokussierten Dokuments. ${current_doc_name}: Der Name des aktuell fokussierten Dokuments (ohne Erweiterung). ${current_doc_dir}: Das Verzeichnis des aktuell fokussierten Dokuments. ${relative_dir}: Der relative Verzeichnispfad zwischen ${project_root} und ${current_doc_dir}. Ausschneiden Dunkel Datum diff --git a/bin/assets/i18n/en.xml b/bin/assets/i18n/en.xml index 7947b92cd..aa95864aa 100644 --- a/bin/assets/i18n/en.xml +++ b/bin/assets/i18n/en.xml @@ -186,7 +186,7 @@ File path is: Custom Variables Custom Variables allow to simplify the build commands steps adding custom variables that can be used over the build settings in commands, arguments, and working directories. Custom Variables can be invoked using ${variable_name} in any of the commands. - There are predefined custom variables available to use: ${project_root}: The folder / project root directory. ${build_type}: The build type selected to build the project. ${os}: The current operating system name. ${arch}: The current operating architecture. ${nproc}: The number of logical processing units. ${current_doc}: The last or current focused document path. ${current_doc_name}: The last or current focused document name without extension. ${current_doc_dir}: The last or current focused document directory. + There are predefined custom variables available to use: ${project_root}: The project root directory. ${build_type}: The currently selected build type. ${os}: The current operating system name. ${arch}: The current operating system architecture. ${nproc}: The number of logical processor cores. ${current_doc}: The path of the currently focused document. ${current_doc_name}: The name of the currently focused document (without extension). ${current_doc_dir}: The directory of the currently focused document. ${relative_dir}: The relative directory path between ${project_root} and ${current_doc_dir}. Cut Dark Date diff --git a/bin/assets/i18n/fr.xml b/bin/assets/i18n/fr.xml index faadb18f7..601cd9367 100644 --- a/bin/assets/i18n/fr.xml +++ b/bin/assets/i18n/fr.xml @@ -187,15 +187,7 @@ Le chemin du fichier est : Variables personnalisées Les variables personnalisées permettent de simplifier les étapes des commandes de construction en ajoutant des variables personnalisées qui peuvent être utilisées sur les paramètres de construction dans les commandes, les arguments et les répertoires de travail. Les variables personnalisées peuvent être appelées à l'aide de ${nom_variable} dans n'importe laquelle des commandes. - Il existe des variables personnalisées prédéfinies disponibles : -${project_root} : le dossier / répertoire racine du projet. -${build_type} : le type de construction sélectionné pour construire le projet. -${os} : le nom du système d'exploitation courant. -${arch} : l'architecture d'exploitation courante. -${nproc} : le nombre de processeurs. -${current_doc} : le chemin du document courant ou le plus récent. -${current_doc_name} : le nom du document courant ou le plus récent sans extension. -${current_doc_dir} : le répertoire du document courant ou le plus récent. + Il existe des variables personnalisées prédéfinies disponibles : ${project_root} : le répertoire racine du projet. ${build_type} : le type de construction actuellement sélectionné. ${os} : le nom du système d'exploitation actuel. ${arch} : l'architecture du système d'exploitation actuel. ${nproc} : le nombre de cœurs de processeurs logiques. ${current_doc} : le chemin du document actuellement focalisé. ${current_doc_name} : le nom du document actuellement focalisé (sans extension). ${current_doc_dir} : le répertoire du document actuellement focalisé. ${relative_dir} : le chemin du répertoire relatif entre ${project_root} et ${current_doc_dir}. Couper Sombre Date @@ -858,7 +850,7 @@ dans l'arborescence de répertoires ainsi que dans les boites de dialogues de s Supprimer Ouvrir le dossier parent dans l'explorateur de fichiers Coller - Refaire/string> + Refaire Sélectionner tout Annuler Copier @@ -921,3 +913,5 @@ Redémarrer ecode pour voir les changements. Coller dans le terminal Renommer le terminal +me="terminal_rename">Renommer le terminal + diff --git a/bin/assets/i18n/zh_CN.xml b/bin/assets/i18n/zh_CN.xml index e9c9fc722..70b22e549 100644 --- a/bin/assets/i18n/zh_CN.xml +++ b/bin/assets/i18n/zh_CN.xml @@ -16,8 +16,8 @@ license: 'MIT (respective)' ?--> - - 关于Ecode + + 关于 Ecode 新增分支 新增构建 新增构建步骤 @@ -61,29 +61,27 @@ 删除构建名称 %s? 构建类型必填! 构建类型 - Build types can be used as a dynamic build option represented by the special key ${build_type}. The build type can be switch easily from the editor. + 构建类型可用作由特殊键 ${build_type} 表示的动态构建选项。可以在编辑器中轻松切换构建类型。 取消 取消构建 取消清理 - Capture Positions - Case sensitive - Change Case - Change Escape Sequence - Change Whole Word - Always check for new updates at startup. - Check For Updates - Check Languages Health - Clean - Clean run with errors - + 捕捉位置 + 区分大小写 + 切换大小写 + 更改转义序列 + 更改全词匹配 + 启动时总是检查更新。 + 检查更新 + 检查语言健康状况 + 清理 + 清理运行时出错 清理步骤 - 成功清理run - + 成功清理运行 清理历史 清空菜单 - Clear System Environment - Clone Setting - Cloned name must be different from any existing build name. + 清除系统环境 + 克隆设置 + 克隆名称必须与任何现有构建名称不同。 关闭 关闭所有标签页 关闭Ecode @@ -151,21 +149,21 @@ 自定义环境变量 自定义输出解析器 自定义环境变量 - Custom Variables allow to simplify the build commands steps adding custom variables that can be used over the build settings in commands, arguments, and working directories. - Custom Variables can be invoked using ${variable_name} in any of the commands. - There are predefined custom variables available to use:
${project_root}: The folder / project root directory.
${build_type}: The build type selected to build the project.
${os}: The current operating system name.
${nproc}: The number of logical processing units. + 自定义变量允许通过添加自定义变量来简化构建命令步骤,这些变量可以在构建设置的命令、参数和工作目录中使用。 + 可以在任何命令中使用 ${variable_name} 来调用自定义变量。 + 有以下预定义的自定义变量可用: ${project_root}: 项目根目录。 ${build_type}: 当前选中的构建类型。 ${os}: 当前操作系统名称。 ${arch}: 当前操作系统架构。 ${nproc}: 逻辑处理器核心数。 ${current_doc}: 当前选中的文档路径。 ${current_doc_name}: 当前选中的文档名称(不含扩展名)。 ${current_doc_dir}: 当前选中的文档所在目录。 ${relative_dir}: ${project_root} 与 ${current_doc_dir} 之间的相对目录路径。 剪切 - Dark + 深色 日期 - Draw Boxes - Debug Draw Boxes Toggle - Debug Draw Debug Data - Highlight Focus & Hover - Debug Draw Highlight Toggle - Debug Widget Tree View - Default Theme - Delete Selected Custom Output Parser - Delete Selected Environment Variable + 绘制框 + 调试绘制框切换 + 调试绘制调试数据 + 高亮焦点和悬停 + 调试绘制高亮切换 + 调试组件树视图 + 默认主题 + 删除选定的自定义输出解析器 + 删除选定的环境变量 删除 删除已选 删除设置 @@ -447,8 +445,8 @@ Restart ecode to see the changes. 打开工作区符号搜索 输出 输出解析器 - Custom output parsers scan command line output for user-provided error patterns to create entries in Build Issues and highlight those errors on the Build Output - Presets are provided as generic output parsers, you can select one below, by default a "generic" preset will be selected: + 自定义输出解析器扫描命令行输出,查找用户提供的错误模式,以在构建问题中创建条目并在构建输出上突出显示这些错误。 + 预设提供为通用输出解析器,您可以在下面选择一个,默认情况下将选择“通用”预设: 覆盖 主人 粘贴 @@ -576,7 +574,7 @@ Restart ecode to see the changes. 状态 支持的平台 - Selecting none means that the build settings will work and be available on any Operating System + 不选择任何内容表示构建设置将在任何操作系统上工作并可用。 选择构建 选择构建类型 选择侧栏 @@ -632,21 +630,21 @@ file in the directory tree. Type Type to Locate Ui字体大小 - UI语言 Language - Multisample Anti-Aliasing Level - Ui板字体大小 - UI配色方案 + 界面语言 + 多重采样抗锯齿级别 + 界面面板字体大小 + 界面偏好配色方案 渲染器 渲染器版本 - Ui缩放 - UI主题 - Copy - Copy Containing Folder Path... - Copy File Path - Copy File Path and Position - Paste - Delete - Open Containing Folder in File Manager + 界面缩放比例 + 界面主题 + 复制 + 复制所在文件夹路径... + 复制文件路径 + 复制文件路径和位置 + 剪切 + 删除 + 在文件管理器中打开所在文件夹 粘贴 重做 全选 diff --git a/src/tools/ecode/projectbuild.cpp b/src/tools/ecode/projectbuild.cpp index d326419a7..e8c252016 100644 --- a/src/tools/ecode/projectbuild.cpp +++ b/src/tools/ecode/projectbuild.cpp @@ -29,6 +29,7 @@ static const char* VAR_NPROC = "${nproc}"; static const char* VAR_CURRENT_DOC = "${current_doc}"; static const char* VAR_CURRENT_DOC_NAME = "${current_doc_name}"; static const char* VAR_CURRENT_DOC_DIR = "${current_doc_dir}"; +static const char* VAR_RELATIVE_DIR = "${relative_dir}"; static void replaceVar( ProjectBuildStep& s, const std::string& var, const std::string& val ) { static std::string slashDup = FileSystem::getOSSlash() + FileSystem::getOSSlash(); @@ -398,12 +399,16 @@ void ProjectBuildManager::replaceDynamicVars( ProjectBuildCommand& cmd ) { std::string curDocName = FileSystem::fileRemoveExtension( FileSystem::fileNameFromPath( curDoc ) ); std::string curDocDir = FileSystem::fileRemoveFileName( curDoc ); + std::string relativeDir = curDocDir; + FileSystem::filePathRemoveBasePath( mProjectRoot, relativeDir ); + FileSystem::dirAddSlashAtEnd( relativeDir ); replaceVar( cmd, VAR_OS, currentOS ); replaceVar( cmd, VAR_ARCH, Sys::getOSArchitecture() ); replaceVar( cmd, VAR_NPROC, nproc ); replaceVar( cmd, VAR_CURRENT_DOC, curDoc ); replaceVar( cmd, VAR_CURRENT_DOC_NAME, curDocName ); replaceVar( cmd, VAR_CURRENT_DOC_DIR, curDocDir ); + replaceVar( cmd, VAR_RELATIVE_DIR, relativeDir ); if ( cmd.workingDir.empty() ) cmd.workingDir = mProjectRoot; } diff --git a/src/tools/ecode/uibuildsettings.cpp b/src/tools/ecode/uibuildsettings.cpp index 2a9eef596..926ea9c0f 100644 --- a/src/tools/ecode/uibuildsettings.cpp +++ b/src/tools/ecode/uibuildsettings.cpp @@ -242,8 +242,8 @@ class UIBuildStep : public UILinearLayout { findByClass( "reuse_previous_terminal" ) ); mDataBindHolder += UIDataBindBool::New( &mStep->useStatusBarTerminal, findByClass( "use_statusbar_terminal" ) ); - mDataBindHolder += UIDataBindBool::New( &mStep->stripAnsiCodes, - findByClass( "strip_ansi_codes" ) ); + mDataBindHolder += + UIDataBindBool::New( &mStep->stripAnsiCodes, findByClass( "strip_ansi_codes" ) ); } protected: @@ -305,16 +305,17 @@ class UIBuildStep : public UILinearLayout { runInTerminal->setVisible( true ); runInTerminal->setChecked( buildStep->runInTerminal ); - runInTerminal->on( Event::OnValueChange, [reusePreviousTerminal, runInTerminal, - useStatusBarTerminal, stripAnsiCodes]( auto ) { - reusePreviousTerminal->setEnabled( runInTerminal->isChecked() ); - useStatusBarTerminal->setEnabled( runInTerminal->isChecked() ); - stripAnsiCodes->setEnabled( !runInTerminal->isChecked() ); - if ( !runInTerminal->isChecked() ) { - reusePreviousTerminal->setChecked( false ); - useStatusBarTerminal->setChecked( false ); - } - } ); + runInTerminal->on( Event::OnValueChange, + [reusePreviousTerminal, runInTerminal, useStatusBarTerminal, + stripAnsiCodes]( auto ) { + reusePreviousTerminal->setEnabled( runInTerminal->isChecked() ); + useStatusBarTerminal->setEnabled( runInTerminal->isChecked() ); + stripAnsiCodes->setEnabled( !runInTerminal->isChecked() ); + if ( !runInTerminal->isChecked() ) { + reusePreviousTerminal->setChecked( false ); + useStatusBarTerminal->setChecked( false ); + } + } ); reusePreviousTerminal->setVisible( true ); reusePreviousTerminal->setEnabled( buildStep->runInTerminal ); @@ -451,7 +452,7 @@ static const auto SETTINGS_PANEL_XML = R"xml( - +