mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-07-19 10:45:02 +00:00
feat: employ l10n to tinymist-cli and vscode extension (#1505)
* feat: runtime translation * feat: poc of rust translation * feat: clean up implementation * feat: initialize correctly * dev: remove dirty log * dev: rename l10nMsg * fix: desc * feat: update assets building * feat: update assets building * build: update cargo.lock * fix: warnings * fix: warnings * dev: expose api * fix: compile error * fix: compile errors in scripts
This commit is contained in:
parent
dc9013e253
commit
4cbe35a286
33 changed files with 615 additions and 62 deletions
|
@ -31,18 +31,33 @@ impl SemanticRequest for CodeLensRequest {
|
|||
data: None,
|
||||
};
|
||||
|
||||
res.push(doc_lens("Profile", vec!["profile".into()]));
|
||||
res.push(doc_lens("Preview", vec!["preview".into()]));
|
||||
res.push(doc_lens(
|
||||
&tinymist_l10n::t!("tinymist-query.code-action.profile", "Profile"),
|
||||
vec!["profile".into()],
|
||||
));
|
||||
res.push(doc_lens(
|
||||
&tinymist_l10n::t!("tinymist-query.code-action.preview", "Preview"),
|
||||
vec!["preview".into()],
|
||||
));
|
||||
|
||||
let is_html = ctx.world.library.features.is_enabled(typst::Feature::Html);
|
||||
|
||||
if is_html {
|
||||
res.push(doc_lens("Export HTML", vec!["export-html".into()]));
|
||||
res.push(doc_lens(
|
||||
&tinymist_l10n::t!("tinymist-query.code-action.exportHtml", "Export HTML"),
|
||||
vec!["export-html".into()],
|
||||
));
|
||||
} else {
|
||||
res.push(doc_lens("Export PDF", vec!["export-pdf".into()]));
|
||||
res.push(doc_lens(
|
||||
&tinymist_l10n::t!("tinymist-query.code-action.exportPdf", "Export PDF"),
|
||||
vec!["export-pdf".into()],
|
||||
));
|
||||
}
|
||||
|
||||
res.push(doc_lens("More ..", vec!["more".into()]));
|
||||
res.push(doc_lens(
|
||||
&tinymist_l10n::t!("tinymist-query.code-action.more", "More .."),
|
||||
vec!["more".into()],
|
||||
));
|
||||
|
||||
Some(res)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue