correct vocabulary for resolutions tags warning and sort tags list in resolution tags nag

This commit is contained in:
coolbot100s 2025-08-05 12:46:42 -07:00
parent 474e482474
commit 29e4c6d18a
2 changed files with 7 additions and 2 deletions

View File

@ -221,7 +221,8 @@ const multipleResolutionTagsWarning = computed(() => {
);
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;
});

View File

@ -73,6 +73,10 @@ export const tagsNags: Nag[] = [
.concat(context.project.additional_categories)
.filter((tag: string) => allResolutionTags.includes(tag))
const sortedTags = resolutionTags.toSorted((a, b) => {
return allResolutionTags.indexOf(a) - allResolutionTags.indexOf(b)
})
return formatMessage(
defineMessage({
id: 'nags.multiple-resolution-tags.description',
@ -81,7 +85,7 @@ export const tagsNags: Nag[] = [
}),
{
count: resolutionTags.length,
tags: resolutionTags
tags: sortedTags
.join(', ')
.replace('8x-', '8x or lower')
.replace('512x+', '512x or higher'),