feat(v0.1.4): Fix i18n imports + Default open registration
## Changes ### i18n Module Fixes - Fix import paths in service.ts, languageSelector.tsx, header.tsx, base.tsx, results.tsx - Change from '../i18n' to '../i18n/index' or './index' for proper module resolution ### Registration (Breaking Change) - Change ACCOUNT_REGISTRATION default from false to true (out-of-box ready) - Login and Register pages now both visible by default ### Version Bump - Update package.json to v0.1.4 - Update CHANGELOG.md with v0.1.4 release notes - Update README.md and docs with new version numbers ### Build Verification - bun run build: PASSED - Docker build: PASSED - TypeScript compilation: PASSED (no errors)
This commit is contained in:
parent
5c68308c36
commit
558d638df8
17 changed files with 266 additions and 234 deletions
|
|
@ -9,16 +9,16 @@ let formatSelected = false;
|
|||
|
||||
// Get translation helper
|
||||
const getTranslation = (category, key, params) => {
|
||||
if (typeof window.t === 'function') {
|
||||
if (typeof window.t === "function") {
|
||||
return window.t(category, key, params);
|
||||
}
|
||||
// Fallback to English if t is not available
|
||||
const fallbacks = {
|
||||
'common.remove': 'Remove',
|
||||
'convert.title': 'Convert',
|
||||
'convert.titleWithType': 'Convert .{fileType}',
|
||||
'convert.convertButton': 'Convert',
|
||||
'convert.uploading': 'Uploading...'
|
||||
"common.remove": "Remove",
|
||||
"convert.title": "Convert",
|
||||
"convert.titleWithType": "Convert .{fileType}",
|
||||
"convert.convertButton": "Convert",
|
||||
"convert.uploading": "Uploading...",
|
||||
};
|
||||
let text = fallbacks[`${category}.${key}`] || key;
|
||||
if (params) {
|
||||
|
|
@ -58,7 +58,7 @@ dropZone.addEventListener("drop", (e) => {
|
|||
// Extracted handleFile function for reusability in drag-and-drop and file input
|
||||
function handleFile(file) {
|
||||
const fileList = document.querySelector("#file-list");
|
||||
const removeText = getTranslation('common', 'remove');
|
||||
const removeText = getTranslation("common", "remove");
|
||||
|
||||
const row = document.createElement("tr");
|
||||
row.innerHTML = `
|
||||
|
|
@ -186,9 +186,9 @@ fileInput.addEventListener("change", (e) => {
|
|||
const setTitle = () => {
|
||||
const title = document.querySelector("h1");
|
||||
if (fileType) {
|
||||
title.textContent = getTranslation('convert', 'titleWithType', { fileType });
|
||||
title.textContent = getTranslation("convert", "titleWithType", { fileType });
|
||||
} else {
|
||||
title.textContent = getTranslation('convert', 'title');
|
||||
title.textContent = getTranslation("convert", "title");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ const deleteRow = (target) => {
|
|||
|
||||
const uploadFile = (file) => {
|
||||
convertButton.disabled = true;
|
||||
convertButton.value = getTranslation('convert', 'uploading');
|
||||
convertButton.value = getTranslation("convert", "uploading");
|
||||
pendingFiles += 1;
|
||||
|
||||
const formData = new FormData();
|
||||
|
|
@ -243,7 +243,7 @@ const uploadFile = (file) => {
|
|||
if (formatSelected) {
|
||||
convertButton.disabled = false;
|
||||
}
|
||||
convertButton.value = getTranslation('convert', 'convertButton');
|
||||
convertButton.value = getTranslation("convert", "convertButton");
|
||||
}
|
||||
|
||||
//Remove the progress bar when upload is done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue