ciiic-translation-rules 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,437 @@
1
+ // src/index.ts
2
+ var TRANSLATION_RULES = {
3
+ /**
4
+ * Organisation name mappings
5
+ */
6
+ organisations: [
7
+ {
8
+ dutch: "Stimuleringsfonds Creatieve Industrie",
9
+ english: "Creative Industries Fund NL",
10
+ notes: 'Never shorten to just "Stimuleringsfonds" - always use the full name'
11
+ },
12
+ {
13
+ dutch: "Ministerie van OCW",
14
+ english: "Ministry of Education, Culture and Science"
15
+ },
16
+ {
17
+ dutch: "Rijksoverheid",
18
+ english: "Dutch Government"
19
+ },
20
+ {
21
+ dutch: "Mondriaan Fonds",
22
+ english: "Mondriaan Fund"
23
+ },
24
+ {
25
+ dutch: "Filmfonds",
26
+ english: "Netherlands Film Fund"
27
+ }
28
+ ],
29
+ /**
30
+ * Funding call name translations
31
+ * Some calls have official translations, others should remain unchanged
32
+ */
33
+ fundingCalls: [
34
+ {
35
+ dutch: "CIIIC Start: verkennend onderzoek naar immersive experiences",
36
+ english: "CIIIC Start: exploratory research into immersive experiences"
37
+ },
38
+ {
39
+ dutch: "CIIIC Kern: Vraaggestuurd praktijkgericht onderzoek naar immersive experiences",
40
+ english: "CIIIC Kern: Demand-driven practice-oriented research into immersive experiences"
41
+ },
42
+ {
43
+ dutch: "Artistic & Design Research for Immersive Experiences (ADRIE)",
44
+ english: "Artistic & Design Research for Immersive Experiences (ADRIE)",
45
+ notes: "Name stays the same in both languages"
46
+ },
47
+ {
48
+ dutch: "Immersive Tech for Learning & Inclusion (ITLI)",
49
+ english: "Immersive Tech for Learning & Inclusion (ITLI)",
50
+ notes: "Name stays the same in both languages"
51
+ }
52
+ ],
53
+ /**
54
+ * Terminology that can be used interchangeably or has specific translations
55
+ */
56
+ terminology: [
57
+ {
58
+ dutch: ["immersive experiences", "immersieve ervaringen"],
59
+ english: ["immersive experiences"],
60
+ notes: 'In Dutch, both "immersive experiences" (English) and "immersieve ervaringen" are acceptable. The abbreviation "IX" is common in both languages.'
61
+ },
62
+ {
63
+ dutch: ["call", "regeling"],
64
+ english: ["call", "funding call", "grant scheme"],
65
+ notes: 'The English word "call" is commonly used in Dutch. "Regeling" is the formal Dutch synonym.'
66
+ },
67
+ // Grant/Funding Terminology
68
+ {
69
+ dutch: ["subsidie", "financiering"],
70
+ english: ["grant", "funding"]
71
+ },
72
+ {
73
+ dutch: ["aanvraag", "aanvragen"],
74
+ english: ["application", "apply"]
75
+ },
76
+ {
77
+ dutch: ["bijdrage"],
78
+ english: ["contribution", "grant"]
79
+ },
80
+ {
81
+ dutch: ["toekenning"],
82
+ english: ["award", "allocation"]
83
+ },
84
+ {
85
+ dutch: ["begroting"],
86
+ english: ["budget"]
87
+ },
88
+ {
89
+ dutch: ["deadline", "sluitingsdatum"],
90
+ english: ["deadline", "closing date"]
91
+ },
92
+ {
93
+ dutch: ["honorarium"],
94
+ english: ["fee", "honorarium"]
95
+ },
96
+ {
97
+ dutch: ["penvoerder"],
98
+ english: ["lead applicant", "consortium lead"]
99
+ },
100
+ {
101
+ dutch: ["consortium"],
102
+ english: ["consortium"]
103
+ },
104
+ // Sector Terminology
105
+ {
106
+ dutch: ["creatieve industrie"],
107
+ english: ["creative industries"]
108
+ },
109
+ {
110
+ dutch: ["games", "gamesector"],
111
+ english: ["games", "games sector"]
112
+ },
113
+ {
114
+ dutch: ["extended reality", "XR"],
115
+ english: ["extended reality", "XR"]
116
+ },
117
+ {
118
+ dutch: ["virtual reality", "VR"],
119
+ english: ["virtual reality", "VR"]
120
+ },
121
+ {
122
+ dutch: ["augmented reality", "AR"],
123
+ english: ["augmented reality", "AR"]
124
+ },
125
+ {
126
+ dutch: ["ontwikkelaar"],
127
+ english: ["developer"]
128
+ },
129
+ {
130
+ dutch: ["ontwerper"],
131
+ english: ["designer"]
132
+ },
133
+ {
134
+ dutch: ["kunstenaar"],
135
+ english: ["artist"]
136
+ },
137
+ {
138
+ dutch: ["maker"],
139
+ english: ["maker", "creator"]
140
+ }
141
+ ],
142
+ /**
143
+ * Terms that should NEVER be translated
144
+ */
145
+ neverTranslate: [
146
+ "CIIIC",
147
+ "ADRIE",
148
+ "ITLI",
149
+ "IX",
150
+ "IFFR",
151
+ "Eurosonic Noorderslag",
152
+ "ESNS",
153
+ // Social handles and hashtags
154
+ "@CIIIC_NL",
155
+ "#immersiveexperiences",
156
+ // Partner platform names
157
+ "Circle",
158
+ "Notion",
159
+ // Event names that stay the same
160
+ "Dutch Game Garden",
161
+ "Indigo",
162
+ "Control Conference"
163
+ ],
164
+ /**
165
+ * Government policies and official terms
166
+ * Keep in original language, use quotes if needed
167
+ */
168
+ officialTerms: [
169
+ {
170
+ term: "Rijksbrede Innovatie Agenda",
171
+ language: "dutch",
172
+ notes: "No official English translation - keep in Dutch with quotes"
173
+ }
174
+ ],
175
+ /**
176
+ * Button/CTA text translations
177
+ */
178
+ ctaTranslations: [
179
+ { dutch: "Lees meer", english: "Read more" },
180
+ { dutch: "Lees verder", english: "Read more" },
181
+ { dutch: "Meer informatie", english: "More information" },
182
+ { dutch: "Schrijf je in", english: "Register" },
183
+ { dutch: "Meld je aan", english: "Sign up" },
184
+ { dutch: "Aanmelden", english: "Register" },
185
+ { dutch: "Bekijk de agenda", english: "View the agenda" },
186
+ { dutch: "Naar de website", english: "Go to website" },
187
+ { dutch: "Download", english: "Download" },
188
+ { dutch: "Deel dit bericht", english: "Share this" }
189
+ ],
190
+ /**
191
+ * CIIIC-specific role and term translations
192
+ */
193
+ ciiicSpecifics: [
194
+ { dutch: "Programmadirecteur", english: "Programme Director" },
195
+ { dutch: "Projectleider", english: "Project Lead" },
196
+ { dutch: "Communicatie & Marketing", english: "Communications & Marketing" },
197
+ { dutch: "Adviseur", english: "Advisor" },
198
+ { dutch: "Co\xF6rdinator", english: "Coordinator" },
199
+ { dutch: "Communityplatform", english: "Community Platform" }
200
+ ],
201
+ /**
202
+ * Newsletter-specific phrases
203
+ */
204
+ newsletterPhrases: [
205
+ { dutch: "Bekijk deze e-mail in je browser", english: "View this email in your browser" },
206
+ { dutch: "Uitschrijven", english: "Unsubscribe" },
207
+ { dutch: "Voorkeuren aanpassen", english: "Update your preferences" },
208
+ { dutch: "Beste lezer", english: "Dear reader" },
209
+ { dutch: "Met vriendelijke groet", english: "Kind regards" },
210
+ { dutch: "Hartelijke groet", english: "Warm regards" },
211
+ { dutch: "In deze nieuwsbrief", english: "In this newsletter" }
212
+ ]
213
+ };
214
+ function generateTerminologyPrompt() {
215
+ const lines = [];
216
+ lines.push("TERMINOLOGY & TRANSLATION RULES:");
217
+ lines.push("");
218
+ lines.push("Organisation names:");
219
+ for (const org of TRANSLATION_RULES.organisations) {
220
+ lines.push(` - "${org.dutch}" (Dutch) = "${org.english}" (English)`);
221
+ if (org.notes) {
222
+ lines.push(` Note: ${org.notes}`);
223
+ }
224
+ }
225
+ lines.push("");
226
+ lines.push("Funding call translations (use these exact translations):");
227
+ for (const call of TRANSLATION_RULES.fundingCalls) {
228
+ if (call.dutch === call.english) {
229
+ lines.push(` - "${call.dutch}" - same in both languages`);
230
+ } else {
231
+ lines.push(` - Dutch: "${call.dutch}"`);
232
+ lines.push(` English: "${call.english}"`);
233
+ }
234
+ if (call.notes) {
235
+ lines.push(` Note: ${call.notes}`);
236
+ }
237
+ }
238
+ lines.push("");
239
+ lines.push("Terminology guidelines:");
240
+ for (const term of TRANSLATION_RULES.terminology) {
241
+ lines.push(` - Dutch options: ${term.dutch.map((t) => `"${t}"`).join(", ")}`);
242
+ lines.push(` English options: ${term.english.map((t) => `"${t}"`).join(", ")}`);
243
+ if (term.notes) {
244
+ lines.push(` Note: ${term.notes}`);
245
+ }
246
+ }
247
+ lines.push("");
248
+ lines.push("Terms that should NEVER be translated (keep as-is):");
249
+ lines.push(` ${TRANSLATION_RULES.neverTranslate.join(", ")}`);
250
+ lines.push("");
251
+ lines.push("Official terms (keep in original language, use quotes if needed):");
252
+ for (const term of TRANSLATION_RULES.officialTerms) {
253
+ lines.push(` - "${term.term}" (${term.language})`);
254
+ if (term.notes) {
255
+ lines.push(` Note: ${term.notes}`);
256
+ }
257
+ }
258
+ lines.push("");
259
+ lines.push("Button/CTA text translations:");
260
+ for (const cta of TRANSLATION_RULES.ctaTranslations) {
261
+ lines.push(` - "${cta.dutch}" (Dutch) = "${cta.english}" (English)`);
262
+ }
263
+ lines.push("");
264
+ lines.push("CIIIC-specific terms:");
265
+ for (const term of TRANSLATION_RULES.ciiicSpecifics) {
266
+ lines.push(` - "${term.dutch}" (Dutch) = "${term.english}" (English)`);
267
+ }
268
+ lines.push("");
269
+ lines.push("Newsletter-specific phrases:");
270
+ for (const phrase of TRANSLATION_RULES.newsletterPhrases) {
271
+ lines.push(` - "${phrase.dutch}" (Dutch) = "${phrase.english}" (English)`);
272
+ }
273
+ lines.push("");
274
+ lines.push("Personal names:");
275
+ lines.push(" - People's names must NEVER be translated");
276
+ lines.push(' - Example: "Jan de Vries" stays "Jan de Vries", NOT "John of Vries"');
277
+ lines.push("");
278
+ lines.push(
279
+ "GENERAL PRINCIPLE: It is acceptable and often preferable to leave some terms in their original language. Proper nouns, programme names, personal names, and official terminology should generally remain unchanged or use the official translation if one exists."
280
+ );
281
+ return lines.join("\n");
282
+ }
283
+ function getDutchGuidelines() {
284
+ return `
285
+ DUTCH-SPECIFIC RULES:
286
+ - Headlines and titles: Use sentence case only (first letter capitalised, rest lowercase)
287
+ Example: "Deze titel is goed" NOT "Deze Titel Is Goed"
288
+ - Use informal Dutch: Always use "je/jij/jouw" instead of "u/uw"
289
+ - Maintain a friendly but professional tone
290
+ - When translating "Creative Industries Fund NL" \u2192 use "Stimuleringsfonds Creatieve Industrie"
291
+ - "Immersive experiences" can stay in English or be translated to "immersieve ervaringen"
292
+ - The word "call" (funding call) can remain "call" or be translated to "regeling"
293
+
294
+ ${generateTerminologyPrompt()}`;
295
+ }
296
+ function getEnglishGuidelines() {
297
+ return `
298
+ ENGLISH-SPECIFIC RULES:
299
+ - Use British English spellings (e.g., "colour" not "color", "organise" not "organize", "centre" not "center")
300
+ - British vocabulary: "programme" (not "program" for non-computer contexts), "behaviour", "favour", etc.
301
+ - Date format references should use British conventions where applicable
302
+ - When translating "Stimuleringsfonds Creatieve Industrie" \u2192 use "Creative Industries Fund NL"
303
+
304
+ ${generateTerminologyPrompt()}`;
305
+ }
306
+ function getGuidelines(targetLanguage) {
307
+ return targetLanguage === "nl" ? getDutchGuidelines() : getEnglishGuidelines();
308
+ }
309
+ function translateFundingCall(name, targetLanguage) {
310
+ const sourceKey = targetLanguage === "en" ? "dutch" : "english";
311
+ const targetKey = targetLanguage === "en" ? "english" : "dutch";
312
+ const mapping = TRANSLATION_RULES.fundingCalls.find(
313
+ (call) => call[sourceKey].toLowerCase() === name.toLowerCase()
314
+ );
315
+ return mapping?.[targetKey];
316
+ }
317
+ function translateOrganisation(name, targetLanguage) {
318
+ const sourceKey = targetLanguage === "en" ? "dutch" : "english";
319
+ const targetKey = targetLanguage === "en" ? "english" : "dutch";
320
+ const mapping = TRANSLATION_RULES.organisations.find(
321
+ (org) => org[sourceKey].toLowerCase() === name.toLowerCase()
322
+ );
323
+ return mapping?.[targetKey];
324
+ }
325
+ function shouldNeverTranslate(term) {
326
+ return TRANSLATION_RULES.neverTranslate.some(
327
+ (t) => t.toLowerCase() === term.toLowerCase()
328
+ );
329
+ }
330
+ function generateMarkdownPrompt() {
331
+ const lines = [];
332
+ lines.push("# CIIIC Translation Rules");
333
+ lines.push("");
334
+ lines.push("Use these rules when translating content between Dutch and English for CIIIC.");
335
+ lines.push("");
336
+ lines.push("## Organisation Names");
337
+ lines.push("");
338
+ lines.push("| Dutch | English | Notes |");
339
+ lines.push("|-------|---------|-------|");
340
+ for (const org of TRANSLATION_RULES.organisations) {
341
+ lines.push(`| ${org.dutch} | ${org.english} | ${org.notes || ""} |`);
342
+ }
343
+ lines.push("");
344
+ lines.push("## Funding Call Translations");
345
+ lines.push("");
346
+ lines.push("Use these exact translations for funding call names:");
347
+ lines.push("");
348
+ lines.push("| Dutch | English | Notes |");
349
+ lines.push("|-------|---------|-------|");
350
+ for (const call of TRANSLATION_RULES.fundingCalls) {
351
+ const note = call.dutch === call.english ? "Same in both languages" : call.notes || "";
352
+ lines.push(`| ${call.dutch} | ${call.english} | ${note} |`);
353
+ }
354
+ lines.push("");
355
+ lines.push("## Button/CTA Text");
356
+ lines.push("");
357
+ lines.push("| Dutch | English |");
358
+ lines.push("|-------|---------|");
359
+ for (const cta of TRANSLATION_RULES.ctaTranslations) {
360
+ lines.push(`| ${cta.dutch} | ${cta.english} |`);
361
+ }
362
+ lines.push("");
363
+ lines.push("## CIIIC-Specific Terms");
364
+ lines.push("");
365
+ lines.push("| Dutch | English |");
366
+ lines.push("|-------|---------|");
367
+ for (const term of TRANSLATION_RULES.ciiicSpecifics) {
368
+ lines.push(`| ${term.dutch} | ${term.english} |`);
369
+ }
370
+ lines.push("");
371
+ lines.push("## Terminology");
372
+ lines.push("");
373
+ lines.push("These terms can be used interchangeably or have specific translations:");
374
+ lines.push("");
375
+ lines.push("| Dutch | English | Notes |");
376
+ lines.push("|-------|---------|-------|");
377
+ for (const term of TRANSLATION_RULES.terminology) {
378
+ const dutchStr = term.dutch.join(", ");
379
+ const englishStr = term.english.join(", ");
380
+ lines.push(`| ${dutchStr} | ${englishStr} | ${term.notes || ""} |`);
381
+ }
382
+ lines.push("");
383
+ lines.push("## Newsletter-Specific Phrases");
384
+ lines.push("");
385
+ lines.push("| Dutch | English |");
386
+ lines.push("|-------|---------|");
387
+ for (const phrase of TRANSLATION_RULES.newsletterPhrases) {
388
+ lines.push(`| ${phrase.dutch} | ${phrase.english} |`);
389
+ }
390
+ lines.push("");
391
+ lines.push("## Official Terms");
392
+ lines.push("");
393
+ lines.push("Keep these in their original language (use quotes if needed):");
394
+ lines.push("");
395
+ for (const term of TRANSLATION_RULES.officialTerms) {
396
+ lines.push(`- **${term.term}** (${term.language})${term.notes ? ` - ${term.notes}` : ""}`);
397
+ }
398
+ lines.push("");
399
+ lines.push("## Never Translate");
400
+ lines.push("");
401
+ lines.push("These terms should NEVER be translated - keep them exactly as-is:");
402
+ lines.push("");
403
+ lines.push("```");
404
+ lines.push(TRANSLATION_RULES.neverTranslate.join(", "));
405
+ lines.push("```");
406
+ lines.push("");
407
+ lines.push("## General Rules");
408
+ lines.push("");
409
+ lines.push("### Personal Names");
410
+ lines.push("- People's names must NEVER be translated");
411
+ lines.push('- Example: "Jan de Vries" stays "Jan de Vries", NOT "John of Vries"');
412
+ lines.push("");
413
+ lines.push("### Dutch-Specific");
414
+ lines.push("- Headlines and titles: Use sentence case only (first letter capitalised, rest lowercase)");
415
+ lines.push('- Use informal Dutch: Always use "je/jij/jouw" instead of "u/uw"');
416
+ lines.push("- Maintain a friendly but professional tone");
417
+ lines.push("");
418
+ lines.push("### English-Specific");
419
+ lines.push("- Use British English spellings (colour, organise, centre)");
420
+ lines.push('- British vocabulary: "programme" (not "program"), "behaviour", "favour"');
421
+ lines.push("");
422
+ lines.push("### General Principle");
423
+ lines.push("It is acceptable and often preferable to leave some terms in their original language. Proper nouns, programme names, personal names, and official terminology should generally remain unchanged or use the official translation if one exists.");
424
+ lines.push("");
425
+ return lines.join("\n");
426
+ }
427
+ export {
428
+ TRANSLATION_RULES,
429
+ generateMarkdownPrompt,
430
+ generateTerminologyPrompt,
431
+ getDutchGuidelines,
432
+ getEnglishGuidelines,
433
+ getGuidelines,
434
+ shouldNeverTranslate,
435
+ translateFundingCall,
436
+ translateOrganisation
437
+ };
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "ciiic-translation-rules",
3
+ "version": "1.0.0",
4
+ "description": "Translation rules and terminology for CIIIC content (English/Dutch)",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.mjs",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "TRANSLATION_PROMPT.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsup src/index.ts --format cjs,esm --dts",
21
+ "generate-prompt": "npx tsx scripts/generate-prompt.ts",
22
+ "prepublishOnly": "npm run build"
23
+ },
24
+ "keywords": [
25
+ "translation",
26
+ "i18n",
27
+ "dutch",
28
+ "english",
29
+ "ciiic",
30
+ "localization"
31
+ ],
32
+ "author": "CIIIC",
33
+ "license": "MIT",
34
+ "devDependencies": {
35
+ "tsup": "^8.0.0",
36
+ "typescript": "^5.0.0"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "https://github.com/ciiic/translation-rules.git"
41
+ }
42
+ }