refactor: 优化字符串名称
This commit is contained in:
parent
01efdcf7cc
commit
88dfabfa9c
7 changed files with 23 additions and 23 deletions
|
|
@ -62,7 +62,7 @@ fun MainPage(viewModel: MainViewModel, modifier: Modifier = Modifier) {
|
|||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Settings,
|
||||
contentDescription = stringResource(R.string.pages_settings)
|
||||
contentDescription = stringResource(R.string.page_settings)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -80,11 +80,11 @@ fun MainPage(viewModel: MainViewModel, modifier: Modifier = Modifier) {
|
|||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Add,
|
||||
contentDescription = stringResource(R.string.actions_add_task)
|
||||
contentDescription = stringResource(R.string.action_add_task)
|
||||
)
|
||||
AnimatedVisibility(isExpanded) {
|
||||
Text(
|
||||
text = stringResource(R.string.actions_add_task),
|
||||
text = stringResource(R.string.action_add_task),
|
||||
modifier = Modifier.padding(start = 8.dp)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ fun ManagerFragment(
|
|||
modifier = Modifier.fillMaxSize()
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.tips_no_task),
|
||||
text = stringResource(R.string.tip_no_task),
|
||||
style = MaterialTheme.typography.titleMedium
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ fun TodoBottomSheet(
|
|||
modifier = Modifier.padding(horizontal = 16.dp)
|
||||
) {
|
||||
Text(
|
||||
text = stringResource(R.string.actions_add_task),
|
||||
text = stringResource(R.string.action_add_task),
|
||||
style = MaterialTheme.typography.headlineMedium
|
||||
)
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ fun TodoBottomSheet(
|
|||
|
||||
Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) {
|
||||
OutlinedButton(onClick = onClose) {
|
||||
Text(stringResource(R.string.actions_cancel))
|
||||
Text(stringResource(R.string.action_cancel))
|
||||
}
|
||||
FilledTonalButton(
|
||||
onClick = {
|
||||
|
|
@ -108,7 +108,7 @@ fun TodoBottomSheet(
|
|||
)
|
||||
}
|
||||
) {
|
||||
Text(stringResource(R.string.actions_save))
|
||||
Text(stringResource(R.string.action_save))
|
||||
}
|
||||
}
|
||||
Spacer(Modifier.size(30.dp))
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ fun FilterChipGroup(
|
|||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Outlined.Check,
|
||||
contentDescription = stringResource(R.string.tips_select_this),
|
||||
contentDescription = stringResource(R.string.tip_select_this),
|
||||
modifier = Modifier.size(FilterChipDefaults.IconSize)
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ fun TodoCard(
|
|||
Icon(
|
||||
imageVector = Icons.Outlined.Check,
|
||||
tint = MaterialTheme.colorScheme.primary,
|
||||
contentDescription = stringResource(R.string.tips_mark_completed)
|
||||
contentDescription = stringResource(R.string.tip_mark_completed)
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">待办</string>
|
||||
<string name="pages_settings">设置</string>
|
||||
<string name="actions_add_task">添加待办</string>
|
||||
<string name="tips_no_task">目前没有任务要完成的,好好休息一下吧~</string>
|
||||
<string name="page_settings">设置</string>
|
||||
<string name="action_add_task">添加待办</string>
|
||||
<string name="tip_no_task">目前没有任务要完成的,好好休息一下吧~</string>
|
||||
<string name="placeholder_add_todo">待办内容</string>
|
||||
<string name="actions_cancel">取消</string>
|
||||
<string name="actions_save">保存</string>
|
||||
<string name="action_cancel">取消</string>
|
||||
<string name="action_save">保存</string>
|
||||
<string name="error_no_task_content">没有输入待办内容</string>
|
||||
<string name="tips_select_this">选择该项</string>
|
||||
<string name="tips_mark_completed">标记为已完成</string>
|
||||
<string name="tip_select_this">选择该项</string>
|
||||
<string name="tip_mark_completed">标记为已完成</string>
|
||||
</resources>
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
<resources>
|
||||
<string name="app_name">To Do</string>
|
||||
<string name="pages_settings">Settings</string>
|
||||
<string name="actions_add_task">Add Task</string>
|
||||
<string name="tips_no_task">There are no tasks to complete at the moment, take a good rest!</string>
|
||||
<string name="page_settings">Settings</string>
|
||||
<string name="action_add_task">Add Task</string>
|
||||
<string name="tip_no_task">There are no tasks to complete at the moment, take a good rest!</string>
|
||||
<string name="placeholder_add_todo">Task content</string>
|
||||
<string name="actions_cancel">Cancel</string>
|
||||
<string name="actions_save">Save</string>
|
||||
<string name="action_cancel">Cancel</string>
|
||||
<string name="action_save">Save</string>
|
||||
<string name="error_no_task_content">No task content entered</string>
|
||||
<string name="tips_select_this">Select this</string>
|
||||
<string name="tips_mark_completed">Mark as completed</string>
|
||||
<string name="tip_select_this">Select this</string>
|
||||
<string name="tip_mark_completed">Mark as completed</string>
|
||||
</resources>
|
||||
Loading…
Reference in a new issue