From 2753b07b092e34b5fc8efa3e2123cf8c0a592e9a Mon Sep 17 00:00:00 2001 From: Pascal Date: Thu, 12 Mar 2026 07:58:44 +0000 Subject: [PATCH 1/4] Fixed display of default source and target language, updated README for installation instructions --- .gitignore | 4 + README.md | 115 +++++++++++++++++++++++++++ app/components/LanguageSelector.vue | 13 ++- app/components/TranslationOutput.vue | 4 +- app/composables/useTranslation.ts | 7 +- app/pages/index.vue | 1 - 6 files changed, 132 insertions(+), 12 deletions(-) create mode 100644 README.md diff --git a/.gitignore b/.gitignore index 4a7f73a..cf23eb9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ .nitro .cache dist +package-lock.json # Node dependencies node_modules @@ -22,3 +23,6 @@ logs .env .env.* !.env.example + +#IDE +.vscode diff --git a/README.md b/README.md new file mode 100644 index 0000000..78ed769 --- /dev/null +++ b/README.md @@ -0,0 +1,115 @@ +# Quick Ling Setup + + +## Setup + +Make sure to install dependencies: + +```bash +# npm +npm install + +# pnpm +pnpm install + +# yarn +yarn install + +# bun +bun install +``` + +## Ollama Setup (Optional) + +To use the translation service, you need to have Ollama installed and the translategemma model loaded. + +### Installing Ollama + +#### Linux and macOS +```bash +# Add Ollama repository +curl -fsSL https://ollama.com/install.sh | sh +``` + +#### Windows (PowerShell) +```powershell +# Download and install +irm https://ollama.com/install.ps1 | iex +``` + +### Pulling the TranslateGemma Model + +After installing Ollama, pull the translategemma model: + +```bash +# Pull the translation model +ollama pull translategemma:latest +``` + +For specific model versions: +```bash +# Pull a specific version +ollama pull translategemma:12b +``` + +### Running Ollama Server + +Start the Ollama server (runs on `localhost:11434` by default): + +```bash +ollama serve +``` + +## Development Server + +Start the development server on `http://localhost:3000`: + +```bash +# npm +npm run dev + +# pnpm +pnpm dev + +# yarn +yarn dev + +# bun +bun run dev +``` + +## Production + +Build the application for production: + +```bash +# npm +npm run build + +# pnpm +pnpm build + +# yarn +yarn build + +# bun +bun run build +``` + +Locally preview production build: + +```bash +# npm +npm run preview + +# pnpm +pnpm preview + +# yarn +yarn preview + +# bun +bun run preview +``` + +Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information. \ No newline at end of file diff --git a/app/components/LanguageSelector.vue b/app/components/LanguageSelector.vue index 920cafd..dd9a390 100644 --- a/app/components/LanguageSelector.vue +++ b/app/components/LanguageSelector.vue @@ -3,13 +3,13 @@ import { useLanguages } from "~/composables/useLanguages"; interface Props { label?: string; - modelValue: string; + modelValue?: string; } const props = defineProps(); -const emit = defineEmits<{ - (e: "update:modelValue", value: string): void; -}>(); + + +const model = defineModel({ default: 'en' }); const { languages } = useLanguages(); @@ -21,10 +21,7 @@ const { languages } = useLanguages();