Localize the rest of the TAFDocumentSheetConfig
This commit is contained in:
parent
235f8aef39
commit
1f9aee329e
2 changed files with 18 additions and 6 deletions
|
|
@ -40,7 +40,9 @@
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"confirm-and-close": "Confirm and Close",
|
"confirm-and-close": "Confirm and Close",
|
||||||
"save-and-close": "Save and Close",
|
"save-and-close": "Save and Close",
|
||||||
"delete": "Delete"
|
"delete": "Delete",
|
||||||
|
"resizable": "Resizable",
|
||||||
|
"not-resizable": "Not Resizable"
|
||||||
},
|
},
|
||||||
"Apps": {
|
"Apps": {
|
||||||
"Ask": {
|
"Ask": {
|
||||||
|
|
@ -75,7 +77,8 @@
|
||||||
"label": "Height"
|
"label": "Height"
|
||||||
},
|
},
|
||||||
"Resizable": {
|
"Resizable": {
|
||||||
"label": "Resizable"
|
"label": "Resizable",
|
||||||
|
"placeholder": "Default ({placeholder})"
|
||||||
},
|
},
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"foundry": "Foundry",
|
"foundry": "Foundry",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { __ID__, filePath } from "../consts.mjs";
|
import { __ID__, filePath } from "../consts.mjs";
|
||||||
import { getDefaultSizing } from "../utils/getSizing.mjs";
|
import { getDefaultSizing } from "../utils/getSizing.mjs";
|
||||||
|
import { localizer } from "../utils/localizer.mjs";
|
||||||
|
|
||||||
const { diffObject, expandObject, flattenObject } = foundry.utils;
|
const { diffObject, expandObject, flattenObject } = foundry.utils;
|
||||||
const { DocumentSheetConfig } = foundry.applications.apps;
|
const { DocumentSheetConfig } = foundry.applications.apps;
|
||||||
|
|
@ -74,7 +75,9 @@ export class TAFDocumentSheetConfig extends DocumentSheetConfig {
|
||||||
const defaults = getDefaultSizing();
|
const defaults = getDefaultSizing();
|
||||||
context.placeholders = {
|
context.placeholders = {
|
||||||
...defaults,
|
...defaults,
|
||||||
resizable: defaults.resizable ? `Resizable` : `Not Resizable`,
|
resizable: defaults.resizable
|
||||||
|
? localizer(`taf.misc.resizable`)
|
||||||
|
: localizer(`taf.misc.not-resizable`),
|
||||||
};
|
};
|
||||||
|
|
||||||
// Custom values from document itself
|
// Custom values from document itself
|
||||||
|
|
@ -88,9 +91,15 @@ export class TAFDocumentSheetConfig extends DocumentSheetConfig {
|
||||||
|
|
||||||
// Static prep
|
// Static prep
|
||||||
context.resizeOptions = [
|
context.resizeOptions = [
|
||||||
{ label: `Default (${context.placeholders.resizable})`, value: `` },
|
{
|
||||||
{ label: `Resizable`, value: `true` },
|
label: localizer(
|
||||||
{ label: `No Resizing`, value: `false` },
|
`taf.Apps.TAFDocumentSheetConfig.Resizable.placeholder`,
|
||||||
|
{ placeholder: context.placeholders.resizable },
|
||||||
|
),
|
||||||
|
value: ``,
|
||||||
|
},
|
||||||
|
{ label: localizer(`taf.misc.resizable`), value: `true` },
|
||||||
|
{ label: localizer(`taf.misc.not-resizable`), value: `false` },
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
// #endregion Data Prep
|
// #endregion Data Prep
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue