correct vocabulary for resolutions tags warning and sort tags list in resolution tags nag
This commit is contained in:
parent
474e482474
commit
29e4c6d18a
@ -221,7 +221,8 @@ const multipleResolutionTagsWarning = computed(() => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (resolutionTags.length > 1) {
|
if (resolutionTags.length > 1) {
|
||||||
return `You've selected ${resolutionTags.length} resolution tags (${resolutionTags.map((t) => t.name).join(", ")}). Resource packs should typically only have one resolution tag.`;
|
return `You've selected ${resolutionTags.length} resolution tags (${resolutionTags.map((t) => t.name).join(", ").replace('8x-', '8x or lower')
|
||||||
|
.replace('512x+', '512x or higher')}). Resource packs should typically only have one resolution tag.`;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -73,6 +73,10 @@ export const tagsNags: Nag[] = [
|
|||||||
.concat(context.project.additional_categories)
|
.concat(context.project.additional_categories)
|
||||||
.filter((tag: string) => allResolutionTags.includes(tag))
|
.filter((tag: string) => allResolutionTags.includes(tag))
|
||||||
|
|
||||||
|
const sortedTags = resolutionTags.toSorted((a, b) => {
|
||||||
|
return allResolutionTags.indexOf(a) - allResolutionTags.indexOf(b)
|
||||||
|
})
|
||||||
|
|
||||||
return formatMessage(
|
return formatMessage(
|
||||||
defineMessage({
|
defineMessage({
|
||||||
id: 'nags.multiple-resolution-tags.description',
|
id: 'nags.multiple-resolution-tags.description',
|
||||||
@ -81,7 +85,7 @@ export const tagsNags: Nag[] = [
|
|||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
count: resolutionTags.length,
|
count: resolutionTags.length,
|
||||||
tags: resolutionTags
|
tags: sortedTags
|
||||||
.join(', ')
|
.join(', ')
|
||||||
.replace('8x-', '8x or lower')
|
.replace('8x-', '8x or lower')
|
||||||
.replace('512x+', '512x or higher'),
|
.replace('512x+', '512x or higher'),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user