docs: translation module (#14271)
* docs: translation module * fix link in JS SDK * add translations user guides [WIP] * updates * fix broken link * remove mentions of default locale * change header * updates * updated user guides * handle todos * fix build error * fix lint errors
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,453 @@
|
||||
{
|
||||
"id": 391,
|
||||
"name": "translation-models",
|
||||
"variant": "project",
|
||||
"kind": 1,
|
||||
"flags": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 399,
|
||||
"name": "Locale",
|
||||
"variant": "declaration",
|
||||
"kind": 32,
|
||||
"flags": {
|
||||
"isConst": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "locale.ts",
|
||||
"line": 3,
|
||||
"character": 6,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L3"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/entity.ts",
|
||||
"qualifiedName": "DmlEntity"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/entity.ts",
|
||||
"qualifiedName": "DMLEntitySchemaBuilder"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reflection",
|
||||
"declaration": {
|
||||
"id": 400,
|
||||
"name": "__type",
|
||||
"variant": "declaration",
|
||||
"kind": 65536,
|
||||
"flags": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 401,
|
||||
"name": "id",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "locale.ts",
|
||||
"line": 5,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L5"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/primary-key.ts",
|
||||
"qualifiedName": "PrimaryKeyModifier"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/id.ts",
|
||||
"qualifiedName": "IdProperty"
|
||||
},
|
||||
"name": "IdProperty",
|
||||
"package": "@medusajs/utils"
|
||||
}
|
||||
],
|
||||
"name": "PrimaryKeyModifier",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 402,
|
||||
"name": "code",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "locale.ts",
|
||||
"line": 6,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L6"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/text.ts",
|
||||
"qualifiedName": "TextProperty"
|
||||
},
|
||||
"name": "TextProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 403,
|
||||
"name": "name",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "locale.ts",
|
||||
"line": 7,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L7"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/text.ts",
|
||||
"qualifiedName": "TextProperty"
|
||||
},
|
||||
"name": "TextProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"title": "Properties",
|
||||
"children": [
|
||||
401,
|
||||
402,
|
||||
403
|
||||
]
|
||||
}
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "locale.ts",
|
||||
"line": 4,
|
||||
"character": 20,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/locale.ts#L4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "DMLEntitySchemaBuilder",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
{
|
||||
"type": "literal",
|
||||
"value": "locale"
|
||||
}
|
||||
],
|
||||
"name": "DmlEntity",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 392,
|
||||
"name": "Translation",
|
||||
"variant": "declaration",
|
||||
"kind": 32,
|
||||
"flags": {
|
||||
"isConst": true
|
||||
},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 3,
|
||||
"character": 6,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L3"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/entity.ts",
|
||||
"qualifiedName": "DmlEntity"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/entity.ts",
|
||||
"qualifiedName": "DMLEntitySchemaBuilder"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reflection",
|
||||
"declaration": {
|
||||
"id": 393,
|
||||
"name": "__type",
|
||||
"variant": "declaration",
|
||||
"kind": 65536,
|
||||
"flags": {},
|
||||
"children": [
|
||||
{
|
||||
"id": 394,
|
||||
"name": "id",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 5,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L5"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/primary-key.ts",
|
||||
"qualifiedName": "PrimaryKeyModifier"
|
||||
},
|
||||
"typeArguments": [
|
||||
{
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/id.ts",
|
||||
"qualifiedName": "IdProperty"
|
||||
},
|
||||
"name": "IdProperty",
|
||||
"package": "@medusajs/utils"
|
||||
}
|
||||
],
|
||||
"name": "PrimaryKeyModifier",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 395,
|
||||
"name": "reference_id",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 6,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L6"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/text.ts",
|
||||
"qualifiedName": "TextProperty"
|
||||
},
|
||||
"name": "TextProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 396,
|
||||
"name": "reference",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 7,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L7"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/text.ts",
|
||||
"qualifiedName": "TextProperty"
|
||||
},
|
||||
"name": "TextProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 397,
|
||||
"name": "locale_code",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 8,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L8"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/text.ts",
|
||||
"qualifiedName": "TextProperty"
|
||||
},
|
||||
"name": "TextProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
},
|
||||
{
|
||||
"id": 398,
|
||||
"name": "translations",
|
||||
"variant": "declaration",
|
||||
"kind": 1024,
|
||||
"flags": {},
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 9,
|
||||
"character": 4,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L9"
|
||||
}
|
||||
],
|
||||
"type": {
|
||||
"type": "reference",
|
||||
"target": {
|
||||
"sourceFileName": "../../../../packages/core/utils/src/dml/properties/json.ts",
|
||||
"qualifiedName": "JSONProperty"
|
||||
},
|
||||
"name": "JSONProperty",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"title": "Properties",
|
||||
"children": [
|
||||
394,
|
||||
395,
|
||||
396,
|
||||
397,
|
||||
398
|
||||
]
|
||||
}
|
||||
],
|
||||
"sources": [
|
||||
{
|
||||
"fileName": "translation.ts",
|
||||
"line": 4,
|
||||
"character": 25,
|
||||
"url": "https://github.com/medusajs/medusa/blob/8bd1d22765edef3b3d2ff31c8f8935049d8b280a/packages/modules/translation/src/models/translation.ts#L4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"name": "DMLEntitySchemaBuilder",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
{
|
||||
"type": "literal",
|
||||
"value": "translation"
|
||||
}
|
||||
],
|
||||
"name": "DmlEntity",
|
||||
"package": "@medusajs/utils"
|
||||
},
|
||||
"defaultValue": "..."
|
||||
}
|
||||
],
|
||||
"groups": [
|
||||
{
|
||||
"title": "Variables",
|
||||
"children": [
|
||||
399,
|
||||
392
|
||||
]
|
||||
}
|
||||
],
|
||||
"packageName": "@medusajs/translation",
|
||||
"symbolIdMap": {
|
||||
"391": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/index.ts",
|
||||
"qualifiedName": ""
|
||||
},
|
||||
"392": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "Translation"
|
||||
},
|
||||
"393": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object"
|
||||
},
|
||||
"394": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object.id"
|
||||
},
|
||||
"395": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object.reference_id"
|
||||
},
|
||||
"396": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object.reference"
|
||||
},
|
||||
"397": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object.locale_code"
|
||||
},
|
||||
"398": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/translation.ts",
|
||||
"qualifiedName": "__object.translations"
|
||||
},
|
||||
"399": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/locale.ts",
|
||||
"qualifiedName": "Locale"
|
||||
},
|
||||
"400": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/locale.ts",
|
||||
"qualifiedName": "__object"
|
||||
},
|
||||
"401": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/locale.ts",
|
||||
"qualifiedName": "__object.id"
|
||||
},
|
||||
"402": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/locale.ts",
|
||||
"qualifiedName": "__object.code"
|
||||
},
|
||||
"403": {
|
||||
"sourceFileName": "../../../../packages/modules/translation/src/models/locale.ts",
|
||||
"qualifiedName": "__object.name"
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"entries": {
|
||||
"1": "../../../../packages/modules/translation/src/models/index.ts"
|
||||
},
|
||||
"reflections": {
|
||||
"1": 391
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user