feat: write the UI in English, select only conversation content
- source strings are English again; Chinese comes from lib/l10n/zh.dart through tr()/trArgs() and AppText, and a language without a table (Spanish, ...) reads English instead of Chinese - server and user data (titles, messages, file names, notes, task names) is drawn with plain Text, so it is never looked up in the table - SelectionArea moved from the whole message list to the messages, the answer text, an opened tool call's details and the turn footer; status lines and folded tool rows no longer start a selection - a message the transcript does not know (its start event was lost while the stream was down) fetches the tail once, so a turn continued from another client comes in with its prompt - bump to 0.5.3
This commit is contained in:
1 parent
7b5bccf28f
commit
511c3b006b
43 files changed
+1620
-1791
No files matched your search
@@ -70,7 +70,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.fromLTRB(12, 12, 12, 4),
|
||||
child: AppText('选择模型',
|
||||
child: AppText('Select model',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold)),
|
||||
),
|
||||
Padding(
|
||||
@@ -78,7 +78,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
child: TextField(
|
||||
onChanged: (v) => setState(() => _filter = v),
|
||||
decoration: InputDecoration(
|
||||
hintText: tr('搜索'),
|
||||
hintText: tr('Search'),
|
||||
border: const OutlineInputBorder(),
|
||||
isDense: true),
|
||||
),
|
||||
@@ -93,7 +93,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
Widget _models() {
|
||||
final all = widget.app.modelList;
|
||||
if (all.isEmpty) {
|
||||
return const Center(child: AppText('正在载入模型…'));
|
||||
return const Center(child: AppText('Loading models…'));
|
||||
}
|
||||
final filter = _filter.trim().toLowerCase();
|
||||
final matching = filter.isEmpty
|
||||
@@ -104,7 +104,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
m.id.toLowerCase().contains(filter))
|
||||
m,
|
||||
];
|
||||
if (matching.isEmpty) return const Center(child: AppText('没有结果'));
|
||||
if (matching.isEmpty) return const Center(child: AppText('No results'));
|
||||
|
||||
final byKey = {
|
||||
for (final m in all) ModelPrefs.keyFor(m.providerId, m.id): m,
|
||||
@@ -126,7 +126,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
final children = <Widget>[];
|
||||
if (filter.isEmpty) {
|
||||
if (favorites.isNotEmpty) {
|
||||
children.add(_sectionHeader(tr('收藏'), 'favorites', count: favorites.length));
|
||||
children.add(_sectionHeader(tr('Favorites'), 'favorites', count: favorites.length));
|
||||
if (!_collapsed.contains('favorites')) {
|
||||
for (final model in favorites) {
|
||||
children.add(_modelRow(model));
|
||||
@@ -134,7 +134,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
}
|
||||
}
|
||||
if (recents.isNotEmpty) {
|
||||
children.add(_sectionHeader(tr('最近'), 'recents', count: recents.length));
|
||||
children.add(_sectionHeader(tr('Recent'), 'recents', count: recents.length));
|
||||
if (!_collapsed.contains('recents')) {
|
||||
for (final model in recents) {
|
||||
children.add(_modelRow(model));
|
||||
@@ -143,7 +143,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
}
|
||||
}
|
||||
for (final entry in providers.entries) {
|
||||
final label = entry.key.isEmpty ? tr('其它') : entry.key;
|
||||
final label = entry.key.isEmpty ? tr('Other') : entry.key;
|
||||
children.add(_sectionHeader(label, 'provider:${entry.key}',
|
||||
count: entry.value.length));
|
||||
if (!_collapsed.contains('provider:${entry.key}')) {
|
||||
@@ -174,7 +174,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: AppText(
|
||||
count == null ? label : trArgs('{0}({1})', [label, count]),
|
||||
count == null ? label : trArgs('{0} ({1})', [label, count]),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w700,
|
||||
@@ -200,7 +200,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
title: Row(
|
||||
children: [
|
||||
Flexible(
|
||||
child: AppText(model.name,
|
||||
child: Text(model.name,
|
||||
maxLines: 1, overflow: TextOverflow.ellipsis),
|
||||
),
|
||||
if (model.reasoning)
|
||||
@@ -213,7 +213,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
),
|
||||
subtitle: model.context > 0
|
||||
? AppText(
|
||||
trArgs('{0} 上下文', [formatTokenCount(model.context)]),
|
||||
trArgs('{0} context', [formatTokenCount(model.context)]),
|
||||
style: TextStyle(fontSize: 11, color: theme.hintColor))
|
||||
: null,
|
||||
trailing: Row(
|
||||
@@ -232,7 +232,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
size: 18,
|
||||
color: favorite ? theme.colorScheme.primary : theme.hintColor,
|
||||
),
|
||||
tooltip: favorite ? tr('取消收藏') : tr('收藏'),
|
||||
tooltip: favorite ? tr('Remove from favorites') : tr('Favorites'),
|
||||
onPressed: () async {
|
||||
await _prefs.toggleFavorite(key);
|
||||
if (mounted) setState(() {});
|
||||
@@ -289,12 +289,12 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const AppText('思考强度',
|
||||
const AppText('Thinking effort',
|
||||
style: TextStyle(
|
||||
fontSize: 13, fontWeight: FontWeight.w700)),
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: AppText(model.name,
|
||||
child: Text(model.name,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
@@ -302,7 +302,7 @@ class _PickerSheetState extends State<_PickerSheet> {
|
||||
),
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
child: const AppText('完成'),
|
||||
child: const AppText('Done'),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user