Skip to content

Commit

Permalink
fix: generate text
Browse files Browse the repository at this point in the history
  • Loading branch information
forgetfulskybro committed Nov 12, 2023
1 parent 6dd05c1 commit fb7c844
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
38 changes: 36 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/util/generateText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export function generateWYR(
): object {
const wyrRegexes: Record<string, RegExp> = {
"en_EN": /^(?!.*(?:would you rather)).*$/i,
"de_DE": /^(?!.*(?:würdest du eher)).*$/i,
"es_ES": /^(?!.*(?:preferirías)).*$/i,
"fr_FR": /^(?!.*(?:préfères-tu)).*$/i,
"de_DE": /^(?!.*(?:würdest du eher|wurdest du eher)).*$/i,
"es_ES": /^(?!.*(?:preferirías|preferirias)).*$/i,
"fr_FR": /^(?!.*(?:préfères-tu|preferes-tu)).*$/i,
};

const wyrMap: Record<string, string> = {
Expand Down Expand Up @@ -52,8 +52,8 @@ export function generateWWYD(
): object {
const languageRegex: Record<string, RegExp> = {
"en_EN": /^(?!.*(?:what would you do)).*$/i,
"de_DE": /^(?!.*(?:was würdest du tun)).*$/i,
"es_ES": /^(?!.*(?:qué harías)).*$/i,
"de_DE": /^(?!.*(?:was würdest du tun|was wurdest du tun)).*$/i,
"es_ES": /^(?!.*(?:qué harías|que harias)).*$/i,
"fr_FR": /^(?!.*(?:que ferais-tu)).*$/i,
};

Expand Down

0 comments on commit fb7c844

Please sign in to comment.