From 864f7c04513b9b2c2cf1316ac0764bae6dc352bb Mon Sep 17 00:00:00 2001 From: Beau Bouchard <127320+BeauBouchard@users.noreply.github.com> Date: Thu, 21 Sep 2023 11:15:07 -0400 Subject: [PATCH] [i18n] Bengali 'ben-in' translation (#322) * Bengali Language added (#320) * few facts are translated * test cases added. test the test cases first * more facts translated * 5 more facts translated * fix: small linting fix and test assertion change --------- Co-authored-by: DShaw0004 <114005178+dshaw0004@users.noreply.github.com> --- package-lock.json | 100 +++++++++++++++++--------- package.json | 5 +- src/models/localizations/ben-in.js | 109 +++++++++++++++++++++++++++++ tests/models/facts.test.js | 33 +++++++++ 4 files changed, 211 insertions(+), 36 deletions(-) create mode 100644 src/models/localizations/ben-in.js diff --git a/package-lock.json b/package-lock.json index 8b80d1b..63c0619 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "devDependencies": { "chai": "4.3.8", "codecov": "3.8.3", - "eslint": "8.49.0", + "eslint": "^8.49.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-import": "2.28.1", "eslint-plugin-prettier": "4.2.1", @@ -317,9 +317,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -355,9 +355,9 @@ "dev": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -1919,9 +1919,9 @@ } }, "node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -2261,22 +2261,23 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=12.0.0" } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "node_modules/fn.name": { @@ -3319,6 +3320,12 @@ "node": ">=4" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3343,6 +3350,15 @@ "json5": "lib/cli.js" } }, + "node_modules/keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", @@ -5921,9 +5937,9 @@ } }, "@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.8.1.tgz", + "integrity": "sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ==", "dev": true }, "@eslint/eslintrc": { @@ -5950,9 +5966,9 @@ "dev": true }, "globals": { - "version": "13.21.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", - "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7040,9 +7056,9 @@ } }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.22.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.22.0.tgz", + "integrity": "sha512-H1Ddc/PbZHTDVJSnj8kWptIRSD6AM3pK+mKytuIVF4uoBV7rshFlhhvA58ceJ5wp3Er58w6zj7bykMpYXt3ETw==", "dev": true, "requires": { "type-fest": "^0.20.2" @@ -7431,19 +7447,20 @@ "dev": true }, "flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.0.tgz", + "integrity": "sha512-OHx4Qwrrt0E4jEIcI5/Xb+f+QmJYNj2rrK8wiIdQOIrB9WrrJL8cjZvXdXuBTkkEwEqLycb5BeZDV1o2i9bTew==", "dev": true, "requires": { - "flatted": "^3.1.0", + "flatted": "^3.2.7", + "keyv": "^4.5.3", "rimraf": "^3.0.2" } }, "flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", "dev": true }, "fn.name": { @@ -8194,6 +8211,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -8215,6 +8238,15 @@ "minimist": "^1.2.0" } }, + "keyv": { + "version": "4.5.3", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.3.tgz", + "integrity": "sha512-QCiSav9WaX1PgETJ+SpNnx2PRRapJ/oRSXM4VO5OGYGSjrxbKPVFVhB3l2OCbLCk329N8qyAtsJjSjvVBWzEug==", + "dev": true, + "requires": { + "json-buffer": "3.0.1" + } + }, "kuler": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", diff --git a/package.json b/package.json index 095fff8..870ae1f 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,8 @@ "sonseong10 ", "Whiskydog ", "DerTimonius ", - "Gilsabo " + "Gilsabo ", + "dshaw0004 " ], "scripts": { "start": "node ./src/app.js", @@ -56,7 +57,7 @@ "devDependencies": { "chai": "4.3.8", "codecov": "3.8.3", - "eslint": "8.49.0", + "eslint": "^8.49.0", "eslint-config-prettier": "9.0.0", "eslint-plugin-import": "2.28.1", "eslint-plugin-prettier": "4.2.1", diff --git a/src/models/localizations/ben-in.js b/src/models/localizations/ben-in.js new file mode 100644 index 0000000..01a1942 --- /dev/null +++ b/src/models/localizations/ben-in.js @@ -0,0 +1,109 @@ +const facts = [ + "১৯৮৭(1987) সালে আমেরিকার এক নম্বর পোষা প্রাণী হিসাবে বিড়াল কুকুরকে ছাড়িয়ে যায়।", + "যেসব বিড়াল একসাথে থাকে তারা মাঝে মাঝে একে অপরের মাথা ঘষে দেখায় যে তাদের লড়াই করার কোন ইচ্ছা নেই। অল্পবয়সী বিড়ালরা এটি প্রায়শই করে, বিশেষ করে যখন তারা উত্তেজিত হয়।", + "মা বিড়াল তাদের বিড়ালছানাদের লিটার বাক্স ব্যবহার করতে শেখায়।", + "জীবনের প্রাথমিক পর্যায়ে আপনি যেভাবে বিড়ালছানাদের সাথে আচরণ করেন তা পরবর্তী জীবনে এটির ব্যক্তিত্বের বৈশিষ্ট্যগুলি উপস্থাপন করবে।", + // "Contrary to popular belief, the cat is a social animal. A pet cat will respond and answer to speech , and seems to enjoy human companionship.", + // "When well treated, a cat can live twenty or more years but the average life span of a domestic cat is 14 years.", + // "Neutering a cat extends its life span by two or three years.", + "বিড়াল, বিশেষ করে বয়স্ক বিড়ালদের ক্যান্সার হয়। অনেক সময় এই রোগ সফলভাবে চিকিত্সা করা যেতে পারে।", + "বিড়াল মিষ্টি স্বাদ করতে পারে না", + "বিড়ালদের খাবারে অবশ্যই চর্বি থাকতে হবে কারণ তারা নিজেরাই এটি তৈরি করতে পারে না।", + // "Some common houseplants poisonous to cats include: English Ivy, iris, mistletoe, philodendron, and yew.", + "টাইলেনল এবং চকলেট উভয়ই বিড়ালদের জন্য বিষাক্তকর", + // "Many cats cannot properly digest cows milk. Milk and milk products give them diarrhea.", + "গড় বিড়ালের খাবার প্রায় পাঁচটি ইঁদুরের সমান।", + // "The average cat food meal is the equivalent to about five mice.", + // "Cats can get tapeworms from eating fleas. These worms live inside the cat forever, or until they are removed with medication. They reproduce by shedding a link from the end of their long bodies. This link crawls out the cat's anus, and sheds hundreds of eggs. These eggs are injested by flea larvae, and the cycles continues. Humans may get these tapeworms too, but only if they eat infected fleas. Cats with tapeworms should be dewormed by a veterinarian.", + "বিড়ালরা ইঁদুর খেয়ে টেপওয়ার্ম পেতে পারে৷ আপনার বিড়ালরা যদি ইঁদুর ধরে ফেলে এটি থেকে পুরস্কার কেড়ে নেওয়াই ভাল।", + "বিড়ালের মধ্যে এইডসের একটি রূপ বিদ্যমান।", + "সিয়ামিজ বিড়ালের বিন্দুর রঙ তাপ সম্পর্কিত। শীতল অঞ্চলগুলি গাঢ়", + + // "Siamese kittens are born white because of the heat inside the mother's uterus before birth. This heat keeps the kittens' hair from darkening on the points.", + // "People who are allergic to cats are actually allergic to cat saliva or to cat dander. If the resident cat is bathed regularly the allergic people tolerate it better.", + // "Studies now show that the allergen in cats is related to their scent glands. Cats have scent glands on their faces and at the base of their tails. Entire male cats generate the most scent. If this secretion from the scent glands is the allergen, allergic people should tolerate spayed female cats the best.", + // "Cats do not think that they are little people. They think that we are big cats. This influences their behavior in many ways.", + // "Cats are subject to gum disease and to dental caries. They should have their teeth cleaned by the vet or the cat dentist once a year.", + // "Many people fear catching a protozoan disease, Toxoplasmosis, from cats. This disease can cause illness in the human, but more seriously, can cause birth defects in the unborn. Toxoplasmosis is a common disease, sometimes spread through the feces of cats. It is caused most often from eating raw or rare beef. Pregnant women and people with a depressed immune system should not touch the cat litter box. Other than that, there is no reason that these people have to avoid cats.", + // "The ancestor of all domestic cats is the African Wild Cat which still exists today.", + // "In ancient Egypt, killing a cat was a crime punishable by death.", + // "In ancient Egypt, mummies were made of cats, and embalmed mice were placed with them in their tombs. In one ancient city, over 300,000 cat mummies were found.", + // "In the Middle Ages, during the Festival of Saint John, cats were burned alive in town squares.", + // "The first cat show was in 1871 at the Crystal Palace in London.", + // "Today there are about 100 distinct breeds of the domestic cat.", + // "Like birds, cats have a homing ability that uses its biological clock, the angle of the sun, and the Earth's magnetic field. A cat taken far from its home can return to it. But if a cat's owners move far from its home, the cat can't find them.", + // "Cats bury their feces to cover their trails from predators.", + // "Cats sleep 16 to 18 hours per day. When cats are asleep, they are still alert to incoming stimuli. If you poke the tail of a sleeping cat, it will respond accordingly.", + // "Besides smelling with their nose, cats can smell with an additional organ called the Jacobson's organ, located in the upper surface of the mouth.", + // "The chlorine in fresh tap water irritates sensitive parts of the cat's nose. Let tap water sit for 24 hours before giving it to a cat.", + // "Abraham Lincoln loved cats. He had four of them while he lived in the White House.", + // "Julius Ceasar, Henri II, Charles XI, and Napoleon were all afraid of cats.", + // "Cats have an average of 24 whiskers, arranged in four horizontal rows on each side.", + // "The word 'cat' in various languages: French: chat; German: katze; Italian: gatto; Spanish/Portugese: gato; Yiddish: kats; Maltese: qattus; Swedish/Norwegian: katt; Dutch: kat; Icelandic: kottur; Greek: catta; Hindu: katas; Japanese:neko; Polish: kot; Ukranian: kotuk; Hawiian: popoki; Russian: koshka; Latin: cattus; Egyptian: mau; Turkish: kedi; Armenian: Gatz; Chinese: mao; Arabic: biss; Indonesian: kucing; Bulgarian: kotka; Malay: kucing; Thai/Vietnamese: meo; Romanian: pisica; Lithuanian: katinas; Czech: kocka; Slovak: macka; Armenian: gatz; Basque: catua; Estonian: kass; Finnish: kissa; Swahili: paka.", + // "Statistics indicate that animal lovers in recent years have shown a preference for cats over dogs!", + // "Cats can be taught to walk on a leash, but a lot of time and patience is required to teach them. The younger the cat is, the easier it will be for them to learn.", + // "Purring not always means happiness. Purring could mean a cat is in terrible pain such as during childbirth. Kitten will purr to their mother to let her know they are getting enough milk while nursing. Purring is a process of inhaling and exhaling, usually performed while the mouth is closed. But don't worry, if your cat is purring while your gently petting her and holding her close to you - that is a happy cat!", + // "The catnip plant contains an oil called hepetalactone which does for cats what marijuana does to some people. Not all cats react to it those that do appear to enter a trancelike state. A positive reaction takes the form of the cat sniffing the catnip, then licking, biting, chewing it, rub & rolling on it repeatedly, purring, meowing & even leaping in the air.", + // "Of all the species of cats, the domestic cat is the only species able to hold its tail vertically while walking. All species of wild cats hold their talk horizontally or tucked between their legs while walking.", + // "A happy cat holds her tail high and steady.", + // "Almost 10% of a cat's bones are in its tail, and the tail is used to maintain balance.", + // "Cat families usually play best in even numbers. Cats and kittens should be aquired in pairs whenever possible.", + // "Baking chocolate is the most dangerous chocolate to your cat.", + // "You check your cats pulse on the inside of the back thigh, where the leg joins to the body. Normal for cats: 110-170 beats per minute.", + // "Jaguars are the only big cats that don't roar.", + // "A cats field of vision is about 185 degrees.", + // "Cats have individual preferences for scratching surfaces and angles. Some are horizontal scratchers while others exercise their claws vertically.", + // "The Maine Coone is the only native American long haired breed.", + // "The Maine Coon is 4 to 5 times larger than the Singapura, the smallest breed of cat.", + // "Tabby cats are thought to get their name from Attab, a district in Baghdad, now the capital of Iraq.", + // "Retractable claws are a physical phenomenon that sets cats apart from the rest of the animal kingdom. In the cat family, only cheetahs cannot retract their claws.", + // "Not every cat gets 'high' from catnip. Whether or not a cat responds to it depends upon a recessive gene: no gene, no joy.", + // "A cat can sprint at about thirty-one miles per hour.", + // "In ancient Egypt, when a family cat died, all family members would shave their eyebrows as a sign of mourning.", + // "Cats have been domesticated for half as long as dogs have been.", + // "A cat's whiskers are thought to be a kind of radar, which helps a cat gauge the space it intends to walk through.", + // "A cat can spend five or more hours a day grooming himself.", + // "All cats have three sets of long hairs that are sensitive to pressure - whiskers, eyebrows,and the hairs between their paw pads.", + // "Both humans and cats have identical regions in the brain responsible for emotion.", + // "A cat's brain is more similar to a man's brain than that of a dog.", + // "A cat has more bones than a human; humans have 206, and the cat - 230.", + // "Cats have 30 vertebrae--5 more than humans have.", + // "Cats are the most popular pet in the United States: There are 88 million pet cats and 74 million dogs.", + // "Cats have over 20 muscles that control their ears.", + // "A group of cats is called a clowder.", + // "There are cats who have survived falls from over 32 stories (320 meters) onto concrete.", + // "Cats sleep 70% of their lives.", + // "A cat has been mayor of Talkeetna, Alaska, for 15 years. His name is Stubbs.", + // "A cat has ran for mayor of Mexico City in 2013.", + // "In tigers and tabbies, the middle of the tongue is covered in backward-pointing spines, used for breaking off and gripping meat.", + // 'When cats grimace, they are usually "taste-scenting." They have an extra organ that, with some breathing control, allows the cats to taste-sense the air.', + // "Cats can not taste sweetness.", + // "Owning a cat can reduce the risk of stroke and heart attack by a third.", + // "Wikipedia has a recording of a cat meowing because why not?", + // "The worlds largest cat measured 48.5 inches long. https://www.youtube.com/watch?v=gc5M0aGc_EI", + // "Evidence suggests domesticated cats have been around since 3600 B.C., 2,000 years before Egypts pharaohs.", + // "A cats purr may be a form of self-healing, as it can be a sign of nervousness as well as contentment. Similarly, the frequency of a domestic cats purr is the same at which muscles and bones repair themselves.", + // "Adult cats only meow to communicate with humans.", + "বিশ্বের সবচেয়ে ধনী বিড়ালের মূল্য 1 কোটি 30 লাখ ডলার তার মালিক মারা যাওয়ার পরে সে সব টাকা পায়ে ।", + // "Your cat recognizes your voice but just acts too cool to care (probably because they are).", + "বিড়াল প্রায়ই ল্যাকটোজ সহ্য করতে পারে না, তাই তাদের দুধ দেওয়া বন্ধ করুন!", + "বিড়াল তাদের দৈর্ঘ্যের ছয় গুণ পর্যন্ত লাফ দিতে পারে", + "বিড়াল 33টি বিভিন্ন প্রজাতির বিলুপ্তিতে অবদান রেখেছে।", + "বিড়াল বেঁচে থাকার জন্য সমুদ্রের জল পান করতে পারে ", + // "Cheetahs communicate by purring and meowing like housecats, they cannot roar like big cats (e.g. lions).", +]; + +const langName = "bengali", + langISO = "ben", + langLocale = "in", + langLocaleName = "India"; + +module.exports = { + langName, + langISO, + langLocale, + langLocaleName, + code: `${langISO}-${langLocale}`, + codeName: `${langName} (${langLocaleName})`, + facts: facts, +}; diff --git a/tests/models/facts.test.js b/tests/models/facts.test.js index e4aa53c..c8ecf0f 100644 --- a/tests/models/facts.test.js +++ b/tests/models/facts.test.js @@ -70,6 +70,39 @@ describe("Testing Models", () => { }); }); }); + describe("BEN - Indian Localization", () => { + describe("getSingle", () => { + it("it should return a single fact of random", () => { + const actual = facts.getSingle(null, "ben"); + expect(actual).to.be.a("string"); + }); + it("it should return the single fact of ID 1", () => { + const actualOne = facts.getSingle(1, "ben"); + const expectedOne = + "১৯৮৭(1987) সালে আমেরিকার এক নম্বর পোষা প্রাণী হিসাবে বিড়াল কুকুরকে ছাড়িয়ে যায়।"; + expect(actualOne).to.be.a("string"); + expect(actualOne).to.be.equal(expectedOne); + }); + it("it should return the single fact of ID 3", () => { + const actualThree = facts.getSingle(3, "ben"); + const expectedThree = + "মা বিড়াল তাদের বিড়ালছানাদের লিটার বাক্স ব্যবহার করতে শেখায়।"; + expect(actualThree).to.be.a("string"); + expect(actualThree).to.be.equal(expectedThree); + }); + }); + describe("BEN - getMany", () => { + it("it should return an array of 3 facts of random", () => { + const actual = facts.getMany(3, "ben"); + const allFacts = facts.getLanguageFacts("ben"); + expect(actual).to.be.a("array"); + expect(actual[0]).to.be.a("string"); + expect(actual.length).to.be.equal(3); + expect(allFacts).to.deep.include(actual[0]); + + }); + }); + }); describe("ESP-ES - Spanish - Spain Localization", () => { describe("getSingle", () => { it("it should return a single fact of random", () => {