convert EN localization to use proper casing, remove postprocessing from renderer

This commit is contained in:
jeffvli
2026-04-29 13:37:57 -07:00
parent bc7ef0624b
commit 4424e9ae33
193 changed files with 2267 additions and 3399 deletions
+5 -19
View File
@@ -35,15 +35,9 @@ export const normalizeReleaseTypes = (types: string[], t: TFunction) => {
const lower = type.toLocaleLowerCase();
if (lower in PRIMARY_MAPPING) {
primary.push(
t(`releaseType.primary.${PRIMARY_MAPPING[lower]}`, { postProcess: 'sentenceCase' }),
);
primary.push(t(`releaseType.primary.${PRIMARY_MAPPING[lower]}`));
} else if (lower in SECONDARY_MAPPING) {
secondary.push(
t(`releaseType.secondary.${SECONDARY_MAPPING[lower]}`, {
postProcess: 'sentenceCase',
}),
);
secondary.push(t(`releaseType.secondary.${SECONDARY_MAPPING[lower]}`, {}));
} else {
unknown.push(titleCase(type));
}
@@ -61,17 +55,13 @@ export const normalizeToPrimaryReleaseTypes = (types: string[], t: TFunction) =>
for (const type of types) {
const lower = type.toLocaleLowerCase();
if (lower in PRIMARY_MAPPING) {
primary.push(
t(`releaseType.primary.${PRIMARY_MAPPING[lower]}`, { postProcess: 'sentenceCase' }),
);
primary.push(t(`releaseType.primary.${PRIMARY_MAPPING[lower]}`));
}
}
// If no primary types found, use "other" category
if (primary.length === 0) {
primary.push(
t(`releaseType.primary.${PRIMARY_MAPPING.other}`, { postProcess: 'sentenceCase' }),
);
primary.push(t(`releaseType.primary.${PRIMARY_MAPPING.other}`));
}
return primary;
@@ -82,11 +72,7 @@ export const normalizeToSecondaryReleaseTypes = (types: string[], t: TFunction)
for (const type of types) {
const lower = type.toLocaleLowerCase();
if (lower in SECONDARY_MAPPING) {
secondary.push(
t(`releaseType.secondary.${SECONDARY_MAPPING[lower]}`, {
postProcess: 'sentenceCase',
}),
);
secondary.push(t(`releaseType.secondary.${SECONDARY_MAPPING[lower]}`, {}));
}
}