mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-09 17:06:05 +02:00
More translations
This commit is contained in:
parent
0b69c1882b
commit
7eeb1f76c3
11 changed files with 407 additions and 236 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { last } from "./arrayUtils";
|
||||
import { P } from "./probabilityUtils";
|
||||
|
||||
export const gender = {
|
||||
export const gender: Record<string, Record<string, string>> = {
|
||||
fr: {},
|
||||
};
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ export const trimVowels = (string: string, minLength: number = 3) => {
|
|||
* @returns The adjective form of the noun.
|
||||
*/
|
||||
export const getAdjective = (nounToBeAdjective: string) => {
|
||||
const adjectivizationRules = {
|
||||
const adjectivizationRules: Record<string, any> = {
|
||||
en: [
|
||||
{
|
||||
name: "guo",
|
||||
|
|
@ -329,7 +329,7 @@ export const getAdjective = (nounToBeAdjective: string) => {
|
|||
},
|
||||
],
|
||||
};
|
||||
for (const rule of adjectivizationRules[window.locale]) {
|
||||
for (const rule of adjectivizationRules[options.language]) {
|
||||
if (P(rule.probability) && rule.condition.test(nounToBeAdjective)) {
|
||||
return rule.action(nounToBeAdjective);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue