mirror of
https://github.com/openclaw/openclaw.git
synced 2026-10-03 01:29:56 +00:00
improve(i18n): reduce locale catalog hashing overhead (#152355)
* improve(i18n): reduce locale catalog hashing overhead * Merge branch 'main' into investigate/p13-sha256-helper-20260919 * Merge branch 'main' into investigate/p13-sha256-helper-20260919 Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
This commit is contained in:
parent
917029cc35
commit
ab5b994413
1 changed files with 2 additions and 2 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { createHash } from "node:crypto";
|
||||
import { hash } from "node:crypto";
|
||||
import { existsSync, readFileSync } from "node:fs";
|
||||
import type { TranslationMap, TranslationMemoryEntry } from "./control-ui-i18n-sync-plan.ts";
|
||||
|
||||
export function hashControlUiTranslationText(text: string): string {
|
||||
return createHash("sha256").update(text.trim().split(/\s+/).join(" ")).digest("hex");
|
||||
return hash("sha256", text.trim().split(/\s+/).join(" "), "hex");
|
||||
}
|
||||
|
||||
export function mergeControlUiTranslationMaps(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue