增加提示词

This commit is contained in:
2025-11-15 20:22:29 +08:00
parent cea0064ec5
commit 5b4be27af9
8 changed files with 21496 additions and 4967 deletions
+2 -1
View File
@@ -536,7 +536,8 @@ export const usePromptStore = defineStore('promptStore', {
} else {
let changed = false;
const change: { key: string; translation?: Partial<Record<LangCode, string>>; hidden?: boolean } = { key };
for (const l of ['en', 'zh_CN', 'es_ES'] as LangCode[]) {
const langs = Array.from(new Set([...(base.languages || []), ...(cur.languages || [])]));
for (const l of langs as LangCode[]) {
const a = baseTag.translation?.[l] ?? '';
const b = curTag.translation?.[l] ?? '';
if (a !== b) {
+1 -1
View File
@@ -1,4 +1,4 @@
export type LangCode = 'en' | 'zh_CN' | 'es_ES';
export type LangCode = 'en' | 'zh_CN';
export interface PromptTag {
key: string;
-10
View File
@@ -92,15 +92,5 @@ export async function loadInitialDataset(): Promise<PromptDataset> {
console.warn('zh_CN.yaml not found or invalid', err);
}
try {
const esRoot = await fetchYaml('/sd/es_ES.yaml');
const esMap = collectTranslations(esRoot);
mergeLanguage(dataset, esMap, 'es_ES');
if (!dataset.languages.includes('es_ES')) dataset.languages.push('es_ES');
} catch (err) {
// ignore if missing
console.warn('es_ES.yaml not found or invalid', err);
}
return dataset;
}