@@ -19,9 +19,9 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
1919
2020 if ( hasInvalidNumber || hasInvalidLetter ) {
2121 throw new Error (
22- `Masukan tidak valid: Hanya ${
23- type === "alphabet" ? "huruf " : "angka "
24- } yang diizinkan untuk urutan ${ type } .`
22+ `Invalid input: Only ${
23+ type === "alphabet" ? "letters " : "numbers "
24+ } are allowed for ${ type } sequence .`
2525 ) ;
2626 }
2727 } , [ ] ) ;
@@ -38,7 +38,7 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
3838 . map ( ( x ) => ( x . trim ( ) === "..." ? null : x . trim ( ) ) ) ;
3939
4040 if ( inputArray . length < 2 ) {
41- throw new Error ( "Masukan urutan harus memiliki setidaknya dua urutan ." ) ;
41+ throw new Error ( "Sequence input must have at least two terms ." ) ;
4242 }
4343
4444 validateSequence ( inputArray , sequenceType ) ;
@@ -61,41 +61,41 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
6161 case "arithmetic" : {
6262 const diff = findArithmeticDifference ( solvedSequence ) ;
6363 if ( diff === null ) {
64- throw new Error ( "Tidak dapat menemukan selisih yang umum ." ) ;
64+ throw new Error ( "Cannot find common difference ." ) ;
6565 }
6666 solvedSequence = fillMissingTermsArithmetic ( solvedSequence , diff ) ;
6767 return {
6868 solvedArray : solvedSequence ,
69- details : `Selisih yang umum adalah ${ diff } .` ,
69+ details : `The common difference is ${ diff } .` ,
7070 } ;
7171 }
7272
7373 case "geometric" : {
7474 const ratio = findGeometricRatio ( solvedSequence ) ;
7575 if ( ratio === null ) {
76- throw new Error ( "Tidak dapat menemukan rasio yang umum ." ) ;
76+ throw new Error ( "Cannot find common ratio ." ) ;
7777 }
7878 solvedSequence = fillMissingTermsGeometric ( solvedSequence , ratio ) ;
7979 return {
8080 solvedArray : solvedSequence ,
81- details : `Rasio yang umum adalah ${ ratio } .` ,
81+ details : `The common ratio is ${ ratio } .` ,
8282 } ;
8383 }
8484
8585 case "alphabet" : {
8686 const diff = findAlphabetDifference ( solvedSequence ) ;
8787 if ( diff === null ) {
88- throw new Error ( "Tidak dapat menemukan perbedaan huruf yang umum ." ) ;
88+ throw new Error ( "Cannot find common letter difference ." ) ;
8989 }
9090 solvedSequence = fillMissingTermsAlphabet ( solvedSequence , diff ) ;
9191 return {
9292 solvedArray : solvedSequence ,
93- details : `Perbedaan huruf yang umum adalah ${ diff } .` ,
93+ details : `The common letter difference is ${ diff } .` ,
9494 } ;
9595 }
9696
9797 default :
98- throw new Error ( "Tipe urutan tidak diketahui ." ) ;
98+ throw new Error ( "Unknown sequence type ." ) ;
9999 }
100100 } , [ ] ) ;
101101
@@ -158,25 +158,25 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
158158 const text = solvedSequence . join ( ", " ) ;
159159 navigator . clipboard
160160 . writeText ( text )
161- . then ( ( ) => alert ( "Disalin ke Clipboard" ) )
162- . catch ( ( err ) => console . error ( "Gagal menyalin teks : " , err ) ) ;
161+ . then ( ( ) => alert ( "Copied to Clipboard" ) )
162+ . catch ( ( err ) => console . error ( "Failed to copy text : " , err ) ) ;
163163 } , [ solvedSequence ] ) ;
164164
165165 const placeholder = {
166- arithmetic : "contoh : 2, 4, 6, 8, ..." ,
167- geometric : "contoh : 2, 6, 18, 54, ..." ,
168- alphabet : "contoh : A, D, G, J, ..." ,
166+ arithmetic : "e.g. : 2, 4, 6, 8, ..." ,
167+ geometric : "e.g. : 2, 6, 18, 54, ..." ,
168+ alphabet : "e.g. : A, D, G, J, ..." ,
169169 } [ sequenceType ] ;
170170
171171 return (
172172 < div className = "sequence-page fade-in" >
173- < motion . h2 > { `Menyelesaikan Urutan ${
173+ < motion . h2 > { `Solve Missing ${
174174 sequenceType . charAt ( 0 ) . toUpperCase ( ) + sequenceType . slice ( 1 )
175- } yang Hilang `} </ motion . h2 >
175+ } Sequence `} </ motion . h2 >
176176 < form onSubmit = { handleSubmit } className = "sequence-form" >
177177 < div >
178178 < label >
179- Masukkan urutan (gunakan "..." untuk urutan yang hilang ):
179+ Enter sequence (use "..." for missing terms ):
180180 </ label >
181181 < input
182182 type = "text"
@@ -191,13 +191,13 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
191191 className = "button-hover"
192192 type = "submit"
193193 >
194- Selesaikan
194+ Solve
195195 </ button >
196196 </ form >
197197
198198 { solvedSequence . length > 0 && (
199199 < div >
200- < h3 > Urutan yang Dipecahkan :</ h3 >
200+ < h3 > Solved Sequence :</ h3 >
201201 < ul >
202202 { solvedSequence . map ( ( num , index ) => (
203203 < li key = { index } className = "list-item-hover" >
@@ -210,15 +210,15 @@ const SolveMissing = memo(({ sequenceType, goBack }) => {
210210 className = "back-button button-hover"
211211 onClick = { handleCopy }
212212 >
213- Salin ke Clipboard
213+ Copy to Clipboard
214214 </ button >
215215 </ div >
216216 ) }
217217 < button
218218 className = "back-button button-hover"
219219 onClick = { goBack }
220220 >
221- Kembali
221+ Back
222222 </ button >
223223 </ div >
224224 ) ;
0 commit comments