savareyhano / sistem-informasi-inventaris-barang

An inventory management application that can generate QR codes, print QR codes, and scan QR codes via webcam or image upload.
GNU General Public License v3.0
5 stars 4 forks source link

problems with translation #18

Open KamaR0308 opened 8 months ago

KamaR0308 commented 8 months ago

hi savareyhano. why when I try to change the language of foreign words in the code to my language I get an error

SyntaxError: Invalid or unexpected token in D:\VScodeProjects\inventory\barang 2\src\views\barangMasuk.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint: https://github.com/RyanZim/EJS-Lint Or, if you meant to create an async function, pass async: true as an option. at new Function () at Template.compile (D:\VScodeProjects\inventory\barang 2\node_modules\ejs\lib\ejs.js:673:12) at Object.compile (D:\VScodeProjects\inventory\barang 2\node_modules\ejs\lib\ejs.js:398:16) at handleCache (D:\VScodeProjects\inventory\barang 2\node_modules\ejs\lib\ejs.js:235:18) at tryHandleCache (D:\VScodeProjects\inventory\barang 2\node_modules\ejs\lib\ejs.js:274:16) at exports.renderFile [as engine] (D:\VScodeProjects\inventory\barang 2\node_modules\ejs\lib\ejs.js:491:10) at View.render (D:\VScodeProjects\inventory\barang 2\node_modules\express\lib\view.js:135:8) at tryRender (D:\VScodeProjects\inventory\barang 2\node_modules\express\lib\application.js:657:10) at Function.render (D:\VScodeProjects\inventory\barang 2\node_modules\express\lib\application.js:609:3) at ServerResponse.render (D:\VScodeProjects\inventory\barang 2\node_modules\express\lib\response.js:1039:7)

For example, I change Barang Masuk to Incoming Product

savareyhano commented 8 months ago

Screenshot the code you are trying to change here.

If i have a time, maybe i will do full english translation in the future instead of indonesian language as to make this program more usable for international users, God Willing.

KamaR0308 commented 8 months ago

Screenshot the code you are trying to change here.

almost anywhere i try to change indonesian language to english. In some places simple word editing works, in others it doesn’t.

KamaR0308 commented 8 months ago

image

These are the tabs that break. Although I edit words not at all in the files associated with these tabs

savareyhano commented 8 months ago

Screenshot the code you are trying to change here.

almost anywhere i try to change indonesian language to english. In some places simple word editing works, in others it doesn’t.

Can you send me the file that you are trying to change the language to? So i can check the problem myself

KamaR0308 commented 8 months ago

image

KamaR0308 commented 8 months ago

image

KamaR0308 commented 8 months ago

accidentally closed it.

KamaR0308 commented 8 months ago

image

When I try to return the previous value to the h1 header, the error does not disappear

SyntaxError: Invalid or unexpected token in D:\VScodeProjects\inventory\inv20\src\views\barangMasuk.ejs while compiling ejs

If the above error is not helpful, you may want to try EJS-Lint: https://github.com/RyanZim/EJS-Lint Or, if you meant to create an async function, pass async: true as an option. at new Function () at Template.compile (D:\VScodeProjects\inventory\inv20\node_modules\ejs\lib\ejs.js:673:12) at Object.compile (D:\VScodeProjects\inventory\inv20\node_modules\ejs\lib\ejs.js:398:16) at handleCache (D:\VScodeProjects\inventory\inv20\node_modules\ejs\lib\ejs.js:235:18)
at tryHandleCache (D:\VScodeProjects\inventory\inv20\node_modules\ejs\lib\ejs.js:274:16) at View.exports.renderFile [as engine] (D:\VScodeProjects\inventory\inv20\node_modules\ejs\lib\ejs.js:491:10) at View.render (D:\VScodeProjects\inventory\inv20\node_modules\express\lib\view.js:135:8) at tryRender (D:\VScodeProjects\inventory\inv20\node_modules\express\lib\application.js:657:10) at Function.render (D:\VScodeProjects\inventory\inv20\node_modules\express\lib\application.js:609:3) at ServerResponse.render (D:\VScodeProjects\inventory\inv20\node_modules\express\lib\response.js:1039:7)

savareyhano commented 8 months ago

image

Does changing it into english still produce the error?

KamaR0308 commented 8 months ago

image

Does changing it into english still produce the error?

what if I want to use another language besides English?

savareyhano commented 8 months ago

image

Does changing it into english still produce the error?

what if I want to use another language besides English?

No problem, just checking if this problem might be related to the npm package itself (rather than the code), which cannot handle non romans character (just my assumption).

savareyhano commented 8 months ago

In the meantime you can try to follow what the error says of using "EJS-Lint", perhaps it will find and fix the problem that is mentioned.

Meanwhile i'm currently working on the update on the dev branch, it's gonna be slow (update) though.