Fully localize the Attribute Manager app
This commit is contained in:
parent
9f6c117c84
commit
3819db1ce4
4 changed files with 23 additions and 9 deletions
|
|
@ -38,13 +38,22 @@
|
||||||
"no-data-submitted": "No data submitted",
|
"no-data-submitted": "No data submitted",
|
||||||
"data-query-notif-header": "Data Query Notification",
|
"data-query-notif-header": "Data Query Notification",
|
||||||
"cancel": "Cancel",
|
"cancel": "Cancel",
|
||||||
"confirm-and-close": "Confirm and Close"
|
"confirm-and-close": "Confirm and Close",
|
||||||
|
"save-and-close": "Save and Close",
|
||||||
|
"delete": "Delete"
|
||||||
},
|
},
|
||||||
"Apps": {
|
"Apps": {
|
||||||
"Ask": {
|
"Ask": {
|
||||||
"title": "Questions",
|
"title": "Questions",
|
||||||
"invalid-input-type": "Invalid input type provided: {type}"
|
"invalid-input-type": "Invalid input type provided: {type}"
|
||||||
},
|
},
|
||||||
|
"AttributeManager": {
|
||||||
|
"title": "Attributes: {name}",
|
||||||
|
"has-max": "Has Maximum?",
|
||||||
|
"name-placeholder": "Attribute Name...",
|
||||||
|
"no-attributes": "No attributes yet",
|
||||||
|
"add-new-attribute": "Add New Attribute"
|
||||||
|
},
|
||||||
"QueryStatus": {
|
"QueryStatus": {
|
||||||
"title": "Information Request Status",
|
"title": "Information Request Status",
|
||||||
"user-disconnected-tooltip": "This user is not logged in to Foundry",
|
"user-disconnected-tooltip": "This user is not logged in to Foundry",
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
import { __ID__, filePath } from "../consts.mjs";
|
import { __ID__, filePath } from "../consts.mjs";
|
||||||
import { attributeSorter } from "../utils/attributeSort.mjs";
|
import { attributeSorter } from "../utils/attributeSort.mjs";
|
||||||
|
import { localizer } from "../utils/localizer.mjs";
|
||||||
import { toID } from "../utils/toID.mjs";
|
import { toID } from "../utils/toID.mjs";
|
||||||
|
|
||||||
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
@ -52,7 +53,10 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
};
|
};
|
||||||
|
|
||||||
get title() {
|
get title() {
|
||||||
return `Attributes: ${this.#doc.name}`;
|
return localizer(
|
||||||
|
`taf.Apps.AttributeManager.title`,
|
||||||
|
this.#doc,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
// #endregion Instance Data
|
// #endregion Instance Data
|
||||||
|
|
||||||
|
|
@ -102,7 +106,6 @@ export class AttributeManager extends HandlebarsApplicationMixin(ApplicationV2)
|
||||||
attrs.push({
|
attrs.push({
|
||||||
id,
|
id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
displayName: data.isNew ? `New Attribute` : data.name,
|
|
||||||
sort: data.sort,
|
sort: data.sort,
|
||||||
isRange: data.isRange,
|
isRange: data.isRange,
|
||||||
isNew: data.isNew ?? false,
|
isNew: data.isNew ?? false,
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@
|
||||||
type="text"
|
type="text"
|
||||||
data-bind="{{ attr.id }}.name"
|
data-bind="{{ attr.id }}.name"
|
||||||
value="{{ attr.name }}"
|
value="{{ attr.name }}"
|
||||||
placeholder="Attribute Name..."
|
placeholder="{{localize "taf.Apps.AttributeManager.name-placeholder"}}"
|
||||||
>
|
>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span>{{ attr.name }}</span>
|
<span>{{ attr.name }}</span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<label>
|
<label>
|
||||||
Has Maximum?
|
{{localize "taf.Apps.AttributeManager.has-max"}}
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
data-bind="{{ attr.id }}.isRange"
|
data-bind="{{ attr.id }}.isRange"
|
||||||
|
|
@ -32,10 +32,12 @@
|
||||||
type="button"
|
type="button"
|
||||||
data-action="removeAttribute"
|
data-action="removeAttribute"
|
||||||
>
|
>
|
||||||
Delete
|
{{localize "taf.misc.delete"}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p>No attributes yet</p>
|
<p>
|
||||||
|
{{localize "taf.Apps.AttributeManager.no-attributes"}}
|
||||||
|
</p>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
type="button"
|
type="button"
|
||||||
data-action="addNew"
|
data-action="addNew"
|
||||||
>
|
>
|
||||||
Add New Attribute
|
{{localize "taf.Apps.AttributeManager.add-new-attribute"}}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
>
|
>
|
||||||
Save and Close
|
{{localize "taf.misc.save-and-close"}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue