@goenhance/strapi-plugins-translate 1.1.9 → 1.1.11
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/server/index.js
CHANGED
|
@@ -29,7 +29,6 @@ ALLOWED ENGLISH CONTENT
|
|
|
29
29
|
English is allowed ONLY for:
|
|
30
30
|
|
|
31
31
|
1) Version numbers
|
|
32
|
-
2) Standard technical acronyms (AI, API, UI, UX, JSON, HTML, CSS, FPS, 4K, etc.)
|
|
33
32
|
3) Code variables or placeholders
|
|
34
33
|
|
|
35
34
|
All other English words must be translated.
|
|
@@ -43,7 +42,6 @@ STRUCTURE REQUIREMENTS (STRICT)
|
|
|
43
42
|
- Do NOT add fields.
|
|
44
43
|
- Do NOT remove fields.
|
|
45
44
|
- Do NOT reorder fields.
|
|
46
|
-
- Only translate string values that contain natural language.
|
|
47
45
|
- Preserve placeholders, variables, HTML, Markdown syntax, and URLs exactly.
|
|
48
46
|
- HTML link labels also need to be translated
|
|
49
47
|
- Maintain valid JSON formatting.
|
|
@@ -63,7 +61,7 @@ If a string value is:
|
|
|
63
61
|
- An ID
|
|
64
62
|
- A slug
|
|
65
63
|
- A filename
|
|
66
|
-
|
|
64
|
+
|
|
67
65
|
|
|
68
66
|
You MUST return it exactly as-is.
|
|
69
67
|
|
|
@@ -1618,7 +1616,6 @@ CRITICAL LANGUAGE LOCK:
|
|
|
1618
1616
|
APPROVED ENGLISH TERMS (ONLY THESE CATEGORIES):
|
|
1619
1617
|
|
|
1620
1618
|
- Version numbers
|
|
1621
|
-
- Standard technical acronyms (AI, API, UI, UX, JSON, HTML, CSS, FPS, 4K)
|
|
1622
1619
|
- Code variables or placeholders
|
|
1623
1620
|
|
|
1624
1621
|
All other English words must be translated.
|
package/dist/server/index.mjs
CHANGED
|
@@ -28,7 +28,6 @@ ALLOWED ENGLISH CONTENT
|
|
|
28
28
|
English is allowed ONLY for:
|
|
29
29
|
|
|
30
30
|
1) Version numbers
|
|
31
|
-
2) Standard technical acronyms (AI, API, UI, UX, JSON, HTML, CSS, FPS, 4K, etc.)
|
|
32
31
|
3) Code variables or placeholders
|
|
33
32
|
|
|
34
33
|
All other English words must be translated.
|
|
@@ -42,7 +41,6 @@ STRUCTURE REQUIREMENTS (STRICT)
|
|
|
42
41
|
- Do NOT add fields.
|
|
43
42
|
- Do NOT remove fields.
|
|
44
43
|
- Do NOT reorder fields.
|
|
45
|
-
- Only translate string values that contain natural language.
|
|
46
44
|
- Preserve placeholders, variables, HTML, Markdown syntax, and URLs exactly.
|
|
47
45
|
- HTML link labels also need to be translated
|
|
48
46
|
- Maintain valid JSON formatting.
|
|
@@ -62,7 +60,7 @@ If a string value is:
|
|
|
62
60
|
- An ID
|
|
63
61
|
- A slug
|
|
64
62
|
- A filename
|
|
65
|
-
|
|
63
|
+
|
|
66
64
|
|
|
67
65
|
You MUST return it exactly as-is.
|
|
68
66
|
|
|
@@ -1617,7 +1615,6 @@ CRITICAL LANGUAGE LOCK:
|
|
|
1617
1615
|
APPROVED ENGLISH TERMS (ONLY THESE CATEGORIES):
|
|
1618
1616
|
|
|
1619
1617
|
- Version numbers
|
|
1620
|
-
- Standard technical acronyms (AI, API, UI, UX, JSON, HTML, CSS, FPS, 4K)
|
|
1621
1618
|
- Code variables or placeholders
|
|
1622
1619
|
|
|
1623
1620
|
All other English words must be translated.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const DEFAULT_SYSTEM_PROMPT = "You are a professional localization engineer specializing in SEO-driven multilingual websites.\n\nYour task is to translate structured JSON content into ONE strictly defined target language provided in the user instructions.\n\nYou must strictly follow the language specified by the user.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nGLOBAL LANGUAGE RULES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n- Output must contain only ONE language.\n- Do not mix languages.\n- Do not auto-switch to a similar language.\n- All visible natural language text must be fully localized.\n- Partial translation is forbidden.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nALLOWED ENGLISH CONTENT\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nEnglish is allowed ONLY for:\n\n1) Version numbers\
|
|
1
|
+
export declare const DEFAULT_SYSTEM_PROMPT = "You are a professional localization engineer specializing in SEO-driven multilingual websites.\n\nYour task is to translate structured JSON content into ONE strictly defined target language provided in the user instructions.\n\nYou must strictly follow the language specified by the user.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nGLOBAL LANGUAGE RULES\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n- Output must contain only ONE language.\n- Do not mix languages.\n- Do not auto-switch to a similar language.\n- All visible natural language text must be fully localized.\n- Partial translation is forbidden.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nALLOWED ENGLISH CONTENT\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nEnglish is allowed ONLY for:\n\n1) Version numbers\n3) Code variables or placeholders\n\nAll other English words must be translated.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nSTRUCTURE REQUIREMENTS (STRICT)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n- Preserve JSON structure exactly.\n- Do NOT modify keys.\n- Do NOT add fields.\n- Do NOT remove fields.\n- Do NOT reorder fields.\n- Preserve placeholders, variables, HTML, Markdown syntax, and URLs exactly.\n- HTML link labels also need to be translated\n- Maintain valid JSON formatting.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nIMMUTABLE VALUE RULE (CRITICAL)\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nIf a string value is:\n\n- A pure URL\n- A file path\n- A CDN link\n- An image link\n- A video link\n- A hash\n- An ID\n- A slug\n- A filename\n\n\nYou MUST return it exactly as-is.\n\nDo NOT:\n- Wrap it in Markdown\n- Convert it to ![]()\n- Add alt text\n- Add HTML tags\n- Reformat it\n- Modify it in any way\n\nThe value must remain byte-identical to the source.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nNO FORMAT TRANSFORMATION RULE\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nYou are performing translation ONLY.\n\nYou are NOT:\n- Improving formatting\n- Converting plain URLs into Markdown\n- Generating new markup\n- Optimizing structure\n- Rewriting fields\n- Enhancing content\n\nDo not reinterpret field meaning.\nDo not transform content type.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nSEO LOCALIZATION\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n- Use natural terminology used by native speakers.\n- Avoid literal translation.\n- Maintain marketing fluency where appropriate.\n- Preserve technical accuracy where required.\n\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nMANDATORY VALIDATION\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nBefore output:\n\n1. Verify that only ONE target language is used.\n2. Ensure no unintended foreign words remain.\n3. Ensure allowed English is limited to approved categories.\n4. Ensure all immutable values remain byte-identical.\n5. Ensure JSON structure is unchanged.\n6. Ensure valid JSON format.\n\nReturn ONLY the localized JSON.\nNo explanations.\nNo comments.\nNo extra formatting.";
|
|
2
2
|
export declare const SYSTEM_PROMPT_APPENDIX = "The user asks you to translate the text to a specific language, the language is provided via short code like \"en\", \"fr\", \"de\", etc.";
|
|
3
3
|
export declare const DEFAULT_LLM_TEMPERATURE = 0.3;
|
|
4
4
|
export declare const DEFAULT_LLM_MODEL = "gpt-4o";
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.11",
|
|
3
3
|
"keywords": [
|
|
4
4
|
"strapi",
|
|
5
5
|
"plugin",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"test:ts:back": "run -T tsc -p server/tsconfig.json"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@strapi/design-system": "^2.0
|
|
44
|
-
"@strapi/icons": "^2.0
|
|
43
|
+
"@strapi/design-system": "^2.2.0",
|
|
44
|
+
"@strapi/icons": "^2.2.0",
|
|
45
45
|
"openai": "^5.3.0",
|
|
46
46
|
"react-intl": "^7.1.11"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@strapi/sdk-plugin": "^5.
|
|
50
|
-
"@strapi/strapi": "^5.
|
|
49
|
+
"@strapi/sdk-plugin": "^5.4.0",
|
|
50
|
+
"@strapi/strapi": "^5.39.0",
|
|
51
51
|
"@strapi/typescript-utils": "^5.31.3",
|
|
52
52
|
"@types/koa": "^3.0.1",
|
|
53
53
|
"@types/react": "^19.1.8",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"typescript": "^5.8.3"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@strapi/sdk-plugin": "^5.
|
|
64
|
-
"@strapi/strapi": ">=5.
|
|
63
|
+
"@strapi/sdk-plugin": "^5.4.0",
|
|
64
|
+
"@strapi/strapi": ">=5.39.0",
|
|
65
65
|
"react": "^18.3.1",
|
|
66
66
|
"react-dom": "^18.3.1",
|
|
67
67
|
"react-router-dom": "^6.30.0",
|