Skip to content

fix: 增加主机搜索框#264

Open
andnnl wants to merge 2 commits into
jeff141:mainfrom
andnnl:fix/placeholder-alignment
Open

fix: 增加主机搜索框#264
andnnl wants to merge 2 commits into
jeff141:mainfrom
andnnl:fix/placeholder-alignment

Conversation

@andnnl

@andnnl andnnl commented Jul 13, 2026

Copy link
Copy Markdown

修复内容

问题描述

命令输入框的占位提示文本(placeholder)在中文环境下显示为右对齐,与输入框中文本左对齐不一致。

修复方案

  1. 修复占位提示文本对齐问题

    • 为 placeholder 添加 horizontal-alignment: left; 属性
    • 同时修复英文占位提示的对齐问题
    • 添加单元测试验证占位提示文本对齐
  2. 搜索框占位提示文本支持国际化

    • 将硬编码的中英文判断改为使用 @tr() 国际化函数
    • 添加中英文翻译资源文件条目

变更文件

  • ui/welcome.slint - 修复占位提示对齐 + 使用国际化
  • lang/zh/LC_MESSAGES/meatshell.po - 添加中文翻译
  • lang/en/LC_MESSAGES/meatshell.po - 添加英文翻译

测试

  • 所有现有测试通过
  • 新增 2 个单元测试验证占位提示文本对齐

@andnnl andnnl changed the title fix: 修复命令输入框占位提示文本左对齐问题 fix: 增加主机搜索框,修复命令输入框占位提示文本左对齐问题 Jul 14, 2026
@andnnl andnnl changed the title fix: 增加主机搜索框,修复命令输入框占位提示文本左对齐问题 fix: 增加主机搜索框 Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant