Skip to content

Commit

Permalink
fix: fix generate-config script & update supported languages
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart committed Aug 11, 2024
1 parent bd8c853 commit f52d25f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export declare namespace lang {
'sq': 'Albanian',
'am': 'Amharic',
'ar': 'Arabic',
'ar-EG': 'Arabic (Egyptian)',
'hy': 'Armenian',
'as': 'Assamese',
'az': 'Azerbaijani',
Expand Down Expand Up @@ -179,6 +180,7 @@ export declare namespace lang {
'sl': 'Slovenian',
'so': 'Somali',
'es': 'Spanish',
'es-MX': 'Spanish (Mexican)',
'sw': 'Swahili',
'sv': 'Swedish',
'ty': 'Tahitian',
Expand Down
6 changes: 3 additions & 3 deletions scripts/generate-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ const DEFAULT_USER_AGENT = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKi
const config = {
websiteEndpoint: richTranslateParams[1],
translateEndpoint: richTranslateParams[0],
spellCheckEndpoint: richTranslateParams[33],
spellCheckEndpoint: richTranslateParams[32],
// maxTextLen: richTranslateParams[5],
// PENDING: hard-coding
maxTextLen: 1000,
// PENDING: hard-coding
maxTextLenCN: 5000,
maxCorrectableTextLen: richTranslateParams[30],
maxCorrectableTextLen: richTranslateParams[29],
maxEPTTextLen: eptRichTranslateParams[5],
correctableLangs: richTranslateParams[31],
correctableLangs: richTranslateParams[30],
eptLangs: eptLangCodes,
userAgent: DEFAULT_USER_AGENT
}
Expand Down
2 changes: 2 additions & 0 deletions src/lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"sq": "Albanian",
"am": "Amharic",
"ar": "Arabic",
"ar-EG": "Arabic (Egyptian)",
"hy": "Armenian",
"as": "Assamese",
"az": "Azerbaijani",
Expand Down Expand Up @@ -110,6 +111,7 @@
"sl": "Slovenian",
"so": "Somali",
"es": "Spanish",
"es-MX": "Spanish (Mexican)",
"sw": "Swahili",
"sv": "Swedish",
"ty": "Tahitian",
Expand Down

0 comments on commit f52d25f

Please sign in to comment.