Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 8 additions & 39 deletions scripts/i18n/update-locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ import {

interface SourceManifest {
files: Record<string, string>
// Transitional baseline: leaf path keys per entry file whose committed
// translations violated token validation when the manifest was recorded.
// The check exempts them; a successful locale run heals and drops them.
knownViolations?: Record<string, string[]>
version: 1
}

Expand All @@ -60,7 +56,6 @@ interface SourcePlan {
invalidated: Set<string>
previousLeafCount: number
degraded: boolean
knownViolationKeys: ReadonlySet<string>
}

interface LocaleFileState {
Expand Down Expand Up @@ -185,15 +180,7 @@ function loadManifest(filename: string): SourceManifest {
Array.isArray(manifest.files) ||
!Object.values(manifest.files).every(
(hash) => typeof hash === 'string' && /^[0-9a-f]{40,64}$/.test(hash)
) ||
('knownViolations' in manifest &&
(!manifest.knownViolations ||
typeof manifest.knownViolations !== 'object' ||
Array.isArray(manifest.knownViolations) ||
!Object.values(manifest.knownViolations).every(
(keys) =>
Array.isArray(keys) && keys.every((key) => typeof key === 'string')
)))
)
) {
throw new Error(`${filename} has an invalid source manifest`)
}
Expand Down Expand Up @@ -242,8 +229,7 @@ function writeManifest(
entryDir: string,
manifestFile: string,
advancedFilenames: readonly string[],
preservedFiles: Readonly<Record<string, string>>,
preservedViolations: Readonly<Record<string, string[]>>
preservedFiles: Readonly<Record<string, string>>
): void {
const files = Object.fromEntries(
[
Expand All @@ -257,13 +243,7 @@ function writeManifest(
])
].sort(([left], [right]) => left.localeCompare(right))
)
const manifest: SourceManifest = {
files,
...(Object.keys(preservedViolations).length > 0
? { knownViolations: preservedViolations }
: {}),
version: 1
}
const manifest: SourceManifest = { files, version: 1 }
const serialized = `${JSON.stringify(manifest, null, 2)}\n`
if (
!existsSync(manifestFile) ||
Expand Down Expand Up @@ -354,15 +334,14 @@ function reportCheck(states: readonly LocaleFileState[]): number {
)
}
// Skip keys queued because the English source changed (comparing an old
// translation against new English is meaningless) and baseline violations
// recorded in the manifest; a key newly corrupted beyond those must fail
// the check. Degraded plans (recorded source unavailable) cannot tell
// staleness from corruption, so they skip the audit.
// translation against new English is meaningless). Degraded plans
// (recorded source unavailable) cannot tell staleness from corruption, so
// they skip the audit.
if (state.plan.degraded) continue
for (const error of auditProtectedLiterals(
state.plan.source,
state.existing,
new Set([...state.plan.invalidated, ...state.plan.knownViolationKeys])
state.plan.invalidated
)) {
auditErrors.push(`${label}: ${error}`)
}
Expand Down Expand Up @@ -421,8 +400,7 @@ async function run(argv: readonly string[]): Promise<void> {
[...changes.added, ...changes.modified].map(pathKey)
),
previousLeafCount: collectLeaves(previous).size,
degraded: recorded === undefined,
knownViolationKeys: new Set(manifest.knownViolations?.[filename] ?? [])
degraded: recorded === undefined
}
})

Expand Down Expand Up @@ -632,15 +610,6 @@ async function run(argv: readonly string[]): Promise<void> {
const hash = manifest.files[filename]
return hash ? [[filename, hash] as const] : []
})
),
// A completed file's translations were fully revalidated, so its baseline
// violations are healed and dropped; failed files keep theirs
Object.fromEntries(
filenames.flatMap((filename) => {
if (completedFilenames.has(filename)) return []
const keys = manifest.knownViolations?.[filename]
return keys && keys.length > 0 ? [[filename, keys] as const] : []
})
)
)

