Skip to content

Commit 50dc180

Browse files
committed
feat: add new languages
1 parent 4617cae commit 50dc180

File tree

1 file changed

+39
-9
lines changed

1 file changed

+39
-9
lines changed

src/pages/index.js

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const languages = [
4343
name: "Czech",
4444
i18nName: "Čeština",
4545
fontFamily: "'Roboto Mono'",
46-
toEnglishDict: "'languages/cs/cs_native.lang.yaml'",
46+
toEnglishDict: "'languages/cs/default.yaml'",
4747
},
4848
{
4949
id: "DE",
@@ -52,7 +52,7 @@ const languages = [
5252
name: "German",
5353
i18nName: "Deutsch",
5454
fontFamily: "'Roboto Mono'",
55-
toEnglishDict: "'languages/de/de_native.lang.yaml'",
55+
toEnglishDict: "'languages/de/default.yaml'",
5656
},
5757
{
5858
id: "UR",
@@ -62,7 +62,7 @@ const languages = [
6262
i18nName: "اردو",
6363
direction: "rtl",
6464
fontFamily: "'Roboto Mono'",
65-
toEnglishDict: "'languages/ur/ur_native.lang.yaml'",
65+
toEnglishDict: "'languages/ur/default.yaml'",
6666
fontWeights: "bold",
6767
style: {
6868
direction: "rtl"
@@ -76,7 +76,7 @@ const languages = [
7676
name: "Hindi",
7777
i18nName: "Hindi",
7878
fontFamily: "'Roboto Mono'",
79-
toEnglishDict: "'languages/hi/hi_native.lang.yaml'",
79+
toEnglishDict: "'languages/hi/default.yaml'",
8080
},
8181
{
8282
id: "EN",
@@ -85,8 +85,36 @@ const languages = [
8585
name: "English",
8686
i18nName: "English",
8787
fontFamily: "'Roboto Mono'",
88+
},
89+
{
90+
id: "GA",
91+
code3: "gle",
92+
code2: "ga",
93+
name: "Irish",
94+
i18nName: "Gaeilge",
95+
fontFamily: "'Roboto Mono'",
96+
toEnglishDict: "'languages/ga/default.yaml'",
97+
},
98+
{
99+
id: "KO",
100+
code3: "kor",
101+
code2: "ko",
102+
name: "Korean",
103+
i18nName: "한국어",
104+
fontFamily: "'Roboto Mono'",
105+
toEnglishDict: "'languages/ko/default.yaml'",
106+
},
107+
{
108+
id: "FR",
109+
code3: "fra",
110+
code2: "fr",
111+
name: "French",
112+
i18nName: "Français",
113+
fontFamily: "'Roboto Mono'",
114+
toEnglishDict: "'languages/fr/default.yaml'",
88115
}
89116
]
117+
90118
const IDE = ({basicSetup, ...props}) => {
91119

92120
const { colorMode } = useColorMode();
@@ -198,8 +226,6 @@ with open("chad.txt", "r") as f:
198226

199227
export default function Home() {
200228

201-
const isMobile = typeof window !== 'undefined' && window.innerWidth <= 1000;
202-
203229
const {siteConfig} = useDocusaurusContext();
204230

205231
const [editorCode, setEditorCode] = useState(initialCodes[0].en);
@@ -630,7 +656,7 @@ display(now.strftime("%m/%d/%Y, %H:%M:%S"))
630656
}}>
631657

632658
<py-config>{`
633-
packages = ["https://test-files.pythonhosted.org/packages/49/8a/966eba36fb3a46c7728cbb6acaf85b124d8bc440d9ebec5d93e08cee147c/urdupython-0.1.6-py3-none-any.whl"]
659+
packages = ["https://test-files.pythonhosted.org/packages/6a/2b/6a3f7eded685c7445d270c6272e71b8fb5a54f994e2c25adf526b0f6ec30/urdupython-0.1.8-py3-none-any.whl"]
634660
`}</py-config>
635661

636662
{/* <py-config>{`
@@ -686,7 +712,9 @@ with open('file', 'w') as sys.stdout:
686712
code=original_code,
687713
args={
688714
'translate': True,
689-
'dictionary': os.path.join(SCRIPTDIR, ${sourceLanguage.toEnglishDict}),
715+
'dictionary': '',
716+
'source_language': '${sourceLanguage.code2}',
717+
'file': '',
690718
'reverse': False,
691719
'keep': False,
692720
'keep_only': False,
@@ -702,7 +730,9 @@ with open('file', 'w') as sys.stdout:
702730
code=english_code,
703731
args={
704732
'translate': True,
705-
'dictionary': os.path.join(SCRIPTDIR, ${targetLanguage.toEnglishDict}),
733+
'dictionary': '',
734+
'source_language': '${targetLanguage.code2}',
735+
'file': '',
706736
'reverse': True,
707737
'keep': False,
708738
'keep_only': False,

0 commit comments

Comments
 (0)