yoastseo
Version:
Yoast client-side content analysis
311 lines (310 loc) • 14.9 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _scores = require("./scores");
var _includesConsecutiveWords = require("../helpers/includesConsecutiveWords");
var _isFollowedByException = require("../helpers/isFollowedByException");
var _generalFeedbackStrings = require("./feedbackStrings/generalFeedbackStrings");
var _cultureAssessmentStrings = require("./feedbackStrings/cultureAssessmentStrings");
var _createRuleDescriptions = require("../helpers/createRuleDescriptions");
const cultureAssessments = [{
identifier: "firstWorld",
nonInclusivePhrases: ["First World"],
inclusiveAlternatives: "the specific name for the region or country",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["War", "war", "Assembly", "assembly"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["War", "war", "Assembly", "assembly"])
}, {
identifier: "thirdWorld",
nonInclusivePhrases: ["Third World"],
inclusiveAlternatives: "the specific name for the region or country",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true,
rule: (words, nonInclusivePhrase) => (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["War", "war", "Quarterly", "quarterly", "country"])),
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["War", "war", "Quarterly", "quarterly", "country"])
}, {
identifier: "tribe",
nonInclusivePhrases: ["tribe"],
inclusiveAlternatives: "<i>group, cohort, crew, league, guild, team, union</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureUsesTerm
}, {
identifier: "tribes",
nonInclusivePhrases: ["tribes"],
inclusiveAlternatives: "<i>groups, cohorts, crews, leagues, guilds, teams, unions</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureUsesTerm
}, {
identifier: "exotic",
nonInclusivePhrases: ["exotic"],
inclusiveAlternatives: "<i>unfamiliar, foreign, peculiar, fascinating, alluring, bizarre, non-native, introduced</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.beCarefulHarmful + " Unless you are referring to animals or scientific terms, " + "consider using an alternative, such as %2$s.",
rule: (words, nonInclusivePhrase) => {
return (0, _includesConsecutiveWords.includesConsecutiveWords)(words, nonInclusivePhrase).filter((0, _isFollowedByException.isNotFollowedByException)(words, nonInclusivePhrase, ["longhair", "longhairs", "shorthair", "shorthairs", "bloom", "blooms", "species", "florals", "botanical", "botanicals", "leather", "leathers", "material", "materials", "timber", "timbers", "composite", "composites", "atom", "atoms", "molecule", "molecules", "hadron", "hadrons", "sphere", "spheres", "star", "stars", "car", "cars", "sports car", "sports cars"]));
},
ruleDescription: (0, _createRuleDescriptions.notFollowed)(["longhair", "longhairs", "shorthair", "shorthairs", "bloom", "blooms", "species", "florals", "botanical", "botanicals", "leather", "leathers", "material", "materials", "timber", "timbers", "composite", "composites", "atom", "atoms", "molecule", "molecules", "hadron", "hadrons", "sphere", "spheres", "star", "stars", "car", "cars", "sports car", "sports cars"])
}, {
identifier: "sherpa",
nonInclusivePhrases: ["sherpa"],
inclusiveAlternatives: "<i>commander, coach, mastermind, coach, mentor</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureOfOrigin
}, {
identifier: "guru",
nonInclusivePhrases: ["guru"],
inclusiveAlternatives: "<i>mentor, doyen, coach, mastermind, virtuoso, expert</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureOfOrigin
}, {
identifier: "gurus",
nonInclusivePhrases: ["gurus"],
inclusiveAlternatives: "<i>mentors, doyens, coaches, masterminds, virtuosos, experts</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureOfOrigin
}, {
identifier: "nonWhite",
nonInclusivePhrases: ["non-white"],
inclusiveAlternatives: "<i>people of color, POC, BIPOC</i> or specifying the racial groups mentioned",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "oriental",
nonInclusivePhrases: ["oriental"],
inclusiveAlternatives: "<i>Asian</i>. When possible, be more specific (e.g. <i>East Asian</i>)",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessAnimalsObjects
}, {
identifier: "asianAmerican",
nonInclusivePhrases: ["Asian-American"],
inclusiveAlternatives: "<i>Asian American</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true
}, {
identifier: "asianAmericans",
nonInclusivePhrases: ["Asian-Americans"],
inclusiveAlternatives: "<i>Asian Americans</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true
}, {
identifier: "africanAmerican",
nonInclusivePhrases: ["African-American"],
inclusiveAlternatives: "<i>African American, Black, American of African descent</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true
}, {
identifier: "africanAmericans",
nonInclusivePhrases: ["African-Americans"],
inclusiveAlternatives: "<i>African Americans, Black, Americans of African descent</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful,
caseSensitive: true
}, {
identifier: "whiteRace",
nonInclusivePhrases: ["the White race"],
inclusiveAlternatives: "",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.avoidHarmful,
caseSensitive: true
}, {
identifier: "whitelist",
nonInclusivePhrases: ["whitelist"],
inclusiveAlternatives: "<i>allowlist</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "whitelists",
nonInclusivePhrases: ["whitelists"],
inclusiveAlternatives: "<i>allowlists</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "whitelisting",
nonInclusivePhrases: ["whitelisting"],
inclusiveAlternatives: "<i>allowlisting</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "whitelisted",
nonInclusivePhrases: ["whitelisted"],
inclusiveAlternatives: "<i>allowlisted</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "blacklist",
nonInclusivePhrases: ["blacklist"],
inclusiveAlternatives: "<i>blocklist, denylist, faillist, redlist</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "blacklists",
nonInclusivePhrases: ["blacklists"],
inclusiveAlternatives: "<i>blocklists, denylists, faillists, redlists</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "blacklisting",
nonInclusivePhrases: ["blacklisting"],
inclusiveAlternatives: "<i>blocklisting, denylisting, faillisting, redlisting</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "blacklisted",
nonInclusivePhrases: ["blacklisted"],
inclusiveAlternatives: "<i>blocklisted, denylisted, faillisted, redlisted</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "gyp",
nonInclusivePhrases: ["gyp"],
inclusiveAlternatives: "<i>fraud, cheat, swindle, rip-off</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "gyps",
nonInclusivePhrases: ["gyps"],
inclusiveAlternatives: "<i>frauds, cheats, swindles, rips off, rip-offs</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "gypped",
nonInclusivePhrases: ["gypped"],
inclusiveAlternatives: "<i>cheated, swindled, ripped off</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "gypping",
nonInclusivePhrases: ["gypping"],
inclusiveAlternatives: "<i>cheating, swindling, ripping off</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "gypsy",
nonInclusivePhrases: ["gypsy", "gipsy"],
inclusiveAlternatives: ["<i>Rom, Roma person, Romani, Romani person</i>", "<i>traveler, wanderer, free-spirited</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.orangeUnlessSomeoneWants, "If you are referring to a lifestyle rather than the ethnic group or " + "their music, consider using an alternative such as %3$s."].join(" ")
}, {
identifier: "gypsies",
nonInclusivePhrases: ["gypsies", "gipsies"],
inclusiveAlternatives: ["<i>Roma, Romani, Romani people</i>", "<i>travelers, wanderers, free-spirited</i>"],
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: [_generalFeedbackStrings.orangeUnlessSomeoneWants, "If you are referring to a lifestyle rather than the ethnic group or " + "their music, consider using an alternative such as %3$s."].join(" ")
}, {
identifier: "eskimo",
nonInclusivePhrases: ["eskimo", "eskimos"],
inclusiveAlternatives: "the specific name of the Indigenous community (for example, <i>Inuit</i>)",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants
}, {
identifier: "coloredPerson",
nonInclusivePhrases: ["colored person"],
inclusiveAlternatives: "<i>person of color, POC, BIPOC</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "coloredPeople",
nonInclusivePhrases: ["colored people"],
inclusiveAlternatives: "<i>people of color, POC, BIPOC</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "americanIndians",
nonInclusivePhrases: ["American Indian", "American Indians"],
inclusiveAlternatives: "<i>Native American(s), Indigenous peoples of America</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.orangeUnlessSomeoneWants,
caseSensitive: true
}, {
identifier: "mulatto",
nonInclusivePhrases: ["mulatto", "mulattos", "mulattoes"],
inclusiveAlternatives: "<i>mixed, biracial, multiracial</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "savage",
nonInclusivePhrases: ["savage"],
inclusiveAlternatives: "<i>severe, dreadful, untamed, brutal, fearless, fierce, brilliant, amazing</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "civilized",
nonInclusivePhrases: ["civilized"],
inclusiveAlternatives: "<i>proper, well-mannered, enlightened, respectful</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "primitive",
nonInclusivePhrases: ["primitive"],
inclusiveAlternatives: "<i>early, rudimentary</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "powWow",
nonInclusivePhrases: ["pow-wow"],
inclusiveAlternatives: "<i>chat, brief conversation, brainstorm, huddle</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureOfOrigin
}, {
identifier: "lowManOnTheTotemPole",
nonInclusivePhrases: ["low man on the totem pole"],
inclusiveAlternatives: "<i>person of lower rank, junior-level</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "spiritAnimal",
nonInclusivePhrases: ["spirit animal"],
inclusiveAlternatives: "<i>inspiration, hero, icon, idol</i>",
score: _scores.SCORES.POTENTIALLY_NON_INCLUSIVE,
feedbackFormat: _cultureAssessmentStrings.orangeUnlessCultureOfOrigin
}, {
identifier: "firstWorldCountries",
nonInclusivePhrases: ["first world countries"],
inclusiveAlternatives: "the specific name for the regions or countries",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "firstWorldHyphen",
nonInclusivePhrases: ["first-world"],
inclusiveAlternatives: "the specific name for the region or country",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "third-worldCountry",
nonInclusivePhrases: ["third-world country"],
inclusiveAlternatives: "<i>low-income country, developing country</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "third-worldCountry",
nonInclusivePhrases: ["third world country"],
inclusiveAlternatives: "<i>low-income country, developing country</i>",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: _generalFeedbackStrings.redHarmful
}, {
identifier: "underdevelopedCountry",
nonInclusivePhrases: ["underdeveloped country"],
inclusiveAlternatives: "developing country",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. Consider using an alternative, " + "such as <i>%2$s</i> instead or be more specific about what aspect this word refers to."
}, {
identifier: "underdevelopedCountries",
nonInclusivePhrases: ["underdeveloped countries"],
inclusiveAlternatives: "developing countries",
score: _scores.SCORES.NON_INCLUSIVE,
feedbackFormat: "Avoid using <i>%1$s</i> as it is potentially harmful. Consider using an alternative, " + "such as <i>%2$s</i> instead or be more specific about what aspect this word refers to."
}];
cultureAssessments.forEach(assessment => {
assessment.category = "culture";
assessment.learnMoreUrl = "https://yoa.st/inclusive-language-culture";
});
var _default = exports.default = cultureAssessments;
//# sourceMappingURL=cultureAssessments.js.map