Expand Down
31 changes: 0 additions & 31 deletions src/locales/.source-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,5 @@
"nodeDefs.json": "93c778a69bfe43a07e3bf07d1ecfadc26bf44661",
"settings.json": "1028b58bfb4f3e4f5025cd8d933bd19085c291e3"
},
"knownViolations": {
"main.json": [
"[\"assetBrowser\",\"civitaiLinkExample\"]",
"[\"assetBrowser\",\"civitaiLinkLabel\"]",
"[\"assetBrowser\",\"jobId\"]",
"[\"assetBrowser\",\"uploadModelDescription2\"]",
"[\"assetBrowser\",\"uploadModelDescription3\"]",
"[\"g\",\"disabling\"]",
"[\"g\",\"enabling\"]",
"[\"g\",\"itemsSelected\"]",
"[\"g\",\"searchPlaceholder\"]",
"[\"g\",\"updating\"]",
"[\"linearMode\",\"downloadAll\"]",
"[\"manager\",\"changingVersion\"]",
"[\"manager\",\"failed\"]",
"[\"manager\",\"uninstalling\"]",
"[\"rightSidePanel\",\"missingModels\",\"gatedModelsHint\"]",
"[\"subscription\",\"creditsRemainingThisMonth\"]",
"[\"subscription\",\"creditsRemainingThisYear\"]",
"[\"subscription\",\"inviteUpTo\"]",
"[\"subscription\",\"preview\",\"creditsRefillMonthlyTo\"]",
"[\"toastMessages\",\"failedToAccessBillingPortal\"]",
"[\"workspace\",\"addedToWorkspace\"]",
"[\"workspacePanel\",\"inviteLimitReached\"]",
"[\"workspacePanel\",\"members\",\"membersCount\"]"
],
"nodeDefs.json": [
"[\"ByteDanceSeedAudio\",\"description\"]",
"[\"LTXVDurationPredictor\",\"description\"]"
]
},
"version": 1
}
9 changes: 3 additions & 6 deletions src/locales/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,9 @@ rerun with `--allow-prune` (or the `allow_prune` input on the manual workflow
dispatch) only after confirming the English sources are complete.
`pnpm locale:check` runs offline in CI: it reports pending work and fails on
protected-token violations that are not already queued for retranslation
because the English source changed. The manifest's `knownViolations` field
baselines violations that predate the pipeline; a successful locale run heals
and drops them, and any corruption introduced beyond the baseline fails the
check immediately. oxfmt ignores `src/locales/**/*.json` — the pipeline is the
sole writer of those bytes, which keeps the manifest's recorded blob hashes
valid.
because the English source changed. oxfmt ignores `src/locales/**/*.json` — the
pipeline is the sole writer of those bytes, which keeps the manifest's recorded
blob hashes valid.

### Manual Translation Updates

