MicroFish/backend
Dominik Seemann 3793c960e8 feat(i18n): translate oasis_profile_generator prompts to english
Translate the system prompt and the individual / group persona prompt
builders in backend/app/services/oasis_profile_generator.py from
Chinese to English. The base prompt language was biasing persona
prose (bio, persona, profession, interested_topics) toward Chinese
even under Accept-Language: en, despite the existing
get_language_instruction() postfix mechanism. Translating the base
prompts removes that bias.

All locale-steering call sites are preserved verbatim (the inline
{get_language_instruction()} in each builder, the system-prompt
assembly), so non-English locales continue to receive Chinese output
of equivalent quality. Locale-independent constraints stay English
inside the prompt: gender stays the literal "male"/"female" enum
for individuals and "other" for groups; age stays an integer (30
for institutional accounts). The two attrs_str / context_str fallback
defaults ("无", "无额外上下文") are translated to "None" /
"No additional context" so they compose with the English body.

The country-language hint country: 国家(使用中文,如"中国") is
dropped during translation; locale now decides the country language
via the postfix.

Out of scope (untouched): logger calls (issue #6, already merged),
docstrings and comments (issue #7), the rule-based fallback
_generate_profile_rule_based, and the resilience helpers
_fix_truncated_json / _try_fix_json. No public API change, no new
dependencies, no edits outside the target file.

Closes #3
2026-05-08 05:44:00 +00:00
..
app feat(i18n): translate oasis_profile_generator prompts to english 2026-05-08 05:44:00 +00:00
scripts feat(i18n): translate ontology_generator prompts to english 2026-05-07 09:40:27 +00:00
tests feat(i18n): externalize chinese log and api response strings 2026-05-07 13:52:22 +00:00
pyproject.toml feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30
requirements.txt fix(file_parser): handle non-UTF-8 encoded text files with automatic encoding detection 2026-01-22 18:28:37 +08:00
run.py Add UTF-8 encoding support for Windows console in run.py and logger.py to prevent character encoding issues 2025-12-26 17:58:48 +08:00
uv.lock feat: migrate knowledge graph from Zep Cloud to Graphiti + local Neo4j 2026-03-22 01:30:28 +05:30