Guidelines for translating narrative content into Indonesian while preserving literary style and integrating it into the codebase.
This skill guides you through translating the "Book Reader" content (data.js) into Indonesian. It emphasizes literary quality over literal translation and provides a workflow for integrating multilingual support.
"Pahami Perasaan, Bukan Sekadar Kata." The source material is a "Nordic Noir" style thriller. The Indonesian translation must reflect this cold, clinical, yet intense atmosphere. Use formal Indonesian (Bahasa Baku) for narrative and analytical sections, while allowing for more emotive language in Noa's sections.
Tone Guidelines:
Use this to structurally prepare the codebase for Indonesian support.
Schema Update:
Modify src/features/reader/data.js to support Indonesian fields.
{
chapter: 1,
title: "PART I: THE DEFICIT",
title_id: "BAGIAN I: DEFISIT", // [NEW]
content: "<p>...</p>",
content_id: "<p>...</p>" // [NEW]
}
Logic Update:
Update logic.js to handle the id language state.
const state = {
lang: 'en', // 'cn', or 'id'
};
// In renderChapter:
let title, content;
if (state.lang === 'cn') {
title = chapter.title_cn;
content = chapter.content_cn;
} else if (state.lang === 'id') {
title = chapter.title_id;
content = chapter.content_id;
} else {
title = chapter.title;
content = chapter.content;
}
UI Update: Add a language toggle (ID) in the Settings Drawer.
Use this when generating the content.
Novel.txt or data.js chunk by chunk.<p>) is preserved.| English Term | Context | Indonesian Translation | Note |
|---|---|---|---|
| "HelloTalk" | The App | HelloTalk | Keep English brand name usually |
| "Social Housing" | Setting | Perumahan Rakyat / Subsidi | Conveys lower economic status |
| "Polders" | Geography | Polder | Common term in Indonesian for reclaimed land |
| "Apex Predator" | Metaphor | Predator Puncak | Strength/Danger |