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