@@ -119,8 +119,9 @@ export default function Srt() {
119
119
const [ filename , setFilename ] = useState ( "" ) ;
120
120
const [ loading , setLoading ] = useState ( false ) ;
121
121
const [ transFileStatus , setTransFileStatus ] = useState < TranslateFileStatus > ( { isTranslating : false , transCount : 0 } ) ;
122
+ const [ showAllLang , setShowAllLang ] = useState ( false ) ;
122
123
const { t} = useTranslation ( "common" ) ;
123
- const [ langs , setLangs ] = useState ( commonLangZh ) ;
124
+ const langs = showAllLang ? suportedLangZh : commonLangZh ;
124
125
const isEnglish = t ( "English" ) === "English" ;
125
126
126
127
const getUseGoogle = ( ) => {
@@ -322,7 +323,8 @@ export default function Srt() {
322
323
< select className = { styles . selectLang } id = "langSelect" >
323
324
{ langs . map ( lang => < option key = { lang } value = { lang } > { isEnglish ? langBiMap . get ( lang ) : lang } </ option > ) }
324
325
</ select >
325
- { ! loading ? < button onClick = { translate } type = "button" title = { t ( "API-Slow-Warn" ) ! } className = { styles . genButton } style = { { marginLeft : "20px" , height : "30px" , width : "80px" } } > { t ( "Translate-This" ) } </ button >
326
+ < input type = "checkbox" title = { t ( "Show All languages" ) ! } style = { { marginLeft : "5px" } } checked = { showAllLang } onChange = { e => setShowAllLang ( e . target . checked ) } > </ input >
327
+ { ! loading ? < button onClick = { translate } type = "button" title = { t ( "API-Slow-Warn" ) ! } className = { styles . genButton } style = { { marginLeft : "5px" , height : "30px" , width : "80px" } } > { t ( "Translate-This" ) } </ button >
326
328
: < button disabled type = "button" className = { styles . genButton } style = { { marginLeft : "20px" , height : "30px" , width : "80px" } } >
327
329
< div style = { { display : "flex" , alignItems : "center" , justifyContent : "center" } } >
328
330
< Image
0 commit comments