Update categoryList socket emissions to include language and translation request: Modified the socket.emit calls in SharedCarousel, Sitemap, and prerender.cjs to support language specification and translation requests. Added JTL language mappings in translate-i18n.js for improved localization.

This commit is contained in:
sebseb7
2025-07-18 12:36:39 +02:00
parent 67f0126343
commit aa82e8d1d2
3 changed files with 25 additions and 2 deletions

View File

@@ -70,6 +70,29 @@ const TARGET_LANGUAGES = {
'zh': 'Chinese (Simplified)'
};
/* JTL mapping
bg (Bulgarian) -> kSprache: 37
cs (Czech) -> kSprache: 21
es (Spanish) -> kSprache: 20
fr (French) -> kSprache: 5
el (Greek) -> kSprache: 7
hr (Croatian) -> kSprache: 11
hu (Hungarian) -> kSprache: 24
it (Italian) -> kSprache: 10
pl (Polish) -> kSprache: 14
ro (Romanian) -> kSprache: 26
ru (Russian) -> kSprache: 16
sk (Slovak) -> kSprache: 18
sl (Slovenian) -> kSprache: 19
sr (Serbian) -> kSprache: 93
sv (Swedish) -> kSprache: 17
tr (Turkish) -> kSprache: 22
uk (Ukrainian) -> kSprache: 23
ar (Arabic) -> kSprache: 30
zh (Chinese) -> kSprache: 43
*/
// Initialize OpenAI client
const openai = new OpenAI({
apiKey: OPENAI_API_KEY,