feat(i18n): add story styles localization for English and Chinese

- Translated and added various story styles to localization files for English, Simplified Chinese, and Traditional Chinese.
- Updated the StoryTeller class to utilize the translation function for story styles, enhancing the storytelling experience across different languages.
This commit is contained in:
bridge
2026-02-02 21:54:56 +08:00
parent 26332003e5
commit 2cbe7660e7
4 changed files with 166 additions and 18 deletions

View File

@@ -12,24 +12,25 @@ from src.classes.relations import (
process_relation_changes,
get_relation_change_context
)
from src.i18n import t
story_styles = [
"平淡叙述:语句克制、少修饰、像旁观者记录。",
"寓情于景:以景见情,情随境迁,情景交融。",
"写意古风:重意象与比兴,点到为止,少生僻文言。",
"市井烟火:行文接地气,多用口语化表达,朴实自然,不拿腔拿调。",
"诗意抒情:短句与对仗点缀,少量用典,不堆砌辞藻。",
"哲思寓言:借事设问,含一两句点睛之语,不说教。",
"编年纪事:近史官笔法,记事有序,少形容词。",
"景物拟人:对景施以轻微拟人,景中含志,不滥。",
"道法自然:以道家语汇点染,不艰涩,收束于一念。",
"佛理空相:无常、空相的领悟穿插事中,轻淡不玄。",
"民间说书:似说书人口吻但用书面语,叙事节奏明快,生动有趣。",
"雅致书卷:书卷气、引文气息浅尝辄止,不显摆。",
"豪放旷达:用词大开大合,气势磅礴,不拘小节,直抒胸臆。",
"绮丽诡谲:重感官描写,辞藻华丽妖冶,强调光影与色彩的奇异感。",
"冷峻简练:短句为主,字字珠玑,如金石相击,不做多余情感渲染。",
"细笔白描:不加藻饰,通过捕捉极细微的动作与神态来传神,真实细腻。",
"Plain narration: Restrained language, minimal embellishment, recording like a bystander.",
"Emotion in scenery: Expressing emotion through scenery, blending feelings with the setting.",
"Freehand ancient style: Focus on imagery and metaphor, concise, avoiding obscure archaic language.",
"Marketplace life: Grounded writing, using colloquialisms, simple and natural, without pretension.",
"Poetic lyricism: Short sentences and parallelism, sparse use of allusions, avoiding flowery language.",
"Philosophical fable: Asking questions through events, containing one or two punchlines, without preaching.",
"Chronicle style: Like a historian's record, orderly events, few adjectives.",
"Personification of scenery: Slight personification of scenery, embedding aspirations in the view, not overused.",
"Taoist nature: Tinted with Taoist vocabulary, not obscure, focusing on a single thought.",
"Buddhist emptiness: Insights of impermanence and emptiness interwoven, light and not mysterious.",
"Folk storytelling: Like a storyteller's tone but in written language, fast-paced, vivid and interesting.",
"Elegant scholarly: Scholarly atmosphere, slight touch of citations, without showing off.",
"Bold and open: Grand words, majestic momentum, informal, expressing feelings directly.",
"Gorgeous and bizarre: Heavy sensory description, ornate and seductive language, emphasizing the strangeness of light and color.",
"Cold and concise: Mainly short sentences, every word counts, like metal striking stone, no extra emotional rendering.",
"Fine line drawing: No decoration, capturing subtle movements and expressions to convey spirit, real and delicate.",
]
@@ -84,7 +85,7 @@ class StoryTeller:
"avatar_name_2": avatar_name_2,
"event": event,
"res": res,
"style": random.choice(story_styles),
"style": t(random.choice(story_styles)),
"story_prompt": prompt,
}
@@ -158,7 +159,7 @@ class StoryTeller:
"gathering_info": gathering_info,
"events": events_text,
"details": details_text,
"style": random.choice(story_styles),
"style": t(random.choice(story_styles)),
"story_prompt": prompt
}

View File