Expand Down
28 changes: 14 additions & 14 deletions src/locales/ar/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,7 @@
"disableAll": "تعطيل الكل",
"disableSelected": "تعطيل المحدد",
"disableThirdParty": "تعطيل الطرف الثالث",
"disabling": "جارٍ التعطيل",
"disabling": "جارٍ تعطيل {id}",
"disconnectedFromBackend": "تم قطع الاتصال بالخادم الخلفي. يرجى التحقق مما إذا كان الخادم يعمل.",
"dismiss": "تجاهل",
"download": "تنزيل",
Expand All @@ -1584,7 +1584,7 @@
"enableOrDisablePack": "تفعيل أو تعطيل الحزمة",
"enableSelected": "تفعيل المحدد",
"enabled": "ممكّن",
"enabling": "جارٍ التمكين",
"enabling": "جارٍ تفعيل {id}",
"enter": "إدخال",
"enterBaseName": "أدخل الاسم الأساسي",
"enterNewName": "أدخل الاسم الجديد",
Expand Down Expand Up @@ -1644,7 +1644,7 @@
"installing": "جارٍ التثبيت",
"interrupted": "تمت المقاطعة",
"itemsCopiedToClipboard": "تم نسخ العناصر إلى الحافظة",
"itemsSelected": "تم تحديد {selectedCount} عناصر",
"itemsSelected": "لم يتم تحديد أي عنصر | تم تحديد عنصر واحد | تم تحديد {count} عناصر",
"job": "مهمة",
"jobIdCopied": "تم نسخ معرف المهمة إلى الحافظة",
"keybinding": "اختصار لوحة المفاتيح",
Expand Down Expand Up @@ -1807,7 +1807,7 @@
"searchKeybindings": "بحث في اختصارات المفاتيح",
"searchModels": "بحث في النماذج",
"searchNodes": "بحث في العقد",
"searchPlaceholder": "بحث...",
"searchPlaceholder": "ابحث عن {subject}...",
"searchSettings": "بحث في الإعدادات",
"searchWorkflows": "بحث في سير العمل",
"seeTutorial": "شاهد الدليل",
Expand Down Expand Up @@ -1859,7 +1859,7 @@
"updateAvailable": "تحديث متاح",
"updateFrontend": "تحديث الواجهة الأمامية",
"updated": "تم التحديث",
"updating": "جارٍ التحديث",
"updating": "جارٍ تحديث {id}",
"upload": "رفع",
"uploadAlreadyInProgress": "الرفع جارٍ بالفعل",
"uploadTimedOut": "انتهت مهلة التحميل. يرجى المحاولة مرة أخرى.",
Expand Down Expand Up @@ -2226,7 +2226,7 @@
},
"cancelThisRun": "إلغاء هذا التشغيل",
"deleteAllAssets": "حذف جميع الأصول من هذه الجلسة",
"downloadAll": "تنزيل الكل",
"downloadAll": "نزّل {count} من أصول عملية التشغيل هذه",
"dragAndDropImage": "اسحب وأسقط صورة",
"emptyWorkflowExplanation": "سير العمل الخاص بك فارغ. تحتاج إلى بعض العقد أولاً لبدء بناء التطبيق.",
"enterNodeGraph": "دخول مخطط العقد",
Expand Down Expand Up @@ -2480,7 +2480,7 @@
"enablePackToChangeVersion": "فعّل هذه الحزمة لتغيير الإصدارات",
"errorConnecting": "خطأ في الاتصال بسجل عقد Comfy.",
"extensionsSuccessfullyInstalled": "تم تثبيت الإضافات بنجاح وهي جاهزة للاستخدام!",
"failed": "فشل ({count})",
"failed": "فشل",
"failedToInstall": "فشل في التثبيت",
"filter": {
"disabled": "معطّل",
Expand Down Expand Up @@ -2569,7 +2569,7 @@
"tryUpdateTooltip": "اسحب آخر التغييرات من المستودع. قد تحتوي الإصدارات الليلية على تحديثات لا يمكن اكتشافها تلقائيًا.",
"uninstall": "إلغاء التثبيت",
"uninstallSelected": "إلغاء تثبيت المحدد",
"uninstalling": "جاري إلغاء التثبيت",
"uninstalling": "جارٍ إلغاء تثبيت {id}",
"unresolvedNodes": {
"message": "العُقد التالية غير مثبتة ولم يتم العثور عليها في السجل.",
"title": "العُقد المفقودة غير المحلولة"
Expand Down Expand Up @@ -3428,7 +3428,7 @@
"expandNodes": "عرض العُقد المرجعية",
"gatedModelDownloadTooltip": "قد يتطلب التنزيل تسجيل الدخول إلى Hugging Face أولاً.",
"gatedModelTooltip": "هذا النموذج مقيد ويتطلب تسجيل الدخول إلى Hugging Face والموافقة على اتفاقية الترخيص الخاصة به.",
"gatedModelsHint": "بعض النماذج مقيدة. لتنزيلها، قم بتسجيل الدخول إلى Hugging Face ووافق على اتفاقية ترخيص النموذج.",
"gatedModelsHint": "يوجد نموذج واحد خاضع لقيود الوصول. لتنزيله، سجّل الدخول إلى Hugging Face واقبل اتفاقية الترخيص الخاصة به. | توجد {count} نماذج خاضعة لقيود الوصول. لتنزيلها، سجّل الدخول إلى Hugging Face واقبل اتفاقيات الترخيص الخاصة بها.",
"gatedModelsHintLabel": "ملاحظة:",
"import": "استيراد",
"importNotSupported": "الاستيراد غير مدعوم",
Expand Down Expand Up @@ -4090,8 +4090,8 @@
"contactUs": "تواصل معنا",
"creditSliderSave": "وفر {percent}% ({amount})",
"creditsLeftOfTotal": "{remaining} متبقية من أصل {total}",
"creditsRemainingThisMonth": "الرصيد المتبقي لهذا الشهر",
"creditsRemainingThisYear": "الرصيد المتبقي لهذا العام",
"creditsRemainingThisMonth": "مشمول (تُعاد التعبئة في {date})",
"creditsRemainingThisYear": "مشمول (تُعاد التعبئة في {date})",
"creditsUsed": "{used} مستخدمة",
"creditsYouveAdded": "الرصيد الذي أضفته",
"currentPlan": "الخطة الحالية",
Expand Down Expand Up @@ -4707,7 +4707,7 @@
"savedAsWorkflow": "تم التحويل إلى سير عمل مخطط العقد فقط"
},
"workspace": {
"addedToWorkspace": "تمت إضافتك إلى {workspaceName}",
"addedToWorkspace": "تمت إضافتك إلى:",
"inviteAccepted": "تم قبول الدعوة",
"inviteFailed": "فشل في قبول الدعوة",
"switchFailed": "فشل في تبديل مساحة العمل. يرجى المحاولة مرة أخرى.",
Expand Down Expand Up @@ -4802,7 +4802,7 @@
"title": "تعديل تفاصيل مساحة العمل"
},
"invite": "دعوة",
"inviteLimitReached": "لقد وصلت إلى الحد الأقصى وهو ٥٠ عضواً",
"inviteLimitReached": "لقد بلغت الحد الأقصى البالغ {count} عضوًا",
"inviteMember": "دعوة عضو",
"inviteMemberDialog": {
"failedCount": "تعذر إرسال {count} دعوة. حاول مرة أخرى. | تعذر إرسال {count} دعوات. حاول مرة أخرى.",
Expand Down Expand Up @@ -4855,7 +4855,7 @@
"warning": "لقد أنفق هذا المستخدم بالفعل {credits} رصيد. تعيين الحد عند أو أقل من الاستخدام الحالي سيمنع المزيد من التشغيل حتى الشهر القادم."
},
"header": "الأعضاء",
"membersCount": "{count}/٥٠ عضواً",
"membersCount": "{count} من أصل {maxSeats} أعضاء",
"needMoreMembers": "تحتاج إلى المزيد من الأعضاء؟",
"noInvites": "لا توجد دعوات معلقة",
"noMembers": "لا يوجد أعضاء",
Expand Down
4 changes: 2 additions & 2 deletions src/locales/ar/nodeDefs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@
}
},
"ByteDanceSeedAudio": {
"description": "أنشئ كلامًا، موسيقى، مؤثرات صوتية وحوارًا متعدد المتحدثين من خلال مطالبة واحدة باستخدام ByteDance Seed Audio 1.0. صف الصوت أو الأصوات، العاطفة، الأجواء، الموسيقى الخلفية والمؤثرات الصوتية في المطالبة، وأدرج الجمل التي سيتم نطقها. يمكنك اختيار صوت مدمج مسبقًا، أو استنساخ أصوات من حتى ٣ مقاطع مرجعية (موسومة @Audio1-3 في المطالبة)، أو اشتقاق صوت من صورة شخصية. حتى دقيقتين من الصوت لكل تشغيل.",
"description": "أنشئ كلامًا وموسيقى ومؤثرات صوتية وحوارًا متعدد المتحدثين من موجّه واحد باستخدام ByteDance Seed Audio 1.0. صِف الصوت أو الأصوات والمشاعر والأجواء وموسيقى الخلفية والمؤثرات الصوتية في الموجّه، وأدرج النص المراد نطقه. يمكنك اختياريًا تحديد صوت مضمّن مسبق الضبط، أو استنساخ أصوات من 3 مقاطع مرجعية كحد أقصى (موسومة بـ {'@'}Audio1-3 في الموجّه)، أو اشتقاق صوت من صورة شخصية. يدعم كل تشغيل ما يصل إلى دقيقتين من الصوت. يدعم النموذج متعدد اللغات 20 لغة والتحكم في التوقيت استنادًا إلى الطوابع الزمنية.",
"display_name": "ByteDance Seed Audio 1.0",
"inputs": {
"control_after_generate": {
Expand Down Expand Up @@ -8962,7 +8962,7 @@
}
},
"LTXVDurationPredictor": {
"description": "يتنبأ بالمدة الطبيعية للّقطة بناءً على البرومبت باستخدام رأس المدة LTX 2.4 (يتم تحميله عبر ModelPatchLoader)، ويضبطها على شبكة إطارات VAE ذات ٨٠٠٠+١ إطار.",
"description": "يتنبأ بالمدة الطبيعية للمشهد لموجّه باستخدام رأس المدة في LTX 2.4 (المحمّل باستخدام ModelPatchLoader)، ثم يضبطها على شبكة إطارات VAE ‏8k+1.",
"display_name": "متنبئ مدة LTXV",
"inputs": {
"duration_head": {
Expand Down
Loading
Loading