дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
fix(i18n): Translate the remaining UI text (Git, hierarchy, pull requests, dialogs, aria labels) (#114)
Hard-coded UI text, titles and aria-labels in about 110 components (Git panels, hierarchy, pull requests, dialogs, settings, welcome) now go through tx; spliced fragments became whole sentences (fileCount, noneFoundLabel, hierarchyTitle) and pull request states use keyed messages. 225 zh entries added, stale fragment entries removed.
Also: tx used as a tag without interpolations (tx`No checks`) now looks the text up exactly instead of as a template, so it is translated like tx("No checks"); the text-catalog test checks such tags as plain literals. Check and test counts reuse the existing "{count} passed" / "{failed} failing" entries.
Claude-Session: https://claude.ai/code/session_01VUYsdXA2nkF5v6zsC93dpn
Co-authored-by: jaw52 <[email protected]>
Цей коміт міститься в:
121 files changed
+854
-457
No files matched your search
@@ -180,10 +180,6 @@ export interface CommitProblem {
|
||||
details?: { label: string; run: () => void };
|
||||
}
|
||||
|
||||
function plural(n: number, word: string) {
|
||||
return `${n} ${word}${n === 1 ? "" : "s"}`;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export interface CommitCandidate {
|
||||
@@ -289,7 +285,11 @@ export async function runCommitChecks(files: readonly CommitCandidate[], amend:
|
||||
title: "TODO",
|
||||
text: (
|
||||
<>
|
||||
<div>{plural(hits.length, "TODO item")} found in the changed lines:</div>
|
||||
<div>
|
||||
{hits.length === 1
|
||||
? tx`${hits.length} TODO item found in the changed lines:`
|
||||
: tx`${hits.length} TODO items found in the changed lines:`}
|
||||
</div>
|
||||
<ul className={styles.todoList}>
|
||||
{hits.slice(0, 20).map((h, i) => (
|
||||
<li key={i}>
|
||||
@@ -325,13 +325,14 @@ export async function runCommitChecks(files: readonly CommitCandidate[], amend:
|
||||
}
|
||||
}
|
||||
if (crlf.length) {
|
||||
const crlfNames = crlf.slice(0, 5).map(baseName).join(", ") + (crlf.length > 5 ? ", …" : "");
|
||||
problems.push({
|
||||
title: "Line separators",
|
||||
text: (
|
||||
<>
|
||||
{plural(crlf.length, "file")} ({crlf.slice(0, 5).map(baseName).join(", ")}
|
||||
{crlf.length > 5 ? ", …" : ""}) contain CRLF line separators and core.autocrlf is not set, so they would be
|
||||
committed with CRLF. Convert them with the line separator widget in the status bar, or set{" "}
|
||||
{crlf.length === 1
|
||||
? tx`${crlf.length} file (${crlfNames}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set`
|
||||
: tx`${crlf.length} files (${crlfNames}) contain CRLF line separators and core.autocrlf is not set, so they would be committed with CRLF. Convert them with the line separator widget in the status bar, or set`}{" "}
|
||||
<code>git config core.autocrlf input</code>.
|
||||
</>
|
||||
),
|
||||
|
||||
Reference in new issue
Заблокувати користувача