tinymist/locales
Mikkelsej ede7fcaed7
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled
feat: add char count to vs code status bar (#2308)
I have added character counter to the vscode status bar with

`const formatString = statusBarFormatString()
    .replace(/\{wordCount\}/g, `${words} ${plural("Word", words)}`)
    .replace(/\{charCount\}/g, `${chars} ${plural("Character", chars)}`)
    .replace(/\{pageCount\}/g, `${pages} ${plural("Page", pages)}`)
    .replace(/\{fileName\}/g, fileNameWithoutExt);
`
in editors/vscode/src/ui-extends.ts, and modified
`en = "Set format string of the server status. For example,
`{compileStatusIcon}{wordCount} [{fileName}]` will format the status as
`$(check) 123 words [main]`. Valid placeholders are:\n\n-
`{compileStatusIcon}`: Icon indicating the compile status\n-
`{wordCount}`: Number of words in the document\n`{charCount}`: Number of
characters in the document\n- `{fileName}`: Name of the file being
compiled\n\nNote: The status bar will be hidden if the format string is
empty."
`
in locales/tinymist-vscode.toml

This small change should make the option charCount possible for the
statusbar in vscode requested in
https://github.com/Myriad-Dreamin/tinymist/issues/2307 and a nice to
have feature.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-12-14 10:46:43 +08:00
..
README.md docs: make translation of pinning clearer (#1997) 2025-08-06 09:53:47 +08:00
tinymist-rt.toml feat: export tool with page/text preview features (#2182) 2025-11-17 21:59:12 +08:00
tinymist-vscode-rt.toml feat: multi-page export and no-write support (#2098) 2025-10-13 23:02:44 +08:00
tinymist-vscode.toml feat: add char count to vs code status bar (#2308) 2025-12-14 10:46:43 +08:00

Locales

This folder provides the locale files for the applications. The format of the locale files is TOML. It looks like this:

[extension.tinymist.command.tinymist.pinMainToCurrent] # K
en = "Pin the Main File to the Currently Open Document" # V-en
zh-CN = "将主文件固定到当前打开的文档" # zh-CN

Explanation:

  • The key K is the key of the locale string. It is a string that is used to identify the locale string.
    • The key is extension.tinymist.command.tinymist.pinMainToCurrent in the example, wrapped in square brackets.
  • The value V-en is the English locale string, which is also the first locale string used in the application.
    • The value is "Pin the Main file to the Opening Document" in the example.
  • The value V-zh-CN is the Chinese locale string. It is used when the locale of the application is set to Chinese. The rest locale strings are sorted by alphabet order.
    • The value is "将主文件固定到当前打开的文档" in the example.

The format is designed to be easy to modified by LLM.