You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: nodes.py
+62-13Lines changed: 62 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -486,7 +486,7 @@ def exec(self, item):
486
486
# Add language instruction if not English
487
487
language_instruction=""
488
488
iflanguage.lower() !="english":
489
-
language_instruction=f"Write this tutorial chapter in {language}. Ensure all explanations, examples, and comments are in {language}.\n\n"
489
+
language_instruction=f"IMPORTANT: Write this ENTIRE tutorial chapter in {language} language. You MUST translate ALL content including explanations, examples, code comments, and technical terms into {language}. DO NOT use English anywhere except in code syntax and proper nouns. The entire output should be in {language} only.\n\n"
print(f"Warning: Mismatch between chapter order, abstractions, or content at index {i} (abstraction index {abstraction_index}). Skipping file generation for this entry.")
636
676
637
-
# Add attribution to index content
638
-
index_content+="\n\n---\n\nGenerated by [AI Codebase Knowledge Builder](https://github.com/The-Pocket/Tutorial-Codebase-Knowledge)"
677
+
# Add attribution to index content with language-specific text
678
+
iflanguage.lower() !="english":
679
+
# We already have the translated "Generated by" phrase from above, reuse it
680
+
# If not available (which shouldn't happen), translate it again
681
+
if'translated_gen'notinlocals():
682
+
gen_prompt=f"Translate only the phrase 'Generated by' to {language} language. Respond with just the translated phrase, nothing else."
0 commit comments