Skip to content

Commit

Permalink
fix: fix some bilingual text error
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk committed Oct 9, 2024
1 parent 95b52a7 commit 1c3623a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .changeset/green-foxes-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
'@difizen/libro-jupyter': patch
'@difizen/libro-l10n': patch
'@difizen/libro-lab': patch
'@difizen/libro-docs': patch
'@difizen/libro-code-cell': patch
'@difizen/libro-code-editor': patch
'@difizen/libro-codemirror': patch
'@difizen/libro-cofine-editor': patch
'@difizen/libro-cofine-editor-contribution': patch
'@difizen/libro-cofine-editor-core': patch
'@difizen/libro-cofine-textmate': patch
'@difizen/libro-common': patch
'@difizen/libro-core': patch
'@difizen/libro-kernel': patch
'@difizen/libro-language-client': patch
'@difizen/libro-lsp': patch
'@difizen/libro-markdown': patch
'@difizen/libro-markdown-cell': patch
'@difizen/libro-output': patch
'@difizen/libro-prompt-cell': patch
'@difizen/libro-raw-cell': patch
'@difizen/libro-rendermime': patch
'@difizen/libro-search': patch
'@difizen/libro-search-code-cell': patch
'@difizen/libro-shared-model': patch
'@difizen/libro-sql-cell': patch
'@difizen/libro-terminal': patch
'@difizen/libro-toc': patch
'@difizen/libro-virtualized': patch
'@difizen/libro-widget': patch
---

fix: fix some bilingual text error
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class KeybindInstructionsContribution
icon: KeybindInstructionsIcon,
command: KeybindInstructionsCommand.id,
order: 'l',
tooltip: l10n.t('查看快捷键'),
tooltip: () => <div>{l10n.t('查看快捷键')}</div>,
});
}

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-l10n/src/lang/bundle.l10n.en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"在 Output 中查找": "Find in output",
"替换功能不能在 Output 生效": "The replacement function cannot take effect in output.",
"仅在选中 Cell 中查找": "Only find in the selected cell",
"当前文件:": "Current file: ",
"当前文件:": "Current file ",
"当前变量名已存在": "The current variable name already exists.",
"是否显示libro顶部工具栏": "Whether to show the top toolbar of libro",
"顶部工具栏": "Top toolbar",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ const CurrentFileFooterComponent = React.forwardRef(function CurrentFileFooterCo
ref: React.ForwardedRef<HTMLDivElement>,
) {
const currentFileFooterView = useInject<LibroLabCurrentFileFooterView>(ViewInstance);

const label = currentFileFooterView.navigatableView?.title.label;
return (
<div className="libro-lab-current-file-footer" ref={ref}>
<span>{`${l10n.t('当前文件:')}${
currentFileFooterView.navigatableView?.title.label || ''
}`}</span>
<span>{l10n.t('当前文件:')}</span>
{
typeof label === 'function'
? React.createElement(label) // 如果是 React.FC,调用它
: label /* 如果是 ReactNode,直接渲染 */
}
</div>
);
});
Expand Down

0 comments on commit 1c3623a

Please sign in to comment.