@@ -3491,3 +3491,52 @@ msgstr "Cultivation confusion"
msgid "misfortune_theme_anxiety"
msgstr "Anxiety attack"
# Story Styles
msgid "Plain narration: Restrained language, minimal embellishment, recording like a bystander."
msgstr "Plain narration: Restrained language, minimal embellishment, recording like a bystander."
msgid "Emotion in scenery: Expressing emotion through scenery, blending feelings with the setting."
msgstr "Emotion in scenery: Expressing emotion through scenery, blending feelings with the setting."
msgid "Freehand ancient style: Focus on imagery and metaphor, concise, avoiding obscure archaic language."
msgstr "Freehand ancient style: Focus on imagery and metaphor, concise, avoiding obscure archaic language."
msgid "Marketplace life: Grounded writing, using colloquialisms, simple and natural, without pretension."
msgstr "Marketplace life: Grounded writing, using colloquialisms, simple and natural, without pretension."
msgid "Poetic lyricism: Short sentences and parallelism, sparse use of allusions, avoiding flowery language."
msgstr "Poetic lyricism: Short sentences and parallelism, sparse use of allusions, avoiding flowery language."
msgid "Philosophical fable: Asking questions through events, containing one or two punchlines, without preaching."
msgstr "Philosophical fable: Asking questions through events, containing one or two punchlines, without preaching."
msgid "Chronicle style: Like a historian's record, orderly events, few adjectives."
msgstr "Chronicle style: Like a historian's record, orderly events, few adjectives."
msgid "Personification of scenery: Slight personification of scenery, embedding aspirations in the view, not overused."
msgstr "Personification of scenery: Slight personification of scenery, embedding aspirations in the view, not overused."
msgid "Taoist nature: Tinted with Taoist vocabulary, not obscure, focusing on a single thought."
msgstr "Taoist nature: Tinted with Taoist vocabulary, not obscure, focusing on a single thought."
msgid "Buddhist emptiness: Insights of impermanence and emptiness interwoven, light and not mysterious."
msgstr "Buddhist emptiness: Insights of impermanence and emptiness interwoven, light and not mysterious."
msgid "Folk storytelling: Like a storyteller's tone but in written language, fast-paced, vivid and interesting."
msgstr "Folk storytelling: Like a storyteller's tone but in written language, fast-paced, vivid and interesting."
msgid "Elegant scholarly: Scholarly atmosphere, slight touch of citations, without showing off."
msgstr "Elegant scholarly: Scholarly atmosphere, slight touch of citations, without showing off."
msgid "Bold and open: Grand words, majestic momentum, informal, expressing feelings directly."
msgstr "Bold and open: Grand words, majestic momentum, informal, expressing feelings directly."
msgid "Gorgeous and bizarre: Heavy sensory description, ornate and seductive language, emphasizing the strangeness of light and color."
msgstr "Gorgeous and bizarre: Heavy sensory description, ornate and seductive language, emphasizing the strangeness of light and color."
msgid "Cold and concise: Mainly short sentences, every word counts, like metal striking stone, no extra emotional rendering."
msgstr "Cold and concise: Mainly short sentences, every word counts, like metal striking stone, no extra emotional rendering."
msgid "Fine line drawing: No decoration, capturing subtle movements and expressions to convey spirit, real and delicate."
msgstr "Fine line drawing: No decoration, capturing subtle movements and expressions to convey spirit, real and delicate."

View File

@@ -2336,3 +2336,52 @@ msgid "misfortune_theme_anxiety"
msgstr "急火攻心"
# Story Styles
msgid "Plain narration: Restrained language, minimal embellishment, recording like a bystander."
msgstr "平淡叙述:语句克制、少修饰、像旁观者记录。"
msgid "Emotion in scenery: Expressing emotion through scenery, blending feelings with the setting."
msgstr "寓情于景:以景见情,情随境迁,情景交融。"
msgid "Freehand ancient style: Focus on imagery and metaphor, concise, avoiding obscure archaic language."
msgstr "写意古风:重意象与比兴,点到为止,少生僻文言。"
msgid "Marketplace life: Grounded writing, using colloquialisms, simple and natural, without pretension."
msgstr "市井烟火:行文接地气,多用口语化表达,朴实自然,不拿腔拿调。"
msgid "Poetic lyricism: Short sentences and parallelism, sparse use of allusions, avoiding flowery language."
msgstr "诗意抒情:短句与对仗点缀,少量用典,不堆砌辞藻。"
msgid "Philosophical fable: Asking questions through events, containing one or two punchlines, without preaching."
msgstr "哲思寓言:借事设问,含一两句点睛之语,不说教。"
msgid "Chronicle style: Like a historian's record, orderly events, few adjectives."
msgstr "编年纪事:近史官笔法,记事有序,少形容词。"
msgid "Personification of scenery: Slight personification of scenery, embedding aspirations in the view, not overused."
msgstr "景物拟人:对景施以轻微拟人,景中含志,不滥。"
msgid "Taoist nature: Tinted with Taoist vocabulary, not obscure, focusing on a single thought."
msgstr "道法自然:以道家语汇点染,不艰涩,收束于一念。"
msgid "Buddhist emptiness: Insights of impermanence and emptiness interwoven, light and not mysterious."
msgstr "佛理空相:无常、空相的领悟穿插事中,轻淡不玄。"
msgid "Folk storytelling: Like a storyteller's tone but in written language, fast-paced, vivid and interesting."
msgstr "民间说书:似说书人口吻但用书面语,叙事节奏明快,生动有趣。"
msgid "Elegant scholarly: Scholarly atmosphere, slight touch of citations, without showing off."
msgstr "雅致书卷:书卷气、引文气息浅尝辄止,不显摆。"
msgid "Bold and open: Grand words, majestic momentum, informal, expressing feelings directly."
msgstr "豪放旷达:用词大开大合,气势磅礴,不拘小节,直抒胸臆。"
msgid "Gorgeous and bizarre: Heavy sensory description, ornate and seductive language, emphasizing the strangeness of light and color."
msgstr "绮丽诡谲:重感官描写,辞藻华丽妖冶,强调光影与色彩的奇异感。"
msgid "Cold and concise: Mainly short sentences, every word counts, like metal striking stone, no extra emotional rendering."
msgstr "冷峻简练:短句为主,字字珠玑,如金石相击,不做多余情感渲染。"
msgid "Fine line drawing: No decoration, capturing subtle movements and expressions to convey spirit, real and delicate."
msgstr "细笔白描:不加藻饰,通过捕捉极细微的动作与神态来传神,真实细腻。"

