sokko-g/website/src/features/cards/rarityWords.js
Shinuwa 83ac709907
All checks were successful
Validate and deploy Sokko G / validate (push) Successful in 22m11s
Validate and deploy Sokko G / deploy (push) Successful in 13s
Reword bulk recycling and awakening texts, and list only the recycled rarities
The confirmation said "rareté Commun ou plus commune": it now names the recycled rarities ("Vos doublons communs, rares et épiques deviennent …") and its value list keeps only those rarities. The box no longer reads "0 doublon … +0 poussière", and the awakening texts say "6 doublons rares" instead of "doublons de rareté Rare". The history no longer shows "−undefined Éclats" for an awakening with duplicates of the collection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 10:20:42 +01:00

11 lines
699 B
JavaScript

// Rôle : mots des raretés dans les phrases (« 6 doublons rares », « doublons communs, rares et épiques »), plutôt que leur nom
// d'étiquette (« rareté Rare »).
// Adjectif d'une rareté accordé avec « doublon » : « rare », « légendaires », « communs ».
export function rarityAdjective(catalog, rarityId, count = 1) {
const word = (catalog.rarities.find((item) => item.id === rarityId)?.label ?? rarityId).toLocaleLowerCase("fr");
return count > 1 ? `${word}s` : word;
}
// Liste en français : « a, b et c » (`conjunction`) ou « a ou b » (`disjunction`).
export const frenchList = (items, type = "conjunction") => new Intl.ListFormat("fr", { type }).format(items);