Skip to content

Commit

Permalink
Merge branch 'main' into forgot-pwd-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NancyAanchal authored Aug 15, 2024
2 parents b3dac09 + ae7a21f commit 7a867f0
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 11 deletions.
10 changes: 1 addition & 9 deletions nepalingo-web/src/hooks/useDictionary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,10 @@ async function getFetcherByLanguage(
if (!word) {
word = "hello";
}
let newariResult: DictionaryResponse;

switch (language) {
case "Newari":
newariResult = await getNewariWord(word);

if (newariResult.meanings.length === 0) {
console.log("Used Google Translate for newari");
return await getGTranslate("newari", word);
}
return newariResult;

return await getNewariWord(word);
case "Tajpuriya":
return await getTajpuriyaWord(word);
case "Maithili":
Expand Down
1 change: 0 additions & 1 deletion nepalingo-web/src/lib/getGTranslate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const GOOGLE_TRANSLATE_API_KEY = import.meta.env.VITE_GOOGLE_TRANSLATE_API_KEY;

const languageCodes: { [key: string]: string } = {
maithili: "mai",
newari: "new",
};

export const getGTranslate = async (
Expand Down
1 change: 0 additions & 1 deletion nepalingo-web/src/lib/getNextWord.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export const newariWords = [
"hello",
"call",
"can",
"do",
"how",
"I",
Expand Down

0 comments on commit 7a867f0

Please sign in to comment.