Skip to content

Commit

Permalink
Merge pull request #1125 from AI4Bharat/xlit-api
Browse files Browse the repository at this point in the history
fix minor bug in xlit transliteration
  • Loading branch information
ishvindersethi22 authored Nov 27, 2024
2 parents 18f978c + 80fe5ed commit 9a4c8c1
Show file tree
Hide file tree
Showing 2 changed files with 256 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/ui/pages/container/Transliteration/Transliteration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ import useMediaQuery from '@mui/material/useMediaQuery';
import { useDispatch, useSelector } from "react-redux";
import { useParams } from "react-router-dom";
import configs from "../../../../config/config";
import { languages } from "./languages";
const Transliteration = (props) => {
const { onCancelTransliteration ,setIsSpaceClicked,isSpaceClicked,setShowTransliterationModel} = props;
const params = useParams();
const classes = GlobalStyles();
const [text, setText] = useState("");
const [languageList, setLanguageList] = useState([{ DisplayName: "data" }]);
const languageList = languages;
const [selectedLang, setSelectedLang] = useState("");
const [prev, setprev] = useState(false);
const keystrokesRef = useRef([]);
Expand Down Expand Up @@ -150,16 +151,6 @@ const Transliteration = (props) => {
// setIsSpaceClicked(false)
// }

useEffect(() => {
getTransliterationLanguages()
.then(langs => {
setLanguageList(langs);
})
.catch(err => {
console.log(err);
});
}, []);

const handleLanguageChange = (event, val) => {
setSelectedLang(val);
// setIsSpaceClicked(true)
Expand Down
254 changes: 254 additions & 0 deletions src/ui/pages/container/Transliteration/languages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
export const languages = [
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Assamese - অসমীয়া",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "as",
"IsStable": true,
"LangCode": "as",
"ScriptCode": "Beng"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Bangla - বাংলা",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "bn",
"IsStable": true,
"LangCode": "bn",
"ScriptCode": "Beng"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Boro - बड़ो",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "brx",
"IsStable": true,
"LangCode": "brx",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Goan Konkani - कोंकणी",
"FallbackFont": "serif",
"GoogleFont": "Tiro Devanagari Marathi",
"Identifier": "gom",
"IsStable": true,
"LangCode": "gom",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Gujarati - ગુજરાતી",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "gu",
"IsStable": true,
"LangCode": "gu",
"ScriptCode": "Gujr"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Hindi - हिंदी",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "hi",
"IsStable": true,
"LangCode": "hi",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Kannada - ಕನ್ನಡ",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "kn",
"IsStable": true,
"LangCode": "kn",
"ScriptCode": "Knda"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "rtl",
"DisplayName": "Kashmiri - كٲشُر",
"FallbackFont": "serif",
"GoogleFont": "Noto Nastaliq Urdu",
"Identifier": "ks",
"IsStable": true,
"LangCode": "ks",
"ScriptCode": "Aran"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Maithili - मैथिली",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "mai",
"IsStable": true,
"LangCode": "mai",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Malayalam - മലയാളം",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "ml",
"IsStable": true,
"LangCode": "ml",
"ScriptCode": "Mlym"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Manipuri - ꯃꯤꯇꯩꯂꯣꯟ",
"FallbackFont": "sans-serif",
"GoogleFont": "Noto Sans Meetei Mayek",
"Identifier": "mni",
"IsStable": true,
"LangCode": "mni",
"ScriptCode": "Mtei"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Marathi - मराठी",
"FallbackFont": "serif",
"GoogleFont": "Tiro Devanagari Marathi",
"Identifier": "mr",
"IsStable": true,
"LangCode": "mr",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Nepali - नेपाली",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "ne",
"IsStable": true,
"LangCode": "ne",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Oriya - ଓଡ଼ିଆ",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "or",
"IsStable": true,
"LangCode": "or",
"ScriptCode": "Orya"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Panjabi - ਪੰਜਾਬੀ",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "pa",
"IsStable": true,
"LangCode": "pa",
"ScriptCode": "Guru"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Sanskrit - संस्कृतम्",
"FallbackFont": "serif",
"GoogleFont": "Tiro Devanagari Sanskrit",
"Identifier": "sa",
"IsStable": true,
"LangCode": "sa",
"ScriptCode": "Deva"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "rtl",
"DisplayName": "Sindhi - سنڌي",
"FallbackFont": "serif",
"GoogleFont": "Lateef",
"Identifier": "sd",
"IsStable": true,
"LangCode": "sd",
"ScriptCode": "Arab"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Sinhala - සිංහල",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "si",
"IsStable": true,
"LangCode": "si",
"ScriptCode": "Sinh"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Tamil - தமிழ்",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "ta",
"IsStable": true,
"LangCode": "ta",
"ScriptCode": "Taml"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "ltr",
"DisplayName": "Telugu - తెలుగు",
"FallbackFont": null,
"GoogleFont": null,
"Identifier": "te",
"IsStable": true,
"LangCode": "te",
"ScriptCode": "Telu"
},
{
"Author": "AI4Bharat",
"CompiledDate": "09-April-2022",
"Direction": "rtl",
"DisplayName": "Urdu - اُردُو",
"FallbackFont": "serif",
"GoogleFont": "Noto Nastaliq Urdu",
"Identifier": "ur",
"IsStable": true,
"LangCode": "ur",
"ScriptCode": "Aran"
}
];

0 comments on commit 9a4c8c1

Please sign in to comment.