View File

@@ -2354,3 +2354,52 @@ msgid "misfortune_theme_anxiety"
msgstr "急火攻心"
# Story Styles
msgid "Plain narration: Restrained language, minimal embellishment, recording like a bystander."
msgstr "平淡敘述:語句克制、少修飾、像旁觀者記錄。"
msgid "Emotion in scenery: Expressing emotion through scenery, blending feelings with the setting."
msgstr "寓情於景:以景見情,情隨境遷,情景交融。"
msgid "Freehand ancient style: Focus on imagery and metaphor, concise, avoiding obscure archaic language."
msgstr "寫意古風:重意象與比興,點到為止,少生僻文言。"
msgid "Marketplace life: Grounded writing, using colloquialisms, simple and natural, without pretension."
msgstr "市井煙火:行文接地氣,多用口語化表達,樸實自然,不拿腔拿調。"
msgid "Poetic lyricism: Short sentences and parallelism, sparse use of allusions, avoiding flowery language."
msgstr "詩意抒情:短句與對仗點綴,少量用典,不堆砌辭藻。"
msgid "Philosophical fable: Asking questions through events, containing one or two punchlines, without preaching."
msgstr "哲思寓言:借事設問,含一兩句畫龍點睛之語,不說教。"
msgid "Chronicle style: Like a historian's record, orderly events, few adjectives."
msgstr "編年記事:近史官筆法,記事有序,少形容詞。"
msgid "Personification of scenery: Slight personification of scenery, embedding aspirations in the view, not overused."
msgstr "景物擬人:對景施以輕微擬人,景中含志,不濫。"
msgid "Taoist nature: Tinted with Taoist vocabulary, not obscure, focusing on a single thought."
msgstr "道法自然:以道家語彙點染,不艱澀,收束於一念。"
msgid "Buddhist emptiness: Insights of impermanence and emptiness interwoven, light and not mysterious."
msgstr "佛理空相:無常、空相的領悟穿插事中,輕淡不玄。"
msgid "Folk storytelling: Like a storyteller's tone but in written language, fast-paced, vivid and interesting."
msgstr "民間說書:似說書人口吻但用書面語,敘事節奏明快,生動有趣。"
msgid "Elegant scholarly: Scholarly atmosphere, slight touch of citations, without showing off."
msgstr "雅致書卷:書卷氣、引文氣息淺嘗輒止,不顯擺。"
msgid "Bold and open: Grand words, majestic momentum, informal, expressing feelings directly."
msgstr "豪放曠達:用詞大開大合,氣勢磅礴,不拘小節,直抒胸臆。"
msgid "Gorgeous and bizarre: Heavy sensory description, ornate and seductive language, emphasizing the strangeness of light and color."
msgstr "綺麗詭譎:重感官描寫,辭藻華麗妖冶,強調光影與色彩的奇異感。"
msgid "Cold and concise: Mainly short sentences, every word counts, like metal striking stone, no extra emotional rendering."
msgstr "冷峻簡練:短句為主,字字珠璣,如金石相擊,不做多餘情感渲染。"
msgid "Fine line drawing: No decoration, capturing subtle movements and expressions to convey spirit, real and delicate."
msgstr "細筆白描:不加藻飾,通過捕捉極細微的動作與神態來傳神,真實細膩。"