From 5cd45bc2c93369f27e753d7b6cf7f93acdd7c0ea Mon Sep 17 00:00:00 2001 From: Mau Date: Sun, 1 Nov 2026 11:29:22 -0300 Subject: [PATCH 1/4] feat(i18n): zero-dependency i18n engine, en and pt-BR dictionaries, shared UI Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/test-i18n.yml | 32 + docs/i18n-coverage.md | 15 + docs/i18n-glossary.md | 22 + .../2026-10-31-duodesk-i18n-implantacao.md | 126 + .../plans/2026-10-31-duodesk-i18n-pt-br.md | 434 +++ .../plans/2026-11-01-duodesk-i18n-nota-9-5.md | 139 + .../plans/2026-11-01-release-notes-pt-br.md | 40 + flake.nix | 2 +- shared/aurora-shell.js | 269 +- shared/camera-view.html | 10 +- shared/camera-view.js | 19 +- shared/camshare.js | 8 +- shared/clipimage.js | 6 +- shared/feature-art.js | 56 +- shared/i18n-dom.js | 24 + shared/i18n.js | 62 + shared/kvm-map-ui.js | 19 +- shared/locales/en.js | 2934 +++++++++++++++++ shared/locales/fragments/main-process.json | 286 ++ shared/locales/fragments/small-windows.json | 154 + shared/locales/pt-BR.js | 2934 +++++++++++++++++ shared/mesh-intro.js | 16 +- shared/pagefx/core.js | 9 +- shared/pagefx/home.js | 144 +- shared/pagefx/input.js | 90 +- shared/pagefx/phone-media.js | 113 +- shared/pagefx/screens.js | 115 +- shared/pagefx/sharing.js | 195 +- shared/pagefx/support.js | 25 +- shared/pairpop.js | 2 +- shared/rezume-shelf.js | 9 +- shared/rezume.js | 15 +- shared/sidebar-model.js | 29 +- shared/support.js | 37 +- shared/test/i18n-allow.json | 29 + shared/test/i18n-baseline.json | 8 + shared/test/i18n-coverage.js | 86 + shared/test/i18n-glossary.js | 38 + shared/test/i18n-scope.js | 31 + shared/test/i18n.js | 188 ++ shared/test/ui-load.js | 68 + shared/traymenu.js | 36 +- shared/ui-adb.js | 51 +- shared/ui-adbqr.js | 19 +- shared/ui-calls.js | 127 +- shared/ui-camera.js | 101 +- shared/ui-device.js | 123 +- shared/ui-hub.js | 100 +- shared/ui-media.js | 29 +- shared/ui-messages.js | 45 +- shared/ui-mirror.js | 54 +- shared/ui-nowplaying.js | 39 +- shared/ui-pfiles.js | 103 +- shared/ui-qrpair.js | 21 +- shared/ui-remote.js | 31 +- shared/ui-rezume.js | 91 +- shared/ui-support.js | 105 +- shared/ui-updater-modal.js | 49 +- shared/updates.js | 10 +- shared/vcam.js | 10 +- 60 files changed, 8917 insertions(+), 1065 deletions(-) create mode 100644 .github/workflows/test-i18n.yml create mode 100644 docs/i18n-coverage.md create mode 100644 docs/i18n-glossary.md create mode 100644 docs/superpowers/plans/2026-10-31-duodesk-i18n-implantacao.md create mode 100644 docs/superpowers/plans/2026-10-31-duodesk-i18n-pt-br.md create mode 100644 docs/superpowers/plans/2026-11-01-duodesk-i18n-nota-9-5.md create mode 100644 docs/superpowers/plans/2026-11-01-release-notes-pt-br.md create mode 100644 shared/i18n-dom.js create mode 100644 shared/i18n.js create mode 100644 shared/locales/en.js create mode 100644 shared/locales/fragments/main-process.json create mode 100644 shared/locales/fragments/small-windows.json create mode 100644 shared/locales/pt-BR.js create mode 100644 shared/test/i18n-allow.json create mode 100644 shared/test/i18n-baseline.json create mode 100644 shared/test/i18n-coverage.js create mode 100644 shared/test/i18n-glossary.js create mode 100644 shared/test/i18n-scope.js create mode 100644 shared/test/i18n.js create mode 100644 shared/test/ui-load.js diff --git a/.github/workflows/test-i18n.yml b/.github/workflows/test-i18n.yml new file mode 100644 index 00000000..5786b4fa --- /dev/null +++ b/.github/workflows/test-i18n.yml @@ -0,0 +1,32 @@ +name: i18n tests + +on: + pull_request: + push: + branches: [main] + paths: + - 'shared/i18n*.js' + - 'shared/locales/**' + - 'shared/test/**' + - 'windows/**' + - 'linux/**' + - 'mac/**' + - 'android/app/src/main/res/**' + - 'website/locales/**' + +jobs: + i18n: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: node shared/test/i18n.js + - run: node shared/test/i18n-coverage.js + - run: node shared/test/i18n-glossary.js + - run: node shared/test/i18n-scope.js + - run: node shared/test/ui-load.js + - run: node shared/test/packaging.js + - run: node shared/test/sidebar-model.js + - run: node shared/test/traymenu.js diff --git a/docs/i18n-coverage.md b/docs/i18n-coverage.md new file mode 100644 index 00000000..62787a51 --- /dev/null +++ b/docs/i18n-coverage.md @@ -0,0 +1,15 @@ +# Cobertura de tradução (gerado por `node shared/test/i18n-coverage.js --write`) + +Literais de interface em inglês fora de `t()`, por superfície. Heurística: ver o cabeçalho do teste. + +| Superfície | Arquivos | Chamadas `t()` | Literais em inglês | % pendente | +|---|---|---|---|---| +| Páginas do desktop | 57 | 2295 | 0 | 0.0% | +| Mesh | 16 | 913 | 0 | 0.0% | +| Módulos shared/ui | 19 | 907 | 0 | 0.0% | +| Processo principal | 183 | 636 | 0 | 0.0% | +| Efeitos e módulos shared | 18 | 513 | 0 | 0.0% | +| Janelas pequenas | 32 | 53 | 0 | 0.0% | + +## Pendentes + diff --git a/docs/i18n-glossary.md b/docs/i18n-glossary.md new file mode 100644 index 00000000..99a536b5 --- /dev/null +++ b/docs/i18n-glossary.md @@ -0,0 +1,22 @@ +# Glossário pt-BR do DuoDesk + +Termos fixos da interface em português do Brasil. O teste `shared/test/i18n-glossary.js` falha se um termo +proibido aparecer em `shared/locales/pt-BR.js`, em `android/.../values-pt-rBR/strings.xml` ou em +`website/locales/pt-BR.json`. Tratamento: sempre "você". + +| Inglês | Use | Não use | +|---|---|---| +| pair, pairing, paired | parear, pareamento, pareado | emparelhar, emparelhamento | +| app (aplicativo) | aplicativo | app, apps | +| on / off (estado de um recurso) | ativado, desativado, ativar, desativar | ligado, desligado, ligar, desligar | +| phone | telefone | celular, smartphone | +| clipboard | área de transferência | clipboard | +| debugging | depuração | debug | +| hotspot | ponto de acesso | hotspot | +| wireless | sem fio | wireless | +| you, your | você, seu/sua | tu, teu/tua | + +Exceções: nomes próprios e de produtos (Wi-Fi Direct, Bluetooth, Android, GitHub), a palavra "Ligar" só como +verbo de chamada telefônica, e "desligar o computador" (energia). +Regras de estilo: frase em "sentence case" nos textos corridos; "Title Case" só onde o inglês também usa; +sem gênero preso ao nome do dispositivo (`{phone}`, `{name}`): reescrever na forma neutra. diff --git a/docs/superpowers/plans/2026-10-31-duodesk-i18n-implantacao.md b/docs/superpowers/plans/2026-10-31-duodesk-i18n-implantacao.md new file mode 100644 index 00000000..de6fe54b --- /dev/null +++ b/docs/superpowers/plans/2026-10-31-duodesk-i18n-implantacao.md @@ -0,0 +1,126 @@ +# DuoDesk i18n pt-BR: plano de implantação + +Data: 2026-10-31. Complementa `2026-10-31-duodesk-i18n-pt-br.md` (arquitetura). Este plano cobre o que falta +para publicar o pt-BR e como colocá-lo no ar sem regressão no inglês. + +## 1. Estado atual + +Commits locais à frente de `origin/main`: 12 (motor, dicionários, desktop, Android, site, docs, correções). +Nada foi enviado ao remoto. + +Pronto: +- Motor `shared/i18n.js`, dicionários `en`/`pt-BR` (~1.190 chaves, paridade de `{param}` testada). +- Desktop (Windows, Linux, macOS): navegação, cabeçalhos e descrições das abas, todas as páginas principais, + bandeja/barra de menus, seletor de idioma em Geral, persistência em `settings.app.lang`. +- Shells mesh: carregam o i18n e traduzem a navegação e os cabeçalhos. +- Android: ~550 strings em `values` e `values-pt-rBR`, 5 plurais. +- Site: troca EN/PT, `404.js` e `lang-boot.js` compatíveis com a CSP. +- README e docs em pt-BR. + +Pendente (desktop, em inglês): +1. `mesh/ui-*.js` (Windows 5 arquivos, Linux 4, macOS 5). +2. `shared/ui-*.js`, `pairpop.js`, `aurora-shell.js` (hub, chamadas, mensagens, mídia, arquivos do telefone, + dispositivo, espelho, câmera, suporte, janela de atualização, QR/ADB). +3. Janelas pequenas: HUD, appview, phoneview, sender, sound, monitor, appsend, audio, capture, pcview + (usar `shared/i18n-dom.js`, já criado). +4. Processo principal: notificações, diálogos, HUD, mensagens de erro/status em `windows/*.js`, `linux/*.js`, + `mac/*.js` e `shared/*.js` de Node. +5. Android: `Hub.label`, `Files.plural`, `FolderShare.shown()`, rótulos do `AndroidManifest.xml`. + +## 2. Fase A: concluir o desktop + +Método (o mesmo que funcionou na rodada anterior): +- Um lote por grupo de arquivos, sem arquivos em comum entre lotes. Cada lote envolve o texto em + `t(chave, params, inglês_exato)` e grava só as chaves novas em um fragmento JSON; ninguém edita + `shared/locales/*.js` durante o lote. +- Convenção de chave: `.`; prefixos `mesh_`, `meshm_`, `win_`, `lin_`, `mac_`, `sh_` por grupo. +- Regras: inglês idêntico ao original; `{me}`, `{name}`, `{Name}`, `{the}`, `{There}` ficam no texto + (o `UI.fill` os preenche); sem concatenação de fragmentos; plural em `_one`/`_other`; não traduzir logs, + texto comparado no código, mensagens enviadas ao outro dispositivo, nomes de marca. +- Ordem sugerida (menor risco primeiro): janelas pequenas, `shared/ui-*`, mesh, processo principal. + O processo principal é o mais arriscado: grep do texto antes de embrulhar, para não quebrar comparações. + +Mesclar fragmentos (script de mescla): +- Chave igual com inglês diferente entre plataformas vira variante `_linux`/`_mac` e o código dessa + plataforma é renomeado. +- Chave igual com pt diferente: prevalece a do Windows; revisar a lista de divergências. +- Regravar os dicionários, rodar a validação (seção 4). + +Critério de pronto da fase: nenhum literal de interface em inglês fora das exceções documentadas +(marcas, unidades, texto vindo do telefone ou do outro computador). + +## 3. Fase B: Android + +1. Instalar JDK 17+ e o Android SDK (a máquina atual não tem); `cd android && ./gradlew :app:assembleDebug`. +2. Corrigir o que o compilador acusar (principal risco: `stringResource` fora de contexto composable, + `pluralStringResource` sem opt-in). +3. Traduzir `Hub.label`, `Files.plural`, `FolderShare.shown()` e os rótulos do manifest + (`strings.xml` com `@string/...`). +4. Teste em aparelho/emulador com idioma do sistema em Português (Brasil) e em English: percorrer + Visão Geral, Conexão, Chamadas, Mensagens, Arquivos, Mouse, Ajustes, diálogos de pareamento, + notificações; procurar texto cortado e quebras de linha. + +## 4. Verificação (portões antes de qualquer merge) + +Automáticos (todos devem passar; `applog`, `kvm-moves`, `movebench` já falham em `origin/main`): +```bash +for t in shared/test/*.js; do node "$t" >/dev/null 2>&1 || echo "FAIL $t"; done +node shared/test/i18n.js # paridade, chaves usadas existem +node shared/test/packaging.js # locales e i18n entram nos instaladores +``` +Acrescentar ao repositório (hoje só existem como scripts soltos): +- Verificação de padrão em inglês: todo `t('chave', p, 'inglês')` literal deve igualar o valor em `en.js` + (pegou a regressão de `sidebar.nearby` e da navegação). +- Verificação de chaves órfãs. +- Verificação de parâmetros: toda chave com `{x}` recebe `x` no ponto de chamada (exceto os tokens do `UI.fill`). + +Manual, por plataforma (Windows, macOS, Linux X11/Wayland), com `lang` em `auto`, `en` e `pt-BR`: +- Trocar o idioma em Geral: recarrega, nav, cabeçalhos, descrições e bandeja mudam. +- Cada aba abre sem erro no console; conferir texto cortado em 1366×768, 1440×900 e 375×812 (mesh/janela estreita). +- Pareamento completo com outro computador e com o telefone: banner, códigos, estados. +- Bandeja: conectado e desconectado, "Conectar a", "Procurar novamente". +- Migração: perfil que tinha o idioma só no `localStorage` passa a ter `settings.app.lang`. +- Inglês idêntico ao de `origin/main` (comparar capturas de 3 páginas por plataforma). + +Site: `node website/dev-server.js`; EN e PT, `/404`, recarga com PT salvo (sem flash), CSP sem erro no console +(sem script inline). + +## 5. Fase C: integração e publicação + +1. Rebase/merge de `main` na branch de trabalho; resolver conflitos (as páginas `ui-*.js` mudam muito). +2. Abrir PR por área para facilitar a revisão: (a) motor + dicionários + testes; (b) desktop; (c) Android; + (d) site + docs. Cada PR passa pelos portões da seção 4. +3. Antes do `push`: confirmar com o dono do repositório (o remoto é `0xCodez/DuoDesk`; se não houver + permissão de push, enviar para um fork e abrir PR do fork). +4. Versão: subir a versão do app (changelog: "Português (Brasil)"), atualizar o `README.md` e `README.pt-BR.md` + (número da versão, links de download) e as notas da release. +5. CI/instaladores: gerar `.exe`, `.dmg`, `.deb`/AppImage, Nix e APK; instalar cada artefato em máquina limpa e + confirmar que `shared/locales/` existe no pacote e o idioma troca. +6. Site: deploy na Vercel (preview primeiro); conferir `vercel.json` (CSP com `404.js` e `lang-boot.js`). +7. Anúncio: release no GitHub com as notas em EN e PT. + +## 6. Riscos e reversão + +| Risco | Mitigação | +|---|---| +| Regressão no inglês (texto padrão diferente do dicionário) | portão de padrão em inglês na seção 4 | +| Texto comparado no código quebra ao traduzir (processo principal) | grep antes de embrulhar; testes de `shared/test` | +| Idioma só definido depois do carregamento (constantes no topo do módulo) | traduzir no uso/renderização, nunca na carga | +| Janela que não carrega `i18n.js` mostra chave | padrão em inglês no `t()` local cobre; checar no manual | +| Android não compila | Fase B antes de qualquer PR do Android | +| Instalador sem `locales/` | `packaging.js` + instalação em máquina limpa | + +Reversão: cada área vai em PR próprio e o idioma cai para inglês sozinho se o dicionário `pt-BR` falhar +(`t()` usa `en`). Para desligar o pt-BR sem reverter código: remover a opção `pt-BR` do seletor em Geral +e do `getAvailableLanguages`, e forçar `en` em `applyLanguage`. + +## 7. Ordem e estimativa + +1. Fase A, janelas pequenas e `shared/ui-*` (lotes paralelos), mescla, validação. +2. Fase A, mesh e processo principal, mescla, validação. +3. Fase B (depende de JDK/SDK). +4. Verificação manual nas 3 plataformas + site. +5. PRs e publicação (Fase C). + +As fases A e B são independentes e podem andar em paralelo. A verificação manual é o gargalo: +precisa de uma máquina de cada sistema. diff --git a/docs/superpowers/plans/2026-10-31-duodesk-i18n-pt-br.md b/docs/superpowers/plans/2026-10-31-duodesk-i18n-pt-br.md new file mode 100644 index 00000000..71837f6e --- /dev/null +++ b/docs/superpowers/plans/2026-10-31-duodesk-i18n-pt-br.md @@ -0,0 +1,434 @@ +# DuoDesk i18n & Tradução para Português (Brasil) Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Implementar arquitetura de internacionalização (i18n) completa e traduzir 100% do DuoDesk para Português do Brasil (pt-BR) abrangendo Desktop (Windows/macOS/Linux), Documentação, Android e Website. + +**Architecture:** Módulo core `shared/i18n.js` isomórfico (Node + Browser) zero-dependency com dicionários `shared/locales/en.js` e `shared/locales/pt-BR.js`. Integração em renderers Electron via script tags e persistência via store local. No Android, extração para `values-pt-rBR/strings.xml` com integração Jetpack Compose. Na documentação, `README.pt-BR.md` completo com seletor de idiomas. + +**Tech Stack:** JavaScript (ES6 vanilla, Node.js assert), HTML5/CSS3, Electron, Android Kotlin (Jetpack Compose, XML resources), Markdown. + +**Spec:** [duodesk-i18n-spec.md](file:///C:/Users/Mau/.gemini/antigravity/brain/2ead9a51-f63f-4695-b736-2f0c7af12ec9/duodesk-i18n-spec.md) + +## Global Constraints + +- Zero dependências npm externas adicionadas aos pacotes de runtime do Electron. +- Compatibilidade estrita com Content-Security-Policy (`script-src 'self'`). +- Carregamento síncrono das traduções evitando Cumulative Layout Shift (CLS) e flashes de conteúdo sem tradução (FOUT). +- Fallback automático para `en` quando uma chave não existir no idioma selecionado. +- Preservar integridade de código, testes existentes e compatibilidade com macOS, Windows e Linux. + +## Review Focus + +1. Interpolação de variáveis ausentes ou nulas em `t(key, params)` não deve lançar erro nem quebrar a UI, retornando a string original ou o placeholder intacto. +2. Troca de idioma em runtime em Configurações Gerais deve atualizar imediatamente os textos visíveis sem exigir reinicialização manual do app. +3. Chave inexistente deve retornar a chave original ou o `defaultText` em vez de `undefined`. +4. Detecção de idioma do sistema (`navigator.language`) deve mapear variantes como `pt`, `pt-BR`, `pt_BR` para o catálogo `pt-BR`. +5. Recursos Android não devem falhar em tempo de compilação ou execução caso o dispositivo utilize um locale não traduzido (fallback para `values/strings.xml`). + +--- + +### Task 1: Core i18n Engine & Catálogos de Idioma (Desktop & Shared) + +**Files:** +- Create: `shared/locales/en.js` +- Create: `shared/locales/pt-BR.js` +- Create: `shared/i18n.js` +- Test: `shared/test/i18n.js` + +**Interfaces:** +- Produces: + - `i18n.t(key: string, params?: object, defaultText?: string): string` + - `i18n.setLanguage(lang: string): string` + - `i18n.getLanguage(): string` + - `i18n.getAvailableLanguages(): Array<{code: string, label: string}>` + - `i18n.onLanguageChange(listener: (lang: string) => void): () => void` + +- [ ] **Step 1: Escrever teste de unidade que falha para o motor i18n** + +Criar `shared/test/i18n.js`: +```javascript +'use strict'; +const assert = require('assert'); +const i18n = require('../i18n.js'); + +// Teste 1: Chave básica em inglês padrão +i18n.setLanguage('en'); +assert.strictEqual(i18n.t('app.name'), 'DuoDesk'); + +// Teste 2: Alternância para pt-BR +i18n.setLanguage('pt-BR'); +assert.strictEqual(i18n.t('nav.overview'), 'Visão Geral'); + +// Teste 3: Interpolação de parâmetros +assert.strictEqual( + i18n.t('pair.hint_code', { code: '1234' }), + 'Digite o código 1234 no outro computador' +); + +// Teste 4: Fallback para chave inexistente +assert.strictEqual(i18n.t('non.existent.key', null, 'Texto Fallback'), 'Texto Fallback'); + +// Teste 5: Listener de mudança de idioma +let changedTo = null; +const unsubscribe = i18n.onLanguageChange((lang) => { changedTo = lang; }); +i18n.setLanguage('en'); +assert.strictEqual(changedTo, 'en'); +unsubscribe(); + +console.log('i18n: ok'); +``` + +- [ ] **Step 2: Executar teste para verificar falha inicial** + +Comando: `node shared/test/i18n.js` +Esperado: FAIL com `Cannot find module '../i18n.js'` + +- [ ] **Step 3: Implementar catálogos e motor core `shared/i18n.js`** + +Criar `shared/locales/en.js`: +```javascript +(function (root, factory) { + if (typeof module === 'object' && module.exports) module.exports = factory(); + else { + root.DuoDeskLocales = root.DuoDeskLocales || {}; + root.DuoDeskLocales['en'] = factory(); + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function () { + return { + 'app.name': 'DuoDesk', + 'app.not_paired': 'Not paired', + 'app.paired_with': 'Paired with {name}', + 'nav.overview': 'Overview', + 'nav.screens': 'Screens', + 'nav.cursor': 'Mouse & Keys', + 'nav.audio': 'Audio', + 'nav.files': 'Files', + 'nav.apps': 'Apps', + 'nav.phone': 'Phone', + 'nav.settings': 'General', + 'nav.about': 'About', + 'pair.title': 'Pairing', + 'pair.code_label': 'Code', + 'pair.match': 'Codes match', + 'pair.cancel': 'Cancel', + 'pair.hint_code': 'Type the code {code} on the other computer', + 'general.language': 'Language', + 'general.lang_auto': 'Automatic (System)', + 'general.lang_en': 'English', + 'general.lang_pt_br': 'Português (Brasil)' + }; +}); +``` + +Criar `shared/locales/pt-BR.js`: +```javascript +(function (root, factory) { + if (typeof module === 'object' && module.exports) module.exports = factory(); + else { + root.DuoDeskLocales = root.DuoDeskLocales || {}; + root.DuoDeskLocales['pt-BR'] = factory(); + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function () { + return { + 'app.name': 'DuoDesk', + 'app.not_paired': 'Não pareado', + 'app.paired_with': 'Pareado com {name}', + 'nav.overview': 'Visão Geral', + 'nav.screens': 'Telas', + 'nav.cursor': 'Mouse e Teclado', + 'nav.audio': 'Áudio', + 'nav.files': 'Arquivos', + 'nav.apps': 'Aplicativos', + 'nav.phone': 'Telefone', + 'nav.settings': 'Geral', + 'nav.about': 'Sobre', + 'pair.title': 'Pareamento', + 'pair.code_label': 'Código', + 'pair.match': 'Códigos coincidem', + 'pair.cancel': 'Cancelar', + 'pair.hint_code': 'Digite o código {code} no outro computador', + 'general.language': 'Idioma', + 'general.lang_auto': 'Automático (Sistema)', + 'general.lang_en': 'English', + 'general.lang_pt_br': 'Português (Brasil)' + }; +}); +``` + +Criar `shared/i18n.js`: +```javascript +(function (root, factory) { + if (typeof module === 'object' && module.exports) { + const en = require('./locales/en.js'); + const ptBR = require('./locales/pt-BR.js'); + module.exports = factory({ 'en': en, 'pt-BR': ptBR }); + } else { + root.DuoDeskI18n = factory(root.DuoDeskLocales || {}); + root.t = root.DuoDeskI18n.t; + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function (locales) { + 'use strict'; + let currentLang = 'en'; + const listeners = new Set(); + + function normalizeLang(lang) { + if (!lang) return 'en'; + const lower = String(lang).toLowerCase(); + if (lower.startsWith('pt')) return 'pt-BR'; + if (lower.startsWith('en')) return 'en'; + return locales[lang] ? lang : 'en'; + } + + function t(key, params, defaultText) { + const dict = locales[currentLang] || locales['en'] || {}; + const fallbackDict = locales['en'] || {}; + let text = dict[key] !== undefined ? dict[key] : (fallbackDict[key] !== undefined ? fallbackDict[key] : (defaultText !== undefined ? defaultText : key)); + if (params && typeof params === 'object') { + text = String(text).replace(/\{(\w+)\}/g, (_, k) => (params[k] !== undefined && params[k] !== null ? params[k] : `{${k}}`)); + } + return text; + } + + function setLanguage(lang) { + currentLang = normalizeLang(lang); + listeners.forEach(fn => { try { fn(currentLang); } catch (e) { console.error(e); } }); + return currentLang; + } + + function getLanguage() { return currentLang; } + + function getAvailableLanguages() { + return [ + { code: 'en', label: 'English' }, + { code: 'pt-BR', label: 'Português (Brasil)' } + ]; + } + + function onLanguageChange(fn) { + listeners.add(fn); + return () => listeners.delete(fn); + } + + return { t, setLanguage, getLanguage, normalizeLang, getAvailableLanguages, onLanguageChange }; +}); +``` + +- [ ] **Step 4: Executar teste para verificar sucesso** + +Comando: `node shared/test/i18n.js` +Esperado: `i18n: ok` com exit code 0. + +- [ ] **Step 5: Commit** + +```bash +git add shared/locales/ shared/i18n.js shared/test/i18n.js +git commit -m "feat(i18n): add zero-dependency i18n core engine and pt-BR locale" +``` + +--- + +### Task 2: Integração Desktop & Seletor de Idioma em Configurações + +**Files:** +- Modify: `windows/app.html:52-56` +- Modify: `windows/ui-general.js` +- Modify: `shared/sidebar-model.js` +- Modify: `windows/main.js` (ou detecção via preload) +- Test: Carregar `windows/app.html` via Electron ou validação de script tags. + +**Interfaces:** +- Consumes: `DuoDeskI18n.setLanguage`, `DuoDeskI18n.t`, `DuoDeskI18n.onLanguageChange` +- Produces: Seleção persistente em `store.set('general.language', value)` e re-render dos rótulos de navegação e status. + +- [ ] **Step 1: Adicionar scripts de i18n em `windows/app.html`** + +Inserir as tags de script antes dos demais módulos de interface: +```html + + + +``` + +- [ ] **Step 2: Atualizar `shared/sidebar-model.js` para usar chaves de i18n dinâmicas** + +Garantir que a renderização dos títulos dos menus passe por `t('nav.' + pageId)`. + +- [ ] **Step 3: Adicionar campo seletor de idioma em `windows/ui-general.js`** + +Implementar card "Idioma / Language" na tela Geral: +```javascript +const langRow = renderSelect({ + label: t('general.language'), + value: store.get('general.language') || 'auto', + options: [ + { value: 'auto', label: t('general.lang_auto') }, + { value: 'pt-BR', label: 'Português (Brasil)' }, + { value: 'en', label: 'English' } + ], + onChange: (val) => { + store.set('general.language', val); + const target = val === 'auto' ? navigator.language : val; + DuoDeskI18n.setLanguage(target); + location.reload(); + } +}); +``` + +- [ ] **Step 4: Validar sintaxe e integridade dos arquivos modificados** + +Comando: `node -c windows/ui-general.js shared/sidebar-model.js` +Esperado: Exit code 0 sem erros de sintaxe. + +- [ ] **Step 5: Commit** + +```bash +git add windows/app.html windows/ui-general.js shared/sidebar-model.js +git commit -m "feat(ui): integrate i18n into desktop shell and general settings" +``` + +--- + +### Task 3: Tradução Completa dos Dicionários e Sub-sistemas Desktop + +**Files:** +- Modify: `shared/locales/en.js` +- Modify: `shared/locales/pt-BR.js` +- Modify: `windows/ui-overview.js` +- Modify: `windows/ui-cursor.js` +- Modify: `windows/ui-clipboard.js` +- Modify: `windows/ui-files.js` +- Modify: `shared/phonehub.js` + +**Interfaces:** +- Consumes: `t()` em todas as mensagens de status, cards e ações do usuário. + +- [ ] **Step 1: Expandir catálogo `shared/locales/pt-BR.js` e `en.js` com todos os termos dos módulos** + +Mapear termos de: +- Pareamento e KVM (Bordas, ativação suave, troca de comando). +- Compartilhamento de arquivos (arrastar e soltar, downloads recebidos). +- Telefone (chamadas, mensagens, câmera remota, espelhamento). +- Áudio e tela secundária. + +- [ ] **Step 2: Substituir strings hardcoded por chamadas `t()` nos componentes de tela** + +Atualizar `ui-overview.js`, `ui-cursor.js`, `ui-clipboard.js`, `ui-files.js` e `phonehub.js` usando `t(key, params, defaultEnglish)`. + +- [ ] **Step 3: Testar consistência dos catálogos** + +Adicionar em `shared/test/i18n.js` verificação de paridade de chaves: +```javascript +const enKeys = Object.keys(require('../locales/en.js')()); +const ptKeys = Object.keys(require('../locales/pt-BR.js')()); +assert.deepStrictEqual(enKeys.sort(), ptKeys.sort(), 'Chaves en e pt-BR devem ser idênticas'); +``` + +- [ ] **Step 4: Executar teste de paridade de chaves** + +Comando: `node shared/test/i18n.js` +Esperado: `i18n: ok` + +- [ ] **Step 5: Commit** + +```bash +git add shared/locales/ windows/ui-*.js shared/phonehub.js shared/test/i18n.js +git commit -m "feat(i18n): expand full pt-BR translation across desktop components" +``` + +--- + +### Task 4: Tradução da Documentação (`README.pt-BR.md` e `docs/`) + +**Files:** +- Create: `README.pt-BR.md` +- Modify: `README.md:1-20` +- Create: `docs/mesh.pt-BR.md` +- Create: `docs/screen-mesh.pt-BR.md` + +- [ ] **Step 1: Criar o `README.pt-BR.md` completo e localizado** + +Traduzir todas as seções: +- Apresentação: "Todos os seus computadores e seu telefone funcionando em uma única mesa." +- Recursos: Computadores, Telefones e tablets, Conexões, Primeiros passos. +- Instruções de compilação e execução para Windows, macOS, Linux, NixOS e Android. + +- [ ] **Step 2: Adicionar banner de alternância de idioma no topo do `README.md` original** + +Inserir no topo de `README.md`: +```markdown +

+ 🌐 Idiomas / Languages: English · Português (Brasil) +

+``` + +- [ ] **Step 3: Traduzir guias de arquitetura em `docs/*.pt-BR.md`** + +Traduzir `docs/mesh.md` e `docs/screen-mesh.md` mantendo precisão técnica e formatação. + +- [ ] **Step 4: Validar links e referências entre os arquivos Markdown** + +Verificar existência de links relativos e integridade de imagens. + +- [ ] **Step 5: Commit** + +```bash +git add README.pt-BR.md README.md docs/*.pt-BR.md +git commit -m "docs: add full Portuguese (Brazil) translation for README and docs" +``` + +--- + +### Task 5: Localização do Aplicativo Android (Kotlin / Jetpack Compose) + +**Files:** +- Modify: `android/app/src/main/res/values/strings.xml` +- Create: `android/app/src/main/res/values-pt-rBR/strings.xml` +- Modify: `android/app/src/main/java/com/twindesk/android/MainActivity.kt` + +- [ ] **Step 1: Definir recursos em `values/strings.xml` e `values-pt-rBR/strings.xml`** + +Criar `values-pt-rBR/strings.xml` com traduções completas: +```xml + + + DuoDesk + Depuração sem fio + Ativar depuração sem fio + Tela do computador + Exibir a tela do computador + DuoDesk: mouse e teclado do computador + Permite que o computador pareado no DuoDesk toque, role e digite neste celular com mouse e teclado quando a depuração sem fio não estiver disponível. + +``` + +- [ ] **Step 2: Mapear textos do Jetpack Compose para recursos traduzíveis** + +Ajustar `MainActivity.kt` para garantir que o app reflita automaticamente o idioma do sistema operacional do smartphone. + +- [ ] **Step 3: Commit** + +```bash +git add android/app/src/main/res/ android/app/src/main/java/ +git commit -m "feat(android): add pt-BR string resources and localization" +``` + +--- + +### Task 6: Localização do Website (`website/`) + +**Files:** +- Modify: `website/index.html` +- Create: `website/locales/pt-BR.json` (ou script de tradução dinâmica) +- Modify: `website/app.js` + +- [ ] **Step 1: Adicionar suporte a pt-BR no website** + +Configurar alternância de idioma no cabeçalho do site com armazenamento em `localStorage`. + +- [ ] **Step 2: Commit** + +```bash +git add website/ +git commit -m "feat(website): add Portuguese (Brazil) support to DuoDesk website" +``` diff --git a/docs/superpowers/plans/2026-11-01-duodesk-i18n-nota-9-5.md b/docs/superpowers/plans/2026-11-01-duodesk-i18n-nota-9-5.md new file mode 100644 index 00000000..d3e7ba7f --- /dev/null +++ b/docs/superpowers/plans/2026-11-01-duodesk-i18n-nota-9-5.md @@ -0,0 +1,139 @@ +# DuoDesk i18n pt-BR: plano para chegar a 9,5 + +Data: 2026-11-01. Parte da análise de hoje (nota 8,3) e do plano de publicação +`2026-10-31-duodesk-i18n-implantacao.md`. Este plano diz o que mudar, em que ordem, e como medir cada ganho. + +## 1. Meta e como a nota é calculada + +Média simples de quatro dimensões. Para 9,5 de média, nenhuma dimensão fica abaixo de 9,0. + +| Dimensão | Hoje | Meta | O que falta | +|---|---|---|---| +| Qualidade do português | 8,5 | 9,5 | vocabulário padronizado, revisão de frases longas | +| Cobertura | 7,8 | 9,5 | mesh, janelas pequenas, processo principal, assistente | +| Robustez técnica | 9,0 | 9,5 | portões de CI, cobertura medida, verificação em app rodando | +| Site, README, docs | 9,5 | 9,5 | manter | + +Cobertura 9,5 significa: menos de 1% de literais em inglês nas superfícies que o usuário vê, fora das exceções +documentadas (marcas, unidades, texto que vem do telefone ou do outro computador). + +## 2. Fase 1: medir (meio dia) + +Sem medição, a nota é opinião. Antes de traduzir mais, transformar os scripts soltos em portões do repositório. + +1. `shared/test/i18n-coverage.js`: varre os arquivos de interface e do processo principal e conta literais de + interface em inglês fora de `t()`. Gera `docs/i18n-coverage.md` (tabela por superfície). + Lista de exceções em `shared/test/i18n-allow.json` (marcas, unidades, campos de definição de aba). + Falha se a contagem passar do limite gravado. O limite desce a cada fase (nunca sobe). +2. `shared/test/i18n-defaults.js`: todo `t('chave', p, 'inglês')` literal tem o mesmo texto de `en.js`. +3. `shared/test/i18n-orphans.js`: nenhuma chave sem uso (exceto `nav.*`, `tab.*`, `tray.*` montadas em tempo de execução). +4. `shared/test/i18n-params.js`: cada `{x}` do dicionário recebe `x` no ponto de chamada (exceto os tokens do + `UI.fill`: `me`, `name`, `Name`, `the`, `There`, `them`). +5. `shared/test/i18n-glossary.js`: lê `docs/i18n-glossary.md` (seção 3) e falha se o `pt-BR.js` usar um termo + proibido (ex.: "emparelh", "app " fora de nomes próprios, "ligar/desligar" para estados). +6. Ligar tudo no CI (`npm test` ou o job existente) e exigir verde antes de merge. + +Saída da fase: linha de base numérica por superfície e CI que impede regressão. + +## 3. Fase 2: vocabulário e qualidade (1 dia) + +Criar `docs/i18n-glossary.md` e aplicar com busca e substituição guiada, revisando cada ocorrência: + +| Conceito | Termo padrão | Evitar | +|---|---|---| +| pair / pairing | parear, pareamento, pareado | emparelhar, emparelhamento | +| app | aplicativo (curto: app só em rótulos de espaço apertado, decidir e documentar) | app / apps misturado | +| on / off (estado) | ativado / desativado | ligado / desligado (exceto Bluetooth e Wi-Fi como interruptor físico: decidir) | +| phone | telefone | celular, smartphone | +| clipboard | área de transferência | clipboard | +| debugging | depuração | debug | +| hotspot | ponto de acesso | hotspot | + +Regras de revisão: +- Tratamento por "você" em todo texto; sem "tu". +- Sentence case nos textos corridos; Title Case só onde o inglês também usa (títulos de aba). +- Mesmo texto em inglês, mesma tradução (já garantido pelo mesclador; checar as 82 divergências antigas). +- Gênero e concordância com `{phone}`, `{name}`, `{me}`: reescrever frases que dependem do gênero do nome + (ex.: "{phone} pode ser encontrado") para forma neutra ("É possível encontrar {phone} enquanto..."). +- Revisão por falante nativo de 100% dos textos longos (mais de 60 caracteres, ~450 chaves) e de uma amostra de + 20% dos curtos. Registrar as correções no próprio PR. + +Saída da fase: qualidade 9,5; `i18n-glossary.js` verde. + +## 4. Fase 3: cobertura (3 a 5 dias, lotes paralelos) + +Método já provado: lotes sem arquivos em comum, cada um grava um fragmento JSON de chaves novas, um único +passo de mescla grava os dicionários, a validação roda no fim. Regras do lote: inglês idêntico ao original; +tokens do `UI.fill` ficam no texto; sem concatenar fragmentos; plural em `_one`/`_other`; não traduzir logs, +texto comparado no código, mensagens para o outro dispositivo, marcas. + +Ordem por ganho de nota e risco: + +1. **Mesh** (maior lacuna: ~231 literais). `windows/mesh/ui-{cursor,multi,overview,phone,share}.js`, + `linux/mesh/ui-{cursor,multi,overview,phone}.js`, `mac/mesh/ui-{cursor,display,multi,overview}.js` e o que + restar em `mesh/app.js`/`ui-start.js` (estados do pareamento, "Phase N"). Reaproveitar as chaves das páginas + não-mesh quando o inglês for igual. +2. **Janelas pequenas** (~66 literais): HUD, monitor, appview, phoneview, sender, sound, appsend, audio, + capture, pcview. HTML com `data-i18n*` e `shared/i18n-dom.js`; renderers com `t()`. +3. **Processo principal** (~53 literais): `callaudio.js`, `apps.js`, `phone-bridge.js`, `smb.js`, `sshd.js`, + `vdd.js`, `firewall.js`, `kvm.js` e os equivalentes de Linux e macOS. Antes de embrulhar, procurar o texto no + código e nos testes: se for comparado ou casado por regex, não mexer. +4. **Assistente do `aurora-shell.js`** (~41 literais de `shared/ui-*`): exemplos e respostas. Decidir se os + comandos de voz/texto aceitos também ganham versão em português (se não, documentar que o assistente + entende só inglês e traduzir apenas a interface). +5. **Android**: `Clip.kt` e `Input.kt` (textos que sobraram); revisar plurais e os 3 `Text("...")` restantes. +6. **Estados de erro do backend**: mensagens montadas nos módulos que viram `state.message`; traduzir na origem + (o idioma já está definido no processo principal). + +Meta por lote: o contador de `i18n-coverage` cai ao nível da meta (≤1%); atualizar o limite gravado no teste. + +## 5. Fase 4: verificação em app rodando (2 dias, precisa das máquinas) + +Nada disso foi feito até hoje. + +1. **Android**: instalar JDK 17+ e Android SDK; `./gradlew :app:assembleDebug`; corrigir o que o compilador + acusar; testar em emulador/aparelho em Português (Brasil) e English. +2. **Desktop**: rodar o app em Windows, macOS e Linux (X11 e Wayland) com `lang` = `auto`, `en`, `pt-BR`. + Checklist por plataforma: + - cada aba abre sem erro no console; trocar o idioma recarrega e muda nav, cabeçalhos, descrições e bandeja; + - pareamento completo (outro computador e telefone): banner, códigos, estados; + - modo Multi-device (mesh) e as janelas pequenas; + - sem texto cortado ou sobreposto em 1366×768, 1440×900 e 375×812; + - inglês idêntico ao de `origin/main` (comparar capturas de 3 páginas por plataforma). +3. **Captura automatizada**: com Playwright (já usado para Electron), um teste de fumaça que abre cada aba em + `pt-BR` e falha se achar texto da lista de "palavras inglesas" (the, and, with, click, open...) fora das + exceções. Roda no CI quando houver runner gráfico. +4. **Site**: `node website/dev-server.js`; EN e PT, `/404`, recarga com PT salvo (sem flash), CSP sem erro. + +## 6. Critérios de aceite para 9,5 + +- Os cinco testes novos passam no CI; `applog`, `kvm-moves`, `movebench` continuam fora (já falham em `origin/main`). +- `docs/i18n-coverage.md` mostra ≤1% de literais em inglês em todas as superfícies, com a lista de exceções. +- `i18n-glossary.js` verde; nenhuma ocorrência de "emparelh", "celular", "tu/teu". +- 100% dos textos longos revisados por falante nativo, com registro das correções. +- Android compila e foi percorrido em pt-BR; desktop percorrido nas 3 plataformas com o checklist acima. +- Nenhuma regressão no inglês (portão de padrão em inglês + comparação de capturas). + +## 7. Cronograma e dependências + +| Etapa | Dias | Depende de | +|---|---|---| +| Fase 1: portões | 0,5 | nada | +| Fase 2: vocabulário e revisão | 1 | Fase 1 (glossário no CI) | +| Fase 3: lotes 1 a 3 | 2 a 3 | Fase 1 (limite de cobertura) | +| Fase 3: lotes 4 a 6 | 1 a 2 | lotes 1 a 3 | +| Fase 4: verificação em app | 2 | JDK/SDK e uma máquina de cada sistema | +| Merge e publicação | conforme o plano de 31/10 | fases 1 a 4 | + +As fases 2 e 3 podem andar em paralelo. A Fase 4 é o gargalo: sem ela a nota de robustez não passa de 9,0, +porque o que foi medido até agora é código, não o app em uso. + +## 8. Riscos + +| Risco | Mitigação | +|---|---| +| Embrulhar texto que o código compara e quebrar lógica | procurar o texto no código e nos testes antes; testes de `shared/test` no fim de cada lote | +| Conflito de chaves entre plataformas | mesclador cria variantes `_linux`/`_mac`; o portão de padrão em inglês acusa divergência | +| Texto fixado na carga do módulo (idioma ainda não definido) | traduzir no uso/renderização; o teste de fumaça pega | +| Limite de cobertura virar burocracia | limite só desce; exceções em arquivo versionado e revisado no PR | +| Revisão nativa atrasar | começar a revisão da Fase 2 enquanto a Fase 3 corre; revisar só o delta nas rodadas seguintes | diff --git a/docs/superpowers/plans/2026-11-01-release-notes-pt-br.md b/docs/superpowers/plans/2026-11-01-release-notes-pt-br.md new file mode 100644 index 00000000..f93de974 --- /dev/null +++ b/docs/superpowers/plans/2026-11-01-release-notes-pt-br.md @@ -0,0 +1,40 @@ +# Notas da release: Português (Brasil) — rascunho + +Rascunho para a release que trouxer o pt-BR. A versão e a data ficam para quem publicar +(o `package.json` do desktop está em 2.5.0; nada foi alterado nas versões). + +## English + +**DuoDesk now speaks Brazilian Portuguese.** + +- Desktop (Windows, macOS, Linux): every page, the tray / menu bar, pairing, notifications and the small + windows follow the language. Pick it in **General › Language**: Automatic (system), Português (Brasil) or English. +- Android: the whole app is available in Portuguese (it follows the system language). +- Website and README: Portuguese versions (`README.pt-BR.md`, `docs/*.pt-BR.md`, EN / PT switch on the site). +- Fixes found along the way: the Camera, Messages, Calls, Media, Files and Support tabs could fail to load + on some pages because several scripts declared the same top-level name. + +Known limits: the assistant bar only understands English commands; messages sent to the other computer +or phone are shown in the sender's language. + +## Português (Brasil) + +**O DuoDesk agora fala português do Brasil.** + +- Desktop (Windows, macOS, Linux): todas as páginas, a bandeja / barra de menus, o pareamento, as notificações e as + janelas pequenas seguem o idioma. Escolha em **Geral › Idioma**: Automático (sistema), Português (Brasil) ou English. +- Android: o app inteiro está disponível em português (segue o idioma do sistema). +- Site e README: versões em português (`README.pt-BR.md`, `docs/*.pt-BR.md`, alternância EN / PT no site). +- Correções feitas no caminho: as abas Câmera, Mensagens, Chamadas, Mídia, Arquivos e Suporte podiam não carregar em + algumas páginas, porque vários scripts declaravam o mesmo nome no topo do arquivo. + +Limites conhecidos: a barra do assistente só entende comandos em inglês; as mensagens enviadas ao outro computador +ou ao telefone aparecem no idioma de quem envia. + +## Antes de publicar + +- [ ] Compilar e testar o Android em pt-BR e em inglês. +- [ ] Rodar o desktop nas 3 plataformas (`auto`, `en`, `pt-BR`) com o checklist do plano de 01/11. +- [ ] Definir a versão, atualizar os links de download do `README.md` e do `README.pt-BR.md`. +- [ ] Gerar os instaladores e conferir que `shared/locales/` e `shared/i18n-dom.js` estão no pacote. +- [ ] Deploy do site na Vercel (preview primeiro). diff --git a/flake.nix b/flake.nix index 2c46d4a7..f008d4bd 100644 --- a/flake.nix +++ b/flake.nix @@ -97,7 +97,7 @@ # Copy shared files cp -r shared/*.js shared/*.css shared/*.html "$share/shared/" # The pages' fonts (Geist woff2 + OFL.txt), the art kit and scenes, the per-page effects - cp -r shared/fonts shared/art shared/pagefx "$share/shared/" + cp -r shared/fonts shared/art shared/pagefx shared/locales "$share/shared/" if [ -d shared/icon ]; then cp -r shared/icon "$share/shared/" fi diff --git a/shared/aurora-shell.js b/shared/aurora-shell.js index 7e6fe348..c32109a1 100644 --- a/shared/aurora-shell.js +++ b/shared/aurora-shell.js @@ -25,6 +25,11 @@ const api = UI.api || window.macshare || {}; const html = document.documentElement; const SVG_NS = 'http://www.w3.org/2000/svg'; + const tr = (k, p, d) => (typeof t === 'function' ? t(k, p, d) : (d || k)); + // A page's name as the sidebar shows it (the shells translate it by id: nav.). The assistant below still + // understands the English names (SYN, the tabs' own titles): only what it shows is translated. + const titleOf = (def) => tr('nav.' + def.id, null, def.id === 'general' ? tr('nav.settings', null, def.title) : def.title); + const PHONE_WORD = () => tr('nav.phone', null, 'Phone'); // ---------- small helpers ---------- function h(tag, cls, kids, props) { @@ -101,27 +106,33 @@ // Sidebar: group labels, "this desk" // ====================================================================== const GROUP_NAME = { - messages: 'Phone', calls: 'Phone', media: 'Phone', papps: 'Phone', - mirror: 'Display', 'mac-pc': 'Display', 'pc-mac': 'Display', receive: 'Display', share: 'Display', display: 'Display', apps: 'Display', - cursor: 'Input', keyboard: 'Input', remote: 'Input', - clipboard: 'Sharing', notifications: 'Sharing', files: 'Sharing', pfiles: 'Sharing', mount: 'Sharing', - audio: 'Media', camera: 'Media', rezume: 'Media', terminal: 'Media', + messages: 'phone', calls: 'phone', media: 'phone', papps: 'phone', + mirror: 'display', 'mac-pc': 'display', 'pc-mac': 'display', receive: 'display', share: 'display', display: 'display', apps: 'display', + cursor: 'input', keyboard: 'input', remote: 'input', + clipboard: 'sharing', notifications: 'sharing', files: 'sharing', pfiles: 'sharing', mount: 'sharing', + audio: 'media', camera: 'media', rezume: 'media', terminal: 'media', }; + // The group's label in the current language (built when used: the language is set after the scripts load). + const groupLabel = (g) => ({ + phone: tr('nav.phone', null, 'Phone'), display: tr('display.display', null, 'Display'), input: tr('aurora.group_input', null, 'Input'), + sharing: tr('aurora.group_sharing', null, 'Sharing'), media: tr('aurora.group_media', null, 'Media'), + })[g] || ''; const idOf = (btn) => ((btn && btn.getAttribute('aria-controls')) || '').replace(/^page-/, ''); // Two sections called "Apps" (the phone's and the other computer's): the phone's says so. - const RELABEL = { papps: ['Apps', 'Phone apps'] }; + const relabel = () => ({ papps: [tr('nav.papps', null, 'Apps'), tr('mirror.phone_apps_heading', null, 'Phone apps')] }); function labelGroups() { - for (const [id, [from, to]] of Object.entries(RELABEL)) { + for (const [id, [from, to]] of Object.entries(relabel())) { const l = nav.querySelector('[aria-controls="page-' + id + '"] .label'); if (l && l.textContent === from) l.textContent = to; } + const more = tr('aurora.group_more', null, 'More'); for (const li of nav.children) { - if (li.classList.contains('sep')) { if (li.dataset.auLabel !== 'More') li.dataset.auLabel = 'More'; continue; } + if (li.classList.contains('sep')) { if (li.dataset.auLabel !== more) li.dataset.auLabel = more; continue; } if (!li.classList.contains('gap')) continue; let name = ''; for (let n = li.nextElementSibling; n && !n.classList.contains('gap') && !n.classList.contains('sep'); n = n.nextElementSibling) { const id = idOf(n.querySelector('.nav-item')); - if (GROUP_NAME[id]) { name = GROUP_NAME[id]; break; } + if (GROUP_NAME[id]) { name = groupLabel(GROUP_NAME[id]); break; } } if (name && li.dataset.auLabel !== name) li.dataset.auLabel = name; } @@ -139,13 +150,13 @@ } // The devices above the sections get a group label like the sections (mesh lists computers too). const phonesEl = $('phones'); - if (phonesEl) phonesEl.dataset.auLabel = $('side-scroll') ? 'Devices' : 'Phones'; + if (phonesEl) phonesEl.dataset.auLabel = $('side-scroll') ? tr('aurora.group_devices', null, 'Devices') : tr('aurora.group_phones', null, 'Phones'); const sideCol = document.querySelector('#side-scroll, .au-scroll'); if (sideCol) sideCol.classList.add('au-col'); const meName = h('b'); const meSub = h('small'); - const meCard = h('div', 'au-me', [h('span', 'au-av', [h('span')]), h('div', 'au-me-t', [meName, meSub])], { attrs: { 'aria-label': 'This computer' } }); + const meCard = h('div', 'au-me', [h('span', 'au-av', [h('span')]), h('div', 'au-me-t', [meName, meSub])], { attrs: { 'aria-label': tr('aurora.this_computer', null, 'This computer') } }); sidebar.append(meCard); // ====================================================================== @@ -158,8 +169,8 @@ const routeIc = h('span'); const routeTxt = h('span'); const routePill = h('span', 'au-pill au-route', [routeIc, routeTxt]); - const secPill = h('span', 'au-pill au-sec', [icon('lock'), h('span', null, null, { text: 'encrypted' })], { title: 'TLS with a pinned certificate, on every route' }); - const kbd = h('button', 'au-kbd', null, { text: MOD + ' K', title: 'Ask DuoDesk (' + MOD + '+K)', type: 'button' }); + const secPill = h('span', 'au-pill au-sec', [icon('lock'), h('span', null, null, { text: tr('aurora.encrypted', null, 'encrypted') })], { title: tr('aurora.encrypted_title', null, 'TLS with a pinned certificate, on every route') }); + const kbd = h('button', 'au-kbd', null, { text: MOD + ' K', title: tr('aurora.ask_kbd_title', { mod: MOD }, 'Ask DuoDesk (' + MOD + '+K)'), type: 'button' }); const topbar = h('div', 'au-topbar', [crumb, h('span', 'au-sp'), peerPill, routePill, secPill, kbd]); content.prepend(topbar); content.addEventListener('scroll', () => topbar.classList.toggle('scrolled', content.scrollTop > 4), { passive: true }); @@ -191,7 +202,7 @@ function devicesOf(s) { const list = []; const ph = (s && s.phone) || {}; - const myName = (s.device && s.device.name) || s.macName || safe(() => UI.peer(s).me, '') || 'This computer'; + const myName = (s.device && s.device.name) || s.macName || safe(() => UI.peer(s).me, '') || tr('aurora.this_computer', null, 'This computer'); list.push({ kind: 'me', key: 'me', name: myName, os: OS, live: true }); const M = window.SidebarModel; if (Array.isArray(s.peers) && M && typeof M.buildTiles === 'function') { @@ -220,7 +231,7 @@ if (Array.isArray(s.peers)) { for (const p of s.peers) { if (!p || p.os === 'android' || p.state === 'via') continue; - list.push({ kind: 'pc', key: 'pc:' + p.id, id: p.id, name: p.name || 'Computer', os: p.os || 'win', live: !!(p.connected || p.state === 'connected'), wait: p.state === 'connecting', rtt: p.rtt, selected: !!p.selected, mesh: true }); + list.push({ kind: 'pc', key: 'pc:' + p.id, id: p.id, name: p.name || tr('aurora.computer', null, 'Computer'), os: p.os || 'win', live: !!(p.connected || p.state === 'connected'), wait: p.state === 'connecting', rtt: p.rtt, selected: !!p.selected, mesh: true }); } } else if (s.link) { const st = s.link.state; @@ -228,9 +239,9 @@ const name = (s.peer && s.peer.name) || s.link.macName || (s.paired && s.paired.macName) || ''; const phone = isPhoneSession(s); if (!phone && (name || st === 'connecting' || st === 'reconnecting' || pairing)) { - list.push({ kind: 'pc', key: 'pc', name: name || (pairing && pairing.macName) || 'The other computer', os: (s.peer && s.peer.os) || (s.paired && s.paired.os) || 'mac', live: st === 'connected', wait: st === 'connecting' || st === 'reconnecting' || !!pairing, rtt: s.link.rtt, paired: !!s.paired }); + list.push({ kind: 'pc', key: 'pc', name: name || (pairing && pairing.macName) || tr('aurora.other_computer', null, 'The other computer'), os: (s.peer && s.peer.os) || (s.paired && s.paired.os) || 'mac', live: st === 'connected', wait: st === 'connecting' || st === 'reconnecting' || !!pairing, rtt: s.link.rtt, paired: !!s.paired }); } - if (phone && st === 'connected') list.push({ kind: 'phone', key: 'phone:session', name: name || 'Phone', live: true, rtt: s.link.rtt, battery: ph.info && ph.info.battery, charging: ph.info && ph.info.charging }); + if (phone && st === 'connected') list.push({ kind: 'phone', key: 'phone:session', name: name || PHONE_WORD(), live: true, rtt: s.link.rtt, battery: ph.info && ph.info.battery, charging: ph.info && ph.info.charging }); } else if (s.client || s.paired || (s.guest && s.guest.hosts)) { // Mac: the session's client, else the most recent pairing either way (UI.peer merges s.paired and // s.guest.hosts by lastSeen; paired entries carry no os). @@ -240,20 +251,20 @@ const pr = safe(() => UI.peer(s), null); const g = s.guest || {}; const wait = !c && (!!notFailed(s.pairing) || !!notFailed(g.pairing) || /connecting/.test((g.status && g.status.state) || '')); - if (c && c.os === 'android') list.push({ kind: 'phone', key: 'phone:session', name: c.name || 'Phone', live: true, rtt: c.rttMs, battery: ph.info && ph.info.battery, charging: ph.info && ph.info.charging }); + if (c && c.os === 'android') list.push({ kind: 'phone', key: 'phone:session', name: c.name || PHONE_WORD(), live: true, rtt: c.rttMs, battery: ph.info && ph.info.battery, charging: ph.info && ph.info.charging }); else if (c || paired.length || hosts.length || wait) { - const name = (c && c.name) || (pr && pr.name && pr.name !== 'the other computer' ? pr.name : '') || 'The other computer'; + const name = (c && c.name) || (pr && pr.name && pr.name !== 'the other computer' ? pr.name : '') || tr('aurora.other_computer', null, 'The other computer'); list.push({ kind: 'pc', key: 'pc', name, os: (c && c.os) || (pr && pr.os) || 'win', live: !!c, wait, rtt: c && c.rttMs, paired: !!(paired.length || hosts.length) }); } } const nearby = Array.isArray(ph.nearby) ? ph.nearby.slice() : Array.isArray(ph.phones) ? ph.phones.slice() : []; // The connected phone even when the nearby list doesn't carry it. - if (ph.connected && ph.connected.id && !nearby.some((d) => d && d.id === ph.connected.id)) nearby.unshift({ id: ph.connected.id, name: ph.connected.name || (ph.info && ph.info.name) || 'Phone', connected: true }); + if (ph.connected && ph.connected.id && !nearby.some((d) => d && d.id === ph.connected.id)) nearby.unshift({ id: ph.connected.id, name: ph.connected.name || (ph.info && ph.info.name) || PHONE_WORD(), connected: true }); for (const d of nearby) { if (!d || list.some((x) => x.kind === 'phone' && (x.name === d.name || (x.id && x.id === d.id)))) continue; const on = !!(d.connected || (ph.connected && ph.connected.id === d.id)); list.push(Object.assign({ - kind: 'phone', key: 'ph:' + d.id, id: d.id, name: d.name || 'Phone', live: on, + kind: 'phone', key: 'ph:' + d.id, id: d.id, name: d.name || PHONE_WORD(), live: on, wait: !!(ph.connecting && ph.connecting.id === d.id), usb: !!(d.usb || (on && ph.connected && ph.connected.usb)), }, phoneNums(ph, d.id, on))); } @@ -274,18 +285,23 @@ // The shells' "limited" rule (renderPage): macOnly pages are off and locked with a peer that can't do them. function limitedOf(def, s) { if (!def.macOnly || !s || !s.peer) return ''; - if (def.macOnly === 'linux') return s.peer.os === 'linux' ? 'not with Linux yet' : ''; + if (def.macOnly === 'linux') return s.peer.os === 'linux' ? 'linux' : ''; const l = safe(() => UI.peer(s).limited, ''); - return l ? 'not with this device' : ''; + return l ? 'device' : ''; } + // Why a switch can't be used now: a code (limitedOf, featState), its words here. + const whyText = (why) => ({ + linux: tr('aurora.why_linux', null, 'not with Linux yet'), device: tr('aurora.why_device', null, 'not with this device'), + now: tr('aurora.why_now', null, 'not available now'), peer: tr('aurora.why_peer', null, 'needs a connected device'), + })[why] || ''; function featState(def, s) { const lim = limitedOf(def, s); if (lim) return { on: false, dis: true, why: lim }; const on = !!safe(() => def.master.get(s), false); const dd = def.master.disabled; let dis = !!safe(() => (typeof dd === 'function' ? dd(s) : dd), false); - let why = dis ? 'not available now' : ''; - if (!dis && document.body.classList.contains('no-peer') && !FREE().includes(def.id)) { dis = true; why = 'needs a connected device'; } + let why = dis ? 'now' : ''; + if (!dis && document.body.classList.contains('no-peer') && !FREE().includes(def.id)) { dis = true; why = 'peer'; } return { on, dis, why }; } @@ -323,10 +339,10 @@ // Home dashboard // ====================================================================== const greet = h('small'); - const hello = h('div', 'au-hello', [greet, h('h1', null, ['What should your ', h('span', null, null, { text: 'desks' }), ' do?'])]); + const hello = h('div', 'au-hello', [greet, h('h1', null, [tr('aurora.hello_prefix', null, 'What should your '), h('span', null, null, { text: tr('aurora.hello_desks', null, 'desks') }), tr('aurora.hello_suffix', null, ' do?')])]); const devsEl = h('div', 'au-devs'); const subEl = h('div', 'au-sub'); - const home = h('section', 'au-home', [hello, devsEl, subEl], { attrs: { 'aria-label': 'Home' } }); + const home = h('section', 'au-home', [hello, devsEl, subEl], { attrs: { 'aria-label': tr('aurora.home_aria', null, 'Home') } }); let hostPage = null; let cardsKey = ''; let cardRefs = []; @@ -354,7 +370,7 @@ // What follows the cards: the open device's own page (Overview), or Connection's pairing and nearby list. const btn = nav.querySelector('[aria-controls="page-' + id + '"] .label'); const live = id === 'overview' && last ? liveOne(devicesOf(last)) : null; - subEl.textContent = live ? 'More on ' + live.name : btn ? btn.textContent : id; + subEl.textContent = live ? tr('aurora.more_on_dev', { name: live.name }, 'More on ' + live.name) : btn ? btn.textContent : id; } function flash(card) { @@ -407,7 +423,7 @@ const card = h('div', 'au-dev', [h('div', 'au-ring', [h('i')], { attrs: { 'aria-hidden': 'true' } }), h('div', 'au-glow'), head, num, row]); card.dataset.dev = dev.key; const fts = feats.map((def, i) => { - const b = h('button', 'au-ft', [safe(() => UI.icon(def.icon || def.id), null)], { type: 'button', attrs: { 'aria-label': def.title } }); + const b = h('button', 'au-ft', [safe(() => UI.icon(def.icon || def.id), null)], { type: 'button', attrs: { 'aria-label': titleOf(def) } }); b.style.setProperty('--c', COLORS[i % COLORS.length]); b.onclick = () => { const s = UI.state || last; @@ -421,7 +437,7 @@ return { def, b }; }); const lks = (links || []).map((def, i) => { - const b = h('button', 'au-ft au-lk', [safe(() => UI.icon(def.icon || def.id), null)], { type: 'button', attrs: { 'aria-label': 'Open ' + def.title } }); + const b = h('button', 'au-ft au-lk', [safe(() => UI.icon(def.icon || def.id), null)], { type: 'button', attrs: { 'aria-label': tr('aurora.open_def_title', { title: titleOf(def) }, 'Open ' + titleOf(def)) } }); b.style.setProperty('--c', COLORS[(fts.length + i) % COLORS.length]); b.onclick = () => { const s = UI.state || last; @@ -444,15 +460,15 @@ if (cards.length < 2) { // nothing paired yet: the way to add one const acts = []; if (canQr()) { - const qr = h('button', 'btn small primary', null, { text: 'Pair a phone', type: 'button' }); - qr.onclick = () => run('Pair a phone with a QR code'); + const qr = h('button', 'btn small primary', null, { text: tr('aurora.pair_phone', null, 'Pair a phone'), type: 'button' }); + qr.onclick = () => run('Pair a phone with a QR code', tr('aurora.chip_pair_qr', null, 'Pair a phone with a QR code')); acts.push(qr); } - const find = h('button', 'btn small' + (acts.length ? '' : ' primary'), null, { text: 'Find nearby', type: 'button' }); - find.onclick = () => run('Refresh nearby devices'); + const find = h('button', 'btn small' + (acts.length ? '' : ' primary'), null, { text: tr('aurora.find_nearby', null, 'Find nearby'), type: 'button' }); + find.onclick = () => run('Refresh nearby devices', tr('aurora.chip_refresh', null, 'Refresh nearby devices')); acts.push(find); els.push(h('div', 'au-dev au-add', [ - h('div', 'au-h', [h('span', 'au-ic', [icon('plus')]), h('div', 'au-n', [h('b', null, null, { text: 'Add a device' }), h('small', null, null, { text: 'Another computer or a phone' })])]), + h('div', 'au-h', [h('span', 'au-ic', [icon('plus')]), h('div', 'au-n', [h('b', null, null, { text: tr('aurora.add_device', null, 'Add a device') }), h('small', null, null, { text: tr('aurora.add_device_sub', null, 'Another computer or a phone') })])]), h('div', 'au-acts', acts), ])); } @@ -476,47 +492,48 @@ for (const f of r.fts) { const fs = featState(f.def, s); if (fs.on) onCount++; - const tip = f.def.title + ' · ' + (fs.on ? 'on' : 'off') + (fs.dis ? ' · ' + fs.why : ''); + const tip = [titleOf(f.def), fs.on ? tr('aurora.state_on', null, 'on') : tr('aurora.state_off', null, 'off'), fs.dis ? whyText(fs.why) : ''].filter(Boolean).join(' · '); f.b.classList.toggle('on', fs.on); f.b.classList.toggle('dis', fs.dis); f.b.dataset.tip = tip; f.b.setAttribute('aria-pressed', fs.on ? 'true' : 'false'); f.b.setAttribute('aria-disabled', fs.dis ? 'true' : 'false'); - f.b.setAttribute('aria-description', tip + (fs.dis ? ' (opens its page)' : '')); + f.b.setAttribute('aria-description', fs.dis ? tr('aurora.tip_opens_page', { tip }, tip + ' (opens its page)') : tip); } const tgt = isTarget(d, s); for (const f of r.lks) { const ok = tgt && visible(f.def, s); f.b.classList.toggle('dis', !ok); - const tip = ok ? 'Open ' + f.def.title : f.def.title + ' · ' + (d.live ? 'select ' + d.name + ' first' : 'connect ' + d.name + ' first'); + const lt = titleOf(f.def); + const tip = ok ? tr('aurora.open_def_title', { title: lt }, 'Open ' + lt) : d.live ? tr('aurora.tip_select_first', { title: lt, name: d.name }, lt + ' · select ' + d.name + ' first') : tr('aurora.tip_connect_first', { title: lt, name: d.name }, lt + ' · connect ' + d.name + ' first'); f.b.dataset.tip = tip; f.b.setAttribute('aria-description', tip); } - r.head.title = d.kind === 'me' ? '' : d.live ? (tgt ? 'Open ' + d.name : 'Select ' + d.name) : d.action === 'none' || d.kind === 'pc' ? 'Open Connection' : 'Connect to ' + d.name; + r.head.title = d.kind === 'me' ? '' : d.live ? (tgt ? tr('aurora.head_open', { name: d.name }, 'Open ' + d.name) : tr('aurora.head_select', { name: d.name }, 'Select ' + d.name)) : d.action === 'none' || d.kind === 'pc' ? tr('aurora.head_open_connection', null, 'Open Connection') : tr('aurora.head_connect', { name: d.name }, 'Connect to ' + d.name); const via = d.usb ? 'USB' : viaOf(s); if (d.kind === 'me') { - r.sub.textContent = 'this desk · ' + OS_NAME[OS]; + r.sub.textContent = tr('aurora.this_desk', { os: OS_NAME[OS] }, 'this desk · ' + OS_NAME[OS]); const screens = safe(() => (s.pcScreen && s.pcScreen.monitors && s.pcScreen.monitors.length) || (Array.isArray(s.displays) && s.displays.length) || (s.sharing && Array.isArray(s.sharing.displays) && s.sharing.displays.filter((x) => x && !x.virtual).length) || 0, 0); - if (screens) setNum(r.num, screens, screens === 1 ? 'screen' : 'screens'); - else setNum(r.num, onCount, 'on'); + if (screens) setNum(r.num, screens, screens === 1 ? tr('aurora.unit_screen_one', null, 'screen') : tr('aurora.unit_screen_other', null, 'screens')); + else setNum(r.num, onCount, tr('aurora.unit_on', null, 'on')); } else if (d.kind === 'pc') { - r.sub.textContent = d.live ? (OS_NAME[d.os] || 'Computer') + ' · ' + via : d.wait ? 'Connecting…' : 'Paired · offline'; + r.sub.textContent = d.live ? (OS_NAME[d.os] || tr('aurora.computer', null, 'Computer')) + ' · ' + via : d.wait ? tr('sidebar.connecting', null, 'Connecting…') : tr('aurora.paired_offline', null, 'Paired · offline'); if (d.live && d.rtt != null) setNum(r.num, d.rtt, 'ms'); - else setNum(r.num, d.live ? 'Live' : '—', d.live ? '' : d.wait ? 'connecting' : 'offline'); + else setNum(r.num, d.live ? tr('display.live', null, 'Live') : '—', d.live ? '' : d.wait ? tr('aurora.unit_connecting', null, 'connecting') : tr('aurora.unit_offline', null, 'offline')); } else { - r.sub.textContent = d.live ? via + (d.rtt != null ? ' · ' + d.rtt + ' ms' : '') : d.wait ? 'Connecting…' : 'Nearby · click to connect'; - if (d.live && d.battery != null) setNum(r.num, d.battery, '% battery' + (d.charging ? ' ⚡' : '')); + r.sub.textContent = d.live ? via + (d.rtt != null ? ' · ' + d.rtt + ' ms' : '') : d.wait ? tr('sidebar.connecting', null, 'Connecting…') : tr('aurora.nearby_click', null, 'Nearby · click to connect'); + if (d.live && d.battery != null) setNum(r.num, d.battery, tr('aurora.unit_battery', null, '% battery') + (d.charging ? ' ⚡' : '')); else if (d.live && d.rtt != null) setNum(r.num, d.rtt, 'ms'); - else setNum(r.num, '—', d.wait ? 'connecting' : 'nearby'); + else setNum(r.num, '—', d.wait ? tr('aurora.unit_connecting', null, 'connecting') : tr('aurora.unit_nearby', null, 'nearby')); } - if (r.empty) r.empty.textContent = d.live ? (tgt ? 'Everything is on its own pages' : 'Select it to use its features') : d.kind === 'phone' ? 'Connect it to use its features' : 'Connect to use its features'; + if (r.empty) r.empty.textContent = d.live ? (tgt ? tr('aurora.empty_own_pages', null, 'Everything is on its own pages') : tr('aurora.empty_select', null, 'Select it to use its features')) : d.kind === 'phone' ? tr('aurora.empty_connect_it', null, 'Connect it to use its features') : tr('aurora.empty_connect', null, 'Connect to use its features'); } } function renderHome(s) { const hr = new Date().getHours(); - greet.textContent = hr < 5 ? 'Good night' : hr < 12 ? 'Good morning' : hr < 18 ? 'Good afternoon' : 'Good evening'; + greet.textContent = hr < 5 ? tr('aurora.greet_night', null, 'Good night') : hr < 12 ? tr('aurora.greet_morning', null, 'Good morning') : hr < 18 ? tr('aurora.greet_afternoon', null, 'Good afternoon') : tr('aurora.greet_evening', null, 'Good evening'); placeHome(); const cards = assign(s, devicesOf(s)); const key = JSON.stringify(cards.map((c) => [c.dev.key, c.dev.kind, c.dev.name, c.dev.os, c.feats.map((d) => d.id), c.links.map((d) => d.id)])); @@ -544,12 +561,12 @@ const cls = dot ? dot.className : ''; peerDot.className = 'au-dot' + (/\bbad\b/.test(cls) ? ' bad' : /\b(warn|good)\b/.test(cls) ? ' warn' : ''); const t = $('peer-text'); - peerTxt.textContent = (t && t.textContent) || 'Not paired'; + peerTxt.textContent = (t && t.textContent) || tr('sidebar.not_paired', null, 'Not paired'); } routePill.hidden = !live; secPill.hidden = !live; meName.textContent = devs[0].name; - meSub.textContent = 'this desk · ' + OS_NAME[OS]; + meSub.textContent = tr('aurora.this_desk', { os: OS_NAME[OS] }, 'this desk · ' + OS_NAME[OS]); meCard.title = s.version ? 'DuoDesk ' + s.version : ''; } let lastActive = null; @@ -563,7 +580,7 @@ // The section's own name (the first one hosts Home: same name as in the sidebar), "Set up" over setup. const setup = isSetup(); html.classList.toggle('au-setup', setup); - const key = setup ? 'Set up' : title || 'DuoDesk'; + const key = setup ? tr('general.set_up', null, 'Set up') : title || 'DuoDesk'; if (crumb._k !== key) { crumb._k = key; crumb.replaceChildren(h('span', null, null, { text: 'DuoDesk' }), h('i', null, null, { text: '/' }), h('b', null, null, { text: key })); @@ -583,22 +600,22 @@ // ====================================================================== // Command bar // ====================================================================== - const inp = h('input', 'au-inp', null, { type: 'text', placeholder: 'Ask DuoDesk anything…', spellcheck: false, autocomplete: 'off', attrs: { 'aria-label': 'Ask DuoDesk', enterkeyhint: 'send' } }); - const attach = h('button', 'au-cb', [icon('plus')], { type: 'button', title: 'Send files…', attrs: { 'aria-label': 'Send files' } }); - const agentName = h('span', null, null, { text: 'All devices' }); - const agent = h('button', 'au-agent', [agentName, icon('chev')], { type: 'button', title: 'Which device', attrs: { 'aria-haspopup': 'menu' } }); - const send = h('button', 'au-cb send', [icon('up')], { type: 'button', title: 'Send (Enter)', attrs: { 'aria-label': 'Send' } }); + const inp = h('input', 'au-inp', null, { type: 'text', placeholder: tr('aurora.ask_placeholder', null, 'Ask DuoDesk anything…'), spellcheck: false, autocomplete: 'off', attrs: { 'aria-label': tr('aurora.ask_aria', null, 'Ask DuoDesk'), enterkeyhint: 'send' } }); + const attach = h('button', 'au-cb', [icon('plus')], { type: 'button', title: tr('aurora.send_files_title', null, 'Send files…'), attrs: { 'aria-label': tr('aurora.send_files', null, 'Send files') } }); + const agentName = h('span', null, null, { text: tr('aurora.all_devices', null, 'All devices') }); + const agent = h('button', 'au-agent', [agentName, icon('chev')], { type: 'button', title: tr('aurora.which_device', null, 'Which device'), attrs: { 'aria-haspopup': 'menu' } }); + const send = h('button', 'au-cb send', [icon('up')], { type: 'button', title: tr('aurora.send_title', null, 'Send (Enter)'), attrs: { 'aria-label': tr('aurora.send_aria', null, 'Send') } }); const idle = h('div', 'au-layer au-idle', [inp, h('div', 'au-row', [attach, h('span', 'au-sp'), agent, send])]); const tx = h('div', 'au-tx', null, { attrs: { 'aria-live': 'polite' } }); const res = h('div', 'au-res', null, { attrs: { role: 'list', 'aria-live': 'polite' } }); - const agent2Name = h('span', null, null, { text: 'All devices' }); - const agent2 = h('button', 'au-agent', [agent2Name, icon('chev')], { type: 'button', title: 'Which device', attrs: { 'aria-haspopup': 'menu' } }); - const again = h('button', 'au-cb', [icon('plus')], { type: 'button', title: 'Ask something else (' + MOD + '+K)', attrs: { 'aria-label': 'Ask something else' } }); - const close = h('button', 'au-cb', [icon('x')], { type: 'button', title: 'Close (Esc)', attrs: { 'aria-label': 'Close' } }); + const agent2Name = h('span', null, null, { text: tr('aurora.all_devices', null, 'All devices') }); + const agent2 = h('button', 'au-agent', [agent2Name, icon('chev')], { type: 'button', title: tr('aurora.which_device', null, 'Which device'), attrs: { 'aria-haspopup': 'menu' } }); + const again = h('button', 'au-cb', [icon('plus')], { type: 'button', title: tr('aurora.ask_something_else', { mod: MOD }, 'Ask something else (' + MOD + '+K)'), attrs: { 'aria-label': tr('aurora.ask_something_else_aria', null, 'Ask something else') } }); + const close = h('button', 'au-cb', [icon('x')], { type: 'button', title: tr('aurora.close_esc', null, 'Close (Esc)'), attrs: { 'aria-label': tr('aurora.close_aria', null, 'Close') } }); const exp = h('div', 'au-layer au-exp off', [tx, res, h('div', 'au-row', [agent2, h('span', 'au-sp'), again, close])]); const cmd = h('div', 'au-cmd', [h('div', 'au-aur', [h('i'), h('i')], { attrs: { 'aria-hidden': 'true' } }), idle, exp]); const sugs = h('div', 'au-sugs'); - const dock = h('div', 'au-dock', [sugs, h('div', 'au-halo-w', [h('div', 'au-halo')], { attrs: { 'aria-hidden': 'true' } }), cmd], { attrs: { role: 'search', 'aria-label': 'Ask DuoDesk' } }); + const dock = h('div', 'au-dock', [sugs, h('div', 'au-halo-w', [h('div', 'au-halo')], { attrs: { 'aria-hidden': 'true' } }), cmd], { attrs: { role: 'search', 'aria-label': tr('aurora.ask_aria', null, 'Ask DuoDesk') } }); content.append(dock); let state = 'idle'; @@ -632,7 +649,7 @@ else if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); closeMenu(); inp.blur(); } }); send.onclick = submit; - attach.onclick = () => run('Send files'); + attach.onclick = () => run('Send files', tr('aurora.send_files', null, 'Send files')); close.onclick = collapse; again.onclick = () => { collapse(); inp.focus(); }; @@ -683,26 +700,28 @@ } // Suggestion chips above the bar: from what this window can really do right now. + // Each chip: what it says (translated) and the English request it runs (the only one the assistant understands). function suggestions(s) { const out = []; if (!s) return out; + const chip = (cmd, label) => out.push({ cmd, label }); const linked = linkedOf(s); if (!linked) { - if (canQr()) out.push('Pair a phone with a QR code'); - out.push('Refresh nearby devices'); + if (canQr()) chip('Pair a phone with a QR code', tr('aurora.chip_pair_qr', null, 'Pair a phone with a QR code')); + chip('Refresh nearby devices', tr('aurora.chip_refresh', null, 'Refresh nearby devices')); const pc = devicesOf(s).find((d) => d.kind === 'pc' && !d.live); - if (pc) out.push('Reconnect to ' + pc.name); - out.push('Open General settings'); + if (pc) chip('Reconnect to ' + pc.name, tr('aurora.chip_reconnect', { name: pc.name }, 'Reconnect to ' + pc.name)); + chip('Open General settings', tr('aurora.chip_open_general', null, 'Open General settings')); return out.slice(0, 4); } for (const def of masterDefs()) { if (!visible(def, s)) continue; const fs = featState(def, s); - if (!fs.on && !fs.dis) out.push('Turn on ' + def.title.toLowerCase()); + if (!fs.on && !fs.dis) chip('Turn on ' + def.title.toLowerCase(), tr('aurora.chip_turn_on', { name: titleOf(def).toLowerCase() }, 'Turn on ' + titleOf(def).toLowerCase())); if (out.length >= 2) break; } - if (s.files ? s.files.dropToMac !== false : true) out.push('Send files'); - out.push('Open clipboard'); + if (s.files ? s.files.dropToMac !== false : true) chip('Send files', tr('aurora.send_files', null, 'Send files')); + chip('Open clipboard', tr('aurora.chip_open_clipboard', null, 'Open clipboard')); return out.slice(0, 4); } let sugKey = ''; @@ -712,13 +731,13 @@ dock.classList.toggle('chips', !!show); sugs.inert = !show; const list = suggestions(UI.state || last); - const key = list.join('|'); + const key = list.map((c) => c.label).join('|'); if (key === sugKey) return; sugKey = key; - sugs.replaceChildren(...list.map((t) => { - const b = h('button', 'au-sug', null, { text: t, type: 'button' }); + sugs.replaceChildren(...list.map((c) => { + const b = h('button', 'au-sug', null, { text: c.label, type: 'button' }); b.addEventListener('mousedown', (e) => e.preventDefault()); // keep the input's focus (and the chips) - b.onclick = () => { inp.value = ''; run(t); }; + b.onclick = () => { inp.value = ''; run(c.cmd, c.label); }; return b; })); } @@ -738,7 +757,7 @@ menuOpener = btn; const s = UI.state || last; const devs = s ? devicesOf(s) : []; - const items = [{ key: 'all', name: 'All devices', kind: '' }].concat(devs.map((d) => ({ key: d.key, name: d.kind === 'me' ? d.name + ' (this desk)' : d.name, kind: d.kind === 'me' ? '' : d.kind === 'phone' ? 'phone' : d.live ? 'live' : 'offline' }))); + const items = [{ key: 'all', name: tr('aurora.all_devices', null, 'All devices'), kind: '' }].concat(devs.map((d) => ({ key: d.key, name: d.kind === 'me' ? tr('aurora.menu_this_desk', { name: d.name }, d.name + ' (this desk)') : d.name, kind: d.kind === 'me' ? '' : d.kind === 'phone' ? tr('aurora.menu_phone', null, 'phone') : d.live ? tr('aurora.menu_live', null, 'live') : tr('aurora.menu_offline', null, 'offline') }))); menu = h('div', 'au-menu', items.map((it) => { const b = h('button', it.key === target ? 'sel' : '', [h('span', null, null, { text: it.name }), it.kind ? h('small', null, null, { text: it.kind }) : null], { type: 'button', attrs: { role: 'menuitem' } }); b.onclick = (e) => { e.stopPropagation(); target = it.key; setTargetLabel(); closeMenu(); inp.focus(); }; @@ -760,7 +779,7 @@ function setTargetLabel() { const d = targetDev(); if (!d) target = 'all'; - const t = d ? d.name : 'All devices'; + const t = d ? d.name : tr('aurora.all_devices', null, 'All devices'); agentName.textContent = t; agent2Name.textContent = t; } @@ -899,7 +918,7 @@ let v = off ? false : on ? true : open ? null : verb; const best = bestPage(raw, s, prefer); if (!best || best.score < 3) { - if (/\b(connect|pair)\b/.test(t)) { steps.push(stepOpen(s, UI.tabs.find((d) => d.id === 'connection'), 'Opening Connection to pick a device')); continue; } + if (/\b(connect|pair)\b/.test(t)) { steps.push(stepOpen(s, UI.tabs.find((d) => d.id === 'connection'), tr('aurora.step_opening_connection', null, 'Opening Connection to pick a device'))); continue; } steps.push(stepHint()); continue; } @@ -907,7 +926,7 @@ if (open && !off && !/\b(turn|switch)\b/.test(t)) v = null; verb = v; if (v !== null && def.master) steps.push(stepToggle(def, v, s)); - else if (v !== null) steps.push(stepOpen(s, def, def.title + ' has no switch: opening it')); + else if (v !== null) steps.push(stepOpen(s, def, tr('aurora.no_switch_opening', { title: titleOf(def) }, titleOf(def) + ' has no switch: opening it'))); else steps.push(stepOpen(s, def)); } if (!steps.length) steps.push(stepHint()); @@ -924,121 +943,131 @@ return null; } + // The examples are the English requests the assistant understands: only the words around them are translated. function stepHint() { - return { hint: true, label: 'Try “turn on clipboard”, “open mouse”, “connect 192.168.1.20”, “refresh” or “pair a phone”.' }; + return { hint: true, label: tr('aurora.hint_try', null, 'Try “turn on clipboard”, “open mouse”, “connect 192.168.1.20”, “refresh” or “pair a phone”.') }; } function stepOpen(s, def, label) { return { - label: label || 'Opening ' + def.title, + label: label || tr('aurora.step_opening', { title: titleOf(def) }, 'Opening ' + titleOf(def)), run: () => { - if (s && !visible(def, s)) return { no: def.title + ' isn’t available with this device' }; + if (s && !visible(def, s)) return { no: tr('aurora.unavailable_device', { title: titleOf(def) }, titleOf(def) + ' isn’t available with this device') }; UI.go(def.id); - return { ok: label || def.title + ' is open' }; + return { ok: label || tr('aurora.is_open', { title: titleOf(def) }, titleOf(def) + ' is open') }; }, }; } function stepToggle(def, v, s) { return { - label: (v ? 'Turning on ' : 'Turning off ') + def.title, + label: v ? tr('aurora.step_turning_on', { title: titleOf(def) }, 'Turning on ' + titleOf(def)) : tr('aurora.step_turning_off', { title: titleOf(def) }, 'Turning off ' + titleOf(def)), run: async () => { const cur = UI.state || s; - if (!visible(def, cur)) return { no: def.title + ' isn’t available with this device' }; + const title = titleOf(def); + if (!visible(def, cur)) return { no: tr('aurora.unavailable_device', { title }, title + ' isn’t available with this device') }; const fs = featState(def, cur); - if (fs.on === v) return { info: def.title + ' was already ' + (v ? 'on' : 'off') }; - if (fs.dis) { UI.go(def.id); return { no: def.title + ' ' + fs.why + ': opened it' }; } + if (fs.on === v) return { info: v ? tr('aurora.was_already_on', { title }, title + ' was already on') : tr('aurora.was_already_off', { title }, title + ' was already off') }; + if (fs.dis) { + UI.go(def.id); + return { no: { linux: tr('aurora.opened_linux', { title }, title + ' not with Linux yet: opened it'), device: tr('aurora.opened_device', { title }, title + ' not with this device: opened it'), now: tr('aurora.opened_now', { title }, title + ' not available now: opened it'), peer: tr('aurora.opened_peer', { title }, title + ' needs a connected device: opened it') }[fs.why] }; + } await Promise.race([Promise.resolve(def.master.set(v)), wait(3000)]); - const card = devsEl.querySelector('.au-ft[aria-label="' + def.title.replace(/"/g, '') + '"]'); + const card = devsEl.querySelector('.au-ft[aria-label="' + title.replace(/"/g, '') + '"]'); if (card) flash(card.closest('.au-dev')); - return { ok: def.title + (v ? ' is on' : ' is off') }; + return { ok: v ? tr('aurora.is_on', { title }, title + ' is on') : tr('aurora.is_off', { title }, title + ' is off') }; }, }; } function stepConnect(addr) { return { - label: 'Connecting to ' + addr, + label: tr('aurora.step_connecting_to', { name: addr }, 'Connecting to ' + addr), run: async () => { UI.go('connection'); let err = ''; - const attempt = (p) => Promise.race([Promise.resolve(p).then((r) => { if (r && typeof r.error === 'string') err = r.error; }, (e) => { err = (e && e.message) || 'That didn’t work'; }), wait(4000)]); + const attempt = (p) => Promise.race([Promise.resolve(p).then((r) => { if (r && typeof r.error === 'string') err = r.error; }, (e) => { err = (e && e.message) || tr('aurora.didnt_work', null, 'That didn’t work'); }), wait(4000)]); if (typeof api.connectAddress === 'function') await attempt(api.connectAddress(addr)); else if (typeof api.pairWith === 'function') await attempt(api.pairWith(addr)); else if (typeof api.pair === 'function') await attempt(api.pair(addr)); - else return { no: 'Connecting by address isn’t available here' }; + else return { no: tr('aurora.no_connect_by_address', null, 'Connecting by address isn’t available here') }; await wait(250); const p = (UI.state || {}).pairing; - if (p && p.phase === 'failed') return { no: p.error || 'Couldn’t reach ' + addr }; + if (p && p.phase === 'failed') return { no: p.error || tr('aurora.couldnt_reach', { addr }, 'Couldn’t reach ' + addr) }; if (err) return { no: err }; - return { ok: 'Asked ' + addr + ' to connect: follow it on Connection' }; + return { ok: tr('aurora.asked_to_connect', { addr }, 'Asked ' + addr + ' to connect: follow it on Connection') }; }, }; } function stepRefresh() { return { - label: 'Looking for devices nearby', + label: tr('aurora.step_looking', null, 'Looking for devices nearby'), run: async () => { UI.go('connection'); const f = api.refreshFound || api.refreshDiscovery; - if (typeof f !== 'function') return { no: 'Refresh isn’t available here' }; + if (typeof f !== 'function') return { no: tr('aurora.no_refresh', null, 'Refresh isn’t available here') }; await Promise.race([Promise.resolve(f()).catch(() => {}), wait(2500)]); - return { ok: 'Refreshed the nearby list' }; + return { ok: tr('aurora.refreshed', null, 'Refreshed the nearby list') }; }, }; } function stepPairPhone() { return { - label: 'Showing the pairing QR code', + label: tr('aurora.step_showing_qr', null, 'Showing the pairing QR code'), run: async () => { - if (!canQr()) { UI.go('connection'); return { info: 'Pair phones from Connection › Nearby' }; } + if (!canQr()) { UI.go('connection'); return { info: tr('aurora.pair_from_nearby', null, 'Pair phones from Connection › Nearby') }; } UI.go('connection'); await wait(120); const page = $('page-connection'); - const btn = page && [...page.querySelectorAll('button')].find((b) => /qr code/i.test(b.textContent) && !b.disabled && b.offsetParent); - if (!btn) return { info: 'Pair a phone from Connection (the QR card shows while no phone is connected)' }; + // The QR card's button, whatever the language: its words are the ones the card shows (qrpair.show / qrpair.hide). + const showTxt = tr('qrpair.show', null, 'Show QR Code'); + const hideTxt = tr('qrpair.hide', null, 'Hide'); + const btn = page && [...page.querySelectorAll('button')].find((b) => (b.textContent.trim() === showTxt || b.textContent.trim() === hideTxt || /qr code/i.test(b.textContent)) && !b.disabled && b.offsetParent); + if (!btn) return { info: tr('aurora.pair_from_connection', null, 'Pair a phone from Connection (the QR card shows while no phone is connected)') }; btn.scrollIntoView({ block: 'center', behavior: 'smooth' }); - if (!/hide/i.test(btn.textContent)) btn.click(); - return { ok: 'Scan the code with the phone’s camera' }; + if (btn.textContent.trim() !== hideTxt && !/hide/i.test(btn.textContent)) btn.click(); + return { ok: tr('aurora.scan_code', null, 'Scan the code with the phone’s camera') }; }, }; } function stepDisconnect(s) { return { - label: 'Disconnecting', + label: tr('aurora.step_disconnecting', null, 'Disconnecting'), run: () => { - if (!linkedOf(UI.state || s)) return { info: 'Nothing is connected' }; + if (!linkedOf(UI.state || s)) return { info: tr('aurora.nothing_connected', null, 'Nothing is connected') }; if (isPhoneSession(s) || (s.phone && s.phone.connected && !(s.link && s.link.state === 'connected'))) call(s.phone && s.phone.connected ? 'disconnectPhone' : 'disconnect'); else call('disconnect'); - return { ok: 'Disconnected' }; + return { ok: tr('overview.disconnected', null, 'Disconnected') }; }, }; } function stepSendFiles(s) { return { - label: 'Choosing files to send', + label: tr('aurora.step_choosing_files', null, 'Choosing files to send'), run: () => { - if (!linkedOf(UI.state || s)) return { no: 'Connect a device first to send files' }; - if (typeof api.chooseSendFiles !== 'function') { UI.go('files'); return { info: 'Drop files on the Overview to send them' }; } + if (!linkedOf(UI.state || s)) return { no: tr('aurora.connect_first_send', null, 'Connect a device first to send files') }; + if (typeof api.chooseSendFiles !== 'function') { UI.go('files'); return { info: tr('aurora.drop_on_overview', null, 'Drop files on the Overview to send them') }; } api.chooseSendFiles(); - return { ok: 'Pick the files in the window that opened' }; + return { ok: tr('aurora.pick_files', null, 'Pick the files in the window that opened') }; }, }; } function stepConnectDevice(d, s) { - if (!d) return { label: 'Reconnecting', run: () => { if (typeof api.connectAgain === 'function') { api.connectAgain(); return { ok: 'Reconnecting to the paired computer' }; } UI.go('connection'); return { info: 'Pick a device on Connection' }; } }; + if (!d) return { label: tr('aurora.step_reconnecting', null, 'Reconnecting'), run: () => { if (typeof api.connectAgain === 'function') { api.connectAgain(); return { ok: tr('aurora.reconnecting_paired', null, 'Reconnecting to the paired computer') }; } UI.go('connection'); return { info: tr('aurora.pick_on_connection', null, 'Pick a device on Connection') }; } }; + const connecting = tr('aurora.step_connecting_to', { name: d.name }, 'Connecting to ' + d.name); return { - label: 'Connecting to ' + d.name, + label: connecting, run: () => { - if (d.live && d.mesh && !d.selected) { openDevice(d); return { ok: 'Switched to ' + d.name }; } - if (d.live) { UI.go('overview'); return { info: d.name + ' is already connected' }; } - if (d.kind === 'phone' && d.id && typeof api.connectPhone === 'function') { api.connectPhone(d.id); return { ok: 'Connecting to ' + d.name }; } - if (d.mesh && d.kind === 'pc') { UI.go('connection'); return { info: d.name + ' isn’t connected: it joins by itself once it’s on, or from Connection' }; } - if (d.kind === 'pc' && typeof api.connectAgain === 'function') { api.connectAgain(); return { ok: 'Connecting to ' + d.name }; } + if (d.live && d.mesh && !d.selected) { openDevice(d); return { ok: tr('aurora.switched_to', { name: d.name }, 'Switched to ' + d.name) }; } + if (d.live) { UI.go('overview'); return { info: tr('aurora.already_connected', { name: d.name }, d.name + ' is already connected') }; } + if (d.kind === 'phone' && d.id && typeof api.connectPhone === 'function') { api.connectPhone(d.id); return { ok: connecting }; } + if (d.mesh && d.kind === 'pc') { UI.go('connection'); return { info: tr('aurora.joins_by_itself', { name: d.name }, d.name + ' isn’t connected: it joins by itself once it’s on, or from Connection') }; } + if (d.kind === 'pc' && typeof api.connectAgain === 'function') { api.connectAgain(); return { ok: connecting }; } UI.go('connection'); - return { info: 'Connect ' + d.name + ' from Connection' }; + return { info: tr('aurora.connect_from_connection', { name: d.name }, 'Connect ' + d.name + ' from Connection') }; }, }; } - async function run(text) { + // text: the request (English: the only one understood); shown: what the bar echoes (a chip's own words). + async function run(text, shown) { const id = ++runId; closeMenu(); inp.blur(); @@ -1046,7 +1075,7 @@ tx.replaceChildren(); res.replaceChildren(); sizeCard(); - const ws = text.split(/\s+/).filter(Boolean); + const ws = (shown || text).split(/\s+/).filter(Boolean); const step = Math.max(45, Math.min(140, 1500 / ws.length)); for (const w of ws) { if (id !== runId) return; @@ -1075,7 +1104,7 @@ res.append(h('div', null, [mark, label], { attrs: { role: 'listitem' } })); sizeCard(); let r; - try { r = await st.run(); } catch (e) { r = { no: (e && e.message) || 'That didn’t work' }; } + try { r = await st.run(); } catch (e) { r = { no: (e && e.message) || tr('aurora.didnt_work', null, 'That didn’t work') }; } await wait(420); if (id !== runId) return; r = r || { ok: st.label }; diff --git a/shared/camera-view.html b/shared/camera-view.html index d142ce39..15644221 100644 --- a/shared/camera-view.html +++ b/shared/camera-view.html @@ -23,11 +23,15 @@ -
Asking for the camera…
+
Asking for the camera…
- - + +
+ + + + diff --git a/shared/camera-view.js b/shared/camera-view.js index c1d57ad4..6b439787 100644 --- a/shared/camera-view.js +++ b/shared/camera-view.js @@ -4,12 +4,17 @@ // (shared/vcam-feed.js); Camera › Window shows it. Camera › Rotate turns it here too. 'use strict'; +// camera-view.html loads shared/i18n.js (window.t); the fallback only fills the English default. +function tr(k, p, d) { + if (typeof window.t === 'function') return window.t(k, p, d); + return String(d !== undefined ? d : k).replace(/\{(\w+)\}/g, (m, n) => (p && p[n] != null ? p[n] : m)); +} const api = window.cam; const video = document.getElementById('video'); const status = document.getElementById('status'); const again = document.getElementById('again'); const mirror = document.getElementById('mirror'); -const name = new URLSearchParams(location.search).get('name') || 'the other computer'; +const name = new URLSearchParams(location.search).get('name') || tr('kit.the_other_computer', null, 'the other computer'); const feed = window.CamOut ? window.CamOut() : null; let pc = null; let pending = []; @@ -73,7 +78,7 @@ async function offer(sdp) { me.onconnectionstatechange = () => { if (pc !== me) return; if (me.connectionState === 'connected') { say(''); api.send({ t: 'live' }); } - else if (me.connectionState === 'failed') say(`The picture can’t get through from ${name}: are both on the same network?`, true); + else if (me.connectionState === 'failed') say(tr('sh_camera_view.picture_cant_get_through', { name }, 'The picture can’t get through from {name}: are both on the same network?'), true); }; try { await me.setRemoteDescription({ type: 'offer', sdp }); @@ -82,7 +87,7 @@ async function offer(sdp) { for (const c of pending.splice(0)) await me.addIceCandidate(c).catch(() => {}); pending = null; } catch (e) { - say('The camera didn’t start: ' + e.message, true); + say(tr('camshare.camera_didnt_start', { error: e.message }, 'The camera didn’t start: {error}'), true); } } @@ -96,10 +101,10 @@ api.on((m) => { reset(); } else if (m.t === 'status') { const n = m.name || name; - if (m.status === 'starting') say(`Asking ${n} for its camera…`); - else if (m.status === 'refused') { reset(); say(`${n} doesn’t share its camera: turn on Camera › “Let this computer see the camera” there.`, true); } - else if (m.status === 'failed') { reset(); say(`${n}’s camera didn’t start: ${m.error || 'unknown'}`, true); } - else if (m.status === 'ended') { reset(); say(`${n} stopped its camera.`, true); } + if (m.status === 'starting') say(tr('camera.asking_peer', { name: n }, 'Asking {name} for its camera…')); + else if (m.status === 'refused') { reset(); say(tr('sh_camera_view.doesnt_share_camera', { name: n }, '{name} doesn’t share its camera: turn on Camera › “Let this computer see the camera” there.'), true); } + else if (m.status === 'failed') { reset(); say(tr('sh_camera_view.peer_camera_didnt_start', { name: n, error: m.error || tr('sh_camera_view.unknown_error', null, 'unknown') }, '{name}’s camera didn’t start: {error}'), true); } + else if (m.status === 'ended') { reset(); say(tr('sh_camera_view.peer_stopped_camera', { name: n }, '{name} stopped its camera.'), true); } } }); again.onclick = () => api.send({ t: 'again' }); diff --git a/shared/camshare.js b/shared/camshare.js index 0b5f1c1b..34640798 100644 --- a/shared/camshare.js +++ b/shared/camshare.js @@ -15,6 +15,8 @@ 'use strict'; const path = require('path'); +const i18n = require('./i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const P = require('./protocol.js'); const T = P.T; @@ -114,7 +116,7 @@ class CamShare { this._toSender({ t: 'start', deviceId: this.cfg().device || '' }, true); this.sender.status = 'starting'; this.link.send({ t: T.CAM_STATE, status: 'starting' }); - this.popup('driven', `${this.peerName()} is viewing this computer’s camera`); + this.popup('driven', tr('camshare.peer_viewing_camera', { name: this.peerName() }, `${this.peerName()} is viewing this computer’s camera`)); this.onChange(); } @@ -149,7 +151,7 @@ class CamShare { } else if (m.t === 'status') { s.status = m.status === 'live' ? 'live' : m.status === 'failed' ? '' : s.status; this.link.send({ t: T.CAM_STATE, status: String(m.status || ''), error: String(m.error || '').slice(0, 200) }); - if (m.status === 'failed') this.popup('home', `The camera didn’t start: ${String(m.error || '').slice(0, 120)}`); + if (m.status === 'failed') this.popup('home', tr('camshare.camera_didnt_start', { error: String(m.error || '').slice(0, 120) }, `The camera didn’t start: ${String(m.error || '').slice(0, 120)}`)); this.onChange(); } } @@ -179,7 +181,7 @@ class CamShare { // Closing that window only hides it: the camera stops with the switch. view(show = false) { if (this.cfg().on === false) return; // Camera's switch is off - if (!this.link.connected()) return this.popup('home', 'Not connected'); + if (!this.link.connected()) return this.popup('home', tr('main.not_connected', null, 'Not connected')); const old = this.viewer; if (old && !old.win.isDestroyed()) { if (show) { diff --git a/shared/clipimage.js b/shared/clipimage.js index a27494a3..ec39de8c 100644 --- a/shared/clipimage.js +++ b/shared/clipimage.js @@ -10,6 +10,8 @@ 'use strict'; const crypto = require('crypto'); +const i18n = require('./i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const P = require('./protocol.js'); const T = P.T; @@ -265,7 +267,9 @@ class ClipImages { // As the clipboard holds it now (it may re-encode it): never sent back. this.sig.received = sigOf(await this._read()) || sigOf(img); this.o.remember('in', this._item({ png: pic.png, w: pic.w || img.getSize().width, h: pic.h || img.getSize().height }, img, pic.shot)); - this.o.popup('driven', `${pic.shot ? 'Screenshot' : 'Picture'} from ${this.o.peerName()} copied: paste it with ${this.o.pasteKeys || 'Ctrl+V'}`); + const kind = pic.shot ? tr('clipimage.kind_screenshot', null, 'Screenshot') : tr('clipimage.kind_picture', null, 'Picture'); + const keys = this.o.pasteKeys || 'Ctrl+V'; + this.o.popup('driven', tr('clipimage.copied_paste_with', { kind, name: this.o.peerName(), keys }, `${pic.shot ? 'Screenshot' : 'Picture'} from ${this.o.peerName()} copied: paste it with ${this.o.pasteKeys || 'Ctrl+V'}`)); this.o.onChange(); } diff --git a/shared/feature-art.js b/shared/feature-art.js index 85dd9103..ddd2291c 100644 --- a/shared/feature-art.js +++ b/shared/feature-art.js @@ -16,6 +16,7 @@ // FeatureArt.create(id, { color, keep, onDismiss }) -> { el, set(show) }; color: the tab's (a CSS gradient), // keep: Dismiss is remembered (function () { + const tr = (k, p, d) => (typeof t === 'function' ? t(k, p, d) : (d || k)); const FREE = ['overview', 'multi', 'general', 'about', 'feedback', 'tip', 'phone', 'calls', 'messages', 'media', 'pfiles']; // Nothing connected: a switch of a feature can't be turned on or off (it shows dimmed, styled from @@ -180,7 +181,7 @@ + '' + '' + `${doc(1)}${along(4, '68,152;68,152;200,118;200,118;332,152;332,152', '0;0.1;0.35;0.55;0.8;1')}${fade(4, '0;1;1;0;0', '0;0.08;0.82;0.9;1')}` - + pill(68, 'Copy', '0;1;1;0;0', '0;0.06;0.3;0.36;1') + pill(332, 'Paste', '0;0;1;1;0', '0;0.78;0.84;0.97;1'); + + pill(68, tr('general.copy', null, 'Copy'), '0;1;1;0;0', '0;0.06;0.3;0.36;1') + pill(332, tr('files.paste', null, 'Paste'), '0;0;1;1;0', '0;0.78;0.84;0.97;1'); }, // At a desk: the bell rings, the phone lights up, notifications slide onto the screen. notifications: (id) => { @@ -278,7 +279,7 @@ [...cmd].forEach((ch, i) => { out += `${ch === ' ' ? ' ' : ch}${from(6, (0.05 + i * 0.035).toFixed(3))}`; }); - out += `Connected to the other computer${from(6, '0.55')}` + out += `${tr('feature_art.connected_other', null, 'Connected to the other computer')}${from(6, '0.55')}` + `~ $${from(6, '0.66')}`; const xs = ['92', ...[...cmd].map((_, i) => 101 + i * 9), '112']; const ys = ['74', ...[...cmd].map(() => 74), '126']; @@ -399,28 +400,29 @@ }; // The feature's name and what it does, the same for every device. - const TEXT = { - cursor: ['Cursor sharing', 'Push the pointer past the edge of the screen and it carries on onto the other device. One mouse or trackpad for both.'], - keyboard: ['Keyboard sharing', 'This keyboard types on whichever device the pointer is on, shortcuts included.'], - clipboard: ['Clipboard sync', 'Copy something on one device and paste it on the other. It goes across by itself.'], - notifications: ['Notification sync', 'Notifications from the other device show up on this one, and the other way round.'], - audio: ['Sound sharing', 'Play one device’s sound on the other’s speakers or headphones.'], - apps: ['App sharing', 'Open an app of the other device: it runs there and shows up here in a window of its own.'], - share: ['Second screen', 'This screen becomes a second screen for the other device: move windows across onto it.'], - receive: ['Remote screen', 'The other device’s screen in a window here, to see it and use it from here.'], - 'mac-pc': ['Remote screen', 'The other device’s screen in a window here, to see it and use it from here.'], - 'pc-mac': ['Screen sharing', 'This screen in a window on the other device, to show it or use it from there.'], - files: ['File sharing', 'Drag files across the screen edge, take in files sent your way, or share a folder.'], - terminal: ['Remote terminal', 'Open a terminal on the other computer from this one. No passwords needed.'], - mount: ['Phone drive', 'The phone’s storage as a drive here, to open and copy its files like any other folder.'], - calls: ['Phone calls', 'Answer and make your phone’s calls on this computer, and talk through it.'], - messages: ['Text messages', 'Read and send your phone’s texts here.'], - media: ['Phone photos', 'See your phone’s photos and videos and copy them here.'], - pfiles: ['Phone files', 'Browse the phone’s storage and copy files to and from it, no cable needed.'], - camera: ['Camera sharing', 'The other device’s camera here: see its picture, or pick it as a camera in any app.'], - remote: ['Phone as a remote', 'Use the phone as this computer’s touchpad, keyboard or gamepad.'], - rezume: ['ReZume', 'Like Handoff on Apple devices: go on here with the page, document or phone app you were using on the other device, and the other way round.'], - }; + // Built when a picture is made, not at load: the language is set after the scripts load. + const TEXT = () => ({ + cursor: [tr('feature_art.cursor_title', null, 'Cursor sharing'), tr('feature_art.cursor_desc', null, 'Push the pointer past the edge of the screen and it carries on onto the other device. One mouse or trackpad for both.')], + keyboard: [tr('feature_art.keyboard_title', null, 'Keyboard sharing'), tr('feature_art.keyboard_desc', null, 'This keyboard types on whichever device the pointer is on, shortcuts included.')], + clipboard: [tr('feature_art.clipboard_title', null, 'Clipboard sync'), tr('feature_art.clipboard_desc', null, 'Copy something on one device and paste it on the other. It goes across by itself.')], + notifications: [tr('feature_art.notifications_title', null, 'Notification sync'), tr('feature_art.notifications_desc', null, 'Notifications from the other device show up on this one, and the other way round.')], + audio: [tr('feature_art.audio_title', null, 'Sound sharing'), tr('feature_art.audio_desc', null, 'Play one device’s sound on the other’s speakers or headphones.')], + apps: [tr('feature_art.apps_title', null, 'App sharing'), tr('feature_art.apps_desc', null, 'Open an app of the other device: it runs there and shows up here in a window of its own.')], + share: [tr('feature_art.share_title', null, 'Second screen'), tr('feature_art.share_desc', null, 'This screen becomes a second screen for the other device: move windows across onto it.')], + receive: [tr('feature_art.receive_title', null, 'Remote screen'), tr('feature_art.receive_desc', null, 'The other device’s screen in a window here, to see it and use it from here.')], + 'mac-pc': [tr('feature_art.receive_title', null, 'Remote screen'), tr('feature_art.receive_desc', null, 'The other device’s screen in a window here, to see it and use it from here.')], + 'pc-mac': [tr('feature_art.pc_mac_title', null, 'Screen sharing'), tr('feature_art.pc_mac_desc', null, 'This screen in a window on the other device, to show it or use it from there.')], + files: [tr('feature_art.files_title', null, 'File sharing'), tr('feature_art.files_desc', null, 'Drag files across the screen edge, take in files sent your way, or share a folder.')], + terminal: [tr('feature_art.terminal_title', null, 'Remote terminal'), tr('feature_art.terminal_desc', null, 'Open a terminal on the other computer from this one. No passwords needed.')], + mount: [tr('feature_art.mount_title', null, 'Phone drive'), tr('feature_art.mount_desc', null, 'The phone’s storage as a drive here, to open and copy its files like any other folder.')], + calls: [tr('feature_art.calls_title', null, 'Phone calls'), tr('feature_art.calls_desc', null, 'Answer and make your phone’s calls on this computer, and talk through it.')], + messages: [tr('feature_art.messages_title', null, 'Text messages'), tr('feature_art.messages_desc', null, 'Read and send your phone’s texts here.')], + media: [tr('feature_art.media_title', null, 'Phone photos'), tr('feature_art.media_desc', null, 'See your phone’s photos and videos and copy them here.')], + pfiles: [tr('feature_art.pfiles_title', null, 'Phone files'), tr('feature_art.pfiles_desc', null, 'Browse the phone’s storage and copy files to and from it, no cable needed.')], + camera: [tr('feature_art.camera_title', null, 'Camera sharing'), tr('feature_art.camera_desc', null, 'The other device’s camera here: see its picture, or pick it as a camera in any app.')], + remote: [tr('feature_art.remote_title', null, 'Phone as a remote'), tr('feature_art.remote_desc', null, 'Use the phone as this computer’s touchpad, keyboard or gamepad.')], + rezume: ['ReZume', tr('feature_art.rezume_desc', null, 'Like Handoff on Apple devices: go on here with the page, document or phone app you were using on the other device, and the other way round.')], + }); const has = (id) => id in SCENE; @@ -489,15 +491,15 @@ pic.setAttribute('aria-hidden', 'true'); paint(pic, id); drawn.push({ id, pic }); - const [head, text] = TEXT[id]; + const [head, text] = TEXT()[id]; const h = document.createElement('h2'); h.textContent = head; const p = document.createElement('p'); p.textContent = text; const ok = document.createElement('button'); ok.className = 'btn'; - ok.textContent = 'Dismiss'; - ok.title = 'Show the settings'; + ok.textContent = tr('rezume.dismiss', null, 'Dismiss'); + ok.title = tr('feature_art.show_settings', null, 'Show the settings'); ok.onclick = () => { gone = true; if (keep) dismiss(id); diff --git a/shared/i18n-dom.js b/shared/i18n-dom.js new file mode 100644 index 00000000..b9b05c5f --- /dev/null +++ b/shared/i18n-dom.js @@ -0,0 +1,24 @@ +// Language for the small windows (popups, HUD, viewers): picks the saved choice (General page) or the +// system's, then fills [data-i18n] elements. Load after locales/en.js, locales/pt-BR.js and i18n.js. +// English default → textContent +// data-i18n-title / -placeholder / -aria-label="key" → that attribute (the English one is the default) +(function () { + 'use strict'; + const I = window.DuoDeskI18n; + if (!I) return; + let saved = null; + try { saved = localStorage.getItem('duodesk.general.language') || localStorage.getItem('duodesk.lang'); } catch (_) {} + I.setLanguage(saved && saved !== 'auto' ? saved : (navigator.language || 'en')); + + function apply(root) { + const scope = root || document; + for (const el of scope.querySelectorAll('[data-i18n]')) el.textContent = I.t(el.dataset.i18n, null, el.textContent); + for (const a of ['title', 'placeholder', 'aria-label']) { + for (const el of scope.querySelectorAll('[data-i18n-' + a + ']')) el.setAttribute(a, I.t(el.getAttribute('data-i18n-' + a), null, el.getAttribute(a) || '')); + } + if (document.documentElement) document.documentElement.lang = I.getLanguage(); + } + window.DuoDeskI18nDom = { apply }; + if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => apply()); + else apply(); +})(); diff --git a/shared/i18n.js b/shared/i18n.js new file mode 100644 index 00000000..2d9754c2 --- /dev/null +++ b/shared/i18n.js @@ -0,0 +1,62 @@ +(function (root, factory) { + if (typeof module === 'object' && module.exports) { + const en = require('./locales/en.js'); + const ptBR = require('./locales/pt-BR.js'); + module.exports = factory({ 'en': en, 'pt-BR': ptBR }); + } else { + root.DuoDeskI18n = factory(root.DuoDeskLocales || {}); + root.t = root.DuoDeskI18n.t; + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function (locales) { + 'use strict'; + let currentLang = 'en'; + const listeners = new Set(); + + function getDict(lang) { + const d = locales[lang]; + if (typeof d === 'function') return d(); + return d || {}; + } + + function normalizeLang(lang) { + if (!lang) return 'en'; + const lower = String(lang).toLowerCase(); + if (lower.startsWith('pt')) return 'pt-BR'; + if (lower.startsWith('en')) return 'en'; + return locales[lang] ? lang : 'en'; + } + + function t(key, params, defaultText) { + if (!key) return defaultText !== undefined ? defaultText : ''; + const dict = getDict(currentLang); + const fallbackDict = getDict('en'); + let text = dict[key] !== undefined ? dict[key] : (fallbackDict[key] !== undefined ? fallbackDict[key] : (defaultText !== undefined ? defaultText : key)); + if (params && typeof params === 'object') { + text = String(text).replace(/\{(\w+)\}/g, (_, k) => (params[k] !== undefined && params[k] !== null ? params[k] : `{${k}}`)); + } + return text; + } + + function registerLocale(code, dict) { + locales[code] = dict; + } + + function setLanguage(lang) { + currentLang = normalizeLang(lang); + listeners.forEach(fn => { try { fn(currentLang); } catch (e) { console.error(e); } }); + return currentLang; + } + + function getLanguage() { return currentLang; } + + function getAvailableLanguages() { + return Object.keys(locales).map((code) => ({ code, label: getDict(code)['lang.name'] || code })); + } + + function onLanguageChange(fn) { + listeners.add(fn); + return () => listeners.delete(fn); + } + + return { t, setLanguage, getLanguage, normalizeLang, registerLocale, getAvailableLanguages, onLanguageChange }; +}); diff --git a/shared/kvm-map-ui.js b/shared/kvm-map-ui.js index 3c0951e9..847f644a 100644 --- a/shared/kvm-map-ui.js +++ b/shared/kvm-map-ui.js @@ -9,6 +9,7 @@ (function (root) { 'use strict'; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const G = root.KvmGeom; const NS = 'http://www.w3.org/2000/svg'; const PLACEHOLDER = [{ id: '?', x: 0, y: 0, w: 1600, h: 1000 }]; @@ -40,8 +41,6 @@ const hint = div('kvm-map-hint'); const identify = document.createElement('button'); identify.className = 'btn small kvm-map-identify'; - identify.textContent = 'Identify'; - identify.title = 'Show each monitor’s number on it, on both computers'; identify.onclick = () => opts.onIdentify(); foot.append(hint, identify); el.append(legend, foot); @@ -154,15 +153,23 @@ // d: {mine, theirs, side, along, me, them}. along null: centred. function update(d) { const side = d.side || 'right'; - data = { mine: d.mine || [], theirs: d.theirs || [], side, along: 0, me: d.me || 'This computer', them: d.them || 'The other computer' }; + identify.textContent = tr('sh_kvm_map_ui.identify', null, 'Identify'); + identify.title = tr('sh_kvm_map_ui.identify_title', null, 'Show each monitor’s number on it, on both computers'); + data = { mine: d.mine || [], theirs: d.theirs || [], side, along: 0, me: d.me || tr('general.this_computer', null, 'This computer'), them: d.them || tr('overview.other_computer', null, 'The other computer') }; const { mine, theirs } = lists(); data.along = typeof d.along === 'number' ? d.along : G.centred(mine, theirs, side); meKey.textContent = data.me; themKey.textContent = data.them; hint.textContent = data.theirs.length - ? `Drag ${data.them} to where it is on your desk. The pointer crosses only where the screens touch (highlighted).` - : `Drag ${data.them} to the side it is on. Its screens show here once it’s connected (with an up-to-date DuoDesk).`; - box.setAttribute('aria-label', `${data.them} is ${{ left: 'to the left of', right: 'to the right of', top: 'above', bottom: 'below' }[side]} ${data.me}`); + ? tr('sh_kvm_map_ui.drag_to_desk_position', { them: data.them }, 'Drag {them} to where it is on your desk. The pointer crosses only where the screens touch (highlighted).') + : tr('sh_kvm_map_ui.drag_to_side', { them: data.them }, 'Drag {them} to the side it is on. Its screens show here once it’s connected (with an up-to-date DuoDesk).'); + const place = { + left: () => tr('sh_kvm_map_ui.is_left_of', { them: data.them, me: data.me }, '{them} is to the left of {me}'), + right: () => tr('sh_kvm_map_ui.is_right_of', { them: data.them, me: data.me }, '{them} is to the right of {me}'), + top: () => tr('sh_kvm_map_ui.is_above', { them: data.them, me: data.me }, '{them} is above {me}'), + bottom: () => tr('sh_kvm_map_ui.is_below', { them: data.them, me: data.me }, '{them} is below {me}'), + }; + box.setAttribute('aria-label', place[side]()); identify.hidden = !data.mine.length; if (!drag) render(side, data.along); } diff --git a/shared/locales/en.js b/shared/locales/en.js new file mode 100644 index 00000000..a693711d --- /dev/null +++ b/shared/locales/en.js @@ -0,0 +1,2934 @@ +(function (root, factory) { + const dict = factory(); + const exp = Object.assign(function () { return dict; }, dict); + if (typeof module === 'object' && module.exports) module.exports = exp; + else { + root.DuoDeskLocales = root.DuoDeskLocales || {}; + root.DuoDeskLocales['en'] = dict; + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function () { + return { + "lang.name": "English", + "nav.overview": "Overview", + "nav.connection": "Connection", + "nav.screens": "Screens", + "nav.cursor": "Mouse", + "nav.keyboard": "Keyboard", + "nav.audio": "Audio", + "nav.files": "File Sharing", + "nav.apps": "Apps", + "nav.phone": "Phone", + "nav.calls": "Calls", + "nav.messages": "Messages", + "nav.media": "Photos", + "hub.photos_and_videos": "Photos and videos", + "hub.files": "Files", + "nav.camera": "Camera", + "nav.remote": "Remote", + "nav.clipboard": "Clipboard", + "nav.notifications": "Notifications", + "nav.terminal": "Terminal", + "nav.mount": "Mount", + "nav.multi": "Multi-device", + "nav.settings": "General", + "nav.general": "General", + "nav.about": "About", + "nav.mac-pc": "Receive screen", + "nav.receive": "Receive screen", + "nav.pc-mac": "Share screen", + "nav.share": "Share screen", + "sidebar.connected": "Connected", + "sidebar.connecting": "Connecting…", + "sidebar.not_paired": "Not paired", + "sidebar.pairing": "Pairing…", + "sidebar.reconnecting": "Reconnecting…", + "sidebar.identity_changed": "Identity changed", + "sidebar.nearby": "Nearby", + "sidebar.nearby_click_to_connect": "Nearby · Click to connect", + "sidebar.via": "via {name}", + "sidebar.waiting": "Waiting for it to connect", + "sidebar.not_connected": "Not connected", + "sidebar.phone": "Phone", + "sidebar.connect_to": "Connect to {name}", + "pair.title_with": "Pairing with {name}", + "pair.wants_to_pair": "{name} wants to pair", + "pair.press_pair_on": "Press Pair on {name}", + "pair.banner_ask_hint": "DuoDesk on {name} asks to pair with this PC. Press Pair there, then compare the codes.", + "pair.match": "Codes match", + "pair.allow": "Allow", + "pair.deny": "Deny", + "pair.close": "Close", + "pair.cancel": "Cancel", + "general.language": "Language", + "general.lang_auto": "Automatic (System)", + "overview.disconnect": "Disconnect", + "overview.connect": "Connect", + "overview.cancel": "Cancel", + "overview.location_settings": "Location settings", + "overview.connect_wifi_direct": "Connect with Wi-Fi Direct", + "overview.back_to_bluetooth": "Back to Bluetooth", + "overview.connect_hotspot": "Connect with hotspot", + "overview.hotspot_name": "Hotspot name", + "overview.password": "Password", + "overview.password_saved": "Password (saved)", + "overview.join": "Join", + "overview.copy": "Copy", + "overview.connect_by_address": "Connect by address", + "overview.address_aria": "Address", + "overview.cant_look_network": "Can’t look for computers on this network.", + "overview.fix_firewall": "Fix firewall", + "overview.ble_phones": "Bluetooth with phones", + "overview.ble_computers": "Bluetooth with computers", + "overview.refresh": "Refresh", + "overview.looking": "Looking…", + "overview.found_nearby": "Found nearby", + "overview.paired": "Paired", + "overview.paired_check": "Paired ✓", + "overview.connected": "Connected", + "overview.waiting_allow": "Waiting for {name} to allow…", + "overview.connecting": "Connecting…", + "overview.cant_reach": "Can’t reach {name} at {address}. Is DuoDesk open there, on the same Wi-Fi?", + "overview.taking_over": "Taking over…", + "overview.other_computer": "The other computer", + "overview.pairing": "Pairing…", + "overview.not_connected": "Not connected", + "overview.identity_changed": "This {kind} looks different now. Forget it and pair again.", + "overview.open_on_peer": "Open DuoDesk on {name}.", + "overview.pick_below": "Pick a computer below, or connect by address.", + "overview.disconnected": "Disconnected", + "overview.take_over": "Take over", + "overview.hotspot_hint": "Switch on {name}’s hotspot, then type its name and password here.", + "overview.asking_wifi": "Asking {name} for Wi-Fi…", + "overview.starting_wifi_direct": "Starting Wi-Fi Direct for {name}…", + "overview.joining_ssid": "Joining {ssid}…", + "overview.on_wifi_with": "On Wi-Fi with {name}", + "overview.wifi_failed": "Wi-Fi didn’t come up", + "overview.no_network": "No network", + "overview.looking_at_addr": "Looking for DuoDesk at {addr}…", + "overview.connect_by_addr_works": "Connect by address still works.", + "overview.fw_blocked": "The firewall blocks it. Connect by address may still work.", + "overview.retry": "Retry", + "overview.pair_btn": "Pair", + "overview.codes_match": "Codes match", + "overview.wants_to_connect": "wants to connect", + "overview.check_code_named": "Check the code: {code} (the same on {name}?)", + "overview.looking_for_computers": "Looking for computers…", + "overview.open_other_pc": "Open DuoDesk on the other computer.", + "overview.waking": "Waking…", + "overview.wake": "Wake", + "overview.waking_name": "Waking {name}…", + "overview.online": "Online", + "overview.switch": "Switch", + "overview.forget": "Forget", + "overview.nothing_paired": "Nothing paired yet", + "overview.pair_in_found_nearby": "Pair with a computer in Found nearby.", + "overview.last_seen": "Last seen {time}", + "overview.youre_using": "You’re using {there}", + "overview.peer_using_me": "{There} is using {me}", + "cursor.reverse_scrolling": "Reverse scrolling", + "cursor.trackpad_gestures": "Trackpad gestures", + "cursor.gestures_hint": "Pinch to zoom, swipe between desktops, Task View / Mission Control, back and forward — done the native way on {name}. The same on both", + "cursor.over_bluetooth": "Over Bluetooth", + "cursor.bluetooth_hint": "When {name} isn’t on this network and you’re connected through Bluetooth (slower). Off: nothing crosses until you’re on Wi-Fi again. The same on both", + "cursor.none": "None", + "cursor.wireless_debugging": "Wireless Debugging", + "cursor.control_phone_with": "Control the phone with", + "cursor.phone_card": "Phone", + "cursor.use_peer_on_me": "Use {name}’s mouse and keyboard on {me}", + "cursor.push_edge_there": "Push the pointer past the edge there", + "cursor.pointer_speed": "Pointer speed here", + "cursor.use_me_on_peer": "Use {me}’s mouse and keyboard on {name}", + "cursor.push_edge": "Push the pointer past the edge", + "cursor.edge_resistance": "Edge resistance", + "cursor.resistance_hint": "Push a little further to cross", + "cursor.feel": "Feel", + "cursor.not_same_network": "Not on the same network", + "cursor.right_now": "Right now", + "cursor.where_other_pc": "Where the other computer is", + "cursor.auto_adb_ready": "Automatic: ADB, wireless debugging is ready", + "cursor.auto_acc_fallback": "Automatic: Accessibility until wireless debugging is set up", + "cursor.acc_hint": "Accessibility: DuoDesk on the phone taps and types. Works over Wi-Fi, Wi-Fi Direct and Bluetooth, no developer options", + "cursor.adb_full_control": "ADB: full control through wireless debugging", + "cursor.adb_not_setup_yet": "ADB: full control through wireless debugging (not set up yet)", + "clipboard.title": "Clipboard", + "clipboard.instantly": "Instantly", + "clipboard.when_switch": "When you switch", + "clipboard.sync": "Sync", + "clipboard.skip_passwords": "Skip passwords", + "clipboard.from_pw_managers": "From password managers", + "clipboard.pictures": "Pictures", + "clipboard.largest_text": "Largest text", + "clipboard.off": "Off", + "clipboard.items_10": "10 items", + "clipboard.items_20": "20 items", + "clipboard.items_50": "50 items", + "clipboard.items_100": "100 items", + "clipboard.copy_there_paste_me": "Copy on {name}, paste on {me}", + "clipboard.copy_me_paste_there": "Copy on {me}, paste on {name}", + "clipboard.privacy": "Privacy", + "clipboard.recent_items": "Recent items", + "clipboard.never_saved_disk": "Never saved to disk", + "clipboard.recent": "Recent", + "clipboard.clear": "Clear", + "clipboard.as_soon_as_copy": "As soon as you copy", + "clipboard.when_move_to_other": "When you move to the other computer", + "clipboard.pics_both_ways": "Pictures and screenshots you copy, up to 10 MB, both ways", + "clipboard.pics_no_ble": "Pictures and screenshots you copy, up to 10 MB, both ways. Not over Bluetooth", + "clipboard.pics_turn_on_peer": "Turn on Pictures on {name} too (an older version there can’t: update DuoDesk)", + "clipboard.longer_text_pics": "Longer text isn’t sent. Pictures: up to 10 MB", + "clipboard.longer_text": "Longer text isn’t sent", + "clipboard.turned_off_on": "Turned off on {name}", + "clipboard.last_skip": "Last item not sent: {last}.", + "clipboard.sent_to": "Sent to {name}", + "clipboard.from_peer": "From {name}", + "clipboard.to_peer": "To {name}", + "clipboard.screenshot": "Screenshot", + "clipboard.picture": "Picture", + "clipboard.whitespace": "(whitespace)", + "clipboard.copy_btn": "Copy", + "clipboard.nothing_yet": "Nothing yet", + "clipboard.recent_off": "Recent items are off", + "files.peer_folder_here": "{Name}’s folder here", + "files.open": "Open", + "files.open_peer_shared": "Open {name}’s shared folder", + "files.my_folder_on_peer": "{me}’s folder on {name}", + "files.choose": "Choose…", + "files.share_folder_with": "Share a folder with {name}", + "files.take_files_from": "Take files from {name} on {me}", + "files.send_files_to": "Send files from {me} to {name}", + "files.drop_here": "Drop files or folders here", + "files.connect_to_send": "Connect to send files", + "files.send_files": "Send files", + "files.hint_downloads_phone": "They go to {the}’s Downloads", + "files.hint_downloads_pc": "They go to {the}’s Downloads, or the folder chosen there for received files", + "files.to_peer": "To {the}", + "files.sending_to": "Sending {name} to {the}", + "files.pasting_to": "Pasting {name} to {the}", + "files.idx_of_total": " · {idx} of {total}", + "files.shortcuts_sw": "Copy and paste files with shortcuts", + "files.shortcuts_title": "Copy and paste files", + "files.copy": "Copy", + "files.select_explorer_first": "Select files in File Explorer first", + "files.paste": "Paste", + "files.edge_drag_sw": "Drag files across the screen edge", + "files.drag_between_computers": "Drag files between computers", + "files.cancel": "Cancel", + "files.recent": "Recent", + "files.pasting": "Pasting…", + "files.paste_hint_dest": "Into the app in front (a chat, a mail…), or the File Explorer folder in front, else the Desktop", + "files.turned_off_on": "Turned off on {name}", + "files.drag_hint": "Drag through the screen edge and drop anywhere", + "files.drive_num": "Drive {drive}", + "files.connecting": "Connecting…", + "files.over_ble_open_wifi": "Over Bluetooth: Open connects it with Wi-Fi Direct", + "files.waiting_peer_share": "Waiting for {name} to share one", + "files.setting_up": "Setting up…", + "files.removing": "Removing…", + "files.on_peer": "On {name}", + "files.problem": "Problem", + "files.shared": "Shared", + "files.nothing_sent": "Nothing sent", + "files.sent_file": "Sent {file}", + "files.not_sent_file": "Not sent: {file}", + "files.sending_name": "Sending {name}", + "files.nothing_received": "Nothing received", + "files.received_file": "Received {file}", + "files.not_received_file": "Not received: {file}", + "files.received_from_peer": "Received from {name}", + "files.received_count_one": "Received 1 file from {name}", + "files.received_count_other": "Received {count} files from {name}", + "files.not_received": "Not received", + "files.copying_name": "Copying {name}", + "files.dragging_name": "Dragging {name}", + "files.esc_cancels": "Esc cancels", + "files.receiving_files_from_one": "Receiving {count} file from {name}", + "files.receiving_files_from_other": "Receiving {count} files from {name}", + "phone.enter_sends": "Enter sends messages", + "phone.close": "Close", + "phone.show_screen": "Show Phone Screen", + "phone.disconnect": "Disconnect", + "phone.wireless_debugging": "Wireless debugging", + "phone.pairing_code": "Pairing code", + "phone.try_again": "Try Again", + "phone.show_me_how": "Show me how", + "phone.screen_mouse_keyboard": "Screen, mouse and keyboard", + "phone.search_apps": "Search apps", + "phone.open_on_pc": "Open on this PC", + "phone.settings": "Settings", + "phone.battery": "Battery {battery}%", + "tab.apps.desc": "Use apps from the other computer in their own windows.", + "tab.apps.desc_mac": "Open apps from the other computer in their own windows.", + "tab.audio.desc": "Hear one computer on the other.", + "tab.clipboard.desc": "Copy on one computer, paste on the other.", + "tab.cursor.desc": "Move the pointer off the edge of the screen to go to the other computer.", + "tab.files.heading": "File Sharing", + "tab.files.desc": "Send files and folders between your devices, or share a folder.", + "tab.files.desc_mac": "Drag files between your computers, or share a folder.", + "tab.keyboard.desc": "Type on whichever computer the pointer is on.", + "tab.mount.desc": "The phone’s storage as a drive in Explorer, through ADB: the cable (USB debugging) or wireless debugging.", + "tab.mount.desc_linux": "The phone’s storage as a drive in the file manager, through ADB: the cable (USB debugging) or wireless debugging.", + "tab.mount.desc_mac": "The phone’s storage as a drive in Finder, through ADB: the cable (USB debugging) or wireless debugging.", + "tab.multi.desc": "Several computers and phones connected at once", + "tab.notifications.desc": "See one computer’s notifications on the other.", + "tab.connection.heading": "Connection", + "tab.phone.heading": "Phone", + "tab.mac-pc.heading": "{Name}’s screen on {me}", + "tab.mac-pc.desc": "See the other computer’s screen in a window here.", + "tab.pc-mac.heading": "{me}’s screen on {name}", + "tab.pc-mac.desc": "See {me} in a window on the other computer.", + "tab.terminal.desc": "Open a terminal on the other computer.", + "tab.terminal.desc_mac": "Open a shell on the other computer. No passwords needed.", + "tab.receive.heading": "{name} on {me}", + "tab.receive.desc": "See its screen in a window here.", + "tab.share.heading": "{me} on {name}", + "tab.share.desc": "Use {me} as a second screen for {name}.", + "display.peer_on_me": "{name} on {me}", + "display.me_on_peer": "{me} on {name}", + "route.to": " to ", + "about.this_computer": "This computer", + "about.computer_name": "Computer name", + "about.system": "System", + "about.processor": "Processor", + "about.memory": "Memory", + "about.architecture": "Architecture", + "about.this_app": "This app", + "about.version": "Version", + "about.built_for": "Built for", + "about.version_value": "Version {version}", + "about.cpu_cores": "{cpu} · {cores} cores", + "about.checking": "Checking…", + "about.latest_is_available_skipped": "{latest} is available (skipped)", + "about.latest_is_available": "{latest} is available", + "about.up_to_date": "Up to date", + "about.couldn_t_check_error": "Couldn’t check: {error}", + "about.you_have_download": "You have {current}. Download {name}", + "about.you_have_opens_release": "You have {current}. Opens the release page", + "about.version_no_releases": "Version {current}. No releases published yet", + "about.version_checked": "Version {version} · checked {time}", + "about.duodesk_icon": "DuoDesk icon", + "about.use_two_computers_as_one": "Use two computers as one desk", + "about.check_now": "Check now", + "about.what_s_new": "What’s New", + "about.don_t_skip": "Don’t skip", + "about.download": "Download", + "about.check_for_updates_automatically": "Check for updates automatically", + "about.updates": "Updates", + "about.check_automatically": "Check automatically", + "about.looks_for_new_releases_on": "Looks for new releases on GitHub every few hours", + "about.made_by": "Made by", + "about.profile": "Profile", + "about.website": "Website", + "about.source_code": "Source code", + "about.all_releases": "All releases", + "about.downloads_for_macos_windows_linux": "Downloads for macOS, Windows, Linux and Android", + "about.releases": "Releases", + "about.report_a_problem": "Report a problem", + "about.open_an_issue_on_github": "Open an issue on GitHub", + "about.issues": "Issues", + "about.log_files": "Log files", + "about.what_duodesk_did_and_any": "What DuoDesk did and any crash, to attach to a bug report", + "about.open_log_folder": "Open log folder", + "about.licence": "Licence", + "about.gnu_general_public_license_v3": "GNU General Public License v3", + "about.free_and_open_source": "Free and open source. © 2026 0xCodez. Includes code © 2026 Inuka Asith.", + "about.read": "Read", + "about.original_source": "Original source", + "about.the_gpl_3_0_code": "The GPL-3.0 code DuoDesk is built on, by Inuka Asith", + "about.thanks": "Thanks", + "apps.peer_apps": "{name}’s apps", + "apps.open_here_one": "{count} open here", + "apps.open_here_other": "{count} open here", + "apps.open_on_name_one": "{count} open on {name}", + "apps.open_on_name_other": "{count} open on {name}", + "apps.open_app_on_name": "Open {app} on {name}", + "apps.pin_app_to_start": "Pin {app} to Start", + "apps.open_name_s_apps_on": "Open {name}’s apps on {me}", + "apps.pick_one_below": "Pick one below", + "apps.open_me_s_apps_on": "Open {me}’s apps on {name}", + "apps.pick_them_over_there": "Pick them over there", + "apps.mac_apps": "Mac apps", + "apps.search": "Search", + "apps.pin_to_start": "Pin to Start", + "apps.loading": "Loading…", + "apps.no_app_matches": "No app matches", + "apps.no_apps_yet": "No apps yet", + "apps.waiting_for_name": "Waiting for {name}", + "apps.none_open": "None open", + "apps.click_refresh_to_ask_name": "Click Refresh to ask {name} for its apps.", + "audio.playing_name": "Playing {name}", + "audio.playing_on_name": "Playing on {name}", + "audio.waiting_for_name": "Waiting for {name}", + "audio.mute_me_while_sending": "Mute {me} while sending", + "audio.play_name_s_sound_on": "Play {name}’s sound on {me}", + "audio.play_me_s_sound_on": "Play {me}’s sound on {name}", + "audio.volume": "Volume", + "keyboard.hotkey_on_name": "Hotkey on {name}", + "keyboard.double_tap_to_type_on": "Double-tap to type on {name} and back", + "keyboard.set_in_duodesk_on_name": "Set in DuoDesk on {name}", + "keyboard.hotkey": "Hotkey", + "keyboard.double_tap_to_turn_cursor": "Double-tap to turn cursor sharing on or off", + "keyboard.switch_the_keyboard_with_the": "Switch the keyboard with the hotkey", + "keyboard.swap_ctrl_and_command": "Swap Ctrl and Command", + "keyboard.works_as_ctrl": "⌘ works as Ctrl", + "keyboard.so_c_copies_here": "So ⌘C copies here", + "keyboard.shortcuts_on_name": "Shortcuts on {name}", + "keyboard.ctrl_works_as_so_ctrl": "Ctrl works as ⌘, so Ctrl+C copies there", + "keyboard.type_on_me_with_name": "Type on {me} with {name}’s keyboard", + "keyboard.type_on_name_with_me": "Type on {name} with {me}’s keyboard", + "keyboard.only_when_cursor_is_off": "Only when Cursor is off", + "mount.mount_works_adb_dev_options": "Mount works through ADB, and Developer options are off on the phone. Switch on Developer options and Wireless debugging (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.mount_works_adb_wireless": "Mount works through ADB, and wireless debugging is off on the phone. Switch it on (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.drive_via_cable": "As a drive in This PC{drive}, through the cable.", + "mount.drive_via_wireless": "As a drive in This PC{drive}, over wireless debugging.", + "mount.show": "Show", + "mount.unmount": "Unmount", + "mount.show_the_phone_in_explorer": "Show the phone in Explorer", + "mount.switch_it_on_to_mount": "Switch it on to mount the phone", + "mount.phone_files": "Phone Files", + "mount.drive": "Drive", + "mount.mounting": "Mounting…", + "mount.plug_the_phone_in_with": "Plug the phone in with USB debugging on, or connect it with wireless debugging, then Mount.", + "multi.turn_on": "Turn on", + "multi.restarting": "Restarting…", + "multi.mesh_mode": "Mesh mode", + "multi.use_several_devices_at_once": "Use several devices at once", + "multi.computers_and_phones_connected_at": "Computers and phones connected at the same time: one clipboard and one set of notifications for all, each screen edge leading to another device, a phone and a computer together", + "multi.duodesk_restarts_when_you_turn": "DuoDesk restarts when you turn it on or off.", + "notifs.shown_one": "{count} shown", + "notifs.shown_other": "{count} shown", + "notifs.sent_one": "{count} sent", + "notifs.sent_other": "{count} sent", + "notifs.send_app": "Send {app}", + "notifs.hide_message_text": "Hide message text", + "notifs.only_the_app_and_the": "Only the app and the title", + "notifs.show_name_s_notifications_on": "Show {name}’s notifications on {me}", + "notifs.show_me_s_notifications_on": "Show {me}’s notifications on {name}", + "notifs.recent_notifications": "Recent Notifications", + "notifs.notification": "Notification", + "notifs.no_notifications_yet": "No notifications yet", + "notifs.incoming_notifications_from_whatsapp_instagram": "Incoming notifications from WhatsApp, Instagram, and other apps will appear here in real-time.", + "notifs.apps_show_up_here_after": "Apps show up here after their first notification while sending is on", + "notifs.as_windows_notifications_from_duodesk": "As Windows notifications, from DuoDesk", + "notifs.windows_notification_list_can_t": "Windows’ notification list can’t be read", + "notifs.also_switches_it_on_the": "Also switches it on the other computer", + "notifs.as_native_notifications_there": "As native notifications there", + "receive.waiting_for_name": "Waiting for {name}", + "receive.showing_name": "Showing {name}", + "receive.sharing_on_name_open_to": "Sharing on {name}. Open to watch.", + "receive.open_starts_sharing_on_name": "Open starts sharing on {name}", + "receive.turn_on_sharing_on_name": "Turn on sharing on {name}", + "receive.mbps_received": "{mbps} Mbps received", + "receive.show": "Show", + "receive.screen_window": "Screen window", + "receive.mirror": "Mirror", + "receive.extend": "Extend", + "receive.name_shares": "{Name} shares", + "receive.play_sound": "Play sound", + "receive.frame_generation": "Frame generation", + "receive.fills_in_late_or_dropped_frames": "Fills in late or dropped frames, and adds in-between frames when this screen is faster than the stream", + "receive.sound": "Sound", + "receive.full_screen": "Full screen", + "receive.connect_to_choose_from_here": "Connect to choose from here", + "receive.update_duodesk_on_the_other": "Update DuoDesk on the other computer to choose from here", + "receive.the_other_computer_doesn_t": "The other computer doesn’t allow choosing from here", + "receive.an_extra_screen_for_it": "An extra screen for it, shown here", + "receive.its_main_screen_shown_here": "Its main screen, shown here", + "receive.pick_mirror_or_extend_or": "Pick Mirror or Extend, or just press Open", + "receive.paused_nobody_watching": "Paused, nobody watching", + "receive.live": "Live", + "receive.live_view_only": "Live, view only", + "share.status_error": "{status}: {error}", + "share.starting_the_extra_screen": "Starting the extra screen…", + "share.on_name": "On {name}", + "share.waiting_for_name": "Waiting for {name}", + "share.ready_starts_when_name_opens": "Ready, starts when {name} opens it", + "share.virtual_display_size": "DuoDesk virtual display, {width} × {height}", + "share.mbps_sent": "{mbps} Mbps sent", + "share.mbps_sent_network_allows": "{mbps} Mbps sent, network allows {target}", + "share.receive_input_from_name": "Receive input from {name}", + "share.let_name_start_and_switch": "Let {name} start and switch this screen", + "share.extend": "Extend", + "share.mirror": "Mirror", + "share.same_as_the_other_screen": "Same as the other screen", + "share.1080p_1920_1080_fastest": "1080p (1920 × 1080), fastest", + "share.1440p_2560_1440_sharper": "1440p (2560 × 1440), sharper", + "share.full_size": "Full size", + "share.low_10_mbps": "Low, 10 Mbps", + "share.medium_20_mbps": "Medium, 20 Mbps", + "share.high_30_mbps": "High, 30 Mbps", + "share.best_50_mbps_wired": "Best, 50 Mbps (wired)", + "share.include_sound": "Include sound", + "share.receive_input": "Receive input", + "share.remote_start": "Remote start", + "share.let_the_other_computer_start": "Let the other computer start and switch this screen", + "share.display": "Display", + "share.size": "Size", + "share.install": "Install", + "share.remove": "Remove", + "share.duodesk_virtual_display": "DuoDesk virtual display", + "share.virtual_display_driver_not_installed": "Virtual display driver not installed. Install it to use Extend.", + "share.screen": "Screen", + "share.mode": "Mode", + "share.resolution": "Resolution", + "share.quality": "Quality", + "share.sound_and_control": "Sound and control", + "share.installing": "Installing…", + "share.installed_adds_the_extra_screen": "Installed. Adds the extra screen for Extend.", + "share.adds_an_extra_screen_for": "Adds an extra screen for Extend. Installs a display driver and asks for administrator rights once.", + "share.opening_the_screen_window_there": "Opening the screen window there starts sharing; Extend and Mirror can be switched from there.", + "terminal.as_user": "As {user}", + "terminal.set_up": "Set up", + "terminal.ssh_server": "SSH server", + "terminal.open_terminal": "Open Terminal", + "terminal.shell_on_name": "Shell on {name}", + "terminal.in_any_terminal": "In any terminal", + "terminal.let_name_open_a_terminal": "Let {name} open a terminal on {me}", + "terminal.open_a_terminal_on_name": "Open a terminal on {name} from {me}", + "terminal.waiting_for_name": "Waiting for {name}", + "terminal.asking_name": "Asking {name}…", + "terminal.ready": "Ready", + "terminal.not_available": "Not available", + "terminal.running": "Running", + "terminal.stopped": "Stopped", + "terminal.not_installed": "Not installed", + "terminal.asks_for_administrator_rights_once": "Asks for administrator rights once", + "terminal.not_ready_yet": "Not ready yet", + "terminal.set_up_the_ssh_server_first": "Set up the SSH server first", + "terminal.turn_on_remote_login_on": "Turn on Remote Login on {name}", + "terminal.set_up_the_ssh_server_on_name": "Set up the SSH server on {name}", + "phone.battery_charging": "Battery {battery}%, charging", + "phone.open_app_in_a_window": "Open {app} in a window (right-click to pin it to Start)", + "phone.downloaded_cant_read_notifications": "{prefix}The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay.", + "phone.downloaded_cant_read_notifications_wifi": "{prefix}The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay. Needs wireless debugging.", + "phone.wireless_debugging_full_control": "Wireless debugging: full control", + "phone.accessibility": "Accessibility", + "phone.duodesk_on_the_phone_taps_and_types": "DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth. No developer options", + "phone.address_port_optional": "Address:port (optional)", + "phone.pairing_address": "Pairing address", + "phone.or_type_it_on_the": "Or type it on the phone, in DuoDesk’s notification", + "phone.on_the_phone_settings_about": "On the phone: Settings › About phone › Software information › tap Build number 7 times. Developer options appear.", + "phone.settings_developer_options_turn_on": "Settings › Developer options: turn on USB debugging.", + "phone.on_the_same_page_turn": "On the same page, turn on Wireless debugging. The phone has to be on a Wi-Fi network (a direct Wi-Fi link alone isn’t enough).", + "phone.tap_wireless_debugging_pair_device": "Tap Wireless debugging › Pair device with pairing code, and type the code here, or in DuoDesk’s notification on the phone.", + "phone.that_s_all_after_pairing": "That’s all: after pairing once, DuoDesk turns wireless debugging on by itself.", + "phone.install": "Install", + "phone.notifications_from_the_phone": "Notifications from the phone", + "phone.phone_sound": "Phone sound", + "phone.data_saver_4_mb_s": "Data saver (4 Mb/s)", + "phone.balanced_8_mb_s": "Balanced (8 Mb/s)", + "phone.sharp_16_mb_s": "Sharp (16 Mb/s)", + "phone.sharpest_24_mb_s": "Sharpest (24 Mb/s)", + "phone.wallpaper": "Wallpaper", + "phone.arrow_keys_swipe": "Arrow keys swipe", + "phone.title_bar": "Title bar", + "phone.side_panel": "Side panel", + "phone.bottom_bar": "Bottom bar", + "phone.phone_sound_in_the_screen": "Phone sound in the screen window", + "phone.android_11_or_later": "Android 11 or later", + "phone.for_the_screen_window_and": "For the screen window and app windows", + "phone.window_controls": "Window controls", + "phone.title_bar_back_home_recents_and": "Title bar: Back, Home, Recents and the main ones up top. Side panel: those, volume, rotate, screenshot and more down the right of each phone window. Bottom bar: Back, Home and Recents under the picture", + "phone.in_whatsapp_instagram_and_telegram": "In WhatsApp, Instagram and Telegram, in a phone window or with this keyboard on the phone. Shift+Enter: a new line", + "phone.in_a_phone_window_up": "In a phone window: up and down through feeds, Reels and Shorts, left and right through pages. Off: they move the cursor", + "phone.show_the_phone_s_wallpaper": "Show the phone’s wallpaper here", + "phone.lets_duodesk_on_the_phone": "Lets DuoDesk on the phone read it (set up over wireless debugging)", + "phone.mouse_and_keyboard": "Mouse and keyboard", + "phone.push_the_pointer_off_the": "Push the pointer off the edge of the screen to use the phone. Double-tap the hotkey to come back.", + "phone.cursor_settings": "Cursor Settings", + "phone.ready": "Ready", + "phone.pair_once": "Pair once", + "phone.missing": "Missing", + "phone.click_the_phone_above_overview": "Click the phone above Overview to connect it.", + "phone.no_phone_connected_open_duodesk": "No phone connected. Open DuoDesk on the phone and pair it from Overview › Nearby.", + "phone.usb_cable": "USB cable", + "phone.hide": "Hide", + "phone.touch_blocked": "Touch blocked", + "phone.wireless_debugging_is_off_on": "Wireless debugging is off on the phone. The screen and ADB control need it; Accessibility doesn’t.", + "phone.the_screen_works_but_xiaomi_refuses": "The screen works, but Xiaomi refuses touch, mouse and keyboard from here. On the phone: Settings › Developer options › USB debugging (Security settings): on (it asks for a Mi account).", + "phone.the_phone_s_screen_touch": "The phone’s screen, touch, mouse and keyboard, and its clipboard in the background", + "phone.duodesk_pairs_with_the_phone": "DuoDesk pairs with the phone’s wireless debugging once. After that the phone’s screen, apps, mouse and keyboard work without this step.", + "phone.this_build_of_duodesk_doesn": "This build of DuoDesk doesn’t carry the Android app.", + "phone.automatic_accessibility_until_wireless_debugging": "Automatic: Accessibility until wireless debugging is ready", + "phone.duodesk_on_the_phone_taps": "DuoDesk on the phone taps and types itself. The phone asks once to allow it in Accessibility", + "phone.apps_open_in_their_own": "Apps open in their own windows once wireless debugging is set up.", + "phone.loading_the_phone_s_apps": "Loading the phone’s apps…", + "phone.phone_screen": "Phone screen", + "phone.mirror": "Mirror", + "setup.done": "Done", + "setup.fix": "Fix", + "setup.firewall_and_network": "Firewall and network", + "setup.not_running": "Not running", + "setup.mouse_and_keyboard_helper": "Mouse and keyboard helper", + "setup.install": "Install", + "setup.duodesk_virtual_display": "DuoDesk virtual display", + "setup.set_up_duodesk": "Set up DuoDesk", + "setup.a_few_things_before_me": "A few things before {me} can share with the other computer.", + "setup.you_can_change_these_later": "You can change these later in General and Display.", + "setup.skip_for_now": "Skip for now", + "setup.checking": "Checking…", + "setup.message_fix_asks_for_administrator": "{message} Fix asks for administrator rights once.", + "setup.status_restart_duodesk_if_it": "{status}. Restart DuoDesk if it stays like this.", + "setup.installing": "Installing…", + "setup.optional_adds_an_extra_screen": "Optional. Adds an extra screen for the other computer (Extend). Installs a display driver and asks for administrator rights once.", + "general.downloads": "Downloads", + "general.folder_missing_downloads_meanwhile": "{folder} isn’t there now: Downloads meanwhile. Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos", + "general.folder_files_sent_to": "{folder} · Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos", + "general.right_click_files_send_to": "Right-click files › Send to › {name} (DuoDesk)", + "general.start_with_windows": "Start with Windows", + "general.duodesk_waits_in_the_tray": "DuoDesk waits in the tray", + "general.change": "Change…", + "general.received_files": "Received files", + "general.show_a_popup_when_switching": "Show a popup when switching", + "general.check_again": "Check again", + "general.fix": "Fix", + "general.firewall": "Firewall", + "general.wake_from_the_network": "Wake from the network", + "general.let_the_other_computer_wake": "Let the other computer wake {me}", + "general.duodesk_in_send_to": "DuoDesk in Send to", + "general.mouse_and_keyboard_helper": "Mouse and keyboard helper", + "general.install": "Install", + "general.virtual_display_driver": "Virtual display driver", + "general.turn_off_bluetooth_on_wi": "Turn off Bluetooth on Wi-Fi connections", + "general.for_a_phone_or_computer": "For a phone or computer that isn’t on this network", + "general.location": "Location", + "general.to_join_a_phone_s": "To join a phone’s or computer’s Wi-Fi Direct (Windows shows Wi-Fi networks only with it)", + "general.computer_name": "Computer name", + "general.how_other_computers_see_this": "How other computers see this one", + "general.show_the_phone_s_wallpaper": "Show the phone’s wallpaper", + "general.on_its_tile_and_overview": "On its tile and Overview. DuoDesk on the phone reads it once wireless debugging is set up", + "general.now_playing": "Now playing", + "general.what_plays_on_the_phone": "What plays on the phone, with its controls", + "general.quick_actions": "Quick actions", + "general.wi_fi_bluetooth_torch_do": "Wi-Fi, Bluetooth, torch, Do not disturb and more, with volume and ringer", + "general.latest_notifications": "Latest notifications", + "general.the_newest_few_with_copy": "The newest few, with Copy for one-time codes", + "general.most_used_apps": "Most used apps", + "general.the_phone_s_most_used": "The phone’s most used apps this week", + "general.its_recent_items_while_clipboard": "Its recent items, while Clipboard is on", + "general.a_drop_zone_that_sends": "A drop zone that sends files to the device", + "general.startup": "Startup", + "general.appearance": "Appearance", + "general.when_the_mouse_and_keyboard": "When the mouse and keyboard move between devices", + "general.network_and_bluetooth": "Network and Bluetooth", + "general.permissions": "Permissions", + "general.this_computer": "This computer", + "general.checking": "Checking…", + "general.ok": "OK", + "general.needs_a_fix": "Needs a fix", + "general.changing": "Changing…", + "general.no_network_adapter_here_can": "No network adapter here can wake {me}", + "general.its_network_adapter_wakes_me": "Its network adapter wakes {me} on a magic packet. Asks for administrator rights to change it", + "general.shows_up_once_a_computer": "Shows up once a computer is paired", + "general.starting": "Starting…", + "general.not_running": "Not running", + "general.running": "Running", + "general.installing": "Installing…", + "general.installed": "Installed", + "general.not_installed": "Not installed", + "general.adds_the_extra_screen_for": "Adds the extra screen for Share screen › Extend", + "general.needed_for_share_screen_extend": "Needed for Share screen › Extend. Asks for administrator rights once", + "general.bluetooth_is_off_in_windows": "Bluetooth is off in Windows settings", + "general.this_pc_s_bluetooth_can": "This PC’s Bluetooth can’t do it (needs Bluetooth LE)", + "general.only_phones_on_this_network": "Only phones on this network or a USB cable connect", + "general.a_phone_nearby_connects_through": "A phone nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment", + "general.bluetooth_stays_on_beside_the": "Bluetooth stays on beside the Wi-Fi, the way back if it drops", + "general.off_now_the_session_is": "Off now: the session is on the same Wi-Fi. Bluetooth comes back when it ends", + "general.on_the_same_wi_fi": "On the same Wi-Fi network (not Wi-Fi Direct), Bluetooth goes off until the session ends. With a computer, phones can’t find this one meanwhile", + "general.only_computers_on_this_network": "Only computers on this network connect", + "general.a_computer_nearby_connects_through": "A computer nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment", + "general.not_supported": "Not supported", + "general.on": "On", + "general.unknown": "Unknown", + "kit.status": "Status", + "kit.display": "Display", + "kit.picture": "Picture", + "kit.speed": "Speed", + "kit.round_trip": "Round trip", + "kit.codec": "Codec", + "kit.decoder": "Decoder", + "kit.encoder": "Encoder", + "kit.delay": "Delay", + "kit.frames_dropped": "Frames dropped", + "kit.freezes": "Freezes", + "kit.details": "Details", + "kit.never": "never", + "kit.just_now": "just now", + "kit.seconds_ago": "{seconds} s ago", + "kit.minutes_ago": "{minutes} min ago", + "kit.hours_ago": "{hours} h ago", + "kit.coming_in_phase": "Coming in phase {phase}", + "kit.how_it_will_work": "How it will work", + "kit.settings_it_will_have": "Settings it will have", + "kit.hardware": "Hardware", + "kit.software": "Software", + "kit.hardware_name": "Hardware ({name})", + "kit.software_name": "Software ({name})", + "kit.this_pc": "This PC", + "kit.the_other_computer": "the other computer", + "kit.fastest": "Fastest", + "kit.smooth": "Smooth", + "kit.playback": "Playback", + "kit.even_motion_about_one_frame": "Even motion, about one frame later. The same on {name}", + "kit.each_frame_the_moment_it": "Each frame the moment it arrives. The same on {name}", + "kit.press_keys": "Press keys…", + "kit.lock_the_cursor": "Lock the cursor", + "kit.lock_key": "Lock key", + "kit.scroll_lock_or_f13_f24": "Scroll Lock or F13–F24 on its own, or a combination with Ctrl, Alt or Win", + "kit.cursor_lock": "Cursor lock", + "kit.keeps_pointer_one_computer": "Keeps the pointer on one computer, even when the mouse is plugged into another.", + "kit.keeps_pointer_one_computer_keys": "Keeps the pointer on one computer, even when the mouse is plugged into another. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "kit.pointer_stays_on_where": "The pointer stays on {where}: the screen edges don’t cross.", + "kit.pointer_stays_on_where_keys": "The pointer stays on {where}: the screen edges don’t cross. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "kit.keeps_pointer_on_where": "Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer.", + "kit.keeps_pointer_on_where_keys": "Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "kit.keyboard_and_mouse": "Keyboard and mouse", + "kit.on_me": "On {me}", + "kit.on_name": "On {name}", + "kit.name_is_using_me": "{Name} is using {me}", + "kit.sharing_off": "Sharing off", + "kit.locked_where": "Locked · {where}", + "kit.cursor_sharing_is_off_double_tap": "Cursor sharing is off. Double-tap {hotkey} to turn it on.", + "kit.cursor_sharing_is_off_over_bluetooth": "Cursor sharing is off over Bluetooth. It comes back on Wi-Fi, or double-tap {hotkey} to turn it on.", + "kit.waiting_for_name": "Waiting for {name}", + "kit.connected_to_name_double_tap": "Connected to {name}. Double-tap {hotkey} to turn cursor sharing off.", + "kit.double_tap_to_turn_cursor_off": "Double-tap {hotkey} to turn cursor sharing off", + "kit.double_tap_to_come_back": "Double-tap {hotkey} to come back and turn cursor sharing off", + "kit.double_tap_to_take_it_back": "Double-tap {hotkey} to take it back", + "kit.double_tap_hotkey": "Double-tap {hotkey}", + "start.duodesk_on_name_asks_to": "DuoDesk on {name} asks to pair with this Mac. Press Pair there, then compare the codes.", + "start.check_that_name_shows_the": "Check that {name} shows the same code.", + "start.name_is_on_the_usb": "{name} is on the USB cable. Click Allow to pair.", + "start.waiting_for_the_code": "Waiting for the code…", + "start.allowed_waiting_for_codes_match": "Allowed. Waiting for “Codes match” on {name}…", + "start.name_confirmed_the_code_click": "{name} confirmed the code. Click Allow if it matches.", + "start.ok": "OK", + "start.waiting_for_allow_on_name": "Waiting for Allow on {name}…", + "start.the_other_device": "the other device", + "start.moving_to_wifi_with_name": "Moving to Wi-Fi with {name}…", + "overview.starting_wifi_for": "Starting Wi-Fi for {name}…", + "start.switch_on_names_hotspot": "Switch on {name}’s hotspot", + "start.couldnt_move_to_wifi": "Couldn’t move to Wi-Fi", + "start.name_isnt_on_this_macs": "{name} isn’t on this Mac’s network. Its screen needs Wi-Fi: switch its hotspot on, then type its name and password here.", + "start.error_still_connected_over": "{error}. Still connected over Bluetooth.", + "start.name_isnt_on_this_network": "{name} isn’t on this network: a direct Wi-Fi link. This Mac is off its own Wi-Fi meanwhile.", + "start.name_isnt_on_this_network_files": "{name} isn’t on this network: a direct Wi-Fi link for the files. This Mac is off its own Wi-Fi meanwhile.", + "start.name_isnt_on_this_network_screen": "{name} isn’t on this network: a direct Wi-Fi link for the screen. This Mac is off its own Wi-Fi meanwhile.", + "overview.its_address": "Its address", + "overview.youre_using_name": "You’re using {name}", + "overview.name_is_using_me": "{name} is using {me}", + "overview.screen_recording": "Screen Recording", + "cursor.accessibility": "Accessibility", + "overview.input_monitoring": "Input Monitoring", + "overview.open_general": "Open General", + "overview.waiting_codes_match_on": "Waiting for “Codes match” on {name}…", + "overview.didnt_answer_is_duodesk_open": "{name} didn’t answer. Is DuoDesk open there?", + "overview.asked_to_pair_confirm_there": "Asked {name} to pair. Confirm there…", + "overview.perms_arent_allowed": "{list} aren’t allowed", + "overview.perm_isnt_allowed": "{list} isn’t allowed", + "overview.duodesk_needs_it_to_share": "DuoDesk needs it to share this Mac with the other computer. After an update, allow it again.", + "overview.allow_local_network_for_duodesk": "Allow Local Network for DuoDesk, or connect by address.", + "overview.open_other_to_connect": "Open DuoDesk on the other computer to connect.", + "overview.pick_above": "Pick a computer above, or connect by address.", + "overview.pair_with_a_computer_in": "Pair with a computer in Nearby.", + "cursor.use_here_control_there": "Use here, control there", + "cursor.let_it_control_this": "Let it control this computer", + "cursor.pinch_to_zoom_swipe_between": "Pinch to zoom, swipe between desktops, Mission Control / Task View, back and forward — done the native way on {name}. The same on both", + "cursor.reverse_scrolling_from_name": "Reverse scrolling from {name}", + "cursor.double_tap_the_hotkey": "Double-tap the hotkey to take everything back", + "cursor.pointer_speed_on_name": "Pointer speed on {name}", + "clipboard.send": "Send", + "clipboard.receive": "Receive", + "clipboard.options": "Options", + "clipboard.pics_taken_both_ways": "Pictures you copy and screenshots taken with ⌃⇧⌘4, up to 10 MB, both ways", + "clipboard.pics_taken_no_ble": "Pictures you copy and screenshots taken with ⌃⇧⌘4, up to 10 MB, both ways. Not over Bluetooth", + "clipboard.turned_off_on_name": "Turned off on {name}.", + "clipboard.last_copy_not_sent": "Last copy not sent: {last}.", + "files.share_a_folder": "Share a folder", + "files.accept_files": "Accept files", + "files.accept_files_from": "Accept files from {name}", + "files.connect_the_shared_folder": "Connect the shared folder", + "files.show_in_finder": "Show in Finder", + "files.save_to": "Save to", + "files.downloads": "Downloads", + "files.they_go_to_the_other": "They go to the other computer’s Downloads", + "files.select_files_in_finder_first": "Select files in Finder first", + "files.arriving_files": "Arriving files", + "files.select_files_press_copy_then": "Select files, press {copy}, then {paste} on {name}", + "files.name_copied_file_press_keys": "{name} copied {file} · press {keys}", + "files.name_copied_count_items_press": "{name} copied {count} items · press {keys}", + "files.into_the_app_in_front": "Into the app in front (a chat, a mail…), or the Finder folder in front, else the Desktop", + "files.waiting_for_your_password": "Waiting for your password…", + "files.couldnt_share_error": "Couldn’t share: {error}", + "files.in_finders_sidebar": "In Finder’s sidebar", + "files.couldnt_connect_error": "Couldn’t connect: {error}", + "files.waiting_for_name_share_folder": "Waiting for {name} to share a folder", + "files.receiving_name_percent": "Receiving {name} {percent}%", + "files.sending_name_percent": "Sending {name} {percent}%", + "files.failed_error": "Failed: {error}", + "files.show": "Show", + "general.to_share_your_screen": "To share your screen", + "general.so_the_other_computer_can": "So the other computer can control this one", + "general.to_use_this_keyboard_on": "To use this keyboard on the other computer", + "general.local_network": "Local Network", + "general.to_find_your_other_computers": "To find your other computers and phones", + "general.to_join_a_phones_or": "To join a phone’s or PC’s Wi-Fi Direct (macOS shows Wi-Fi networks only with it)", + "general.full_disk_access": "Full Disk Access", + "general.optional_to_share_any_folder": "Optional: to share any folder with the other computer", + "general.background_helper": "Background helper", + "general.open_at_login": "Open at login", + "general.keep_the_display_awake": "Keep the display awake", + "general.let_name_wake_me": "Let {name} wake {me}", + "general.turn_off_bluetooth_on_wifi": "Turn off Bluetooth on Wi-Fi connections", + "general.duodesk_in_the_share_menu": "DuoDesk in the Share menu", + "general.share_duodesk_sends_files_to": "Share › DuoDesk sends files to the other computer", + "general.extensions": "Extensions…", + "general.show_the_phones_wallpaper": "Show the phone’s wallpaper", + "general.wifi_bluetooth_torch_do_not": "Wi-Fi, Bluetooth, torch, Do not disturb and more, with volume and ringer", + "general.the_phones_most_used_apps": "The phone’s most used apps this week", + "general.while_connected": "While connected", + "general.changed_a_permission": "Changed a permission?", + "general.restart_to_apply_it": "Restart to apply it", + "general.restart": "Restart", + "general.allowed_by_accessibility": "Allowed by Accessibility", + "general.allowed": "Allowed", + "general.not_allowed": "Not allowed", + "general.wake_for_network_access_asks": "Wake for network access. Asks for your password to change it", + "general.on_the_same_wifi_network_not": "On the same Wi-Fi network (not Wi-Fi Direct), Bluetooth goes off until the session ends. With a computer, phones can’t find this one meanwhile", + "general.bluetooth_is_off": "Bluetooth is off", + "general.allow_duodesk_in_system_settings": "Allow DuoDesk in System Settings › Privacy & Security › Bluetooth", + "general.this_mac_cant_advertise_over": "This Mac can’t advertise over Bluetooth", + "general.phones_nearby_connect_over_bluetooth": "Phones nearby connect over Bluetooth. Files and screens move to a direct Wi-Fi link for a while", + "general.pcs_nearby_connect_over_bluetooth": "PCs nearby connect over Bluetooth. Files and screens move to a direct Wi-Fi link for a while", + "display.starting": "Starting…", + "display.waiting_for_name_ellipsis": "Waiting for {name}…", + "display.live": "Live", + "display.ready_starts_when_name_opens": "Ready — starts when {name} opens it", + "display.waiting_for_wifi": "Waiting for Wi-Fi", + "display.waiting_for_name": "Waiting for {name}", + "display.no_display_to_share": "No display to share", + "display.retrying": "Retrying…", + "display.closed": "Closed", + "display.something_went_wrong_in_the": "Something went wrong in the background. Restart DuoDesk.", + "display.extend": "Extend", + "display.mirror": "Mirror", + "display.mode": "Mode", + "display.display": "Display", + "display.virtual_display": "Virtual display", + "display.apply": "Apply", + "display.duodesk_virtual_display": "DuoDesk virtual display", + "display.size": "Size", + "display.1080p_fastest": "1080p, fastest", + "display.1440p_sharper": "1440p, sharper", + "display.full_size": "Full size", + "display.low_10_mbps": "Low, 10 Mbps", + "display.medium_20_mbps": "Medium, 20 Mbps", + "display.high_30_mbps": "High, 30 Mbps", + "display.best_50_mbps_wired": "Best, 50 Mbps (wired)", + "display.max_80_mbps_wired": "Max, 80 Mbps (wired)", + "display.remote_start": "Remote start", + "display.let_name_start_and_switch": "Let {name} start and switch this screen", + "display.open_it_on_name_no": "Open it on {name} — no need to touch {me}", + "display.share_sound_with_the_screen": "Share sound with the screen", + "display.include_sound": "Include sound", + "display.receive_input": "Receive input", + "display.let_name_use_me_in": "Let {name} use {me} in its window", + "display.status": "Status", + "display.picture": "Picture", + "display.speed": "Speed", + "display.round_trip": "Round trip", + "display.codec": "Codec", + "display.encoder": "Encoder", + "display.encode_time": "Encode time", + "display.screen": "Screen", + "display.resolution": "Resolution", + "display.quality": "Quality", + "display.sound_and_control": "Sound and control", + "display.details": "Details", + "display.shows_the_duodesk_virtual_display": "Shows the DuoDesk virtual display", + "display.shows_mes_main_screen": "Shows {me}’s main screen", + "display.label_main": "{label} (main)", + "display.couldnt_create_it_error": "Couldn’t create it: {error}", + "display.on_width_height_pixelwidth_pixelheight": "On, {width} × {height} ({pixelWidth} × {pixelHeight} px)", + "display.on_width_height": "On, {width} × {height}", + "display.on_while_sharing": "On while sharing", + "display.mbps_of_target": "{mbps} Mbps of {target}", + "display.mbps": "{mbps} Mbps", + "display.ms_limited_by": "{ms} ms · limited by {limit}", + "display_pc.stopped_on_the_other_computer": "Stopped on the other computer", + "display_pc.open_full_screen": "Open full screen", + "display_pc.control_it": "Control it", + "display_pc.control_name_from_its_window": "Control {name} from its window", + "display_pc.screen_window": "Screen window", + "display_pc.name_shares": "{name} shares", + "display_pc.frame_generation": "Frame generation", + "display_pc.fills_in_late_or_dropped": "Fills in late or dropped frames, and adds in-between frames when this screen is faster than the stream", + "display_pc.decoder": "Decoder", + "display_pc.delay": "Delay", + "display_pc.smoothness": "Smoothness", + "display_pc.ctrl_f_switches": "Ctrl ⌘ F switches", + "display_pc.connect_to_choose_from_here": "Connect to choose from here", + "display_pc.update_duodesk_on_the_other": "Update DuoDesk on the other computer to choose from here", + "display_pc.the_other_computer_doesnt_allow": "The other computer doesn’t allow choosing from here", + "display_pc.an_extra_screen_for_it": "An extra screen for it, shown here", + "display_pc.its_main_screen_shown_here": "Its main screen, shown here", + "display_pc.pick_mirror_or_extend_or": "Pick Mirror or Extend — or just press Open", + "display_pc.showing_name": "Showing {name}", + "display_pc.open_starts_it_on_name": "Open starts it on {name}", + "display_pc.choose_what_to_share_in": "Choose what to share in DuoDesk on {name}", + "display_pc.ms_buffer_ms_decode": "{buffer} ms buffer · {decode} ms decode", + "control.this_mac": "This Mac", + "control.the_other_computer": "the other computer", + "control.fastest": "Fastest", + "control.smooth": "Smooth", + "control.playback": "Playback", + "control.even_motion_about_one_frame": "Even motion, about one frame later. The same on {name}", + "control.each_frame_the_moment_it": "Each frame the moment it arrives. The same on {name}", + "control.coming_in_phase": "Coming in phase {phase}", + "control.from_from_to_to": "From {from} to {to}", + "control.press_keys": "Press keys…", + "control.lock_the_cursor": "Lock the cursor", + "control.lock_key": "Lock key", + "control.f13_f24_on_its_own": "F13–F24 on its own (a PC keyboard’s Scroll Lock is F14), or a combination with ⌃, ⌥ or ⌘", + "control.cursor_lock": "Cursor lock", + "control.keeps_the_pointer_on_one_key": "Keeps the pointer on one computer, even when the mouse is plugged into another. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "control.keeps_the_pointer_on_one": "Keeps the pointer on one computer, even when the mouse is plugged into another.", + "control.the_pointer_stays_on_where_key": "The pointer stays on {where}: the screen edges don’t cross. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "control.the_pointer_stays_on_where": "The pointer stays on {where}: the screen edges don’t cross.", + "control.keeps_the_pointer_on_where_key": "Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "control.keeps_the_pointer_on_where": "Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer.", + "control.macos_is_blocking_the_mouse": "macOS is blocking the mouse and keyboard. Allow Accessibility and Input Monitoring in General, then restart.", + "control.cursor_sharing_is_off_double": "Cursor sharing is off. Double-tap {hotkey} to turn it on.", + "control.cursor_sharing_is_off_over": "Cursor sharing is off over Bluetooth. It comes back on Wi-Fi, or double-tap {hotkey} to turn it on.", + "control.waiting_for_name": "Waiting for {name}.", + "control.youre_using_name_double_tap": "You’re using {name}. Double-tap {hotkey} to come back and turn cursor sharing off.", + "control.name_is_using_me_double": "{name} is using {me}. Double-tap {hotkey} to take it back.", + "control.connected_to_name_double_tap": "Connected to {name}. Double-tap {hotkey} to turn cursor sharing off.", + "control.never": "never", + "control.just_now": "just now", + "control.n_s_ago": "{n} s ago", + "control.n_min_ago": "{n} min ago", + "control.n_h_ago": "{n} h ago", + "files.sending_files_to_one": "Sending {count} file to {name}", + "files.sending_files_to_other": "Sending {count} files to {name}", + "display_pc.dropped_freezes": "{dropped} dropped · {freezes} freezes", + "display_pc.dropped_freezes_frame_generation": "{dropped} dropped · {freezes} freezes · frame generation on", + "overview.hotspot_password": "Hotspot password", + "overview.fw_blocks_here": "The firewall blocks DuoDesk here: Fix firewall above.", + "files.select_file_manager_first": "Select files in the file manager first", + "files.to_the_or_right_click": "To {the}, or right-click files › Send to in the file manager", + "files.select_files_press": "Select files, press {copy}, then {paste} on {the}", + "files.peer_copied_press": "{them} copied {what} · press {keys}", + "files.n_items": "{count} items", + "files.paste_into_app_front": "Into the app in front (a chat, a mail…), or the file manager folder in front, else {folder}", + "files.from_the_wayland_hint": "From {the}: drop on a folder or the desktop. From here: needs an Xorg session", + "files.drag_edge_drop_folder": "Drag through the screen edge. Here, drop on a folder or the desktop", + "files.in_file_manager_sidebar": "In the file manager’s sidebar", + "files.setting_up_samba": "Setting up Samba…", + "files.folder_shares_samba": "{folder} · Shares it with Samba (asks for your password once)", + "files.sending_name_idx": "Sending {name} ({idx} of {count})", + "files.sent_of_size": "{sent} of {size}", + "files.sent_of_size_queued": "{sent} of {size} · {queued} more waiting", + "about.kernel": "Kernel", + "about.whats_new": "What’s New", + "about.dont_skip": "Don’t skip", + "about.open_an_issue_on": "Open an issue on GitHub", + "about.version_number": "Version {version}", + "about.version_available_skipped": "{version} is available (skipped)", + "about.version_available": "{version} is available", + "about.couldnt_check": "Couldn’t check: {error}", + "about.you_have_download_linux": "You have {version}. Download {file}", + "about.you_have_opens_release_linux": "You have {version}. Opens the release page", + "about.version_no_releases_yet": "Version {version}. No releases published yet", + "general.desktop_session": "Desktop session", + "general.input_access": "Input access", + "general.keep_wifi_while_hosting_wifi": "Keep Wi-Fi while hosting Wi-Fi Direct", + "general.set_up": "Set up", + "general.steadier_bluetooth_links": "Steadier Bluetooth links", + "general.starts_in_the_tray": "Starts in the tray", + "general.quit": "Quit", + "general.quit_duodesk": "Quit DuoDesk", + "general.stops_sharing_until_you_open": "Stops sharing until you open it again", + "general.folder_isnt_there_now_downloads": "{folder} isn’t there now: Downloads meanwhile. Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos", + "general.folder_files_sent_to_me": "{folder} · Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos", + "general.no_wired_network_adapter_here": "No wired network adapter here can wake {me}", + "general.its_wired_network_adapter_wakes": "Its wired network adapter wakes {me} on a magic packet. Asks for your password to change it", + "general.input_through_method": "input through {method}", + "general.partly": "Partly", + "general.reads_the_mouse_and_keyboard": "Reads the mouse and keyboard for crossing; injects through uinput", + "general.can_be_controlled_but_cant": "Can be controlled, but can’t read the mouse and keyboard to cross over (log out and back in after Fix)", + "general.needed_to_share_the_mouse": "Needed to share the mouse and keyboard on Wayland. Asks for your password once", + "general.needs_the_helper_running": "Needs the helper running", + "general.bluetooth_is_off_in_this": "Bluetooth is off in this computer’s settings", + "general.this_computers_bluetooth_cant_do": "This computer’s Bluetooth can’t do it (needs Bluetooth LE and BlueZ)", + "general.a_phone_nearby_connects_through_linux": "A phone nearby connects through Bluetooth; files and screens switch to Wi-Fi for a moment", + "general.a_computer_nearby_connects_through_linux": "A computer nearby connects through Bluetooth; files and screens switch to Wi-Fi for a moment", + "general.waiting_for_your_password": "Waiting for your password…", + "general.setup_didnt_work": "Setup didn’t work: {error}", + "general.a_phone_or_mac_busy_with": "A phone or Mac busy with Wi-Fi for a moment stays connected (5 s before a Bluetooth link counts as lost, not 0.4 s). Asks for your password once", + "general.hosting_wifi_direct_takes_this": "Hosting Wi-Fi Direct takes this computer off its Wi-Fi network until it ends", + "general.wifi_direct_runs_on_a_second": "Wi-Fi Direct runs on a second interface beside this computer’s Wi-Fi network, which stays connected", + "general.not_set_up_the_password_prompt": "Not set up: the password prompt was cancelled. Until it is, hosting takes this computer off its Wi-Fi network", + "general.this_wifi_adapter_can_host": "This Wi-Fi adapter can host beside its network. Asks for your password once (the first time it’s needed, or Set up)", + "general.off": "Off", + "general.idle": "Idle", + "kit.s_ago": "{n} s ago", + "kit.min_ago": "{n} min ago", + "kit.h_ago": "{n} h ago", + "kit.kind_phone": "Phone", + "kit.this_computer": "This computer", + "kit.scroll_lock_or_f13_f24_linux": "Scroll Lock or F13–F24 on its own, or a combination with Ctrl, Alt or Super", + "kit.while_the_pointer_is_on": "While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).", + "kit.keeps_the_pointer_on_one": "Keeps the pointer on one computer, even when the mouse is plugged into another.", + "kit.the_pointer_stays_on": "The pointer stays on {where}: the screen edges don’t cross.", + "kit.keeps_the_pointer_on_where": "Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer.", + "kit.cursor_sharing_is_off_double": "Cursor sharing is off. Double-tap {key} to turn it on.", + "kit.cursor_sharing_is_off_over": "Cursor sharing is off over Bluetooth. It comes back on Wi-Fi, or double-tap {key} to turn it on.", + "kit.waiting_for_the": "Waiting for {the}", + "kit.connected_to_name_double_tap_linux": "Connected to {name}. Double-tap {key} to turn cursor sharing off.", + "kit.double_tap_key_to_turn": "Double-tap {key} to turn cursor sharing off", + "kit.double_tap_key_to_come": "Double-tap {key} to come back and turn cursor sharing off", + "kit.double_tap_key_to_take": "Double-tap {key} to take it back", + "kit.double_tap_key": "Double-tap {key}", + "pair.banner_ask_hint_computer": "DuoDesk on {name} asks to pair with this computer. Press Pair there, then compare the codes.", + "pair.connecting_to": "Connecting to {address}…", + "pair.waiting_for": "Waiting for {name}…", + "pair.check_code_match": "Check that {name} shows the same code, then click Codes match.", + "pair.waiting_for_allow": "Waiting for Allow on {name}…", + "pair.usb_cable_allow": "{name} is on the USB cable. Click Allow to pair.", + "pair.waiting_for_the_code": "Waiting for the code…", + "pair.check_code_allow": "Check that {name} shows the same code, then click Allow.", + "app.phase_number": "Phase {phase}", + "app.not_on_linux_yet": "Not on Linux yet", + "app.from_to": "{from} to {to}", + "app.name_on_me": "{Name} on {me}", + "kit.name_on_me": "{name} on {me}", + "kit.me_on_name": "{me} on {name}", + "about.you_have_download_mac": "You have {version}. Download {file}", + "about.you_have_opens_release_mac": "You have {version}. Opens the release page", + "apps.share_apps": "Share apps", + "apps.open_mes_apps_on": "Open {me}’s apps on {name}", + "apps.open_there_now": "Open there now", + "apps.show_apps_here": "Show apps here", + "apps.open_names_apps_on": "Open {name}’s apps on {me}", + "apps.open_here_now": "Open here now", + "apps.names_apps": "{Name}’s apps", + "apps.couldnt_open": "Couldn’t open: {error}", + "apps.open_app_on": "Open {app} on {name}", + "apps.opening": "Opening…", + "apps.failed": "Failed", + "apps.add_to_the_dock": "Add {app} to the Dock", + "apps.loading_names_apps": "Loading {name}’s apps…", + "apps.no_apps_yet_press_refresh": "No apps yet. Press Refresh.", + "apps.screen_sharing_turns_on_while": "Screen sharing turns on while an app is open", + "apps.needs_accessibility_general": "Needs Accessibility (General)", + "apps.windows_one": "{count} window", + "apps.windows_other": "{count} windows", + "apps.nothing_open": "Nothing open", + "apps.apps_one": "{count} app", + "apps.apps_other": "{count} apps", + "audio.send_sound": "Send sound", + "audio.mute_while_sending": "Mute while sending", + "audio.play_sound_here": "Play sound here", + "audio.play_mes_sound_on": "Play {me}’s sound on {name}", + "audio.play_names_sound_on": "Play {name}’s sound on {me}", + "audio.playing_with_the_screen": "Playing with the screen", + "audio.cant_capture_sound": "Can’t capture sound: {error}", + "keyboard.works_as_ctrl_so_c": "⌘ works as Ctrl, so ⌘C copies there", + "keyboard.ctrl_works_as": "Ctrl works as ⌘", + "keyboard.so_ctrl_c_copies_here": "So Ctrl+C copies here", + "mount.phone_in_finder": "Phone in Finder", + "mount.show_the_phone_in_finder": "Show the phone in Finder", + "mount.finder": "Finder", + "mount.adb_developer_options_off": "Mount works through ADB, and Developer options are off on the phone. Switch on Developer options and Wireless debugging (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.adb_wireless_debugging_off": "Mount works through ADB, and wireless debugging is off on the phone. Switch it on (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.in_finder_via_cable": "In Finder under Locations (through the cable).", + "mount.in_finder_via_wireless": "In Finder under Locations (over wireless debugging).", + "notifs.send_notifications": "Send notifications", + "notifs.show_mes_notifications_on": "Show {me}’s notifications on {name}", + "notifs.allow_full_disk_access": "Allow Full Disk Access", + "notifs.click_or_drag_duodesk_into": "Click +, or drag DuoDesk into the list", + "notifs.show_notifications_here": "Show notifications here", + "notifs.show_names_notifications_on": "Show {name}’s notifications on {me}", + "notifs.needs_full_disk_access": "Needs Full Disk Access", + "notifs.count_sent": "{count} sent", + "notifs.count_shown": "{count} shown", + "notifs.as_native_notifications_from_duodesk": "As native notifications, from DuoDesk", + "notifs.apps_show_up_here_after_mac": "Apps show up here after their first notification", + "phone.duodesk_on_the_phone_taps_mac": "DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth. No developer options", + "phone.thats_all_after_pairing_once": "That’s all: after pairing once, DuoDesk turns wireless debugging on by itself.", + "phone.open_on_this_mac": "Open on this Mac", + "phone.return_sends_messages": "Return sends messages", + "phone.in_whatsapp_instagram_and_telegram_in": "In WhatsApp, Instagram and Telegram, in a phone window or with this keyboard on the phone. ⇧Return: a new line", + "phone.show_the_phones_wallpaper_here": "Show the phone’s wallpaper here", + "phone.push_the_pointer_off_the_edge": "Push the pointer off the edge of the screen to use the phone. Double-tap the hotkey to come back.", + "phone.click_the_phone_above_overview_to": "Click the phone above Overview to connect it.", + "phone.android_version": "Android {version}", + "phone.wireless_debugging_is_off_on_the": "Wireless debugging is off on the phone. The screen and ADB control need it; Accessibility doesn’t.", + "phone.the_phones_screen_touch_mouse_and": "The phone’s screen, touch, mouse and keyboard, and its clipboard in the background", + "phone.duodesk_pairs_with_the_phones_wireless": "DuoDesk pairs with the phone’s wireless debugging once. After that the phone’s screen, apps, mouse and keyboard work without this step.", + "phone.this_build_of_duodesk_doesnt": "This build of DuoDesk doesn’t carry the Android app.", + "phone.the_duodesk_you_downloaded_cant": "The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay.", + "phone.the_duodesk_you_downloaded_cant_wd": "The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay. Needs wireless debugging.", + "phone.automatic_accessibility_until_wireless": "Automatic: Accessibility until wireless debugging is ready", + "phone.duodesk_on_the_phone_taps_asks_once": "DuoDesk on the phone taps and types itself. The phone asks once to allow it in Accessibility", + "phone.apps_open_in_their_own_windows": "Apps open in their own windows once wireless debugging is set up.", + "phone.loading_the_phones_apps": "Loading the phone’s apps…", + "phone.open_app_in_a_window_mac": "Open {app} in a window (right-click to add it to the Dock)", + "setup.screen_recording": "Screen Recording", + "setup.to_share_this_macs_screen": "To share this Mac’s screen", + "setup.accessibility": "Accessibility", + "setup.so_the_other_computer_can": "So the other computer can control this Mac", + "setup.input_monitoring": "Input Monitoring", + "setup.to_use_this_keyboard_on": "To use this keyboard on the other computer", + "setup.local_network": "Local Network", + "setup.to_find_your_other_computers": "To find your other computers", + "setup.allowed": "Allowed", + "setup.macos_needs_your_ok_for": "macOS needs your OK for a few things.", + "setup.restart_duodesk": "Restart DuoDesk", + "setup.allowed_by_accessibility": "Allowed by Accessibility", + "terminal.open_shells_there": "Open shells there", + "terminal.open_shells_on_name_from": "Open shells on {name} from {me}", + "terminal.in_terminal": "In Terminal", + "terminal.allow_shells_here": "Allow shells here", + "terminal.let_name_open_shells_on": "Let {name} open shells on {me}", + "terminal.remote_login": "Remote Login", + "terminal.waiting_for_name_ellipsis": "Waiting for {name}…", + "terminal.set_up_the_ssh_server_in": "Set up the SSH server in DuoDesk on {name}", + "terminal.the_terminal_doesnt_work_over": "The terminal doesn’t work over Bluetooth. Connect with Wi-Fi Direct, or join {name}’s network.", + "terminal.ready_signed_in_as": "Ready, signed in as {user}", + "terminal.not_ready": "Not ready: {reason}", + "terminal.turn_on_terminal_in_duodesk": "Turn on Terminal in DuoDesk on {name}", + "terminal.on": "On", + "terminal.off_turn_it_on_in": "Off. Turn it on in Sharing settings.", + "apps.name_s_apps": "{name}’s apps", + "apps.count_open_here": "{count} open here", + "apps.count_open_on_name": "{count} open on {name}", + "apps.needs_an_xorg_session_wayland": "Needs an Xorg session: Wayland doesn’t let apps show other apps’ windows", + "apps.add_to_the_app_menu": "Add to the app menu", + "apps.add_app_to_the_app": "Add {app} to the app menu", + "keyboard.double_tap_to_type_on_linux": "Double-tap to type on {the} and back", + "keyboard.hotkey_on_the": "Hotkey on {the}", + "keyboard.set_in_duodesk_on_the": "Set in DuoDesk on {the}", + "mount.show_the_phone_in_the": "Show the phone in the file manager", + "mount.dev_options_off": "Mount works through ADB, and Developer options are off on the phone. Switch on Developer options and Wireless debugging (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.wireless_off": "Mount works through ADB, and wireless debugging is off on the phone. Switch it on (Connection), or plug the phone in with USB debugging on. Phone Files works without it.", + "mount.sidebar_cable": "In the file manager’s sidebar, through the cable.", + "mount.sidebar_wireless": "In the file manager’s sidebar, over wireless debugging.", + "notifs.as_desktop_notifications_from_duodesk": "As desktop notifications, from DuoDesk", + "notifs.can_t_read_this_desktop": "Can’t read this desktop’s notifications (dbus-monitor missing)", + "phone.accessibility_tooltip": "DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth. No developer options", + "phone.open_on_this_computer": "Open on this computer", + "phone.the_screen_works_but_xiaomi": "The screen works, but Xiaomi refuses touch, mouse and keyboard from here. On the phone: Settings › Developer options › USB debugging (Security settings): on (it asks for a Mi account).", + "phone.full_app_ready": "The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay.", + "phone.full_app_needs_adb": "The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay. Needs wireless debugging.", + "phone.accessibility_hint": "DuoDesk on the phone taps and types itself. The phone asks once to allow it in Accessibility", + "phone.open_app_in_a_window_linux": "Open {app} in a window", + "receive.status": "Status", + "receive.display": "Display", + "receive.speed": "Speed", + "receive.round_trip": "Round trip", + "receive.codec": "Codec", + "receive.decoder": "Decoder", + "receive.delay": "Delay", + "receive.frames_dropped": "Frames dropped", + "receive.freezes": "Freezes", + "receive.fills_in_late_or_dropped": "Fills in late or dropped frames, and adds in-between frames when this screen is faster than the stream", + "receive.waiting_for_the": "Waiting for {the}", + "receive.sharing_on_the_open_to": "Sharing on {the}. Open to watch.", + "receive.open_starts_sharing_on_the": "Open starts sharing on {the}", + "receive.turn_on_sharing_on_the": "Turn on sharing on {the}", + "receive.mbps_mbps_received": "{mbps} Mbps received", + "setup.desktop_session": "Desktop session", + "setup.input_access": "Input access", + "setup.firewall": "Firewall", + "setup.you_can_change_these_later_linux": "You can change these later in General.", + "setup.no_desktop": "No desktop", + "setup.no_x11_or_wayland_display": "No X11 or Wayland display found. Start DuoDesk from your desktop.", + "setup.wayland_lets_duodesk_share_the": "Wayland lets DuoDesk share the mouse and keyboard through /dev/uinput and /dev/input. Fix sets that up once (asks for your password); then log out and back in.", + "setup.message_fix_lets_ports_port": "{message} Fix lets ports {port} and {discovery} in (asks for your password).", + "setup.helper_restart_duodesk_if_it": "{helper}. Restart DuoDesk if it stays like this.", + "share.status": "Status", + "share.speed": "Speed", + "share.round_trip": "Round trip", + "share.codec": "Codec", + "share.encoder": "Encoder", + "share.frames_dropped": "Frames dropped", + "share.on_the": "On {the}", + "share.waiting_for_the": "Waiting for {the}", + "share.ready_starts_when_the_opens": "Ready, starts when {the} opens it", + "share.virtual_monitor_width_height": "Virtual monitor, {width} × {height}", + "share.sent_network_allows": "{mbps} Mbps sent, network allows {target}", + "share.mbps_mbps_sent": "{mbps} Mbps sent", + "share.receive_input_from_them": "Receive input from {them}", + "share.let_the_start_and_switch": "Let {the} start and switch this screen", + "share.adds_an_extra_screen_for_linux": "Adds an extra screen for Extend by switching on a spare display output. Installs a small helper and asks for your password once.", + "share.extend_isn_t_available_on": "Extend isn’t available on this desktop.", + "share.wayland_asks_extend": "Wayland: your desktop asks which screen to share each time sharing starts, choose “Virtual remote monitor”.", + "share.wayland_asks": "Wayland: your desktop asks which screen to share each time sharing starts.", + "share.input_from_the_needs_input": "Input from {the} needs input access (General).", + "terminal.installs_and_starts_openssh_asks": "Installs and starts OpenSSH. Asks for your password once", + "terminal.set_up_ssh_first": "Set up the SSH server first", + "terminal.set_up_the_ssh_server": "Set up the SSH server on {name}", + "tray.connect_to": "Connect To", + "tray.nobody_nearby": "Nobody nearby", + "tray.connect_by_address": "Connect by Address…", + "tray.look_again": "Look Again", + "tray.open_duodesk": "Open DuoDesk…", + "tray.quit": "Quit DuoDesk", + "tray.bring_back": "Bring Mouse and Keyboard Back", + "tray.cursor_sharing": "Cursor Sharing", + "tray.mouse_keyboard": "Mouse and Keyboard", + "tray.share_keyboard": "Share Keyboard", + "tray.popup_switching": "Show a Popup When Switching", + "tray.screen": "Screen", + "tray.clipboard_sound": "Clipboard and Sound", + "tray.share_clipboard": "Share Clipboard", + "tray.send_sound": "Send Sound", + "tray.files": "Files", + "tray.drag_files": "Drag Files Across the Screen Edge", + "tray.connection": "Connection", + "tray.open_log": "Open Log Folder", + "tray.share_screen": "Share Screen", + "tray.receive_screen": "Receive Screen", + "tray.lock_cursor_on": "Lock Cursor on {name} ({keys})", + "tray.use_mk_on": "Use Mouse and Keyboard on {name}", + "tray.let_control": "Let {name} Control {me}", + "tray.copy_paste_files": "Copy and Paste Files ({copy}, {paste})", + "tray.disconnect_name": "Disconnect {name}", + "tray.download_version": "Download DuoDesk {version}…", + "tray.version_available": "DuoDesk {version} available…", + "tray.take_over_name": "Take Over {name}", + "tray.connect_to_name": "Connect to {name}", + "tray.connected_to": "Connected to {name}", + "tray.disconnected": "Disconnected", + "tray.pair_again": "Pair again", + "tray.continue_from": "Continue {title} from {name}", + "tray.send_to": "Send {title} to {name}", + "mac_notifs.copy_code": "Copy {code}", + "dialog.choose_files": "Choose files", + "dialog.open": "Open", + "dialog.choose_folder": "Choose folder", + "dialog.select_folder": "Select Folder", + "firewall.no_network": "No network connection.", + "firewall.network_public": "The network \"{network}\" is Public, so Windows blocks {name}’s broadcasts.", + "firewall.rule_blocks": "A Windows Firewall rule blocks DuoDesk.", + "firewall.not_allowed_network": "DuoDesk isn’t allowed through Windows Firewall on this network.", + "firewall.check_failed": "Couldn’t check the firewall: {error}", + "firewall.admin_declined": "Not fixed: the administrator prompt was declined", + "firewall.not_fixed": "Not fixed: {error}", + "firewall.firewalld_allows": "firewalld lets DuoDesk in", + "firewall.firewalld_blocks": "firewalld blocks DuoDesk.", + "firewall.no_firewall": "No firewall is on", + "terminal.remote_login_off": "Remote Login is off on {name} (System Settings → General → Sharing).", + "terminal.sshd_off": "The SSH server isn’t running on {name} (its Terminal tab → Set up).", + "terminal.not_allowed": "{Name} doesn’t allow shells from {me} (its Terminal tab).", + "terminal.unavailable_bluetooth": "The terminal doesn’t work over Bluetooth. Connect with Wi-Fi Direct, or join {name}’s network.", + "terminal.no_terminal_app": "No terminal app found. Run ssh duodesk in any terminal.", + "terminal.could_not_open_terminal": "Couldn’t open {app}: {error}", + "vdd.check_failed": "Couldn’t check the display driver: {error}", + "vdd.admin_declined": "The administrator prompt was declined", + "vdd.arm_unsupported": "Extend isn’t available on Windows on ARM yet: Windows there accepts only Microsoft-signed display drivers, and the virtual display driver’s ARM64 build isn’t one (Virtual-Display-Driver#465)", + "vdd.install_failed": "Installing the display driver failed: {error}", + "vdd.switch_failed": "Couldn’t switch the virtual monitor: {error}", + "updates.notif_available_title": "DuoDesk {version} is available", + "updates.notif_manual_body": "Click to view update details.", + "updates.notif_available_body": "You have {current}. Click to view update details and release notes.", + "updates.could_not_reach_github": "Couldn’t reach GitHub", + "appview.title": "App — DuoDesk", + "appview.connecting": "Connecting…", + "appview.reconnecting": "Reconnecting…", + "appview.could_not_show": "Could not show the window: {error}", + "phoneview.title": "Phone", + "phoneview.connecting": "Connecting to the phone…", + "phoneview.controls_toggle": "Show or hide the phone controls", + "phoneview.fullscreen": "Fullscreen", + "phoneview.fullscreen_f11": "Fullscreen (F11)", + "phoneview.panel_aria": "Phone controls", + "phoneview.navbar_aria": "Phone navigation", + "phoneview.via_usb": "Through the USB cable", + "phoneview.via_wireless": "Through wireless debugging", + "phoneview.stopped_sharing": "The phone stopped sharing ({reason}).", + "phoneview.waiting_for_picture": "Waiting for the picture…", + "phoneview.vol_up": "Volume up", + "phoneview.vol_down": "Volume down", + "phoneview.mute": "Mute", + "phoneview.rotate": "Rotate", + "phoneview.rotate_window": "Rotate the window", + "phoneview.torch": "Light", + "phoneview.flip": "Front or back camera", + "phoneview.zoom_in": "Zoom in", + "phoneview.zoom_out": "Zoom out", + "phoneview.shot": "Screenshot (copies it: paste with Ctrl+V)", + "phoneview.notifs": "Notifications", + "phoneview.settings": "Quick settings", + "phoneview.power": "Power (lock or wake the phone)", + "phoneview.screen_off": "Phone screen off (it keeps showing here, and saves the battery)", + "phoneview.screen_off_mac": "Phone screen off: it keeps showing here, and saves the battery (right click: the power key)", + "phoneview.enter_sends": "Enter sends in WhatsApp, Instagram and Telegram (Shift+Enter: a new line)", + "phoneview.return_sends_mac": "Return sends in WhatsApp, Instagram and Telegram (⇧Return: a new line)", + "phoneview.arrow_swipe": "Arrow keys swipe the screen (feeds, Reels, Shorts)", + "phoneview.arrow_swipe_aria": "Arrow keys swipe", + "phoneview.pin": "Keep on top", + "phoneview.back_esc": "Back (Esc)", + "phoneview.back_nav": "Back (right click, Esc)", + "phoneview.back": "Back", + "phoneview.home_nav": "Home (middle click)", + "phoneview.home": "Home", + "phoneview.recents": "Recent apps", + "phoneview.torch_tooltip": "Flashlight / Torch", + "phoneview.switch_camera": "Switch Camera", + "phoneview.screen_off_aria": "Phone screen off", + "phoneview.return_sends_aria": "Return sends messages", + "monitor.not_sharing": "Mac is not sharing", + "monitor.extend": "Extend", + "monitor.extend_title": "Use this window as an extra screen of the other computer", + "monitor.mirror": "Mirror", + "monitor.mirror_title": "Show the other computer’s main screen", + "monitor.fg": "Frame generation", + "monitor.fg_title": "Frame generation: fills in late or dropped frames", + "monitor.fullscreen": "Full screen", + "monitor.fullscreen_title": "Full screen (F11)", + "monitor.fullscreen_mac": "Full screen (Ctrl ⌘ F)", + "monitor.stop": "Stop", + "monitor.stop_title": "Stop sharing on the other computer", + "monitor.waiting_for_picture": "Waiting for {target}…", + "monitor.starting_screen": "Starting the screen over there…", + "monitor.turn_on_sharing": "Not sharing. Turn on sharing over there.", + "monitor.connecting_to": "Connecting to {name}…", + "monitor.reconnecting": "Reconnecting…", + "monitor.interrupted": "The video connection was interrupted…", + "monitor.could_not_start": "Could not start the video: {error}", + "monitor.waiting_for_peer": "Waiting for {name}…", + "monitor.the_picture": "the picture", + "monitor.the_other_computer": "the other computer", + "pcview.connecting_to_pc": "Connecting to the PC…", + "pcview.connecting": "Connecting…", + "pcview.reconnecting": "Reconnecting…", + "pcview.could_not_show": "Could not show the screen: {error}", + "general.later": "Later", + "general.choose": "Choose…", + "cursor.through": "Through", + "cursor.through_hint": "ADB: full control. Accessibility: DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth, no developer options", + "cursor.which_edge_hint": "Which device each edge of the screen leads to: Multi-device › Layout.", + "general.create": "Create", + "general.cancel": "Cancel", + "general.copy": "Copy", + "general.refresh": "Refresh", + "general.nothing_yet": "Nothing yet", + "general.loading": "Loading…", + "general.turn_off": "Turn off", + "general.restarting": "Restarting…", + "hub.wifi_only": "Wi-Fi only", + "hub.adb_ble_hint": "Only available over Wi-Fi: you’re connected over Bluetooth. Connect with Wi-Fi Direct, or join the same Wi-Fi network.", + "hub.hotspot": "Hotspot", + "hub.wifi_direct": "Wi-Fi Direct", + "hub.temp_prefix": "Temporary {name}", + "hub.your_phone": "your phone", + "hub.sound_playing": "Playing. {phone} captures it, so it plays there too (wireless debugging moves it off the phone)", + "hub.sound_tap_start": "Tap Start on {phone} (its notification, or Sound in DuoDesk there)", + "hub.sound_asking": "Asking {phone}…", + "hub.sound_through_adb": "Through wireless debugging", + "hub.sound_over_wifi": "Over Wi-Fi: through wireless debugging, or captured by {phone}", + "hub.need_calls_state": "its calls", + "hub.need_calls_numbers": "who is calling and the call history", + "hub.need_calls_dial": "making calls", + "hub.need_calls_answer": "answering and ending calls", + "hub.need_contacts": "contact names", + "hub.need_msg_read": "reading texts", + "hub.need_msg_send": "sending texts", + "hub.allow_on_phone": "Allow on the phone", + "hub.install": "Install", + "hub.off_msg": "Off. When you switch it on, {phone} asks for what it needs.", + "hub.connect_msg": "Connect {phone} to use {label}: click it at the top of the sidebar.", + "hub.waiting_msg": "Waiting for {phone}… DuoDesk on it needs to be up to date for {label}.", + "hub.files_need_a11": "Files needs Android 11 or later on {phone}. Mount works through ADB instead.", + "hub.install_puts_adb": "Install puts it on the phone through wireless debugging; your settings stay.", + "hub.setup_adb_phone": "Set up wireless debugging on the Phone page, then Install.", + "hub.need_notifs_apk": "{label} need DuoDesk with notifications on {phone} (Android doesn’t let downloaded apps read texts). {adb}", + "hub.allow_media": "Allow {phone} to share its photos and videos with DuoDesk.", + "hub.allow_files": "Allow All files access for DuoDesk on {phone}: it reads and writes the phone’s storage itself, no ADB. Android opens the setting there.", + "hub.allow_general": "Allow {label} on {phone}: DuoDesk asks for {needs}.", + "hub.partial_media": "Only the photos you chose on {phone} show here.", + "hub.partial_general": "Some of {label} needs more on {phone}: {missing}.", + "hub.check_phone_android": "Check {phone}: Android asks there.", + "hub.tap_notif_phone": "Tap the notification on {phone}.", + "hub.connect_wifi_direct": "Connect with Wi-Fi Direct", + "hub.wifi_gate_moving": "Only available over Wi-Fi Direct. Connecting…", + "hub.wifi_gate_failed": "Only available over Wi-Fi Direct. {error}.", + "hub.wifi_direct_failed": "Wi-Fi Direct didn’t come up", + "hub.wifi_gate_ble_can": "Only available over Wi-Fi Direct: you’re connected over Bluetooth. Or join the same Wi-Fi network.", + "hub.wifi_gate_ble_cannot": "Only available over Wi-Fi Direct or the same Wi-Fi network: you’re connected over Bluetooth.", + "hub.connecting_dots": "Connecting…", + "hub.try_again": "Try again", + "calls.desc": "Answer and make your phone’s calls here.", + "calls.card_now": "Now", + "calls.card_call": "Call", + "calls.card_contacts": "Contacts", + "calls.card_sound": "Sound", + "calls.card_bt_setup": "Bluetooth setup", + "calls.card_recent": "Recent", + "calls.answer": "Answer", + "calls.decline": "Decline", + "calls.mute": "Mute", + "calls.unmute": "Unmute", + "calls.sound_here": "Sound here", + "calls.sound_phone": "Sound on the phone", + "calls.end": "End", + "calls.enter_number": "Enter a number", + "calls.number_aria": "Number", + "calls.call": "Call", + "calls.keypad": "Keypad", + "calls.delete": "Delete", + "calls.search_contacts": "Search contacts", + "calls.show_more": "Show more", + "calls.n_numbers": "{count} numbers", + "calls.no_contacts_match": "No contacts match", + "calls.no_contacts_phone": "No contacts on the phone", + "calls.talk_listen_computer": "Talk and listen on this computer", + "calls.talk_listen_row": "Talk and listen on {me}", + "calls.which_phone_aria": "Which phone", + "calls.open_bt_settings": "Open Bluetooth settings", + "calls.step3_confirm": "3. Confirm the code on both", + "calls.forget": "Forget", + "calls.forget_confirm": "Forget?", + "calls.forget_hint": "{phone} and {me} forget each other, over classic Bluetooth and LE, then pair again from the start", + "calls.type_incoming": "Incoming", + "calls.type_outgoing": "Outgoing", + "calls.type_missed": "Missed", + "calls.type_declined": "Declined", + "calls.type_blocked": "Blocked", + "calls.type_voicemail": "Voicemail", + "calls.unknown_number": "Unknown number", + "calls.no_calls_yet": "No calls yet", + "calls.incoming_call": "Incoming call{number}", + "calls.calling": "Calling", + "calls.on_call": "On a call", + "calls.status_audio_off": "Off: calls sound on {phone}", + "calls.status_when_connected": "When {phone} is connected", + "calls.status_starting": "Starting…", + "calls.status_bonding": "Pairing… Confirm the code on {phone} and on {me}", + "calls.status_le_only": "{phone} and {me} are paired over Bluetooth LE only, which can’t carry a call: Forget below, then pair them again in Bluetooth settings", + "calls.status_forget": "{phone} keeps its old pairing with {me}: forget {me} in Bluetooth settings on {phone} (they opened there), then pair them again in Bluetooth settings", + "calls.status_radio_off": "Bluetooth is off on {phone}", + "calls.status_needs_pair": "Not paired with {phone} over classic Bluetooth: pair them in Bluetooth settings, as below. DuoDesk connects once they are", + "calls.which_one_is": "Which one is {phone}?", + "calls.paired_with": "Paired with {phone}", + "calls.paired_hint": "Over classic Bluetooth, which carries the calls’ sound", + "calls.step1_label": "1. On {phone}: Settings › Bluetooth › Pair new device", + "calls.step1_hint": "{phone} can be found while that screen is open", + "calls.step2_label": "2. Pair from {me}", + "calls.step2_hint_default": "In {me}’s Bluetooth settings, add a device and pick {phone}", + "calls.step3_hint_bonding": "Pairing… Confirm it on {phone} and on {me}", + "calls.step3_hint_watch": "Looking for {phone}… DuoDesk connects as soon as they’re paired", + "calls.step3_hint_default": "DuoDesk connects as soon as they’re paired", + "messages.desc": "Read and send your phone’s texts here.", + "messages.new_message": "New message", + "messages.earlier_messages": "Earlier messages", + "messages.to_placeholder": "To: a number", + "messages.to_aria": "To", + "messages.text_message_placeholder": "Text message", + "messages.message_aria": "Message", + "messages.send": "Send", + "messages.group_note": "Answer group conversations on the phone.", + "messages.choose_conversation": "Choose a conversation", + "messages.chat_all": "All", + "messages.chat_texts": "Texts", + "messages.chats_sw_label": "Chat apps in Messages", + "messages.chats_row_desc": "WhatsApp, Instagram, Telegram and Messenger next to your texts. Reply from here.", + "messages.reply_placeholder": "Reply", + "messages.reply_aria": "Reply", + "messages.you_prefix": "You: ", + "messages.text_prefix": "Text · ", + "messages.turn_on_notifs_hint": "Turn on Notifications to see chats here", + "messages.no_chats_yet": "No chats yet. They show here as messages arrive.", + "messages.group_suffix": " · Group", + "messages.chat_note_msgs": "Reply here once the phone shows this chat’s notification again.", + "messages.chat_note_notif": "Answer this one on the phone: its notification has no Reply.", + "messages.no_conversations": "No conversations", + "messages.status_sending": "Sending…", + "messages.status_not_sent": "Not sent", + "messages.status_not_sent_err": "Not sent: {error}", + "messages.allow_sending_hint": "Allow sending on the phone to answer here", + "media.desc": "See your phone’s photos and videos and copy them here.", + "media.filter_all": "All", + "media.filter_photos": "Photos", + "media.filter_videos": "Videos", + "media.filter_screenshots": "Screenshots", + "media.select": "Select", + "media.done": "Done", + "media.video_label": "Video", + "media.save_n_to_me": "Save {count} to {me}", + "media.items_count": "{count}{more} {kind}", + "media.saving_to": "Saving {count} to {me}’s {folder}…", + "media.no_photos_videos": "No photos or videos", + "media.no_items_kind": "No {kind}", + "media.save_to_me": "Save to {me}", + "pfiles.desc": "Browse the phone’s storage and copy files both ways. No wireless debugging needed.", + "pfiles.up": "Up", + "pfiles.hidden": "Hidden", + "pfiles.hidden_hint": "Show files whose names start with a dot", + "pfiles.new_folder": "New Folder", + "pfiles.upload": "Upload…", + "pfiles.folder_name_aria": "Folder name", + "pfiles.done": "Done", + "pfiles.open": "Open", + "pfiles.eject": "Eject", + "pfiles.auto_sw_label": "Open the phone’s shared folder when it shares one", + "pfiles.phone_row_title": "The phone’s shared folder", + "pfiles.serve_sw_label": "Share a folder with the phone", + "pfiles.mine_row_title": "Share a folder with the phone", + "pfiles.shared_folders": "Shared folders", + "pfiles.import_row_hint": "Choose files on the phone, then Import. They go into this folder.", + "pfiles.phone_shared_folder": "{phone}’s shared folder", + "pfiles.show_in_fm": "Show in {fm}", + "pfiles.files_app": "Files", + "pfiles.busy_opening": "Opening…", + "pfiles.busy_wifi": "Connecting with Wi-Fi Direct…", + "pfiles.share_folder_with": "Share a folder with {phone}", + "pfiles.saving_status": "Saving {count} to {me}’s {folder}…", + "pfiles.n_items": "{count} items", + "pfiles.folder": "Folder", + "pfiles.storage": "Storage", + "pfiles.folder_empty": "This folder is empty", + "pfiles.import_to": "Import to {name}", + "pfiles.save_to_me": "Save to {me}", + "pfiles.delete_confirm": "Delete {item}?", + "pfiles.storage_free_of_total": "{free} free of {total}", + "pfiles.sending_items_to": "Sending {count} to {dest}…", + "pfiles.a_file": "a file", + "pfiles.capturing_into": "Capturing into {name}", + "pfiles.importing_into": "Importing into {name}", + "pfiles.capture_hint": "Take photos with the phone’s camera. Each one comes into this folder.", + "pfiles.upload_from_me": "Upload from {me}…", + "device.qs_wifi": "Wi-Fi", + "device.qs_data": "Mobile data", + "device.qs_torch": "Torch", + "device.qs_dnd": "Do not disturb", + "device.qs_rotate": "Auto-rotate", + "device.qs_saver": "Battery saver", + "device.ringer_ring": "Ring", + "device.ringer_vibrate": "Vibrate", + "device.ringer_silent": "Silent", + "device.show_screen": "Show screen", + "device.ring": "Ring", + "device.ring_stop": "Stop ringing", + "device.lock": "Lock", + "device.sleep": "Sleep", + "device.use_wifi_direct": "Use Wi-Fi Direct", + "device.back_to_bt": "Back to Bluetooth", + "device.use_hotspot": "Use hotspot", + "device.disconnect": "Disconnect", + "device.ring_note": "Rings at full volume, even on silent, until you stop it here or there.", + "device.not_connected": "Nothing is connected. Connect a phone or computer on the Connection page.", + "device.media_volume": "Media volume", + "device.quick_actions": "Quick actions", + "device.customize": "Customize", + "device.volume": "Volume", + "device.controls_card": "Controls", + "device.latest_notifications": "Latest notifications", + "device.see_all": "See all", + "device.clipboard": "Clipboard", + "device.most_used": "Most used", + "device.all_apps": "All apps", + "device.send_files": "Send files", + "device.drop_files_here": "Drop files here", + "device.charging": "Charging", + "device.needs_wireless_debugging": "Needs wireless debugging (Connection)", + "device.opens_setting_on_phone": "Opens the setting on the phone", + "device.copy_code": "Copy {code}", + "device.no_notifs_hint": "New notifications from {name} show here", + "device.drop_hint": "They go to {name}’s Downloads", + "device.open_app": "Open {name}", + "device.fact_network": "Network", + "device.fact_control": "Control", + "device.fact_signal": "Signal", + "device.fact_link": "Link", + "device.fact_system": "System", + "device.fact_address": "Address", + "mirror.adb_not_setup_title": "Wireless debugging isn’t set up", + "mirror.adb_not_setup_desc": "Mirroring and phone apps need it. Set it up once on the Connection page.", + "mirror.adb_connecting": "Connecting to the phone’s wireless debugging…", + "mirror.setup_btn": "Set Up", + "mirror.show_screen_btn": "Show Phone Screen", + "mirror.phone_screen_desc": "Opens in its own window. Close it any time; the phone keeps running.", + "mirror.phone_screen": "Phone screen", + "mirror.open_on_here": "Open on {here}", + "mirror.saver_mbps": "Data saver · 4 Mb/s", + "mirror.balanced_mbps": "Balanced · 8 Mb/s", + "mirror.sharp_mbps": "Sharp · 16 Mb/s", + "mirror.sharpest_mbps": "Sharpest · 24 Mb/s", + "mirror.sound_title": "Play phone sound here", + "mirror.sound_hint": "Android 11 or later", + "mirror.quality_title": "Picture quality", + "mirror.quality_hint": "For the phone screen and app windows", + "mirror.controls_title": "Phone controls", + "mirror.controls_hint": "Where Back, Home, Recents and the other buttons sit. The panel button in each window’s title bar shows or hides them.", + "mirror.ctrl_top": "Title bar", + "mirror.ctrl_side": "Side panel", + "mirror.ctrl_bottom": "Bottom bar", + "mirror.enter_sends_title": "{key} sends messages", + "mirror.enter_sends_hint": "In WhatsApp, Instagram and Telegram. {combo} adds a new line.", + "mirror.arrow_swipe_title": "Arrow keys swipe", + "mirror.arrow_swipe_hint": "Up and down through feeds and Shorts, left and right through pages. Off: arrows move the text cursor.", + "mirror.phone_windows": "Phone windows", + "mirror.kb_title": "Mouse and keyboard", + "mirror.kb_hint": "Push the pointer past the screen edge to use the phone.", + "mirror.mouse_settings": "Mouse Settings", + "mirror.search_apps": "Search apps", + "mirror.phone_apps_heading": "Phone apps", + "mirror.phone_apps_desc": "Open any phone app in its own window.", + "mirror.loading_apps": "Loading the phone’s apps…", + "mirror.n_of_total_apps": "{shown} of {total}", + "mirror.n_apps": "{count} apps", + "mirror.tile_title": "Open {name}{menu}", + "mirror.dock_menu": " · Right-click to add it to the Dock", + "mirror.pin_menu": " · Right-click to pin it to Start", + "nowplaying.media_controls_sw": "Media controls on the Phone page", + "nowplaying.needs_full_app": "Needs the full DuoDesk app on the phone, with its notification access on", + "nowplaying.media_controls_hint": "What plays on a connected phone, with Play, Pause, Next and Previous, on the Phone page while it plays", + "nowplaying.play_sound_bt": "Play phone sound here (Bluetooth)", + "nowplaying.the_phone": "The phone", + "nowplaying.paired_bt": "Paired with this computer over Bluetooth", + "nowplaying.mac_no_speaker": "This computer can’t take a phone’s sound over Bluetooth (macOS has no Bluetooth speaker mode)", + "nowplaying.speaker_desc": "This computer as {name}’s Bluetooth speaker: its music, videos and every other sound play here. Pair them in Bluetooth settings first", + "nowplaying.needs_full_name": "Needs the full DuoDesk app on {name}, with its notification access on", + "nowplaying.what_plays_name": "What plays on {name}, with Play, Pause, Next and Previous, on the Phone page while it plays", + "nowplaying.previous": "Previous", + "nowplaying.play": "Play", + "nowplaying.pause": "Pause", + "nowplaying.next": "Next", + "camera.tab_desc": "The other device’s camera here, and as a camera other apps can pick.", + "camera.not_connected": "Not connected", + "camera.needs_adb": "Needs wireless debugging: set it up on the Phone page", + "camera.bt_blocked": "Through Bluetooth a camera can’t go across: connect over Wi-Fi or a cable", + "camera.mesh_turn_on": "Turn on sharing in {name}’s Camera tab first", + "camera.peer_turn_on": "Turn on “Let {me} see this camera” on {name} first", + "camera.open_in_window": "Open it in a window", + "camera.back": "Back", + "camera.front": "Front", + "camera.rotate": "Rotate", + "camera.rotate_title": "A quarter turn clockwise: here, in its window and in the virtual camera", + "camera.window": "Window", + "camera.window_checked": "Window ✓", + "camera.start": "Start", + "camera.stop": "Stop", + "camera.peer_camera": "{name}’s camera", + "camera.virtual_title": "Virtual camera", + "camera.remove": "Remove", + "camera.send_to": "Send to", + "camera.camera_apps_pick": "The camera other apps pick", + "camera.share_sw_label": "Share this camera", + "camera.share_row_title": "Let {name} see this camera", + "camera.default_camera": "The default camera", + "camera.device_row_hint": "Which of {me}’s cameras it shows", + "camera.viewing_now": "{name} is viewing it now", + "camera.camera_on_while_running": "The camera is on while it’s running there", + "camera.our_camera": "{me}’s camera", + "camera.off_top": "Off: turn on Camera at the top", + "camera.press_start": "Press Start to run {name}’s camera here", + "camera.it_stopped": "It stopped: {error}", + "camera.it_didnt_start": "It didn’t start: {error}", + "camera.peer_stopped": "{name} stopped its camera", + "camera.starting_phone": "Starting the phone’s camera…", + "camera.asking_peer": "Asking {name} for its camera…", + "camera.turned_hint": "Turned {rotate}°. Click the picture or Window for a window of its own", + "camera.mesh_share_all": "Let your other devices see this camera", + "camera.mesh_share_hint": "Your other computers can run it there. A popup says so here when one does", + "camera.peer_share_hint": "{name} can run it there. A popup says so here when it does", + "camera.nobody_sees_it": "Off: nobody sees it", + "camera.apps_see_it": "Apps here see it as {name}: pick that one, not {me}’s own camera.{extra}", + "camera.turn_on_vcam_hint": "Turn on Virtual camera to use it as a real camera in other apps (Zoom, Teams, the browser…).{extra}", + "camera.straight_hint": " The picture goes straight between the two computers.", + "support.not_available": "Not available in this build of DuoDesk", + "support.went_wrong": "Something went wrong", + "tip.tab_title": "Tip", + "tip.heading": "Leave a tip", + "tip.desc": "DuoDesk is free and open source. A tip keeps it that way.", + "tip.amount_aria": "Amount", + "tip.other_placeholder": "Other", + "tip.other_aria": "Another amount", + "tip.one_time": "One time", + "tip.monthly": "Monthly", + "tip.anon_placeholder": "Anonymous", + "tip.say_something": "Say something nice (optional)", + "tip.cta_button": "Leave a tip", + "tip.fine_print": "Opens Stripe Checkout in your browser. Nothing is charged until you pay there.", + "tip.your_tip": "Your tip", + "tip.monthly_hint": "Monthly can be cancelled any time from the receipt Stripe sends.", + "tip.name_field": "Name on the supporters list", + "tip.msg_field": "Message", + "tip.supporters": "Supporters", + "tip.no_tips_yet": "No tips yet. Yours could be the first.", + "tip.cta_amount": "Leave a tip · {amount}{suffix}", + "tip.per_month": " / month", + "tip.enter_range": "Enter {min} – {max}", + "tip.sup_count": "{count} {label}{monthly}", + "tip.supporter": "supporter", + "tip.supporters_label": "supporters", + "tip.monthly_count": " · {count} monthly", + "tip.err_default": "The tip jar didn’t answer.", + "tip.opening_stripe": "Opening Stripe…", + "tip.opened_stripe": "Opened {opened} in your browser. Thank you!", + "tip.couldnt_start": "Couldn’t start the tip", + "feedback.tab_title": "Feedback", + "feedback.heading": "Send feedback", + "feedback.desc": "A bug, an idea, or just a hello. It goes straight to the people who make DuoDesk.", + "feedback.bug": "Bug", + "feedback.bug_hint": "What happened, and what did you expect? Steps to make it happen again help a lot.", + "feedback.idea": "Idea", + "feedback.idea_hint": "What would make DuoDesk better for you?", + "feedback.love": "Love it", + "feedback.love_hint": "What do you like? (You can leave it empty.)", + "feedback.what_it_is": "What it is", + "feedback.your_msg_aria": "Your message", + "feedback.email_aria": "Reply email (optional)", + "feedback.info_sw_label": "Include version and system info", + "feedback.preview_aria": "What will be sent", + "feedback.send_email": "Send email", + "feedback.report_gh": "Report on GitHub", + "feedback.your_msg_card": "Your message", + "feedback.reply_email_field": "Reply email (optional)", + "feedback.answer_hint": "Only if you’d like an answer.", + "feedback.info_row_title": "Include version and system info", + "feedback.info_row_desc": "Helps us reproduce a bug. This is everything it adds:", + "feedback.send_it_card": "Send it", + "feedback.fine_print": "Send opens your mail app with everything filled in; nothing leaves until you press Send there. GitHub opens a new public issue in your browser.", + "feedback.opening_gh": "Opening GitHub…", + "feedback.opening_mail": "Opening your mail app…", + "feedback.copied": "Copied. Paste it into an email to contact@beyond-media.ai.", + "feedback.opened_gh": "Opened a new issue on GitHub in your browser.", + "feedback.opened_mail_trunc": "Opened your mail app. The message was long, so it was shortened there; the whole text is on your clipboard.", + "feedback.opened_mail": "Opened your mail app. Press Send there. Thank you!", + "feedback.couldnt_open": "Couldn’t open it", + "updater.no_notes": "No release notes provided for this version.", + "updater.aria_label": "Software Update", + "updater.title": "A new version of DuoDesk is available!", + "updater.notes_label": "Release Notes", + "updater.skip_version": "Skip This Version", + "updater.view_gh": "View on GitHub ↗", + "updater.remind_later": "Remind Me Later", + "updater.update_now": "Update Now", + "updater.download_install": "Download & Install", + "updater.banner_aria": "Software update notification", + "updater.banner_lead": "DuoDesk {version} is available.", + "updater.banner_sub": "(current: v{version})", + "updater.banner_notes": "Release notes", + "updater.banner_download": "Download", + "updater.banner_update": "Update", + "updater.banner_dismiss": "Dismiss banner", + "updater.modal_title": "DuoDesk {version} is available", + "updater.modal_sub": "A new version of DuoDesk is ready to download and install{current}.", + "updater.modal_cur_suffix": " (you have {version})", + "updater.pill_current": "Current: {version}", + "updater.pill_released": "Released: {date}", + "adb.ready": "Ready", + "adb.connecting": "Connecting…", + "adb.needs_pair": "Not paired", + "adb.off": "Off", + "adb.missing": "Missing", + "adb.problem": "Problem", + "adb.touch_blocked": "Touch blocked", + "adb.title": "Wireless debugging", + "adb.show_steps": "Show steps", + "adb.hide_steps": "Hide steps", + "adb.step1": "On the phone, open Settings › About phone and tap Build number seven times.", + "adb.step2": "Open Settings › Developer options and turn on USB debugging.", + "adb.step3": "Turn on Wireless debugging on the same page. The phone needs a Wi-Fi network.", + "adb.step4": "Tap Pair device with pairing code and enter the code below, or tap Pair device with QR code and scan the QR code here.", + "adb.step5": "After the first pairing, DuoDesk turns wireless debugging on by itself.", + "adb.pairing_code_placeholder": "123456", + "adb.pairing_code_aria": "Pairing code", + "adb.address_placeholder": "Address:port (optional)", + "adb.address_aria": "Pairing address", + "adb.pair_btn": "Pair", + "adb.pairing_code_row": "Pairing code", + "adb.pairing_code_hint": "From the phone’s Pair device with pairing code, or type it in DuoDesk’s notification there", + "adb.notifs_row": "Notifications from the phone", + "adb.hint_off_phone": "Off on the phone. Mirroring and ADB control need it; Accessibility control doesn’t.", + "adb.hint_blocked_xiaomi": "The screen works, but this Xiaomi blocks input. On the phone: Developer options › USB debugging (Security settings).", + "adb.hint_ready": "Screen, apps, touch and keyboard, and the clipboard in the background", + "adb.steps_info": "DuoDesk pairs with the phone’s wireless debugging once. After that, mirroring, phone apps and ADB control work without this step.", + "adb.no_android_apk": "This build of DuoDesk doesn’t include the Android app.", + "adb.full_apk_hint": "{error}The downloaded app can’t read notifications. Install the full app over it; settings and pairing stay.{wireless}", + "adb.needs_wireless_suffix": " Needs wireless debugging.", + "adbqr.btn_show": "Show QR Code", + "adbqr.btn_hide": "Hide", + "adbqr.row_title": "Pair with a QR code", + "adbqr.row_hint": "On the phone: Wireless debugging › Pair device with QR code", + "adbqr.img_aria": "Wireless debugging QR code", + "adbqr.scan_with_phone": "Scan with the phone", + "adbqr.step1": "Settings › Developer options › Wireless debugging.", + "adbqr.step2": "Tap Pair device with QR code.", + "adbqr.step3": "Scan this code. DuoDesk connects by itself.", + "adbqr.paired_connecting": "Paired. Connecting…", + "adbqr.timeout": "The QR code timed out. Show it again to retry.", + "adbqr.didnt_pair": "Didn’t pair: ", + "adbqr.waiting_phone": "Waiting for the phone…", + "adbqr.not_available": "Wireless debugging isn’t available here.", + "remote.desc": "Use the phone as this computer’s touchpad, keyboard or gamepad.", + "remote.now_row": "Now", + "remote.on_name": "On {name}", + "remote.on_name_hint": "Open DuoDesk › Remote there, then Touchpad and keyboard or Gamepad. Its speed, tap to click and the gamepad’s keys are set there", + "remote.remote_card": "{name} as a remote", + "remote.real_gamepad": "Real gamepad", + "remote.gamepad_card": "Gamepad", + "remote.not_on_computer": "Not on this computer", + "remote.pad_off_hint": "Off: the gamepad page’s sticks and buttons press keys (WASD, the mouse), as set on {name}", + "remote.pad_live_hint": "On: {name}’s gamepad page is a game controller here{name_suffix}", + "remote.pad_ready_hint": "On: ready when {name} is connected", + "remote.status_off": "Off: {name}’s Remote page can’t move or type here", + "remote.status_in_use": "In use: {name} is moving the pointer or typing here", + "remote.status_opened": "{name}’s Remote page is open and ready", + "remote.status_ready": "Ready: open the Remote page on {name}", + "rezume.page": "Page", + "rezume.document": "Document", + "rezume.app": "App", + "rezume.dismiss": "Dismiss", + "rezume.continue_from": "Continue from {name}", + "rezume.desc": "Like Handoff on Apple devices: go on here with what you were doing on the other device, and the other way round.", + "rezume.send_to_name": "Send to {name}", + "rezume.send_to_hint": "Opens there now what was last in front here", + "rezume.offered_to": "Offered to {name}", + "rezume.web_pages": "Web pages", + "rezume.web_hint": "The tab in front in Chrome, Edge, Firefox, Safari, Brave, Vivaldi, Opera or Arc", + "rezume.videos": "Videos", + "rezume.videos_hint": "A YouTube video playing here opens there at the same second", + "rezume.documents": "Documents", + "rezume.phone_apps": "Phone apps", + "rezume.phone_apps_hint": "The app in front on the phone", + "rezume.mirror_apps": "Mirror apps", + "rezume.what_goes": "What goes", + "rezume.offer_me": "Offer what’s in use on {me}", + "rezume.offer_me_hint": "{name} can go on with it", + "rezume.take_peer": "Take {name}’s", + "rezume.take_peer_hint": "What’s in use there shows here", + "rezume.push_row": "Open what’s sent at once", + "rezume.push_hint": "Send to on {name} (its tray, the share sheet’s Open on computer) opens it here without asking", + "rezume.which_ways": "Which ways", + "rezume.notification": "Notification", + "rezume.notify_hint": "A quiet one, replaced by the next", + "rezume.dock_bar": "Dock", + "rezume.taskbar_dock": "Taskbar or dock", + "rezume.taskbar": "Taskbar", + "rezume.bar_hint": "A button with the app’s icon: click it to go on", + "rezume.menu_bar": "Menu bar", + "rezume.tray": "Tray", + "rezume.tray_hint": "Continue and Send to in its menu", + "rezume.tab_row": "Apps tab and Phone page", + "rezume.tab_hint": "The card above, there too", + "rezume.where_shows": "Where {name}’s shows", + "rezume.doc_phone_hint": "The file open in front here goes to the phone and opens there; the phone has none to send", + "rezume.doc_peer_hint": "The file open in front (Word, Pages, Preview, a text editor…): it comes across and opens on the other side", + "rezume.mirror_need_adb": "Needs wireless debugging (Phone page): until then phone apps aren’t offered here", + "rezume.mirror_ready": "A phone app opens here in a window of its own, as it was", + "rezume.not_connected": "Not connected", + "rezume.off_here": "Off here", + "rezume.peer_update": "No ReZume there yet: update DuoDesk on {name}", + "rezume.peer_off": "Off on {name}: turn it on there too", + "rezume.phone_ready_adb": "Ready: the phone’s apps through wireless debugging (its pages need DuoDesk’s Accessibility there)", + "rezume.phone_ready_acc": "Ready for pages and documents. For what’s in use on the phone, turn on DuoDesk’s Accessibility there, or wireless debugging", + "rezume.ready_incoming": "Ready: something to go on with, above", + "rezume.ready": "Ready", + "rezume.opens_there_now": "Opens there now: {title}", + "rezume.nothing_in_front": "Nothing in front here to send yet", + "rezume.getting_waiting": "Getting {item}…", + "mesh_overview.using_there": "You’re using {there}", + "mesh_overview.there_using_me": "{There} is using {me}", + "mesh_overview.disconnect": "Disconnect", + "mesh_overview.connect": "Connect", + "mesh_overview.location_settings": "Location settings", + "mesh_overview.connect_wifi_direct": "Connect with Wi-Fi Direct", + "mesh_overview.connect_hotspot": "Connect with hotspot", + "mesh_overview.hotspot_name_ph": "Hotspot name", + "mesh_overview.password_ph": "Password", + "mesh_overview.join": "Join", + "mesh_overview.not_on_linux": "Not on Linux yet", + "mesh_overview.shared_folder": "Shared folder", + "mesh_overview.connect_by_address": "Connect by address", + "mesh_overview.cant_look_network": "Can’t look for computers on this network.", + "mesh_overview.fix_firewall": "Fix firewall", + "mesh_overview.bt_phones": "Bluetooth with phones", + "mesh_overview.bt_computers": "Bluetooth with computers", + "mesh_overview.looking": "Looking…", + "mesh_overview.pair_once": "Pair once", + "mesh_overview.phone_screen_mouse_kb": "Phone screen, mouse and keyboard", + "mesh_overview.or_type_on_phone": "Or type it on the phone, in DuoDesk’s notification", + "mesh_overview.phones_need_fixing": "Phones that need fixing", + "mesh_overview.paired": "Paired", + "mesh_overview.the_other_computer": "The other computer", + "mesh_overview.identity_changed": "This {kind} looks different now. Forget it and pair again.", + "mesh_overview.open_on_peer": "Open DuoDesk on {name}.", + "mesh_overview.pick_below": "Pick a computer below, or connect by address.", + "mesh_overview.disconnected": "Disconnected", + "mesh_overview.fix_waiting_wifi": "Turn on Developer options › Wireless debugging on the phone (same Wi-Fi), then tap Fix.", + "mesh_overview.fix_needs_pair": "Pair once: Wireless debugging › Pair device with pairing code on the phone, then type the code in the Pairing code row below.", + "mesh_overview.fix_missing": "adb is missing from this build.", + "mesh_overview.fix_connecting": "Looking for the phone’s wireless debugging… If this stays, tap Fix.", + "mesh_overview.fix_error": "The connection stopped. Tap Fix to try again.", + "mesh_share.title": "Share screen", + "mesh_share.desc": "See {me} in a window on the other computer.", + "mesh_multi.desc": "Several computers and phones connected at once", + "mesh_multi.did_not_move": "That did not move: a device goes next to another one, side by side.", + "mesh_multi.move_here": "Move here", + "mesh_multi.empty_place": "Empty place", + "mesh_multi.mesh_mode": "Mesh mode", + "mesh_multi.use_several_devices": "Use several devices at once", + "mesh_multi.restart_hint": "On. DuoDesk restarts when you turn it on or off", + "mesh_multi.layout": "Layout", + "mesh_multi.joining": "Joining", + "mesh_multi.join_auto": "Join every device automatically", + "adb.try_again": "Try Again", + "media.kind_videos": "videos", + "media.kind_items": "items", + "connections.connect": "Connect", + "connections.bt": "Bluetooth", + "connections.wifi": "Wi-Fi", + "general.save": "Save", + "general.close": "Close", + "general.rename": "Rename", + "general.delete": "Delete", + "general.default": "Default", + "qrpair.show": "Show QR Code", + "qrpair.title": "Pair a phone with a QR code", + "qrpair.hint": "Scan it with the phone’s camera, or with Scan QR code in DuoDesk on the phone", + "qrpair.aria_code": "Pairing QR code", + "qrpair.scan_heading": "Scan with your phone", + "qrpair.step1": "Open the camera, or DuoDesk › Scan QR code.", + "qrpair.step2": "Point it at this code and open the link.", + "qrpair.step3": "Click Allow here when it asks.", + "qrpair.hide": "Hide", + "qrpair.not_ready": "Not ready yet", + "qrpair.note": "A new code comes every 10 minutes. Only someone who sees this screen can use it.", + "aurora.this_computer": "This computer", + "aurora.encrypted": "encrypted", + "aurora.encrypted_title": "TLS with a pinned certificate, on every route", + "aurora.ask_kbd_title": "Ask DuoDesk ({mod}+K)", + "aurora.hello_prefix": "What should your ", + "aurora.hello_desks": "desks", + "aurora.hello_suffix": " do?", + "aurora.home_aria": "Home", + "aurora.more_on_dev": "More on {name}", + "aurora.open_def_title": "Open {title}", + "aurora.pair_phone": "Pair a phone", + "aurora.find_nearby": "Find nearby", + "aurora.add_device": "Add a device", + "aurora.add_device_sub": "Another computer or a phone", + "aurora.this_desk": "this desk · {os}", + "aurora.ask_placeholder": "Ask DuoDesk anything…", + "aurora.ask_aria": "Ask DuoDesk", + "aurora.send_files_title": "Send files…", + "aurora.send_files": "Send files", + "aurora.all_devices": "All devices", + "aurora.which_device": "Which device", + "aurora.send_title": "Send (Enter)", + "aurora.send_aria": "Send", + "aurora.ask_something_else": "Ask something else ({mod}+K)", + "aurora.ask_something_else_aria": "Ask something else", + "aurora.close_esc": "Close (Esc)", + "aurora.close_aria": "Close", + "kvm.partner_driving_me": "{Name} is driving {me}", + "kvm.not_accept_input": "{Name} doesn't accept input from {me}", + "kvm.partner_refused": "{Name} refused", + "kvm.took_input_back": "{Name} took its input back", + "kvm.back_for_admin_or_lock": "Back here for the administrator prompt or lock screen", + "kvm.admin_or_lock": "Use this PC’s own mouse for the administrator prompt or lock screen", + "kvm.partner_no_answer": "Your Mac didn’t answer", + "kvm.another_app_grab": "Another app is holding the mouse or keyboard", + "kvm.partner_disconnected": "{Name} disconnected", + "kvm.tried_use_ble_off": "{Name} tried to use {me} over Bluetooth. It’s turned off here.", + "kvm.tried_use_off": "{Name} tried to use {me}. It’s turned off here.", + "kvm.stopped_answering": "{Name} stopped answering", + "kvm.off_bluetooth": "Cursor sharing is off over Bluetooth", + "kvm.partner_driving_me_mac": "{them} is using this computer right now", + "kvm.not_accept_input_mac": "{them} doesn’t accept input from here", + "kvm.partner_refused_mac": "{them} refused", + "kvm.partner_disconnected_mac": "{them} disconnected", + "kvm.stopped_answering_mac": "{them} stopped answering", + "kvm.partner_no_answer_mac": "{them} didn’t answer", + "firewall.ufw_allows": "ufw lets DuoDesk in", + "firewall.ufw_blocks": "ufw is on and may block DuoDesk.", + "general.send": "Send", + "files.folder_for_received": "Folder for received files", + "files.use_this_folder": "Use this folder", + "files.use_this_folder_cap": "Use This Folder", + "files.share_this_folder": "Share This Folder", + "files.folder_to_share_with_peer": "Folder to share with the other computer", + "cursor.gestures_hint_mac": "Pinch to zoom, swipe between desktops, Mission Control / Task View, back and forward — done the native way on {name}. The same on both", + "mesh_display.desc": "Use {me} as a second screen for {name}.", + "main.code_copied": "Code copied", + "main.cursor_sharing_on": "Cursor sharing on", + "main.cursor_sharing_off": "Cursor sharing off", + "main.cursor_sharing_off_ble": "Cursor sharing off over Bluetooth", + "main.turned_on_on": "Turned on on {name}", + "main.turned_off_on": "Turned off on {name}", + "main.with_peer_double_tap_off": "With {name}. Double-tap {key} to turn it off", + "main.double_tap_off": "Double-tap {key} to turn it off", + "main.comes_back_wifi_double_tap_on": "It comes back on Wi-Fi. Double-tap {key} to turn it on", + "main.double_tap_on": "Double-tap {key} to turn it on", + "main.typing_on": "Typing on {name}", + "main.using_peer": "Using {name}", + "main.peer_is_using_me": "{name} is using {me}", + "main.back_on_me": "Back on {me}", + "main.cursor_locked_on": "Cursor locked on {where}", + "main.cursor_unlocked": "Cursor unlocked", + "main.sending_to_percent": "Sending {name} to {peer} · {percent} %", + "main.sending_name": "Sending {name}", + "main.files_stopped": "Files stopped", + "main.peer_disconnected": "{name} disconnected", + "main.received_one_file": "Received 1 file", + "main.received_n_files": "Received {count} files", + "main.nothing_arrived": "Nothing arrived", + "main.from_peer": "From {name}", + "main.opening_wireless_debugging_ready": "Opening it when wireless debugging is ready…", + "main.sent_to_peer_colon": "Sent to {name}: ", + "main.from_peer_colon": "From {name}: ", + "main.moving_to_wifi": "Moving to Wi-Fi with {name}…", + "main.wifi_didnt_come_up": "Wi-Fi with {name} didn’t come up", + "main.opening_phone_ready": "Opening it when the phone is ready…", + "main.opening_peer_connects": "Opening it when {name} connects…", + "main.not_connected": "Not connected", + "main.open_duodesk_other_first": "Open DuoDesk on the other computer first", + "main.sending_item_to_peer_one": "Sending 1 item to {name}", + "main.sending_item_to_peer_other": "Sending {count} items to {name}", + "main.received_file_from_peer_one": "Received 1 file from {name}", + "main.received_file_from_peer_other": "Received {count} files from {name}", + "main.the_other_computer": "the other computer", + "rezume.continue_title_from": "Continue {title} from {from}", + "rezume.from_name_what": "From {from} · {what}", + "apps.opening_on_peer": "Opening {name} on {peer}…", + "apps.the_app": "the app", + "dragrecv.drop_on_folder_or_desktop": "Drop {name} on a folder or the desktop", + "pcscreen.choose_virtual_monitor": "Choose “Virtual remote monitor” to extend onto {name}", + "sendto.not_connected_yet": "Not connected yet", + "sendto.sending_once_connected": "Sending once {name} is connected", + "sendto.nothing_to_send": "Nothing to send", + "sendto.couldnt_read_item": "Couldn’t read {name}", + "sendto.those_items": "those items", + "sendto.sending_n_items_to": "Sending {items} to {who}", + "sendto.n_items_other": "{count} items", + "fclip.files_not_there_anymore": "Those files aren’t there any more", + "fclip.paste_with_shortcut": "{done}: they’re on the clipboard, paste them with {shortcut}", + "fclip.select_files_explorer": "Select files in File Explorer first", + "fclip.select_files_file_manager": "Select files in the file manager first", + "fclip.nothing_to_copy_there": "Nothing to copy there", + "fclip.copied_items_for_peer_one": "Copied {name} for {peer}", + "fclip.copied_items_for_peer_other": "Copied {count} items for {peer}", + "fclip.nothing_copied_on_peer": "Nothing copied on {peer}", + "fclip.pasting_files_one": "Pasting 1 file…", + "fclip.pasting_files_other": "Pasting {count} files…", + "explorer.connect_your_phone": "Connect your phone", + "explorer.then_choose_files": "Then choose files in Phone Files", + "explorer.capture_needs_it": "Capture from phone needs it", + "explorer.take_photos_on_phone": "Take photos on your phone", + "explorer.they_come_into_folder": "They come into {folder}", + "camshare.peer_viewing_camera": "{name} is viewing this computer’s camera", + "camshare.camera_didnt_start": "The camera didn’t start: {error}", + "clipimage.copied_paste_with": "{kind} from {name} copied: paste it with {keys}", + "clipimage.kind_screenshot": "Screenshot", + "clipimage.kind_picture": "Picture", + + // Remaining pages (Windows, Linux, macOS) + 'mirror.open_on_this_mac': 'Open on this Mac', + 'mirror.open_on_this_computer': 'Open on this computer', + 'mirror.open_on_this_pc': 'Open on this PC', + 'sh_support.someone': 'Someone', + 'sh_support.tip_unavailable': 'This tip jar isn’t available', + 'sh_support.service_answered': 'The tip service answered {status}', + 'sh_support.service_unexpected': 'The tip service sent something unexpected', + 'sh_support.cant_reach': 'Can’t reach beyond-media.ai. Check your connection.', + 'sh_support.enter_amount': 'Enter an amount', + 'sh_support.amount_between': 'Enter an amount between {min} and {max}', + 'sh_support.one_moment': 'One moment…', + 'sh_support.link_wont_open': 'The tip service sent a link DuoDesk won’t open', + 'sh_support.took_too_long': 'The tip service took too long. Try again.', + 'sh_support.cant_open_browser': 'Couldn’t open the browser', + 'sh_support.bad_email': 'That reply email doesn’t look right', + 'sh_support.write_first': 'Write a few words first', + 'sh_support.github_link_failed': 'Couldn’t make the GitHub link', + 'sh_support.email_failed': 'Couldn’t make the email', + 'sh_support.no_mail_app': 'No mail app answered. Use Copy and send it to {contact}.', + 'sh_support.went_wrong': 'Something went wrong', + 'aurora.group_input': 'Input', + 'aurora.group_sharing': 'Sharing', + 'aurora.group_media': 'Media', + 'aurora.group_more': 'More', + 'aurora.group_devices': 'Devices', + 'aurora.group_phones': 'Phones', + 'aurora.computer': 'Computer', + 'aurora.other_computer': 'The other computer', + 'aurora.why_linux': 'not with Linux yet', + 'aurora.why_device': 'not with this device', + 'aurora.why_now': 'not available now', + 'aurora.why_peer': 'needs a connected device', + 'aurora.chip_pair_qr': 'Pair a phone with a QR code', + 'aurora.chip_refresh': 'Refresh nearby devices', + 'aurora.chip_reconnect': 'Reconnect to {name}', + 'aurora.chip_open_general': 'Open General settings', + 'aurora.chip_turn_on': 'Turn on {name}', + 'aurora.chip_open_clipboard': 'Open clipboard', + 'aurora.state_on': 'on', + 'aurora.state_off': 'off', + 'aurora.tip_opens_page': '{tip} (opens its page)', + 'aurora.tip_select_first': '{title} · select {name} first', + 'aurora.tip_connect_first': '{title} · connect {name} first', + 'aurora.head_open': 'Open {name}', + 'aurora.head_select': 'Select {name}', + 'aurora.head_open_connection': 'Open Connection', + 'aurora.head_connect': 'Connect to {name}', + 'aurora.unit_screen_one': 'screen', + 'aurora.unit_screen_other': 'screens', + 'aurora.unit_on': 'on', + 'aurora.paired_offline': 'Paired · offline', + 'aurora.unit_connecting': 'connecting', + 'aurora.unit_offline': 'offline', + 'aurora.nearby_click': 'Nearby · click to connect', + 'aurora.unit_battery': '% battery', + 'aurora.unit_nearby': 'nearby', + 'aurora.empty_own_pages': 'Everything is on its own pages', + 'aurora.empty_select': 'Select it to use its features', + 'aurora.empty_connect_it': 'Connect it to use its features', + 'aurora.empty_connect': 'Connect to use its features', + 'aurora.greet_night': 'Good night', + 'aurora.greet_morning': 'Good morning', + 'aurora.greet_afternoon': 'Good afternoon', + 'aurora.greet_evening': 'Good evening', + 'aurora.menu_this_desk': '{name} (this desk)', + 'aurora.menu_phone': 'phone', + 'aurora.menu_live': 'live', + 'aurora.menu_offline': 'offline', + 'aurora.step_opening_connection': 'Opening Connection to pick a device', + 'aurora.no_switch_opening': '{title} has no switch: opening it', + 'aurora.hint_try': 'Try “turn on clipboard”, “open mouse”, “connect 192.168.1.20”, “refresh” or “pair a phone”.', + 'aurora.step_opening': 'Opening {title}', + 'aurora.unavailable_device': '{title} isn’t available with this device', + 'aurora.is_open': '{title} is open', + 'aurora.step_turning_on': 'Turning on {title}', + 'aurora.step_turning_off': 'Turning off {title}', + 'aurora.was_already_on': '{title} was already on', + 'aurora.was_already_off': '{title} was already off', + 'aurora.opened_linux': '{title} not with Linux yet: opened it', + 'aurora.opened_device': '{title} not with this device: opened it', + 'aurora.opened_now': '{title} not available now: opened it', + 'aurora.opened_peer': '{title} needs a connected device: opened it', + 'aurora.is_on': '{title} is on', + 'aurora.is_off': '{title} is off', + 'aurora.step_connecting_to': 'Connecting to {name}', + 'aurora.didnt_work': 'That didn’t work', + 'aurora.no_connect_by_address': 'Connecting by address isn’t available here', + 'aurora.couldnt_reach': 'Couldn’t reach {addr}', + 'aurora.asked_to_connect': 'Asked {addr} to connect: follow it on Connection', + 'aurora.step_looking': 'Looking for devices nearby', + 'aurora.no_refresh': 'Refresh isn’t available here', + 'aurora.refreshed': 'Refreshed the nearby list', + 'aurora.step_showing_qr': 'Showing the pairing QR code', + 'aurora.pair_from_nearby': 'Pair phones from Connection › Nearby', + 'aurora.pair_from_connection': 'Pair a phone from Connection (the QR card shows while no phone is connected)', + 'aurora.scan_code': 'Scan the code with the phone’s camera', + 'aurora.step_disconnecting': 'Disconnecting', + 'aurora.nothing_connected': 'Nothing is connected', + 'aurora.step_choosing_files': 'Choosing files to send', + 'aurora.connect_first_send': 'Connect a device first to send files', + 'aurora.drop_on_overview': 'Drop files on the Overview to send them', + 'aurora.pick_files': 'Pick the files in the window that opened', + 'aurora.step_reconnecting': 'Reconnecting', + 'aurora.reconnecting_paired': 'Reconnecting to the paired computer', + 'aurora.pick_on_connection': 'Pick a device on Connection', + 'aurora.switched_to': 'Switched to {name}', + 'aurora.already_connected': '{name} is already connected', + 'aurora.joins_by_itself': '{name} isn’t connected: it joins by itself once it’s on, or from Connection', + 'aurora.connect_from_connection': 'Connect {name} from Connection', + 'media.kind_photos': 'photos', + 'media.kind_screenshots': 'screenshots', + 'device.os_win': 'Windows PC', + 'device.os_linux': 'Linux computer', + 'device.adb_ready': 'ADB · ready', + 'device.adb_connecting': 'ADB · connecting', + 'device.adb_not_paired': 'ADB · not paired', + 'device.adb_off': 'ADB · off', + 'device.not_set_up': 'Not set up', + 'device.storage_used_of': '{used} of {total} GB', + 'device.recent_off_hint': 'Turn them on in Clipboard', + 'device.clip_empty_hint': 'What’s copied on either side shows here', + 'sh_vcam.not_on_computer': 'Not on this computer', + 'sh_vcam.check_failed': 'Couldn’t check the virtual camera: {error}', + 'sh_vcam.didnt_install': 'It didn’t install', + 'sh_vcam.remove_failed': 'Couldn’t remove it: {error}', + 'pfiles.the_file_manager': 'the file manager', + 'pfiles.hint_wifi_open': '“{name}”: Open connects with Wi-Fi Direct and shows it in {fm}', + 'pfiles.hint_none_shared': 'None shared: on {phone}, DuoDesk › File access › Share a folder', + 'pfiles.hint_mounted_finder': '“{name}”, in Finder under Locations', + 'pfiles.hint_mounted': '“{name}”, in {fm}', + 'pfiles.hint_open_shows': '“{name}”: Open shows it in {fm}', + 'pfiles.share_failed': 'Couldn’t share: {error}', + 'pfiles.mine_on': '{folder}: in {phone}’s Files app and file pickers', + 'pfiles.mine_on_ble': '{folder}: in {phone}’s Files app and file pickers, over Wi-Fi Direct (Open on the phone connects it)', + 'pfiles.choose_aria': 'Choose {name}', + 'pfiles.dir_items_one': '{count} item', + 'pfiles.new_name_aria': 'New name', + 'pfiles.chosen_count_one': '{count} chosen', + 'pfiles.chosen_count_other': '{count} chosen', + 'pfiles.didnt_work': 'That didn’t work', + 'camera.error_unknown': 'unknown', + 'camera.sharing_now': 'Sharing now: in Zoom, Teams, the browser…, choose only {name} as the camera', + 'camera.ready_hint': 'Ready: the camera running here goes to {name}. Choose only that one in the app you call from', + 'camera.off_hint': 'Off: the picture stays in DuoDesk. On: it’s also {name}, a camera other apps can pick', + 'camera.sending_to_one': '{names} is viewing it now', + 'camera.sending_to_other': '{names} are viewing it now', + 'sh_rezume.couldnt_be_sent': 'It couldn’t be sent', + 'sh_rezume.peer_no_rezume': '{name} has no ReZume yet: update DuoDesk there', + 'sh_rezume.rezume_off_on_peer': 'ReZume is off on {name}', + 'sh_rezume.apps_need_adb': 'Phone apps open here once wireless debugging is on (Phone page)', + 'sh_rezume.didnt_come': 'It didn’t come', + 'sh_rezume.didnt_arrive': '{title} didn’t arrive', + 'rezume.in_window_here': ', in a window here', + 'rezume.doc_here_hint': 'The file open in front (Word, Pages, Preview, a text editor…): it comes across and opens here', + 'rezume.mirror_here_hint': 'A phone app opens here in a window of its own, as it was (wireless debugging)', + 'feature_art.connected_other': 'Connected to the other computer', + 'feature_art.show_settings': 'Show the settings', + 'feature_art.cursor_title': 'Cursor sharing', + 'feature_art.cursor_desc': 'Push the pointer past the edge of the screen and it carries on onto the other device. One mouse or trackpad for both.', + 'feature_art.keyboard_title': 'Keyboard sharing', + 'feature_art.keyboard_desc': 'This keyboard types on whichever device the pointer is on, shortcuts included.', + 'feature_art.clipboard_title': 'Clipboard sync', + 'feature_art.clipboard_desc': 'Copy something on one device and paste it on the other. It goes across by itself.', + 'feature_art.notifications_title': 'Notification sync', + 'feature_art.notifications_desc': 'Notifications from the other device show up on this one, and the other way round.', + 'feature_art.audio_title': 'Sound sharing', + 'feature_art.audio_desc': 'Play one device’s sound on the other’s speakers or headphones.', + 'feature_art.apps_title': 'App sharing', + 'feature_art.apps_desc': 'Open an app of the other device: it runs there and shows up here in a window of its own.', + 'feature_art.share_title': 'Second screen', + 'feature_art.share_desc': 'This screen becomes a second screen for the other device: move windows across onto it.', + 'feature_art.receive_title': 'Remote screen', + 'feature_art.receive_desc': 'The other device’s screen in a window here, to see it and use it from here.', + 'feature_art.pc_mac_title': 'Screen sharing', + 'feature_art.pc_mac_desc': 'This screen in a window on the other device, to show it or use it from there.', + 'feature_art.files_title': 'File sharing', + 'feature_art.files_desc': 'Drag files across the screen edge, take in files sent your way, or share a folder.', + 'feature_art.terminal_title': 'Remote terminal', + 'feature_art.terminal_desc': 'Open a terminal on the other computer from this one. No passwords needed.', + 'feature_art.mount_title': 'Phone drive', + 'feature_art.mount_desc': 'The phone’s storage as a drive here, to open and copy its files like any other folder.', + 'feature_art.calls_title': 'Phone calls', + 'feature_art.calls_desc': 'Answer and make your phone’s calls on this computer, and talk through it.', + 'feature_art.messages_title': 'Text messages', + 'feature_art.messages_desc': 'Read and send your phone’s texts here.', + 'feature_art.media_title': 'Phone photos', + 'feature_art.media_desc': 'See your phone’s photos and videos and copy them here.', + 'feature_art.pfiles_title': 'Phone files', + 'feature_art.pfiles_desc': 'Browse the phone’s storage and copy files to and from it, no cable needed.', + 'feature_art.camera_title': 'Camera sharing', + 'feature_art.camera_desc': 'The other device’s camera here: see its picture, or pick it as a camera in any app.', + 'feature_art.remote_title': 'Phone as a remote', + 'feature_art.remote_desc': 'Use the phone as this computer’s touchpad, keyboard or gamepad.', + 'feature_art.rezume_desc': 'Like Handoff on Apple devices: go on here with the page, document or phone app you were using on the other device, and the other way round.', + 'updater_modal.new_version': 'New Version', + 'nav.mirror': 'Mirroring', + 'nav.papps': 'Apps', + 'nav.pfiles': 'Phone Files', + 'tab.mirror.desc': 'The phone’s screen in a window, with touch, mouse and keyboard.', + 'tab.papps.heading': 'Phone apps', + 'tab.papps.desc': 'Open any phone app in its own window.', + 'tab.media.desc': 'See your phone’s photos and videos and copy them here.', + 'tab.pfiles.desc': 'Browse the phone’s storage and copy files both ways. No wireless debugging needed.', + 'tab.camera.desc': 'The other device’s camera here, and as a camera other apps can pick.', + 'tab.rezume.desc': 'Like Handoff on Apple devices: go on here with what you were doing on the other device, and the other way round.', + 'tab.overview.heading': 'Overview', + 'win_apps.couldnt_open': 'Couldn’t open {name}', + 'win_apps.couldnt_open_why': 'Couldn’t open {name}: {why}', + 'win_apps.opening': 'Opening {name}…', + 'win_apps.shortcut_refused': 'Windows refused the shortcut', + 'win_apps.couldnt_add_start': 'Couldn’t add {name} to Start: {error}', + 'win_apps.in_start_folder': '{name} is in Start › {folder}. Right-click it there to pin it to Start or the taskbar.', + 'win_peerapps.couldnt_open': 'Couldn’t open {name}', + 'win_peerapps.couldnt_open_why': 'Couldn’t open {name}: {why}', + 'win_fclip.couldnt_use_one': 'Couldn’t use {keys}. Another app may have it.', + 'win_fclip.couldnt_use_two': 'Couldn’t use {first} and {second}. Another app may have it.', + 'win_gamepad.not_in_build': 'Not in this build of DuoDesk', + 'win_gamepad.setup_unfinished': 'the setup didn’t finish', + 'win_gamepad.vigem_restart': 'ViGEmBus was installed but doesn’t answer yet: restart Windows', + 'win_helper.not_built': 'Helper not built (run npm run build:helper)', + 'win_ipc.open_in_window': 'Open in a Window', + 'win_main.no_certificate': 'No certificate: {error}', + 'win_monitor_drop.sending': 'Sending {name}, {pct}% {sent} / {size}', + 'win_monitor_drop.sending_multi': 'Sending {name} ({index} of {count}), {pct}% {sent} / {size}', + 'win_pcapps.couldnt_list': 'Couldn’t list this PC’s apps: {error}', + 'win_phoneview.the_phone': 'the phone', + 'win_phoneview.unlock_to_open': 'Unlock {phone} to open {app}', + 'win_phoneview.setup_adb_first': 'Set up wireless debugging on the Phone page first', + 'win_phoneview.screenshot_copied': 'Screenshot copied: paste it with Ctrl+V', + 'win_phoneview.shortcut_refused': 'Windows refused the shortcut', + 'win_phoneview.in_start_folder': '{name} is in Start › {folder}', + 'win_phoneview.couldnt_add_start': 'Couldn’t add {name} to Start: {error}', + 'win_vcam.needs_win11': 'Needs Windows 11: Windows 10 has no virtual cameras', + 'win_vcam.not_in_build': 'Not in this build of DuoDesk', + 'win_vcam.still_legacy_name': 'Still named “TwinDesk Camera” here: it’s renamed at the next start', + 'win_vcam.setup_unfinished': 'the setup didn’t finish', + 'win_vcam.didnt_add': 'Windows didn’t add the camera: {error}', + 'win_sound_renderer.mac_sound': 'Mac sound: {error}', + 'win_sound_renderer.sending_pc_sound': 'Sending this PC’s sound: {error}', + 'win_sound_renderer.no_system_sound': 'Windows gave no system sound', + 'lin_monitor_drop.sending': 'Sending {name}, {pct}% {sent} / {size}', + 'lin_monitor_drop.sending_multi': 'Sending {name} ({index} of {count}), {pct}% {sent} / {size}', + 'lin_sound_renderer.peer_sound': '{Name}’s sound: {error}', + 'lin_sound_renderer.sending_sound': 'Sending this computer’s sound: {error}', + 'lin_sound_renderer.no_loopback': 'the sound loopback device didn’t show up', + 'lin_sound_renderer.no_track': 'no sound track', + 'lin_apps.couldnt_open': 'Couldn’t open {name}', + 'lin_apps.couldnt_open_why': 'Couldn’t open {name}: {why}', + 'lin_apps.opening': 'Opening {name}…', + 'lin_apps.couldnt_add_menu': 'Couldn’t add {name} to the app menu: {error}', + 'lin_apps.in_app_menu': '{name} is in the app menu now (as "{name}"). Pin it to the dock from there.', + 'lin_peerapps.couldnt_open': 'Couldn’t open {name}', + 'lin_peerapps.couldnt_open_why': 'Couldn’t open {name}: {why}', + 'lin_pcapps.couldnt_list': 'Couldn’t list this computer’s apps: {error}', + 'lin_gamepad.not_in_build': 'Not in this build of DuoDesk', + 'lin_gamepad.password_closed': 'The password prompt was closed', + 'lin_gamepad.uinput_not_yours': '/dev/uinput is there but not this user’s yet: log out and in again', + 'lin_helper.not_built': 'Helper not built (run npm run build:helper)', + 'lin_helper.stopped': 'The helper stopped ({code})', + 'lin_main.no_certificate': 'No certificate: {error}', + 'lin_pcscreen.sound_error': 'Sound: {error}', + 'lin_phoneview.the_phone': 'the phone', + 'lin_phoneview.unlock_to_open': 'Unlock {phone} to open {app}', + 'lin_phoneview.setup_adb_first': 'Set up wireless debugging on the Phone page first', + 'lin_sendto.send_to_menu': 'Send to {name} (DuoDesk)', + 'lin_sound.sending_sound': 'Sending this computer’s sound: {error}', + 'lin_sshd.couldnt_add_key': 'Couldn’t add {name}’s key: {error}', + 'lin_sshd.key_still_installed': '{Name}’s key is still installed: {error}', + 'lin_sshd.password_closed': 'The password prompt was closed', + 'lin_sshd.setup_failed': 'Setup failed: {error}', + 'lin_vcam.not_in_build': 'Not in this build of DuoDesk', + 'lin_vcam.still_legacy_name': 'Still named “{legacy}” here: it’s renamed at the next start', + 'lin_vcam.password_closed': 'The password prompt was closed', + 'lin_vcam.no_device': 'v4l2loopback is loaded but has no “{name}” device', + 'lin_vdd.mutter_needs_gnome': 'Extend on Wayland needs GNOME (its virtual monitors)', + 'lin_vdd.needs_pipewire_plugin': 'Extend needs GStreamer’s PipeWire plugin (gstreamer1.0-pipewire)', + 'lin_vdd.nvidia_no_x11_monitor': 'NVIDIA’s driver doesn’t let DuoDesk add a monitor on X11. Extend works on GNOME with Wayland, or with the open-source driver', + 'lin_vdd.no_spare_output': 'Your graphics driver has no spare output for a virtual monitor', + 'lin_vdd.needs_python_gi': 'Extend needs Python 3 with GObject (python3-gi)', + 'lin_vdd.couldnt_check_monitors': 'Couldn’t check the monitors: {error}', + 'lin_vdd.switch_off_title': 'Switch off DuoDesk’s extra screen?', + 'lin_vdd.switch_off_detail': 'DuoDesk’s extra screen for Extend is on ({names}), so windows can end up on a screen nobody sees until Extend is on. Switching it off makes your monitors go black for a moment.', + 'lin_vdd.switch_it_off': 'Switch it off', + 'lin_vdd.leave_it_on': 'Leave it on', + 'lin_vdd.nv_removed_logout': 'Removed. Log out and back in to finish.', + 'lin_vdd.nv_logout_installing': 'Log out and back in once to finish installing.', + 'lin_vdd.nv_needs_settings': 'NVIDIA’s driver needs the extra screen in its settings. Install asks for your password once, then log out and back in. If you later plug a monitor into another port, install again.', + 'lin_vdd.nv_removed_msg': 'Removed: log out and back in to finish', + 'lin_vdd.nv_logout_adding': 'Log out and back in once to finish adding the extra screen for Extend', + 'lin_vdd.nv_no_port': 'NVIDIA’s driver doesn’t let DuoDesk add a monitor on X11, and this card has no free DisplayPort port for one', + 'lin_vdd.couldnt_add': 'Couldn’t add the virtual monitor: {error}', + 'lin_vdd.couldnt_remove': 'Couldn’t remove the virtual monitor: {error}', + 'lin_vdd.monitor_went_away': 'The virtual monitor went away', + 'lin_vdd.switched_off_msg': 'Something on this computer switched the extra screen off (in a virtual machine, its guest tools do that)', + 'lin_vdd.couldnt_resize': 'Couldn’t resize the virtual monitor: {error}', + 'lin_vdd.too_long': 'it took too long', + 'lin_vdd.monitor_stopped': 'the virtual monitor stopped', + 'lin_vdd.no_spare_output_short': 'no spare output', + 'lin_vdd.didnt_come_on': '{output} didn’t come on', + 'lin_vdd.desktop_didnt_switch_on': 'the desktop didn’t switch {output} on', + 'lin_vdd.switched_off_again': 'something on this computer switched it off again (in a virtual machine, its guest tools do that)', + 'lin_vdd.password_closed': 'the password prompt was closed', + 'lin_vdd.not_allowed': 'not allowed to switch the output', + 'lin_vdd.desktop_no_answer': 'the desktop didn’t answer', + 'lin_vdd.no_free_dp': 'no free DisplayPort port', + 'lin_vdd.logout_to_finish': 'log out and back in once to finish installing', + 'lin_vdd.no_sizes': 'the extra screen has no sizes', + 'lin_vdd.desktop_didnt_switch_it_on': 'the desktop didn’t switch it on', + 'lin_vdd.password_closed_cap': 'The password prompt was closed', + 'lin_vdd.install_failed': 'Installing the virtual display helper failed: {error}', + 'lin_vdd.remove_failed': 'Removing the virtual display helper failed: {error}', + 'mac_ipc.open_in_window': 'Open in a Window', + 'mac_ipc.add_to_dock': 'Add to Dock', + 'mac_fclip.couldnt_use_one': 'Couldn’t use {keys}. Another app may have it.', + 'mac_fclip.couldnt_use_two': 'Couldn’t use {first} and {second}. Another app may have it.', + 'mac_phoneview.the_phone': 'the phone', + 'mac_phoneview.unlock_to_open': 'Unlock {phone} to open {app}', + 'mac_phoneview.setup_adb_first': 'Set up wireless debugging on the Phone page first', + 'mac_phoneview.in_dock': '{name} is in the Dock', + 'mac_phoneview.couldnt_add_dock': 'Couldn’t add {name} to the Dock', + 'mac_vcam.not_in_build': 'Not in this build', + 'mac_vcam.obs_turn_on': 'Turn on OBS Virtual Camera in System Settings › General › Login Items & Extensions › Camera Extensions (or press Start Virtual Camera in OBS once), then turn this on again', + 'mac_vcam.obs_install': 'Install OBS Studio and press Start Virtual Camera in it once, then turn this on again', + 'mac_vcam.not_in_build_release': 'Not in this build: macOS takes camera extensions only from DuoDesk signed by its developer (a release build). Choose OBS Virtual Camera instead', + 'mac_vcam.move_to_applications': 'Move DuoDesk to the Applications folder first: macOS installs camera extensions only from there', + 'mac_vcam.allow_in_settings': 'Allow it in System Settings › General › Login Items & Extensions › Camera Extensions (macOS asks once)', + 'mac_vcam.obs_missing': 'OBS Virtual Camera isn’t here', + 'mac_vcam.didnt_install': 'macOS didn’t install the camera: {error}', + 'mac_vcam.installed_after_restart': 'It’s installed after the Mac restarts', + 'mesh_app.name_is_reached_through': '{name} is reached through {via}', + 'mesh_app.forget_name': 'Forget {name}', + 'mesh_share.displays': 'Displays', + 'mesh_overview.via_not_linked_to_this': 'Via {via} · not linked to this PC', + 'mesh_overview.linked_to_count': 'linked to {count}', + 'mesh_overview.looks_different_now_forget_it': 'Looks different now. Forget it and pair again.', + 'mesh_overview.selected': 'Selected', + 'mesh_overview.use': 'Use', + 'mesh_overview.cursor': 'Cursor', + 'mesh_overview.device': 'Device', + 'mesh_overview.cursor_sharing_is_off_for': 'Cursor sharing is off for it', + 'mesh_overview.no_devices_yet': 'No devices yet', + 'meshl_overview.error_connect_by_address': '{error}. Connect by address still works.', + 'meshl_overview.via_not_linked': 'Via {via} · not linked to this PC', + 'meshl_overview.linked_to': 'linked to {count}', + 'meshl_overview.looks_different_now': 'Looks different now. Forget it and pair again.', + 'meshl_overview.selected': 'Selected', + 'meshl_overview.use': 'Use', + 'meshl_overview.cursor': 'Cursor', + 'meshl_overview.device': 'Device', + 'meshl_overview.cursor_sharing_off': 'Cursor sharing is off for it', + 'meshl_overview.no_devices_yet': 'No devices yet', + 'meshl_multi.not_paired_here': 'Not paired here', + 'meshl_multi.out_of_reach': 'Out of reach', + 'meshl_multi.name_state_blocked': '{name} — {state}: not connected to this computer, so the pointer stops before it', + 'meshl_multi.name_state_behind': '{name} — {state}: the pointer gets there only past a device it can\'t reach from here', + 'meshl_multi.name_state': '{name} — {state}', + 'meshl_multi.blocked_many_behind': '{names} aren\'t connected to this computer, so the pointer stops before them and doesn\'t get to the devices past them.', + 'meshl_multi.blocked_many': '{names} aren\'t connected to this computer, so the pointer stops before them.', + 'meshl_multi.blocked_one_behind': '{names} isn\'t connected to this computer, so the pointer stops before it and doesn\'t get to the devices past it.', + 'meshl_multi.blocked_one': '{names} isn\'t connected to this computer, so the pointer stops before it.', + 'meshl_multi.pair_them': 'Pair them with this computer.', + 'meshl_multi.pair_them_or_join': 'Pair them with this computer, or turn on Join every device automatically.', + 'meshl_multi.pair_it': 'Pair it with this computer.', + 'meshl_multi.pair_it_or_join': 'Pair it with this computer, or turn on Join every device automatically.', + 'meshl_multi.now_click_lit_place': 'Now click a lit place next to another device to move it there, or another device to swap places.', + 'meshl_multi.click_device_then_place': 'Click a device, then a place next to another device to move it there, or another device to swap places. Devices sit side by side, with no empty space between them.', + 'meshl_multi.computers': 'Computers', + 'meshl_multi.connect_same_network_only': 'Connect to this one over the same network only, not Bluetooth. Phones over Wi-Fi, a USB cable or Bluetooth, as before', + 'meshl_multi.join_on_hint': 'Pair with one device and the rest connect to this one by themselves. Devices you pair with can introduce others, without a pairing code', + 'meshl_multi.join_off_hint': 'Off: this computer neither introduces devices to each other nor accepts an introduction. Pair each device yourself', + 'meshl_app.is_reached_through': '{name} is reached through {via}', + 'meshl_app.forget_name': 'Forget {name}', + 'meshm_cursor.another_computers_mouse_on': 'Another computer’s mouse on this Mac, and this Mac’s on a phone', + 'meshm_display.as_set_above': 'As set above', + 'meshm_display.mirror_display': 'Mirror {display}', + 'meshm_display.displays': 'Displays', + 'meshm_multi.this_mac': 'This Mac', + 'meshm_multi.not_paired_here': 'Not paired here', + 'meshm_multi.out_of_reach': 'Out of reach', + 'meshm_multi.name_state': '{name} — {state}', + 'meshm_multi.name_state_not_connected_to': '{name} — {state}: not connected to this Mac, so the pointer stops before it', + 'meshm_multi.name_state_the_pointer_gets': '{name} — {state}: the pointer gets there only past a device it can\'t reach from here', + 'meshm_multi.names_isnt_connected_to_this': '{names} isn\'t connected to this Mac, so the pointer stops before it.', + 'meshm_multi.names_arent_connected_to_this': '{names} aren\'t connected to this Mac, so the pointer stops before them.', + 'meshm_multi.names_isnt_connected_to_this_behind': '{names} isn\'t connected to this Mac, so the pointer stops before it and doesn\'t get to the devices past it.', + 'meshm_multi.names_arent_connected_to_this_behind': '{names} aren\'t connected to this Mac, so the pointer stops before them and doesn\'t get to the devices past them.', + 'meshm_multi.pair_it_with_this_mac': 'Pair it with this Mac.', + 'meshm_multi.pair_them_with_this_mac': 'Pair them with this Mac.', + 'meshm_multi.pair_it_with_this_mac_join': 'Pair it with this Mac, or turn on Join every device automatically.', + 'meshm_multi.pair_them_with_this_mac_join': 'Pair them with this Mac, or turn on Join every device automatically.', + 'meshm_multi.now_click_a_lit_place': 'Now click a lit place next to another device to move it there, or another device to swap places.', + 'meshm_multi.click_a_device_then_a': 'Click a device, then a place next to another device to move it there, or another device to swap places. Devices sit side by side, with no empty space between them.', + 'meshm_multi.pair_with_one_device_and': 'Pair with one device and the rest connect to this Mac by themselves. Devices you pair with can introduce others, without a pairing code', + 'meshm_multi.off_this_mac_neither_introduces': 'Off: this Mac neither introduces devices to each other nor accepts an introduction. Pair each device yourself', + 'meshm_overview.devices': 'Devices', + 'meshm_overview.another_device': 'another device', + 'meshm_overview.count_direct_link_one': '{count} direct link', + 'meshm_overview.count_direct_link_other': '{count} direct links', + 'meshm_overview.device': 'Device', + 'meshm_overview.device_lower': 'device', + 'meshm_overview.in_use': 'In use', + 'meshm_overview.use': 'Use', + 'meshm_overview.no_devices_yet': 'No devices yet', + 'meshm_start.is_reached_through': '{name} is reached through {via}', + 'meshm_start.forget_name': 'Forget {name}', + 'app.sections': 'Sections', + 'pair.code': 'Code', + 'app.mesh_on': 'Multi-device is on: Mesh mode', + 'app.hotspot_password': 'Hotspot password', + 'rezume.aria_web': 'Web pages', + 'rezume.aria_video': 'Videos', + 'rezume.aria_docs': 'Documents', + 'rezume.aria_apps': 'Apps', + 'rezume.aria_mirror': 'Screen mirroring', + 'rezume.aria_send': 'Send', + 'rezume.aria_receive': 'Receive', + 'rezume.aria_push': 'Push', + 'rezume.aria_notify': 'Notify', + 'rezume.aria_taskbar': 'Taskbar', + 'rezume.aria_tray': 'Tray', + 'rezume.aria_tab': 'Tab', + + // Remaining pages (Windows, Linux, macOS) + 'win_filedrop.drop_off': 'Dropping files onto Monitor 2 is off (Files tab)', + 'win_filedrop.only_files': 'Only files can be sent (not folders)', + 'win_filedrop.sent': 'Sent', + 'win_filedrop.sent_to': 'Sent to {where}', + 'win_filedrop.not_everything': 'Not everything arrived', + 'win_filedrop.dropped_on': 'Dropped on {name}', + 'win_filedrop.dropped_on_in': 'Dropped on {name} in {where}', + 'win_filedrop.drag_refused': '{Name} couldn’t take the drag', + 'win_filedrop.drag_cancelled': 'Drag cancelled', + 'win_filedrop.not_connected': 'Not connected to {name}', + 'win_filedrop.too_big': 'Too big', + 'win_filedrop.cancelled': 'Cancelled', + 'win_filedrop.saved_on': 'Saved on {name}', + 'win_filedrop.saved_on_path': 'Saved on {name}: {path}', + 'win_filedrop.couldnt_save': '{Name} couldn’t save it', + 'win_filedrop.refuse_not_allowed': '{Name} doesn’t accept dropped files (its Files tab)', + 'win_filedrop.refuse_too_big': 'Too big for {name}', + 'win_filedrop.refuse_busy': '{Name} is busy with another file', + 'win_filedrop.refuse_other': '{Name} refused it', + 'win_filerecv.saved_to': 'Saved to {dir}', + 'win_filerecv.n_of_count_failed': '{failed} of {count} failed', + 'win_dragrecv.dropped': '{label} dropped', + 'win_dragrecv.dropped_in': '{label} dropped in {where}', + 'win_dragrecv.failed': '{label}: failed', + 'win_dragrecv.cancelled': '{label}: cancelled', + 'win_helper.exited': 'helper exited', + 'win_helper.not_running': 'helper not running', + 'win_helper.cmd_timed_out': 'helper: {cmd} timed out', + 'win_link.pair_failed_code': 'Pairing failed ({code}).', + 'win_link.no_duodesk_at': 'No DuoDesk at {address}.', + 'win_link.could_not_connect': 'Could not connect to {address}.', + 'win_link.could_not_connect_why': 'Could not connect to {address} ({why}).', + 'win_link.connection_closed': 'The connection to {name} closed.', + 'win_link.pair_refused': '{Name} refused pairing.', + 'win_link.pair_timeout': 'Pairing timed out.', + 'win_link.pair_busy': '{Name} is already pairing with another device.', + 'win_link.version_mismatch': '{Name} runs a different DuoDesk version. Update both apps.', + 'win_link.not_nearby_any_more': '{Name} isn’t nearby any more.', + 'win_link.pair_cancelled_on': 'Pairing was cancelled on {name}.', + 'win_link.bad_pair_message': '{Name} sent a bad pairing message.', + 'win_link.mac_forgot_me': 'Your Mac forgot {me}. Pair again.', + 'win_link.not_nearby': '{Name} isn’t nearby', + 'win_link.no_welcome': 'No welcome from {name}', + 'win_link.took_over': 'Another device took over', + 'win_link.in_use': 'In use by another device', + 'win_link.closed_link': '{Name} closed the link ({code})', + 'win_main.pasting_files_from_one': 'Pasting {count} file from {name}', + 'win_main.pasting_files_from_other': 'Pasting {count} files from {name}', + 'win_main.sent_name_to_peer': 'Sent {name} to {peer}', + 'win_main.not_everything_on': 'Not everything arrived on {peer}', + 'win_main.on_peer_some_failed': 'On {name}: some files didn’t make it', + 'win_smb.cant_create': 'Can’t create {folder}: {error}', + 'win_smb.pick_folder': 'Pick a folder first', + 'win_smb.no_dpapi': 'Windows can’t protect the password here (DPAPI unavailable)', + 'win_smb.sharing_failed': 'Sharing failed: {error}', + 'win_smb.cancelled_still_shared': 'Cancelled. The folder is still shared.', + 'win_smb.couldnt_connect_folder': 'Couldn’t connect {name}’s folder: {error}', + 'win_vdd.remove_failed': 'Removing the display driver failed: {error}', + 'win_vdd.didnt_finish': 'it didn’t finish', + 'win_vdd.cant_read_account': 'couldn’t read this account’s id', + 'win_vdd.didnt_appear': 'The virtual monitor didn’t appear', + 'win_vdd.didnt_go_away': 'The virtual monitor didn’t go away', + 'win_sender.window_went_away': 'The captured window went away', + 'win_sender.monitor_went_away': 'The captured monitor went away', + 'win_sender.capturing_error': 'Capturing: {error}', + 'win_sender.answer_error': '{Name}’s answer: {error}', + 'lin_dragrecv.dropped_in': '{file} dropped in {where}', + 'lin_dragrecv.desktop': 'Desktop', + 'lin_filedrop.drop_off': 'Dropping files onto Monitor 2 is off (Files tab)', + 'lin_filedrop.only_files': 'Only files can be sent (not folders)', + 'lin_filedrop.sent': 'Sent', + 'lin_filedrop.sent_to': 'Sent to {where}', + 'lin_filedrop.not_everything': 'Not everything arrived', + 'lin_filedrop.dropped_on': 'Dropped on {name}', + 'lin_filedrop.dropped_on_in': 'Dropped on {name} in {where}', + 'lin_filedrop.drag_failed': '{Name} couldn’t take the drag', + 'lin_filedrop.drag_cancelled': 'Drag cancelled', + 'lin_filedrop.cancelled': 'Cancelled', + 'lin_filedrop.saved_on': 'Saved on {name}', + 'lin_filedrop.saved_on_path': 'Saved on {name}: {path}', + 'lin_filedrop.couldnt_save': '{Name} couldn’t save it', + 'lin_main.pasting_files_one': 'Pasting {count} file', + 'lin_main.pasting_files_other': 'Pasting {count} files', + 'lin_main.receiving_files_one': 'Receiving {count} file', + 'lin_main.receiving_files_other': 'Receiving {count} files', + 'lin_main.transfer_from_percent': '{what} from {name} · {percent} %', + 'lin_main.sent_file_to': 'Sent {file} to {name}', + 'lin_main.not_everything_arrived': 'Not everything arrived', + 'lin_main.not_everything_arrived_on': 'Not everything arrived on {name}', + 'lin_main.on_peer': 'On {name}', + 'lin_main.to_peer': 'To {name}', + 'lin_main.sending_to_percent': 'Sending {file} to {name} · {percent} %', + 'lin_main.fix_input_done': 'Done. Log out and back in once to finish.', + 'lin_filerecv.saved_to': 'Saved to {dir}', + 'lin_filerecv.n_failed': '{failed} of {count} failed', + 'lin_helper.timed_out': 'helper: {cmd} timed out', + 'lin_helper.not_running': 'helper not running', + 'lin_helper.exited': 'helper exited', + 'lin_smb.password_closed': 'The password prompt was closed', + 'lin_smb.sharing_failed': 'Sharing failed: {error}', + 'lin_smb.cancelled_still_shared': 'Cancelled. The folder is still shared.', + 'lin_link.pair_refused': '{Name} refused pairing.', + 'lin_link.pair_timeout': 'Pairing timed out.', + 'lin_link.pair_busy': '{Name} is already pairing with another device.', + 'lin_link.version_mismatch': '{Name} runs a different DuoDesk version. Update both apps.', + 'lin_link.pair_failed_code': 'Pairing failed ({code}).', + 'lin_link.not_nearby_pair': '{Name} isn’t nearby any more.', + 'lin_link.not_nearby': '{Name} isn’t nearby', + 'lin_link.pair_cancelled': 'Pairing was cancelled on {name}.', + 'lin_link.bad_pair_message': '{Name} sent a bad pairing message.', + 'lin_link.no_duodesk_at': 'No DuoDesk at {address}.', + 'lin_link.could_not_connect': 'Could not connect to {address}.', + 'lin_link.could_not_connect_why': 'Could not connect to {address} ({why}).', + 'lin_link.connection_closed': 'The connection to {name} closed.', + 'lin_link.identity_changed': 'This Mac looks different now. Forget it and pair again.', + 'lin_link.forgot_me': 'Your Mac forgot {me}. Pair again.', + 'lin_link.no_welcome': 'No welcome from {name}', + 'lin_link.stopped_answering': '{Name} stopped answering', + 'lin_link.asleep': '{Name} is asleep', + 'lin_link.disconnected': '{Name} disconnected', + 'lin_link.took_over': 'Another device took over', + 'lin_link.in_use': 'In use by another device', + 'lin_link.closed_link': '{Name} closed the link ({code})', + 'lin_sender.window_went_away': 'The captured window went away', + 'lin_sender.monitor_went_away': 'The captured monitor went away', + 'lin_sender.capturing_error': 'Capturing: {error}', + 'lin_sender.answer_error': '{Name}’s answer: {error}', + 'mac_appsend.window_went_away': 'The captured window went away', + 'mac_appsend.monitor_went_away': 'The captured monitor went away', + 'mac_appsend.capturing_error': 'Capturing: {error}', + 'mac_appsend.answer_error': '{Name}’s answer: {error}', + 'mac_activity.let_control': 'Let DuoDesk control {app} to offer its tabs: System Settings › Privacy & Security › Automation › DuoDesk', + 'mac_activity.let_control_events': 'Let DuoDesk control System Events to offer documents: System Settings › Privacy & Security › Automation › DuoDesk', + 'lin_smb.pick_folder': 'Pick a folder first', + 'lin_smb.folder_name_cant': 'That folder’s name can’t be shared', + 'lin_smb.unexpected_user': 'Unexpected user name', + 'lin_filedrop.refuse_not_allowed': '{Name} doesn’t accept dropped files (its Files tab)', + 'lin_filedrop.refuse_too_big': 'Too big for {name}', + 'lin_filedrop.refuse_busy': '{Name} is busy with another file', + 'lin_filedrop.refuse_other': '{Name} refused it', + 'sh_camera_view.picture_cant_get_through': 'The picture can’t get through from {name}: are both on the same network?', + 'sh_camera_view.doesnt_share_camera': '{name} doesn’t share its camera: turn on Camera › “Let this computer see the camera” there.', + 'sh_camera_view.peer_camera_didnt_start': '{name}’s camera didn’t start: {error}', + 'sh_camera_view.unknown_error': 'unknown', + 'sh_camera_view.peer_stopped_camera': '{name} stopped its camera.', + 'pfx_home.paused': 'Paused', + 'pfx_home.picture_sent': 'Picture sent', + 'pfx_home.picture_received': 'Picture received', + 'pfx_home.copied_to': 'Copied to {name}', + 'pfx_home.copied_from': 'Copied from {name}', + 'pfx_home.battery': 'Battery', + 'pfx_home.this_desk': 'This desk', + 'pfx_home.cant_look_network': 'Can’t look on this network', + 'pfx_home.identity_changed': 'Identity changed: pair again', + 'pfx_home.linked_with': 'Linked with {name}', + 'pfx_home.linked_with_device': 'Linked with a device', + 'pfx_home.same_code': 'Same code on both?', + 'pfx_home.pairing_failed': 'Pairing didn’t finish', + 'pfx_home.devices_nearby_one': '{n} device nearby', + 'pfx_home.devices_nearby_other': '{n} devices nearby', + 'pfx_home.device': 'Device', + 'pfx_home.mesh': 'Mesh', + 'pfx_home.mesh_preview': 'Mesh preview', + 'pfx_home.device_in_mesh': 'device in the mesh', + 'pfx_home.devices_in_mesh': 'devices in the mesh', + 'pfx_home.device_could_join': 'device could join', + 'pfx_home.devices_could_join': 'devices could join', + 'pfx_home.restarting_mesh': 'Restarting into mesh mode…', + 'pfx_home.connected_now_one': '{n} connected now', + 'pfx_home.connected_now_other': '{n} connected now', + 'pfx_home.pair_first': 'Pair devices first; they show up here', + 'pfx_home.one_clipboard_all': 'One clipboard and one set of notifications for all of them', + 'pfx_home.lamp_helper': 'Helper', + 'pfx_home.no_le': 'No LE', + 'pfx_home.lamp_display_driver': 'Display driver', + 'pfx_home.removing': 'Removing…', + 'pfx_home.status_of_computer': 'Status of this computer', + 'pfx_home.lamp_aria': '{label}: {value}', + 'pfx_home.lamp_aria_go': '{label}: {value}. Go to the setting', + 'pfx_home.needs_fix_one': '{n} needs a fix', + 'pfx_home.needs_fix_other': '{n} need a fix', + 'pfx_home.all_good': 'All good', + 'pfx_home.checks_line': '{n} checks · {name}', + 'pfx_home.n_of_6_on': '{n} of 6 on', + 'pfx_home.ovmap_sub': 'What the Overview shows. Each part is drawn while it’s on.', + 'pfx_home.checking_updates': 'Checking for updates…', + 'pfx_home.version_skipped': '{version} skipped', + 'pfx_home.version_available': '{version} available', + 'pfx_home.new_version_skipped': 'A new version skipped', + 'pfx_home.new_version_available': 'A new version available', + 'pfx_home.couldnt_check_updates': 'Couldn’t check for updates', + 'pfx_input.on_name': 'On {name}', + 'pfx_input.is_using': '{Name} is using {me}', + 'pfx_input.paused_bluetooth': 'Paused · over Bluetooth', + 'pfx_input.sharing_off': 'Sharing off', + 'pfx_input.edges_locked': 'Edges locked · {where}', + 'pfx_input.speed': 'speed', + 'pfx_input.edge_px': 'edge {n} px', + 'pfx_input.no_edge': 'no edge', + 'pfx_input.keyboard_stays_here': 'keyboard stays here', + 'pfx_input.keyboard_off': 'keyboard off', + 'pfx_input.sharing_paused': 'sharing paused', + 'pfx_input.typing_from': 'typing from {name}', + 'pfx_input.keys_go_to': 'keys go to', + 'pfx_input.typing_here': 'typing here', + 'pfx_input.follows_pointer': 'follows the pointer', + 'pfx_input.double_tap_switch': 'double-tap {key} to switch', + 'pfx_input.double_tap': 'double-tap {key}', + 'pfx_input.unavailable': 'Unavailable', + 'pfx_input.not_available_here': 'not available here', + 'pfx_input.as_controller': '{name} as a controller', + 'pfx_input.open_remote_on': 'open remote on {name}', + 'pfx_input.as_remote': '{name} as a remote', + 'pfx_input.gamepad_not_here': 'gamepad · not here', + 'pfx_input.gamepad_off': 'gamepad · off', + 'pfx_input.gamepad_live': 'gamepad · live', + 'pfx_input.gamepad_ready': 'gamepad · ready', + 'pfx_input.controller': 'Controller', + 'pfx_input.hash_no_connection': '# no connection', + 'pfx_input.hash_needs_wifi': '# needs Wi-Fi', + 'pfx_input.hash_off': '# off', + 'pfx_input.connected_as': 'connected as', + 'pfx_input.you': 'you', + 'pfx_input.asking_name': 'asking {name}', + 'pfx_input.waiting_for_name': 'waiting for {name}', + 'pfx_input.not_available_on': 'not available on {name}', + 'pfx_input.problem': 'problem', + 'pfx_input.to_name': 'to {name}', + 'pfx_input.from_name': 'from {name}', + 'pfx_input.setting_up': 'setting up…', + 'pfx_input.listening': 'listening :22', + 'pfx_input.x_not_installed': '✗ not installed', + 'pfx_input.x_stopped': '✗ stopped', + 'pfx_input.checking': 'checking…', + 'pfx_input.can_connect': '{name} can connect', + 'pfx_input.badge_update': 'update', + 'pfx_input.getting_what': 'Getting {what}…', + 'pfx_input.untitled': 'Untitled', + 'pfx_input.page': 'page', + 'pfx_input.document': 'document', + 'pfx_input.app': 'app', + 'pfx_input.connect_pc_or_phone': 'connect a computer or phone', + 'pfx_input.rezume_off': 'ReZume is off', + 'pfx_input.turn_on_carry_on': 'turn it on to carry on elsewhere', + 'pfx_input.update_name': 'Update {name}', + 'pfx_input.no_rezume_there': 'no rezume there yet', + 'pfx_input.off_on_name': 'Off on {name}', + 'pfx_input.turn_on_there_too': 'turn it on there too', + 'pfx_input.from_name_cap': 'From {name}', + 'pfx_input.offered': 'Offered', + 'pfx_input.getting_it': 'Getting it…', + 'pfx_input.ready_to_send': 'ready to send', + 'pfx_input.nothing_handed_over': 'nothing handed over yet', + 'sh_kvm_map_ui.identify': 'Identify', + 'sh_kvm_map_ui.identify_title': 'Show each monitor’s number on it, on both computers', + 'sh_kvm_map_ui.drag_to_desk_position': 'Drag {them} to where it is on your desk. The pointer crosses only where the screens touch (highlighted).', + 'sh_kvm_map_ui.drag_to_side': 'Drag {them} to the side it is on. Its screens show here once it’s connected (with an up-to-date DuoDesk).', + 'sh_kvm_map_ui.is_left_of': '{them} is to the left of {me}', + 'sh_kvm_map_ui.is_right_of': '{them} is to the right of {me}', + 'sh_kvm_map_ui.is_above': '{them} is above {me}', + 'sh_kvm_map_ui.is_below': '{them} is below {me}', + 'sh_mesh_intro.every_device_linked': 'Every device linked to every other: one clipboard and one set of notifications for all, and the mouse and keyboard across all of them.', + 'sh_mesh_intro.turn_on_multi_device': 'Turn on Multi-device?', + 'sh_mesh_intro.mesh_links_three_more': 'Mesh mode links three or more computers and phones at once: every device to every other.', + 'sh_mesh_intro.only_two_keep_off': 'If you connect only two devices, keep it off.', + 'pfx_phone_media.this_computer': 'this computer', + 'pfx_phone_media.connect_phone': 'Connect {phone}', + 'pfx_phone_media.waiting_permission': 'Waiting for permission on {phone}', + 'pfx_phone_media.waiting_for': 'Waiting for {phone}…', + 'pfx_phone_media.no_conversations': 'No conversations yet', + 'pfx_phone_media.unread_phone': 'Unread · {phone}', + 'pfx_phone_media.chat_apps_on': 'Chat apps on', + 'pfx_phone_media.read_only': 'Read-only', + 'pfx_phone_media.you_said': 'You: {text}', + 'pfx_phone_media.n_this_week': '{n} this week', + 'pfx_phone_media.n_missed_today': '{n} missed today', + 'pfx_phone_media.this_week': 'This week', + 'pfx_phone_media.last_call': 'Last · {name} · {time}', + 'pfx_phone_media.calling_phone': 'Calling · {phone}', + 'pfx_phone_media.answer_or_decline': 'Answer or decline below', + 'pfx_phone_media.outgoing': 'Outgoing', + 'pfx_phone_media.on_call': 'On call', + 'pfx_phone_media.muted': 'Muted', + 'pfx_phone_media.sound_here': 'Sound on this computer', + 'pfx_phone_media.sound_on_phone': 'Sound on {phone}', + 'pfx_phone_media.ended': 'Ended', + 'pfx_phone_media.call_ended': 'Call ended', + 'pfx_phone_media.calls_ring_here': 'Calls ring here · {phone}', + 'pfx_phone_media.no_recent_calls': 'No recent calls', + 'pfx_phone_media.no_phone': 'No phone', + 'pfx_phone_media.waiting': 'Waiting', + 'pfx_phone_media.turn_on_calls_top': 'Turn on Calls at the top', + 'pfx_phone_media.items': 'Items', + 'pfx_phone_media.n_videos': '{n} videos', + 'pfx_phone_media.newest_time': 'Newest {time}', + 'pfx_phone_media.only_chosen_photos': 'Only chosen photos', + 'pfx_phone_media.photos_need_wifi_usb': 'Photos need Wi-Fi or USB', + 'pfx_phone_media.loading_phone': 'Loading {phone}…', + 'pfx_phone_media.connect_a_device': 'Connect a device', + 'pfx_phone_media.playing_bluetooth': 'Playing over Bluetooth', + 'pfx_phone_media.from_name': 'From {name}', + 'pfx_phone_media.waiting_for_name': 'Waiting for {name}', + 'pfx_phone_media.turned_off_on': 'Turned off on {name}', + 'pfx_phone_media.error': 'Error', + 'pfx_phone_media.to_name': 'To {name}', + 'pfx_phone_media.lane_in': 'In', + 'pfx_phone_media.lane_out': 'Out', + 'pfx_phone_media.no_device': 'No device', + 'pfx_phone_media.starting': 'Starting', + 'pfx_phone_media.connect_to_use_camera': 'Connect a device to use its camera', + 'pfx_phone_media.live_fps': 'Live · {n} fps', + 'pfx_phone_media.vcam_live': 'Virtual camera live', + 'pfx_phone_media.vcam_ready': 'Virtual camera ready', + 'pfx_phone_media.turned_deg': 'Turned {n}°', + 'pfx_phone_media.window_open': 'Window open', + 'pfx_phone_media.names_viewing_camera': '{names} are viewing {me}’s camera', + 'pfx_phone_media.name_viewing_camera': '{name} is viewing {me}’s camera', + 'pfx_screens.n_window_one': '{n} window', + 'pfx_screens.n_window_other': '{n} windows', + 'pfx_screens.n_app_one': '{n} app', + 'pfx_screens.n_app_other': '{n} apps', + 'pfx_screens.from_who': 'From {name}', + 'pfx_screens.waiting': 'Waiting', + 'pfx_screens.extra_screen': 'Extra screen', + 'pfx_screens.main_screen': 'Main screen', + 'pfx_screens.window_closed': 'window closed', + 'pfx_screens.nobody_watching': 'Nobody is watching it', + 'pfx_screens.open_starts_sharing': 'Open starts sharing on {name}', + 'pfx_screens.turn_on_sharing': 'Turn on sharing on {name}', + 'pfx_screens.ms_delay': '{n} ms delay', + 'pfx_screens.view_only': 'view only', + 'pfx_screens.muted': 'muted', + 'pfx_screens.extra_screen_extend': 'Extra screen · Extend', + 'pfx_screens.screen_mirror': '{name} · Mirror', + 'pfx_screens.this_screen': 'This screen', + 'pfx_screens.of_cap_mbps': 'of {n} Mbps', + 'pfx_screens.starting': 'Starting', + 'pfx_screens.connecting': 'Connecting', + 'pfx_screens.adding_virtual_display': 'Adding the virtual display…', + 'pfx_screens.starts_when_opens': 'Starts when {name} opens it', + 'pfx_screens.connecting_to': 'Connecting to {name}', + 'pfx_screens.sound': 'sound', + 'pfx_screens.input_from': 'input from {name}', + 'pfx_screens.remote_start': 'remote start', + 'pfx_screens.gauge_network': '{n} of {cap} Mbps · network {net}', + 'pfx_screens.gauge': '{n} of {cap} Mbps', + 'pfx_screens.unit_app': 'app', + 'pfx_screens.unit_apps': 'apps', + 'pfx_screens.loading': 'Loading', + 'pfx_screens.no_apps': 'No apps', + 'pfx_screens.opening_here_off': 'Opening them here is off', + 'pfx_screens.each_opens_here': 'Each opens in its own window here', + 'pfx_screens.open_here': 'Open here', + 'pfx_screens.sharing_yours_off': 'Sharing yours is off', + 'pfx_screens.windows_on_name': '{windows} on {name}', + 'pfx_screens.yours_can_open': 'Yours can open there', + 'pfx_screens.shown_of_total': '{shown} of {total}', + 'pfx_screens.unit_window': 'window', + 'pfx_screens.unit_windows': 'windows', + 'pfx_screens.wireless_debugging_once': 'Wireless debugging, once, on Connection', + 'pfx_screens.connecting_to_phone': 'Connecting to the phone…', + 'pfx_screens.show_phone_screen_opens': 'Show Phone Screen opens it here', + 'pfx_screens.phone_screen_open_here': 'The phone’s screen, open here', + 'pfx_screens.phone_camera_open_here': 'The phone’s camera, open here', + 'pfx_screens.app_open_here': '{app}, open here', + 'pfx_screens.an_app': 'An app', + 'pfx_screens.pct_charging': '{n}% charging', + 'pfx_screens.sound_on': 'sound on', + 'pfx_screens.unit_of_n': 'of {n}', + 'pfx_screens.app_drawer': 'App drawer', + 'pfx_screens.each_opens_own_window': 'Each opens in its own window', + 'pfx_screens.needs_wireless_debugging': 'Needs wireless debugging', + 'pfx_screens.in_windows': 'In windows', + 'pfx_sharing.clipboard_between': 'Clipboard between your computers', + 'pfx_sharing.nothing_copied': 'Nothing copied yet', + 'pfx_sharing.copy_it_again': 'Copy it again', + 'pfx_sharing.copy_latest_again': 'Copy the latest item again', + 'pfx_sharing.latest_to': 'Latest · to {name}', + 'pfx_sharing.latest_from': 'Latest · from {name}', + 'pfx_sharing.copied': 'Copied', + 'pfx_sharing.clipboard_off_on': 'Clipboard is off on {name}', + 'pfx_sharing.copies_still_go': 'Copies still go across', + 'pfx_sharing.copy_either_paste_other': 'Copy on either one, paste on the other', + 'pfx_sharing.copies_there_paste_here': 'Copies on {name} paste here', + 'pfx_sharing.copies_here_paste_there': 'Copies here paste on {name}', + 'pfx_sharing.both_directions_off': 'Both directions are off', + 'pfx_sharing.on_switch': 'On switch', + 'pfx_sharing.instant': 'Instant', + 'pfx_sharing.not_sent_reason': 'Not sent: {reason}', + 'pfx_sharing.off_lc': 'off', + 'pfx_sharing.shown_here': 'shown here', + 'pfx_sharing.sent_lc': 'sent', + 'pfx_sharing.quiet_new_land': 'Quiet. New ones land here.', + 'pfx_sharing.text_hidden': 'Text hidden', + 'pfx_sharing.cant_read_windows_list': 'Can’t read Windows’ list', + 'pfx_sharing.cant_read_list': 'Can’t read the list', + 'pfx_sharing.nothing_comes_in': 'Nothing comes in until {name} connects', + 'pfx_sharing.waiting_first_one': 'Waiting for the first one', + 'pfx_sharing.receiving_off': 'Receiving is off', + 'pfx_sharing.latest_what': 'Latest {what}', + 'pfx_sharing.gets_your_files': 'Gets your files', + 'pfx_sharing.sending_off': 'Sending off', + 'pfx_sharing.takes_files': 'Takes files', + 'pfx_sharing.taking_off': 'Taking off', + 'pfx_sharing.n_files_one': '{n} file', + 'pfx_sharing.n_files_other': '{n} files', + 'pfx_sharing.failed_error': 'Failed: {error}', + 'pfx_sharing.file_token': 'FILE', + 'pfx_sharing.i_of_n': '{i} of {n}', + 'pfx_sharing.pasting_to': 'Pasting to {name}', + 'pfx_sharing.sending_to': 'Sending to {name}', + 'pfx_sharing.mb_of_mb': '{sent} of {total}', + 'pfx_sharing.n_more_waiting': '{n} more waiting', + 'pfx_sharing.copying_across_edge': 'Copying across the edge', + 'pfx_sharing.dragging_across_edge': 'Dragging across the edge', + 'pfx_sharing.into_folder': 'Into {folder}', + 'pfx_sharing.receiving_from': 'Receiving from {name}', + 'pfx_sharing.connect_to_send': 'Connect to send files', + 'pfx_sharing.last_file': 'Last: {name} · {ago}', + 'pfx_sharing.sent_to': 'Sent to {name}', + 'pfx_sharing.received_from': 'Received from {name}', + 'pfx_sharing.didnt_go_through': 'Didn’t go through', + 'pfx_sharing.ready_when_you_are': 'Ready when you are', + 'pfx_sharing.drop_files_below': 'Drop files below, or drag them across the screen edge', + 'pfx_sharing.their_folder': 'Their folder · {drive}', + 'pfx_sharing.folder_shared_open': 'Folder shared · open there', + 'pfx_sharing.sharing_problem': 'Sharing: problem', + 'pfx_sharing.folder_shared': 'Folder shared', + 'pfx_sharing.n_chosen': '{n} chosen', + 'pfx_sharing.gb_free': 'GB free', + 'pfx_sharing.needs_wifi': 'Needs Wi-Fi', + 'pfx_sharing.not_ready': 'Not ready', + 'pfx_sharing.cant_open_that': 'Can’t open that', + 'pfx_sharing.reading': 'Reading…', + 'pfx_sharing.folders': 'folders', + 'pfx_sharing.files': 'files', + 'pfx_sharing.in_this_folder': 'in this folder', + 'pfx_sharing.waiting_all_files_access': 'Waiting for All files access', + 'pfx_sharing.getting_ready': 'Getting {phone} ready', + 'pfx_sharing.over_bluetooth_browse': 'Over Bluetooth · connect with Wi-Fi Direct to browse', + 'pfx_sharing.opening_storage': 'Opening Storage', + 'pfx_sharing.of_gb_used_in': 'of {total} GB · {pct}% used · in {folder}', + 'pfx_sharing.capturing_into': 'Capturing into {name}', + 'pfx_sharing.importing_into': 'Importing into {name}', + 'pfx_sharing.phone_folder_open': 'Phone’s folder open', + 'pfx_sharing.sharing_a_folder': 'Sharing a folder', + 'pfx_sharing.pct_charging': '{n}% · charging', + 'pfx_sharing.this_pc': 'This PC', + 'pfx_sharing.via': 'Via', + 'pfx_sharing.wireless': 'Wireless', + 'pfx_sharing.mounted': 'Mounted', + 'pfx_sharing.in_explorer_as': 'In File Explorer as {letter}', + 'pfx_sharing.in_manager_as': 'In the file manager as {letter}', + 'pfx_sharing.in_your_manager': 'In your file manager', + 'pfx_sharing.needs_wifi_bt_no_drive': 'Needs Wi-Fi · Bluetooth can’t carry a drive', + 'pfx_sharing.wd_off_on_phone': 'Wireless debugging is off on the phone', + 'pfx_sharing.unmounting': 'Unmounting…', + 'pfx_sharing.where_cable': '{where}, through the cable', + 'pfx_sharing.where_wireless': '{where}, over wireless debugging', + 'pfx_sharing.ready_mount_this_pc': 'Ready · Mount puts it in This PC', + 'pfx_sharing.ready_mount_manager': 'Ready · Mount puts it in the file manager', + 'pfx_support.offline': 'Offline', + 'pfx_support.per_month': '/ month', + 'pfx_support.cant_reach_tip_jar': 'can’t reach the tip jar', + 'pfx_support.checkout_opened': 'checkout opened in your browser', + 'pfx_support.monthly_tip': 'monthly tip', + 'pfx_support.one_time_tip': 'one-time tip', + 'pfx_support.to_name_stripe': 'to {name} · through Stripe', + 'pfx_support.through_stripe': 'through Stripe', + 'pfx_support.copied_clipboard': 'copied to the clipboard', + 'pfx_support.opened_mail_app': 'opened in your mail app', + 'pfx_support.just_your_words': 'just your words', + 'pfx_support.with_version_info': 'with version and system info', + 'pfx_support.contact_or_issue': 'contact@beyond-media.ai · or a GitHub issue', + 'pfx_support.characters': 'characters', + 'sh_ui_support.nothing_about_computer': 'Nothing about this computer: only your message.', + 'sh_ui_support.nothing_about_computer_reply': 'Nothing about this computer: only your message and your reply address.', + 'camview.asking': 'Asking for the camera…', + 'camview.mirror_title': 'Show it as in a mirror' + }; +}); \ No newline at end of file diff --git a/shared/locales/fragments/main-process.json b/shared/locales/fragments/main-process.json new file mode 100644 index 00000000..f8cc38ed --- /dev/null +++ b/shared/locales/fragments/main-process.json @@ -0,0 +1,286 @@ +{ + "main.code_copied": { + "en": "Code copied", + "pt-BR": "Código copiado" + }, + "main.cursor_sharing_on": { + "en": "Cursor sharing on", + "pt-BR": "Compartilhamento de cursor ativado" + }, + "main.cursor_sharing_off": { + "en": "Cursor sharing off", + "pt-BR": "Compartilhamento de cursor desativado" + }, + "main.cursor_sharing_off_ble": { + "en": "Cursor sharing off over Bluetooth", + "pt-BR": "Compartilhamento de cursor desativado via Bluetooth" + }, + "main.turned_on_on": { + "en": "Turned on on {name}", + "pt-BR": "Ativado em {name}" + }, + "main.turned_off_on": { + "en": "Turned off on {name}", + "pt-BR": "Desativado em {name}" + }, + "main.with_peer_double_tap_off": { + "en": "With {name}. Double-tap {key} to turn it off", + "pt-BR": "Com {name}. Toque duplo em {key} para desativar" + }, + "main.double_tap_off": { + "en": "Double-tap {key} to turn it off", + "pt-BR": "Toque duplo em {key} para desativar" + }, + "main.comes_back_wifi_double_tap_on": { + "en": "It comes back on Wi-Fi. Double-tap {key} to turn it on", + "pt-BR": "Volta no Wi-Fi. Toque duplo em {key} para ativar" + }, + "main.double_tap_on": { + "en": "Double-tap {key} to turn it on", + "pt-BR": "Toque duplo em {key} para ativar" + }, + "main.typing_on": { + "en": "Typing on {name}", + "pt-BR": "Digitando em {name}" + }, + "main.using_peer": { + "en": "Using {name}", + "pt-BR": "Usando {name}" + }, + "main.peer_is_using_me": { + "en": "{name} is using {me}", + "pt-BR": "{name} está usando {me}" + }, + "main.back_on_me": { + "en": "Back on {me}", + "pt-BR": "De volta em {me}" + }, + "main.cursor_locked_on": { + "en": "Cursor locked on {where}", + "pt-BR": "Cursor travado em {where}" + }, + "main.cursor_unlocked": { + "en": "Cursor unlocked", + "pt-BR": "Cursor destravado" + }, + "main.sending_to_percent": { + "en": "Sending {name} to {peer} · {percent} %", + "pt-BR": "Enviando {name} para {peer} · {percent} %" + }, + "main.sending_name": { + "en": "Sending {name}", + "pt-BR": "Enviando {name}" + }, + "main.files_stopped": { + "en": "Files stopped", + "pt-BR": "Arquivos interrompidos" + }, + "main.peer_disconnected": { + "en": "{name} disconnected", + "pt-BR": "{name} desconectou" + }, + "main.received_one_file": { + "en": "Received 1 file", + "pt-BR": "1 arquivo recebido" + }, + "main.received_n_files": { + "en": "Received {count} files", + "pt-BR": "{count} arquivos recebidos" + }, + "main.nothing_arrived": { + "en": "Nothing arrived", + "pt-BR": "Nada recebido" + }, + "main.from_peer": { + "en": "From {name}", + "pt-BR": "De {name}" + }, + "main.opening_wireless_debugging_ready": { + "en": "Opening it when wireless debugging is ready…", + "pt-BR": "Abrindo quando a depuração sem fio estiver pronta…" + }, + "main.sent_to_peer_colon": { + "en": "Sent to {name}: ", + "pt-BR": "Enviado para {name}: " + }, + "main.from_peer_colon": { + "en": "From {name}: ", + "pt-BR": "De {name}: " + }, + "main.moving_to_wifi": { + "en": "Moving to Wi-Fi with {name}…", + "pt-BR": "Mudando para Wi-Fi com {name}…" + }, + "main.wifi_didnt_come_up": { + "en": "Wi-Fi with {name} didn’t come up", + "pt-BR": "O Wi-Fi com {name} não conectou" + }, + "main.opening_phone_ready": { + "en": "Opening it when the phone is ready…", + "pt-BR": "Abrindo quando o telefone estiver pronto…" + }, + "main.opening_peer_connects": { + "en": "Opening it when {name} connects…", + "pt-BR": "Abrindo quando {name} conectar…" + }, + "main.not_connected": { + "en": "Not connected", + "pt-BR": "Não conectado" + }, + "main.open_duodesk_other_first": { + "en": "Open DuoDesk on the other computer first", + "pt-BR": "Abra o DuoDesk no outro computador primeiro" + }, + "main.sending_item_to_peer_one": { + "en": "Sending 1 item to {name}", + "pt-BR": "Enviando 1 item para {name}" + }, + "main.sending_item_to_peer_other": { + "en": "Sending {count} items to {name}", + "pt-BR": "Enviando {count} itens para {name}" + }, + "main.received_file_from_peer_one": { + "en": "Received 1 file from {name}", + "pt-BR": "1 arquivo recebido de {name}" + }, + "main.received_file_from_peer_other": { + "en": "Received {count} files from {name}", + "pt-BR": "{count} arquivos recebidos de {name}" + }, + "main.the_other_computer": { + "en": "the other computer", + "pt-BR": "o outro computador" + }, + "rezume.continue_title_from": { + "en": "Continue {title} from {from}", + "pt-BR": "Continuar {title} de {from}" + }, + "rezume.from_name_what": { + "en": "From {from} · {what}", + "pt-BR": "De {from} · {what}" + }, + "apps.opening_on_peer": { + "en": "Opening {name} on {peer}…", + "pt-BR": "Abrindo {name} em {peer}…" + }, + "apps.the_app": { + "en": "the app", + "pt-BR": "o aplicativo" + }, + "dragrecv.drop_on_folder_or_desktop": { + "en": "Drop {name} on a folder or the desktop", + "pt-BR": "Solte {name} em uma pasta ou na área de trabalho" + }, + "pcscreen.choose_virtual_monitor": { + "en": "Choose “Virtual remote monitor” to extend onto {name}", + "pt-BR": "Escolha “Monitor remoto virtual” para estender em {name}" + }, + "sendto.not_connected_yet": { + "en": "Not connected yet", + "pt-BR": "Ainda não conectado" + }, + "sendto.sending_once_connected": { + "en": "Sending once {name} is connected", + "pt-BR": "Enviando assim que {name} conectar" + }, + "sendto.nothing_to_send": { + "en": "Nothing to send", + "pt-BR": "Nada para enviar" + }, + "sendto.couldnt_read_item": { + "en": "Couldn’t read {name}", + "pt-BR": "Não foi possível ler {name}" + }, + "sendto.those_items": { + "en": "those items", + "pt-BR": "esses itens" + }, + "sendto.sending_n_items_to": { + "en": "Sending {items} to {who}", + "pt-BR": "Enviando {items} para {who}" + }, + "sendto.n_items_other": { + "en": "{count} items", + "pt-BR": "{count} itens" + }, + "fclip.files_not_there_anymore": { + "en": "Those files aren’t there any more", + "pt-BR": "Esses arquivos não estão mais lá" + }, + "fclip.paste_with_shortcut": { + "en": "{done}: they’re on the clipboard, paste them with {shortcut}", + "pt-BR": "{done}: estão na área de transferência, cole com {shortcut}" + }, + "fclip.select_files_explorer": { + "en": "Select files in File Explorer first", + "pt-BR": "Selecione os arquivos no Explorador de Arquivos primeiro" + }, + "fclip.select_files_file_manager": { + "en": "Select files in the file manager first", + "pt-BR": "Selecione os arquivos no gerenciador de arquivos primeiro" + }, + "fclip.nothing_to_copy_there": { + "en": "Nothing to copy there", + "pt-BR": "Nada para copiar lá" + }, + "fclip.copied_items_for_peer_one": { + "en": "Copied {name} for {peer}", + "pt-BR": "Copiado {name} para {peer}" + }, + "fclip.copied_items_for_peer_other": { + "en": "Copied {count} items for {peer}", + "pt-BR": "Copiados {count} itens para {peer}" + }, + "fclip.nothing_copied_on_peer": { + "en": "Nothing copied on {peer}", + "pt-BR": "Nada copiado em {peer}" + }, + "fclip.pasting_files_one": { + "en": "Pasting 1 file…", + "pt-BR": "Colando 1 arquivo…" + }, + "fclip.pasting_files_other": { + "en": "Pasting {count} files…", + "pt-BR": "Colando {count} arquivos…" + }, + "explorer.connect_your_phone": { + "en": "Connect your phone", + "pt-BR": "Conecte seu telefone" + }, + "explorer.then_choose_files": { + "en": "Then choose files in Phone Files", + "pt-BR": "Depois escolha os arquivos em Arquivos do telefone" + }, + "explorer.capture_needs_it": { + "en": "Capture from phone needs it", + "pt-BR": "Capturar do telefone precisa disso" + }, + "explorer.take_photos_on_phone": { + "en": "Take photos on your phone", + "pt-BR": "Tire fotos no seu telefone" + }, + "explorer.they_come_into_folder": { + "en": "They come into {folder}", + "pt-BR": "Elas entram em {folder}" + }, + "camshare.peer_viewing_camera": { + "en": "{name} is viewing this computer’s camera", + "pt-BR": "{name} está visualizando a câmera deste computador" + }, + "camshare.camera_didnt_start": { + "en": "The camera didn’t start: {error}", + "pt-BR": "A câmera não iniciou: {error}" + }, + "clipimage.copied_paste_with": { + "en": "{kind} from {name} copied: paste it with {keys}", + "pt-BR": "{kind} de {name} copiada: cole com {keys}" + }, + "clipimage.kind_screenshot": { + "en": "Screenshot", + "pt-BR": "Captura de tela" + }, + "clipimage.kind_picture": { + "en": "Picture", + "pt-BR": "Imagem" + } +} \ No newline at end of file diff --git a/shared/locales/fragments/small-windows.json b/shared/locales/fragments/small-windows.json new file mode 100644 index 00000000..22762361 --- /dev/null +++ b/shared/locales/fragments/small-windows.json @@ -0,0 +1,154 @@ +{ + "en": { + "appview.title": "App — DuoDesk", + "appview.connecting": "Connecting…", + "appview.reconnecting": "Reconnecting…", + "appview.could_not_show": "Could not show the window: {error}", + + "phoneview.title": "Phone", + "phoneview.connecting": "Connecting to the phone…", + "phoneview.controls_toggle": "Show or hide the phone controls", + "phoneview.fullscreen": "Fullscreen", + "phoneview.fullscreen_f11": "Fullscreen (F11)", + "phoneview.panel_aria": "Phone controls", + "phoneview.navbar_aria": "Phone navigation", + "phoneview.via_usb": "Through the USB cable", + "phoneview.via_wireless": "Through wireless debugging", + "phoneview.stopped_sharing": "The phone stopped sharing ({reason}).", + "phoneview.waiting_for_picture": "Waiting for the picture…", + "phoneview.vol_up": "Volume up", + "phoneview.vol_down": "Volume down", + "phoneview.mute": "Mute", + "phoneview.rotate": "Rotate", + "phoneview.rotate_window": "Rotate the window", + "phoneview.torch": "Light", + "phoneview.flip": "Front or back camera", + "phoneview.zoom_in": "Zoom in", + "phoneview.zoom_out": "Zoom out", + "phoneview.shot": "Screenshot (copies it: paste with Ctrl+V)", + "phoneview.shot_mac": "Screenshot (copies it: paste with ⌘V)", + "phoneview.notifs": "Notifications", + "phoneview.settings": "Quick settings", + "phoneview.power": "Power (lock or wake the phone)", + "phoneview.screen_off": "Phone screen off (it keeps showing here, and saves the battery)", + "phoneview.screen_off_mac": "Phone screen off: it keeps showing here, and saves the battery (right click: the power key)", + "phoneview.enter_sends": "Enter sends in WhatsApp, Instagram and Telegram (Shift+Enter: a new line)", + "phoneview.return_sends_mac": "Return sends in WhatsApp, Instagram and Telegram (⇧Return: a new line)", + "phoneview.arrow_swipe": "Arrow keys swipe the screen (feeds, Reels, Shorts)", + "phoneview.arrow_swipe_aria": "Arrow keys swipe", + "phoneview.pin": "Keep on top", + "phoneview.back_esc": "Back (Esc)", + "phoneview.back_nav": "Back (right click, Esc)", + "phoneview.back": "Back", + "phoneview.home_nav": "Home (middle click)", + "phoneview.home": "Home", + "phoneview.recents": "Recent apps", + "phoneview.torch_tooltip": "Flashlight / Torch", + "phoneview.switch_camera": "Switch Camera", + "phoneview.screen_off_aria": "Phone screen off", + "phoneview.return_sends_aria": "Return sends messages", + + "monitor.not_sharing": "Mac is not sharing", + "monitor.extend": "Extend", + "monitor.extend_title": "Use this window as an extra screen of the other computer", + "monitor.mirror": "Mirror", + "monitor.mirror_title": "Show the other computer’s main screen", + "monitor.fg": "Frame generation", + "monitor.fg_title": "Frame generation: fills in late or dropped frames", + "monitor.fullscreen": "Full screen", + "monitor.fullscreen_title": "Full screen (F11)", + "monitor.fullscreen_mac": "Full screen (Ctrl ⌘ F)", + "monitor.stop": "Stop", + "monitor.stop_title": "Stop sharing on the other computer", + "monitor.waiting_for_picture": "Waiting for {target}…", + "monitor.starting_screen": "Starting the screen over there…", + "monitor.turn_on_sharing": "Not sharing. Turn on sharing over there.", + "monitor.connecting_to": "Connecting to {name}…", + "monitor.reconnecting": "Reconnecting…", + "monitor.interrupted": "The video connection was interrupted…", + "monitor.could_not_start": "Could not start the video: {error}", + "monitor.waiting_for_peer": "Waiting for {name}…", + "monitor.the_picture": "the picture", + "monitor.the_other_computer": "the other computer", + + "pcview.connecting": "Connecting to the PC…", + "pcview.reconnecting": "Reconnecting…", + "pcview.could_not_show": "Could not show the screen: {error}" + }, + "pt-BR": { + "appview.title": "Aplicativo — DuoDesk", + "appview.connecting": "Conectando…", + "appview.reconnecting": "Reconectando…", + "appview.could_not_show": "Não foi possível exibir a janela: {error}", + + "phoneview.title": "Telefone", + "phoneview.connecting": "Conectando ao telefone…", + "phoneview.controls_toggle": "Mostrar ou ocultar os controles do telefone", + "phoneview.fullscreen": "Tela cheia", + "phoneview.fullscreen_f11": "Tela cheia (F11)", + "phoneview.panel_aria": "Controles do telefone", + "phoneview.navbar_aria": "Navegação do telefone", + "phoneview.via_usb": "Pelo cabo USB", + "phoneview.via_wireless": "Pela depuração sem fio", + "phoneview.stopped_sharing": "O telefone parou de compartilhar ({reason}).", + "phoneview.waiting_for_picture": "Aguardando a imagem…", + "phoneview.vol_up": "Aumentar volume", + "phoneview.vol_down": "Diminuir volume", + "phoneview.mute": "Mudo", + "phoneview.rotate": "Girar", + "phoneview.rotate_window": "Girar a janela", + "phoneview.torch": "Luz", + "phoneview.flip": "Câmera frontal ou traseira", + "phoneview.zoom_in": "Ampliar zoom", + "phoneview.zoom_out": "Reduzir zoom", + "phoneview.shot": "Captura de tela (copia: cole com Ctrl+V)", + "phoneview.shot_mac": "Captura de tela (copia: cole com ⌘V)", + "phoneview.notifs": "Notificações", + "phoneview.settings": "Configurações rápidas", + "phoneview.power": "Ligar/Desligar (bloquear ou despertar o telefone)", + "phoneview.screen_off": "Tela do telefone desligada (continua aparecendo aqui e economiza bateria)", + "phoneview.screen_off_mac": "Tela do telefone desligada: continua aparecendo aqui e economiza bateria (clique com botão direito: botão liga/desliga)", + "phoneview.enter_sends": "Enter envia no WhatsApp, Instagram e Telegram (Shift+Enter: nova linha)", + "phoneview.return_sends_mac": "Return envia no WhatsApp, Instagram e Telegram (⇧Return: nova linha)", + "phoneview.arrow_swipe": "Teclas de seta deslizam a tela (feeds, Reels, Shorts)", + "phoneview.arrow_swipe_aria": "Teclas de seta deslizam", + "phoneview.pin": "Manter no topo", + "phoneview.back_esc": "Voltar (Esc)", + "phoneview.back_nav": "Voltar (botão direito, Esc)", + "phoneview.back": "Voltar", + "phoneview.home_nav": "Início (botão do meio)", + "phoneview.home": "Início", + "phoneview.recents": "Aplicativos recentes", + "phoneview.torch_tooltip": "Lanterna", + "phoneview.switch_camera": "Alternar câmera", + "phoneview.screen_off_aria": "Tela do telefone desligada", + "phoneview.return_sends_aria": "Return envia mensagens", + + "monitor.not_sharing": "O Mac não está compartilhando", + "monitor.extend": "Estender", + "monitor.extend_title": "Usar esta janela como uma tela extra do outro computador", + "monitor.mirror": "Espelhar", + "monitor.mirror_title": "Mostrar a tela principal do outro computador", + "monitor.fg": "Geração de quadros", + "monitor.fg_title": "Geração de quadros: preenche quadros atrasados ou perdidos", + "monitor.fullscreen": "Tela cheia", + "monitor.fullscreen_title": "Tela cheia (F11)", + "monitor.fullscreen_mac": "Tela cheia (Ctrl ⌘ F)", + "monitor.stop": "Parar", + "monitor.stop_title": "Parar o compartilhamento no outro computador", + "monitor.waiting_for_picture": "Aguardando {target}…", + "monitor.starting_screen": "Iniciando a tela no outro computador…", + "monitor.turn_on_sharing": "Não está compartilhando. Ative o compartilhamento no outro computador.", + "monitor.connecting_to": "Conectando a {name}…", + "monitor.reconnecting": "Reconectando…", + "monitor.interrupted": "A conexão de vídeo foi interrompida…", + "monitor.could_not_start": "Não foi possível iniciar o vídeo: {error}", + "monitor.waiting_for_peer": "Aguardando {name}…", + "monitor.the_picture": "a imagem", + "monitor.the_other_computer": "o outro computador", + + "pcview.connecting": "Conectando ao PC…", + "pcview.reconnecting": "Reconectando…", + "pcview.could_not_show": "Não foi possível exibir a tela: {error}" + } +} diff --git a/shared/locales/pt-BR.js b/shared/locales/pt-BR.js new file mode 100644 index 00000000..6756a456 --- /dev/null +++ b/shared/locales/pt-BR.js @@ -0,0 +1,2934 @@ +(function (root, factory) { + const dict = factory(); + const exp = Object.assign(function () { return dict; }, dict); + if (typeof module === 'object' && module.exports) module.exports = exp; + else { + root.DuoDeskLocales = root.DuoDeskLocales || {}; + root.DuoDeskLocales['pt-BR'] = dict; + } +})(typeof globalThis !== 'undefined' ? globalThis : this, function () { + return { + "lang.name": "Português (Brasil)", + "nav.overview": "Visão Geral", + "nav.connection": "Conexão", + "nav.screens": "Telas", + "nav.cursor": "Mouse", + "nav.keyboard": "Teclado", + "nav.audio": "Áudio", + "nav.files": "Compartilhamento de Arquivos", + "nav.apps": "Aplicativos", + "nav.phone": "Telefone", + "nav.calls": "Chamadas", + "nav.messages": "Mensagens", + "nav.media": "Fotos", + "hub.photos_and_videos": "Fotos e vídeos", + "hub.files": "Arquivos", + "nav.camera": "Câmera", + "nav.remote": "Controle Remoto", + "nav.clipboard": "Área de Transferência", + "nav.notifications": "Notificações", + "nav.terminal": "Terminal", + "nav.mount": "Montar", + "nav.multi": "Múltiplos Dispositivos", + "nav.settings": "Geral", + "nav.general": "Geral", + "nav.about": "Sobre", + "nav.mac-pc": "Receber tela", + "nav.receive": "Receber tela", + "nav.pc-mac": "Compartilhar tela", + "nav.share": "Compartilhar tela", + "sidebar.connected": "Conectado", + "sidebar.connecting": "Conectando…", + "sidebar.not_paired": "Não pareado", + "sidebar.pairing": "Pareando…", + "sidebar.reconnecting": "Reconectando…", + "sidebar.identity_changed": "Identidade alterada", + "sidebar.nearby": "Por perto", + "sidebar.nearby_click_to_connect": "Por perto · Clique para conectar", + "sidebar.via": "via {name}", + "sidebar.waiting": "Aguardando a conexão", + "sidebar.not_connected": "Não conectado", + "sidebar.phone": "Telefone", + "sidebar.connect_to": "Conectar a {name}", + "pair.title_with": "Pareando com {name}", + "pair.wants_to_pair": "{name} quer parear", + "pair.press_pair_on": "Pressione Parear em {name}", + "pair.banner_ask_hint": "O DuoDesk em {name} pede para parear com este PC. Pressione Parear lá e compare os códigos.", + "pair.match": "Códigos coincidem", + "pair.allow": "Permitir", + "pair.deny": "Recusar", + "pair.close": "Fechar", + "pair.cancel": "Cancelar", + "general.language": "Idioma", + "general.lang_auto": "Automático (Sistema)", + "overview.disconnect": "Desconectar", + "overview.connect": "Conectar", + "overview.cancel": "Cancelar", + "overview.location_settings": "Configurações de localização", + "overview.connect_wifi_direct": "Conectar com Wi-Fi Direct", + "overview.back_to_bluetooth": "Voltar para Bluetooth", + "overview.connect_hotspot": "Conectar com ponto de acesso", + "overview.hotspot_name": "Nome do ponto de acesso", + "overview.password": "Senha", + "overview.password_saved": "Senha (salva)", + "overview.join": "Conectar", + "overview.copy": "Copiar", + "overview.connect_by_address": "Conectar por endereço", + "overview.address_aria": "Endereço", + "overview.cant_look_network": "Não é possível procurar computadores nesta rede.", + "overview.fix_firewall": "Corrigir firewall", + "overview.ble_phones": "Bluetooth com telefones", + "overview.ble_computers": "Bluetooth com computadores", + "overview.refresh": "Atualizar", + "overview.looking": "Procurando…", + "overview.found_nearby": "Encontrados por perto", + "overview.paired": "Pareado", + "overview.paired_check": "Pareado ✓", + "overview.connected": "Conectado", + "overview.waiting_allow": "Aguardando {name} permitir…", + "overview.connecting": "Conectando…", + "overview.cant_reach": "Não foi possível acessar {name} em {address}. O DuoDesk está aberto lá, na mesma rede Wi-Fi?", + "overview.taking_over": "Assumindo controle…", + "overview.other_computer": "O outro computador", + "overview.pairing": "Pareando…", + "overview.not_connected": "Não conectado", + "overview.identity_changed": "Este {kind} parece diferente agora. Esqueça-o e pareie novamente.", + "overview.open_on_peer": "Abra o DuoDesk em {name}.", + "overview.pick_below": "Escolha um computador abaixo ou conecte por endereço.", + "overview.disconnected": "Desconectado", + "overview.take_over": "Assumir controle", + "overview.hotspot_hint": "Ative o ponto de acesso de {name} e digite o nome e a senha da rede aqui.", + "overview.asking_wifi": "Pedindo Wi-Fi a {name}…", + "overview.starting_wifi_direct": "Iniciando Wi-Fi Direct para {name}…", + "overview.joining_ssid": "Conectando a {ssid}…", + "overview.on_wifi_with": "No Wi-Fi com {name}", + "overview.wifi_failed": "O Wi-Fi não iniciou", + "overview.no_network": "Sem rede", + "overview.looking_at_addr": "Procurando DuoDesk em {addr}…", + "overview.connect_by_addr_works": "Conectar por endereço ainda funciona.", + "overview.fw_blocked": "O firewall está bloqueando. Conectar por endereço ainda pode funcionar.", + "overview.retry": "Tentar novamente", + "overview.pair_btn": "Parear", + "overview.codes_match": "Códigos coincidem", + "overview.wants_to_connect": "quer se conectar", + "overview.check_code_named": "Verifique o código: {code} (é o mesmo em {name}?)", + "overview.looking_for_computers": "Procurando computadores…", + "overview.open_other_pc": "Abra o DuoDesk no outro computador.", + "overview.waking": "Ativando…", + "overview.wake": "Ativar", + "overview.waking_name": "Ativando {name}…", + "overview.online": "Online", + "overview.switch": "Alternar", + "overview.forget": "Esquecer", + "overview.nothing_paired": "Nada pareado ainda", + "overview.pair_in_found_nearby": "Pareie com um computador em Encontrados por perto.", + "overview.last_seen": "Última atividade: {time}", + "overview.youre_using": "Você está usando {there}", + "overview.peer_using_me": "{There} está usando {me}", + "cursor.reverse_scrolling": "Inverter rolagem", + "cursor.trackpad_gestures": "Gestos do trackpad", + "cursor.gestures_hint": "Pinçar para zoom, deslizar entre áreas de trabalho, Visão de Tarefas / Mission Control, voltar e avançar — de forma nativa em {name}. O mesmo em ambos", + "cursor.over_bluetooth": "Via Bluetooth", + "cursor.bluetooth_hint": "Quando {name} não estiver nesta rede e você estiver conectado por Bluetooth (mais lento). Desativado: nada atravessa até voltar ao Wi-Fi. O mesmo em ambos", + "cursor.none": "Nenhum", + "cursor.wireless_debugging": "Depuração sem Fio", + "cursor.control_phone_with": "Controlar o telefone com", + "cursor.phone_card": "Telefone", + "cursor.use_peer_on_me": "Usar mouse e teclado de {name} em {me}", + "cursor.push_edge_there": "Empurre o ponteiro além da borda lá", + "cursor.pointer_speed": "Velocidade do ponteiro aqui", + "cursor.use_me_on_peer": "Usar mouse e teclado de {me} em {name}", + "cursor.push_edge": "Empurre o ponteiro além da borda", + "cursor.edge_resistance": "Resistência na borda", + "cursor.resistance_hint": "Empurre um pouco mais para atravessar", + "cursor.feel": "Sensação", + "cursor.not_same_network": "Não está na mesma rede", + "cursor.right_now": "No momento", + "cursor.where_other_pc": "Posição do outro computador", + "cursor.auto_adb_ready": "Automático: ADB, depuração sem fio pronta", + "cursor.auto_acc_fallback": "Automático: Acessibilidade até a depuração sem fio ser configurada", + "cursor.acc_hint": "Acessibilidade: o DuoDesk no telefone toca e digita. Funciona por Wi-Fi, Wi-Fi Direct e Bluetooth, sem opções do desenvolvedor", + "cursor.adb_full_control": "ADB: controle total por depuração sem fio", + "cursor.adb_not_setup_yet": "ADB: controle total por depuração sem fio (ainda não configurada)", + "clipboard.title": "Área de transferência", + "clipboard.instantly": "Instantaneamente", + "clipboard.when_switch": "Ao alternar", + "clipboard.sync": "Sincronização", + "clipboard.skip_passwords": "Ignorar senhas", + "clipboard.from_pw_managers": "De gerenciadores de senha", + "clipboard.pictures": "Imagens", + "clipboard.largest_text": "Tamanho máximo do texto", + "clipboard.off": "Desativado", + "clipboard.items_10": "10 itens", + "clipboard.items_20": "20 itens", + "clipboard.items_50": "50 itens", + "clipboard.items_100": "100 itens", + "clipboard.copy_there_paste_me": "Copiar em {name}, colar em {me}", + "clipboard.copy_me_paste_there": "Copiar em {me}, colar em {name}", + "clipboard.privacy": "Privacidade", + "clipboard.recent_items": "Itens recentes", + "clipboard.never_saved_disk": "Nunca salvos no disco", + "clipboard.recent": "Recentes", + "clipboard.clear": "Limpar", + "clipboard.as_soon_as_copy": "Assim que você copiar", + "clipboard.when_move_to_other": "Quando você mudar para o outro computador", + "clipboard.pics_both_ways": "Imagens e capturas que você copiar, até 10 MB, em ambas as direções", + "clipboard.pics_no_ble": "Imagens e capturas que você copiar, até 10 MB, em ambas as direções. Não disponível via Bluetooth", + "clipboard.pics_turn_on_peer": "Ative Imagens em {name} também (uma versão mais antiga não suporta: atualize o DuoDesk)", + "clipboard.longer_text_pics": "Textos mais longos não são enviados. Imagens: até 10 MB", + "clipboard.longer_text": "Textos mais longos não são enviados", + "clipboard.turned_off_on": "Desativado em {name}", + "clipboard.last_skip": "Último item não enviado: {last}.", + "clipboard.sent_to": "Enviado para {name}", + "clipboard.from_peer": "De {name}", + "clipboard.to_peer": "Para {name}", + "clipboard.screenshot": "Captura de tela", + "clipboard.picture": "Imagem", + "clipboard.whitespace": "(espaço em branco)", + "clipboard.copy_btn": "Copiar", + "clipboard.nothing_yet": "Nada ainda", + "clipboard.recent_off": "Itens recentes desativados", + "files.peer_folder_here": "Pasta de {Name} aqui", + "files.open": "Abrir", + "files.open_peer_shared": "Abrir pasta compartilhada de {name}", + "files.my_folder_on_peer": "Pasta de {me} em {name}", + "files.choose": "Escolher…", + "files.share_folder_with": "Compartilhar uma pasta com {name}", + "files.take_files_from": "Receber arquivos de {name} em {me}", + "files.send_files_to": "Enviar arquivos de {me} para {name}", + "files.drop_here": "Solte arquivos ou pastas aqui", + "files.connect_to_send": "Conecte-se para enviar arquivos", + "files.send_files": "Enviar arquivos", + "files.hint_downloads_phone": "Eles irão para a pasta Downloads de {the}", + "files.hint_downloads_pc": "Vão para a pasta Downloads de {the} ou para a pasta escolhida lá para arquivos recebidos", + "files.to_peer": "Para {the}", + "files.sending_to": "Enviando {name} para {the}", + "files.pasting_to": "Colando {name} em {the}", + "files.idx_of_total": " · {idx} de {total}", + "files.shortcuts_sw": "Copiar e colar arquivos com atalhos", + "files.shortcuts_title": "Copiar e colar arquivos", + "files.copy": "Copiar", + "files.select_explorer_first": "Selecione os arquivos no Explorador de Arquivos primeiro", + "files.paste": "Colar", + "files.edge_drag_sw": "Arrastar arquivos além da borda da tela", + "files.drag_between_computers": "Arrastar arquivos entre computadores", + "files.cancel": "Cancelar", + "files.recent": "Recentes", + "files.pasting": "Colando…", + "files.paste_hint_dest": "No aplicativo em primeiro plano (conversa, e-mail…), na pasta aberta no Explorador ou, senão, na Área de Trabalho", + "files.turned_off_on": "Desativado em {name}", + "files.drag_hint": "Arraste pela borda da tela e solte onde quiser", + "files.drive_num": "Unidade {drive}", + "files.connecting": "Conectando…", + "files.over_ble_open_wifi": "Via Bluetooth: Abrir conecta via Wi-Fi Direct", + "files.waiting_peer_share": "Aguardando {name} compartilhar uma", + "files.setting_up": "Configurando…", + "files.removing": "Removendo…", + "files.on_peer": "Em {name}", + "files.problem": "Problema", + "files.shared": "Compartilhado", + "files.nothing_sent": "Nada enviado", + "files.sent_file": "Enviado: {file}", + "files.not_sent_file": "Não enviado: {file}", + "files.sending_name": "Enviando {name}", + "files.nothing_received": "Nada recebido", + "files.received_file": "Recebido: {file}", + "files.not_received_file": "Não recebido: {file}", + "files.received_from_peer": "Recebido de {name}", + "files.received_count_one": "1 arquivo recebido de {name}", + "files.received_count_other": "{count} arquivos recebidos de {name}", + "files.not_received": "Não recebido", + "files.copying_name": "Copiando {name}", + "files.dragging_name": "Arrastando {name}", + "files.esc_cancels": "Esc cancela", + "files.receiving_files_from_one": "Recebendo {count} arquivo de {name}", + "files.receiving_files_from_other": "Recebendo {count} arquivos de {name}", + "phone.enter_sends": "Enter envia mensagens", + "phone.close": "Fechar", + "phone.show_screen": "Mostrar Tela do Telefone", + "phone.disconnect": "Desconectar", + "phone.wireless_debugging": "Depuração sem fio", + "phone.pairing_code": "Código de pareamento", + "phone.try_again": "Tentar Novamente", + "phone.show_me_how": "Mostrar como", + "phone.screen_mouse_keyboard": "Tela, mouse e teclado", + "phone.search_apps": "Buscar aplicativos", + "phone.open_on_pc": "Abrir neste PC", + "phone.settings": "Configurações", + "phone.battery": "Bateria {battery}%", + "tab.apps.desc": "Use aplicativos do outro computador em janelas próprias.", + "tab.apps.desc_mac": "Abra aplicativos do outro computador em janelas próprias.", + "tab.audio.desc": "Ouça um computador no outro.", + "tab.clipboard.desc": "Copie em um computador, cole no outro.", + "tab.cursor.desc": "Mova o ponteiro além da borda da tela para ir ao outro computador.", + "tab.files.heading": "Compartilhamento de Arquivos", + "tab.files.desc": "Envie arquivos e pastas entre seus dispositivos ou compartilhe uma pasta.", + "tab.files.desc_mac": "Arraste arquivos entre seus computadores ou compartilhe uma pasta.", + "tab.keyboard.desc": "Digite no computador em que o ponteiro estiver.", + "tab.mount.desc": "O armazenamento do telefone como uma unidade no Explorador de Arquivos, via ADB: o cabo (depuração USB) ou a depuração sem fio.", + "tab.mount.desc_linux": "O armazenamento do telefone como uma unidade no gerenciador de arquivos, via ADB: o cabo (depuração USB) ou a depuração sem fio.", + "tab.mount.desc_mac": "O armazenamento do telefone como uma unidade no Finder, via ADB: o cabo (depuração USB) ou a depuração sem fio.", + "tab.multi.desc": "Vários computadores e telefones conectados ao mesmo tempo", + "tab.notifications.desc": "Veja as notificações de um computador no outro.", + "tab.connection.heading": "Conexão", + "tab.phone.heading": "Telefone", + "tab.mac-pc.heading": "Tela de {Name} em {me}", + "tab.mac-pc.desc": "Veja a tela do outro computador em uma janela aqui.", + "tab.pc-mac.heading": "Tela de {me} em {name}", + "tab.pc-mac.desc": "Veja {me} em uma janela no outro computador.", + "tab.terminal.desc": "Abra um terminal no outro computador.", + "tab.terminal.desc_mac": "Abra um shell no outro computador. Sem necessidade de senha.", + "tab.receive.heading": "{name} em {me}", + "tab.receive.desc": "Veja a tela em uma janela aqui.", + "tab.share.heading": "{me} em {name}", + "tab.share.desc": "Use {me} como segunda tela para {name}.", + "display.peer_on_me": "{name} em {me}", + "display.me_on_peer": "{me} em {name}", + "route.to": " para ", + "about.this_computer": "Este computador", + "about.computer_name": "Nome do computador", + "about.system": "Sistema", + "about.processor": "Processador", + "about.memory": "Memória", + "about.architecture": "Arquitetura", + "about.this_app": "Este aplicativo", + "about.version": "Versão", + "about.built_for": "Compilado para", + "about.version_value": "Versão {version}", + "about.cpu_cores": "{cpu} · {cores} núcleos", + "about.checking": "Verificando…", + "about.latest_is_available_skipped": "{latest} está disponível (ignorada)", + "about.latest_is_available": "{latest} está disponível", + "about.up_to_date": "Atualizado", + "about.couldn_t_check_error": "Não foi possível verificar: {error}", + "about.you_have_download": "Você tem {current}. Baixe {name}", + "about.you_have_opens_release": "Você tem {current}. Abre a página da versão", + "about.version_no_releases": "Versão {current}. Nenhuma versão publicada ainda", + "about.version_checked": "Versão {version} · verificada às {time}", + "about.duodesk_icon": "Ícone do DuoDesk", + "about.use_two_computers_as_one": "Use dois computadores como uma só mesa", + "about.check_now": "Verificar agora", + "about.what_s_new": "Novidades", + "about.don_t_skip": "Não ignorar", + "about.download": "Baixar", + "about.check_for_updates_automatically": "Verificar atualizações automaticamente", + "about.updates": "Atualizações", + "about.check_automatically": "Verificar automaticamente", + "about.looks_for_new_releases_on": "Procura novas versões no GitHub a cada poucas horas", + "about.made_by": "Feito por", + "about.profile": "Perfil", + "about.website": "Site", + "about.source_code": "Código-fonte", + "about.all_releases": "Todas as versões", + "about.downloads_for_macos_windows_linux": "Downloads para macOS, Windows, Linux e Android", + "about.releases": "Versões", + "about.report_a_problem": "Relatar um problema", + "about.open_an_issue_on_github": "Abra uma issue no GitHub", + "about.issues": "Issues", + "about.log_files": "Arquivos de log", + "about.what_duodesk_did_and_any": "O que o DuoDesk fez e qualquer falha, para anexar a um relatório de bug", + "about.open_log_folder": "Abrir pasta de logs", + "about.licence": "Licença", + "about.gnu_general_public_license_v3": "Licença Pública Geral GNU v3", + "about.free_and_open_source": "Gratuito e de código aberto. © 2026 0xCodez. Inclui código © 2026 Inuka Asith.", + "about.read": "Ler", + "about.original_source": "Fonte original", + "about.the_gpl_3_0_code": "O código GPL-3.0 em que o DuoDesk se baseia, de Inuka Asith", + "about.thanks": "Agradecimentos", + "apps.peer_apps": "Aplicativos de {name}", + "apps.open_here_one": "{count} aberto aqui", + "apps.open_here_other": "{count} abertos aqui", + "apps.open_on_name_one": "{count} aberto em {name}", + "apps.open_on_name_other": "{count} abertos em {name}", + "apps.open_app_on_name": "Abrir {app} em {name}", + "apps.pin_app_to_start": "Fixar {app} em Iniciar", + "apps.open_name_s_apps_on": "Abrir os aplicativos de {name} em {me}", + "apps.pick_one_below": "Escolha um abaixo", + "apps.open_me_s_apps_on": "Abrir os aplicativos de {me} em {name}", + "apps.pick_them_over_there": "Escolha-os lá", + "apps.mac_apps": "Aplicativos do Mac", + "apps.search": "Buscar", + "apps.pin_to_start": "Fixar em Iniciar", + "apps.loading": "Carregando…", + "apps.no_app_matches": "Nenhum aplicativo encontrado", + "apps.no_apps_yet": "Nenhum aplicativo ainda", + "apps.waiting_for_name": "Aguardando {name}", + "apps.none_open": "Nenhum aberto", + "apps.click_refresh_to_ask_name": "Clique em Atualizar para pedir a lista de aplicativos a {name}.", + "audio.playing_name": "Reproduzindo {name}", + "audio.playing_on_name": "Reproduzindo em {name}", + "audio.waiting_for_name": "Aguardando {name}", + "audio.mute_me_while_sending": "Silenciar {me} ao enviar", + "audio.play_name_s_sound_on": "Reproduzir o som de {name} em {me}", + "audio.play_me_s_sound_on": "Reproduzir o som de {me} em {name}", + "audio.volume": "Volume", + "keyboard.hotkey_on_name": "Atalho em {name}", + "keyboard.double_tap_to_type_on": "Pressione duas vezes para digitar em {name} e voltar", + "keyboard.set_in_duodesk_on_name": "Defina no DuoDesk em {name}", + "keyboard.hotkey": "Atalho", + "keyboard.double_tap_to_turn_cursor": "Pressione duas vezes para ativar ou desativar o compartilhamento do cursor", + "keyboard.switch_the_keyboard_with_the": "Alternar o teclado com o atalho", + "keyboard.swap_ctrl_and_command": "Trocar Ctrl e Command", + "keyboard.works_as_ctrl": "⌘ funciona como Ctrl", + "keyboard.so_c_copies_here": "Assim, ⌘C copia aqui", + "keyboard.shortcuts_on_name": "Atalhos em {name}", + "keyboard.ctrl_works_as_so_ctrl": "Ctrl funciona como ⌘, então Ctrl+C copia lá", + "keyboard.type_on_me_with_name": "Digitar em {me} com o teclado de {name}", + "keyboard.type_on_name_with_me": "Digitar em {name} com o teclado de {me}", + "keyboard.only_when_cursor_is_off": "Somente com o Cursor desativado", + "mount.mount_works_adb_dev_options": "Montar funciona por ADB, e as Opções do desenvolvedor estão desativadas no telefone. Ative as Opções do desenvolvedor e a Depuração sem fio (Conexão), ou conecte o telefone com a depuração USB ativada. O recurso Arquivos do telefone funciona sem isso.", + "mount.mount_works_adb_wireless": "Montar funciona por ADB, e a depuração sem fio está desativada no telefone. Ative-a (Conexão), ou conecte o telefone com a depuração USB ativada. O recurso Arquivos do telefone funciona sem isso.", + "mount.drive_via_cable": "Como unidade em Este Computador{drive}, pelo cabo.", + "mount.drive_via_wireless": "Como unidade em Este Computador{drive}, por depuração sem fio.", + "mount.show": "Mostrar", + "mount.unmount": "Desmontar", + "mount.show_the_phone_in_explorer": "Mostrar o telefone no Explorador de Arquivos", + "mount.switch_it_on_to_mount": "Ative para montar o telefone", + "mount.phone_files": "Arquivos do Telefone", + "mount.drive": "Unidade", + "mount.mounting": "Montando…", + "mount.plug_the_phone_in_with": "Conecte o telefone com a depuração USB ativada, ou conecte-o por depuração sem fio, e então use Montar.", + "multi.turn_on": "Ativar", + "multi.restarting": "Reiniciando…", + "multi.mesh_mode": "Modo mesh", + "multi.use_several_devices_at_once": "Usar vários dispositivos ao mesmo tempo", + "multi.computers_and_phones_connected_at": "Computadores e telefones conectados ao mesmo tempo: uma única área de transferência e um único conjunto de notificações para todos, cada borda da tela levando a outro dispositivo, um telefone e um computador juntos", + "multi.duodesk_restarts_when_you_turn": "O DuoDesk reinicia quando você o ativa ou desativa.", + "notifs.shown_one": "{count} exibida", + "notifs.shown_other": "{count} exibidas", + "notifs.sent_one": "{count} enviada", + "notifs.sent_other": "{count} enviadas", + "notifs.send_app": "Enviar {app}", + "notifs.hide_message_text": "Ocultar texto da mensagem", + "notifs.only_the_app_and_the": "Somente o aplicativo e o título", + "notifs.show_name_s_notifications_on": "Mostrar as notificações de {name} em {me}", + "notifs.show_me_s_notifications_on": "Mostrar as notificações de {me} em {name}", + "notifs.recent_notifications": "Notificações Recentes", + "notifs.notification": "Notificação", + "notifs.no_notifications_yet": "Nenhuma notificação ainda", + "notifs.incoming_notifications_from_whatsapp_instagram": "As notificações recebidas do WhatsApp, Instagram e de outros aplicativos aparecerão aqui em tempo real.", + "notifs.apps_show_up_here_after": "Os aplicativos aparecem aqui após a primeira notificação, com o envio ativado", + "notifs.as_windows_notifications_from_duodesk": "Como notificações do Windows, enviadas pelo DuoDesk", + "notifs.windows_notification_list_can_t": "Não foi possível ler a lista de notificações do Windows", + "notifs.also_switches_it_on_the": "Também ativa no outro computador", + "notifs.as_native_notifications_there": "Como notificações nativas lá", + "receive.waiting_for_name": "Aguardando {name}", + "receive.showing_name": "Mostrando {name}", + "receive.sharing_on_name_open_to": "Compartilhando em {name}. Abra para assistir.", + "receive.open_starts_sharing_on_name": "Abrir inicia o compartilhamento em {name}", + "receive.turn_on_sharing_on_name": "Ative o compartilhamento em {name}", + "receive.mbps_received": "{mbps} Mbps recebidos", + "receive.show": "Mostrar", + "receive.screen_window": "Janela da tela", + "receive.mirror": "Espelhar", + "receive.extend": "Estender", + "receive.name_shares": "{Name} compartilha", + "receive.play_sound": "Reproduzir som", + "receive.frame_generation": "Geração de quadros", + "receive.fills_in_late_or_dropped_frames": "Preenche quadros atrasados ou perdidos e adiciona quadros intermediários quando esta tela é mais rápida que a transmissão", + "receive.sound": "Som", + "receive.full_screen": "Tela cheia", + "receive.connect_to_choose_from_here": "Conecte-se para escolher daqui", + "receive.update_duodesk_on_the_other": "Atualize o DuoDesk no outro computador para escolher daqui", + "receive.the_other_computer_doesn_t": "O outro computador não permite escolher daqui", + "receive.an_extra_screen_for_it": "Uma tela extra para ele, exibida aqui", + "receive.its_main_screen_shown_here": "A tela principal dele, exibida aqui", + "receive.pick_mirror_or_extend_or": "Escolha Espelhar ou Estender, ou apenas pressione Abrir", + "receive.paused_nobody_watching": "Pausado, ninguém assistindo", + "receive.live": "Ao vivo", + "receive.live_view_only": "Ao vivo, somente visualização", + "share.status_error": "{status}: {error}", + "share.starting_the_extra_screen": "Iniciando a tela extra…", + "share.on_name": "Ao vivo em {name}", + "share.waiting_for_name": "Aguardando {name}", + "share.ready_starts_when_name_opens": "Pronto, começa quando {name} abrir", + "share.virtual_display_size": "Tela virtual do DuoDesk, {width} × {height}", + "share.mbps_sent": "{mbps} Mbps enviados", + "share.mbps_sent_network_allows": "{mbps} Mbps enviados, a rede permite {target}", + "share.receive_input_from_name": "Receber entrada de {name}", + "share.let_name_start_and_switch": "Permitir que {name} inicie e alterne esta tela", + "share.extend": "Estender", + "share.mirror": "Espelhar", + "share.same_as_the_other_screen": "Igual à outra tela", + "share.1080p_1920_1080_fastest": "1080p (1920 × 1080), mais rápido", + "share.1440p_2560_1440_sharper": "1440p (2560 × 1440), mais nítido", + "share.full_size": "Tamanho original", + "share.low_10_mbps": "Baixa, 10 Mbps", + "share.medium_20_mbps": "Média, 20 Mbps", + "share.high_30_mbps": "Alta, 30 Mbps", + "share.best_50_mbps_wired": "Melhor, 50 Mbps (com fio)", + "share.include_sound": "Incluir som", + "share.receive_input": "Receber entrada", + "share.remote_start": "Início remoto", + "share.let_the_other_computer_start": "Permitir que o outro computador inicie e alterne esta tela", + "share.display": "Tela", + "share.size": "Tamanho", + "share.install": "Instalar", + "share.remove": "Remover", + "share.duodesk_virtual_display": "Tela virtual do DuoDesk", + "share.virtual_display_driver_not_installed": "Driver de tela virtual não instalado. Instale-o para usar o modo Estender.", + "share.screen": "Tela", + "share.mode": "Modo", + "share.resolution": "Resolução", + "share.quality": "Qualidade", + "share.sound_and_control": "Som e controle", + "share.installing": "Instalando…", + "share.installed_adds_the_extra_screen": "Instalado. Adiciona a tela extra para o modo Estender.", + "share.adds_an_extra_screen_for": "Adiciona uma tela extra para o modo Estender. Instala um driver de vídeo e pede direitos de administrador uma vez.", + "share.opening_the_screen_window_there": "Abrir a janela da tela lá inicia o compartilhamento; Estender e Espelhar podem ser alternados de lá.", + "terminal.as_user": "Como {user}", + "terminal.set_up": "Configurar", + "terminal.ssh_server": "Servidor SSH", + "terminal.open_terminal": "Abrir Terminal", + "terminal.shell_on_name": "Shell em {name}", + "terminal.in_any_terminal": "Em qualquer terminal", + "terminal.let_name_open_a_terminal": "Permitir que {name} abra um terminal em {me}", + "terminal.open_a_terminal_on_name": "Abrir um terminal em {name} a partir de {me}", + "terminal.waiting_for_name": "Aguardando {name}", + "terminal.asking_name": "Consultando {name}…", + "terminal.ready": "Pronto", + "terminal.not_available": "Indisponível", + "terminal.running": "Em execução", + "terminal.stopped": "Parado", + "terminal.not_installed": "Não instalado", + "terminal.asks_for_administrator_rights_once": "Pede direitos de administrador uma vez", + "terminal.not_ready_yet": "Ainda não está pronto", + "terminal.set_up_the_ssh_server_first": "Configure primeiro o servidor SSH", + "terminal.turn_on_remote_login_on": "Ative o Login Remoto em {name}", + "terminal.set_up_the_ssh_server_on_name": "Configure o servidor SSH em {name}", + "phone.battery_charging": "Bateria {battery}%, carregando", + "phone.open_app_in_a_window": "Abrir {app} em uma janela (clique com o botão direito para fixar em Iniciar)", + "phone.downloaded_cant_read_notifications": "{prefix}O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento permanecem.", + "phone.downloaded_cant_read_notifications_wifi": "{prefix}O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento permanecem. Requer depuração sem fio.", + "phone.wireless_debugging_full_control": "Depuração sem fio: controle total", + "phone.accessibility": "Acessibilidade", + "phone.duodesk_on_the_phone_taps_and_types": "O DuoDesk no telefone toca e digita sozinho, por Wi-Fi, Wi-Fi Direct ou Bluetooth. Sem opções do desenvolvedor", + "phone.address_port_optional": "Endereço:porta (opcional)", + "phone.pairing_address": "Endereço de pareamento", + "phone.or_type_it_on_the": "Ou digite no telefone, na notificação do DuoDesk", + "phone.on_the_phone_settings_about": "No telefone: Configurações › Sobre o telefone › Informações do software › toque 7 vezes em Número de compilação. As Opções do desenvolvedor aparecem.", + "phone.settings_developer_options_turn_on": "Configurações › Opções do desenvolvedor: ative a Depuração USB.", + "phone.on_the_same_page_turn": "Na mesma página, ative a Depuração sem fio. O telefone precisa estar em uma rede Wi-Fi (um link Wi-Fi direto sozinho não basta).", + "phone.tap_wireless_debugging_pair_device": "Toque em Depuração sem fio › Parear dispositivo com código de pareamento e digite o código aqui, ou na notificação do DuoDesk no telefone.", + "phone.that_s_all_after_pairing": "Pronto: depois de parear uma vez, o DuoDesk ativa a depuração sem fio sozinho.", + "phone.install": "Instalar", + "phone.notifications_from_the_phone": "Notificações do telefone", + "phone.phone_sound": "Som do telefone", + "phone.data_saver_4_mb_s": "Economia de dados (4 Mb/s)", + "phone.balanced_8_mb_s": "Equilibrado (8 Mb/s)", + "phone.sharp_16_mb_s": "Nítido (16 Mb/s)", + "phone.sharpest_24_mb_s": "Mais nítido (24 Mb/s)", + "phone.wallpaper": "Papel de parede", + "phone.arrow_keys_swipe": "Setas deslizam a tela", + "phone.title_bar": "Barra de título", + "phone.side_panel": "Painel lateral", + "phone.bottom_bar": "Barra inferior", + "phone.phone_sound_in_the_screen": "Som do telefone na janela da tela", + "phone.android_11_or_later": "Android 11 ou superior", + "phone.for_the_screen_window_and": "Para a janela da tela e as janelas dos aplicativos", + "phone.window_controls": "Controles da janela", + "phone.title_bar_back_home_recents_and": "Barra de título: Voltar, Início, Recentes e os principais no topo. Painel lateral: esses, volume, girar, captura de tela e mais, à direita de cada janela do telefone. Barra inferior: Voltar, Início e Recentes sob a imagem", + "phone.in_whatsapp_instagram_and_telegram": "No WhatsApp, Instagram e Telegram, em uma janela do telefone ou com este teclado no telefone. Shift+Enter: nova linha", + "phone.in_a_phone_window_up": "Em uma janela do telefone: para cima e para baixo em feeds, Reels e Shorts, para a esquerda e a direita entre páginas. Desativado: movem o cursor", + "phone.show_the_phone_s_wallpaper": "Mostrar o papel de parede do telefone aqui", + "phone.lets_duodesk_on_the_phone": "Permite que o DuoDesk no telefone o leia (configurado por depuração sem fio)", + "phone.mouse_and_keyboard": "Mouse e teclado", + "phone.push_the_pointer_off_the": "Empurre o ponteiro além da borda da tela para usar o telefone. Pressione o atalho duas vezes para voltar.", + "phone.cursor_settings": "Configurações do Mouse", + "phone.ready": "Pronto", + "phone.pair_once": "Parear uma vez", + "phone.missing": "Ausente", + "phone.click_the_phone_above_overview": "Clique no telefone acima de Visão Geral para conectá-lo.", + "phone.no_phone_connected_open_duodesk": "Nenhum telefone conectado. Abra o DuoDesk no telefone e pareie-o em Visão Geral › Por perto.", + "phone.usb_cable": "Cabo USB", + "phone.hide": "Ocultar", + "phone.touch_blocked": "Toque bloqueado", + "phone.wireless_debugging_is_off_on": "A depuração sem fio está desativada no telefone. A tela e o controle por ADB precisam dela; a Acessibilidade não.", + "phone.the_screen_works_but_xiaomi_refuses": "A tela funciona, mas a Xiaomi recusa toque, mouse e teclado vindos daqui. No telefone: Configurações › Opções do desenvolvedor › Depuração USB (Configurações de segurança): ativada (pede uma conta Mi).", + "phone.the_phone_s_screen_touch": "A tela, o toque, o mouse e o teclado do telefone, e sua área de transferência em segundo plano", + "phone.duodesk_pairs_with_the_phone": "O DuoDesk pareia com a depuração sem fio do telefone uma vez. Depois disso, a tela, os aplicativos, o mouse e o teclado do telefone funcionam sem esta etapa.", + "phone.this_build_of_duodesk_doesn": "Esta versão do DuoDesk não inclui o aplicativo Android.", + "phone.automatic_accessibility_until_wireless_debugging": "Automático: Acessibilidade até a depuração sem fio ficar pronta", + "phone.duodesk_on_the_phone_taps": "O DuoDesk no telefone toca e digita sozinho. O telefone pede uma vez para permitir em Acessibilidade", + "phone.apps_open_in_their_own": "Os aplicativos abrem em janelas próprias depois que a depuração sem fio estiver configurada.", + "phone.loading_the_phone_s_apps": "Carregando os aplicativos do telefone…", + "phone.phone_screen": "Tela do telefone", + "phone.mirror": "Espelhamento", + "setup.done": "Concluído", + "setup.fix": "Corrigir", + "setup.firewall_and_network": "Firewall e rede", + "setup.not_running": "Não está em execução", + "setup.mouse_and_keyboard_helper": "Auxiliar de mouse e teclado", + "setup.install": "Instalar", + "setup.duodesk_virtual_display": "Tela virtual do DuoDesk", + "setup.set_up_duodesk": "Configurar o DuoDesk", + "setup.a_few_things_before_me": "Algumas coisas antes que {me} possa compartilhar com o outro computador.", + "setup.you_can_change_these_later": "Você pode alterar isso depois em Geral e Tela.", + "setup.skip_for_now": "Pular por enquanto", + "setup.checking": "Verificando…", + "setup.message_fix_asks_for_administrator": "{message} Corrigir pede direitos de administrador uma vez.", + "setup.status_restart_duodesk_if_it": "{status}. Reinicie o DuoDesk se continuar assim.", + "setup.installing": "Instalando…", + "setup.optional_adds_an_extra_screen": "Opcional. Adiciona uma tela extra para o outro computador (Estender). Instala um driver de vídeo e pede direitos de administrador uma vez.", + "general.downloads": "Downloads", + "general.folder_missing_downloads_meanwhile": "{folder} não está mais lá: Downloads por enquanto. Arquivos enviados para {me} de outro computador ou de um telefone, e o que é salvo de Arquivos e Fotos de um telefone", + "general.folder_files_sent_to": "{folder} · Arquivos enviados para {me} de outro computador ou de um telefone, e o que é salvo de Arquivos e Fotos de um telefone", + "general.right_click_files_send_to": "Clique com o botão direito nos arquivos › Enviar para › {name} (DuoDesk)", + "general.start_with_windows": "Iniciar com o Windows", + "general.duodesk_waits_in_the_tray": "O DuoDesk fica aguardando na bandeja", + "general.change": "Alterar…", + "general.received_files": "Arquivos recebidos", + "general.show_a_popup_when_switching": "Mostrar um aviso ao alternar", + "general.check_again": "Verificar novamente", + "general.fix": "Corrigir", + "general.firewall": "Firewall", + "general.wake_from_the_network": "Ativar pela rede", + "general.let_the_other_computer_wake": "Permitir que o outro computador ative {me}", + "general.duodesk_in_send_to": "DuoDesk em Enviar para", + "general.mouse_and_keyboard_helper": "Auxiliar de mouse e teclado", + "general.install": "Instalar", + "general.virtual_display_driver": "Driver de tela virtual", + "general.turn_off_bluetooth_on_wi": "Desativar o Bluetooth em conexões Wi-Fi", + "general.for_a_phone_or_computer": "Para um telefone ou computador que não está nesta rede", + "general.location": "Localização", + "general.to_join_a_phone_s": "Para entrar no Wi-Fi Direct de um telefone ou computador (o Windows só mostra redes Wi-Fi com ela)", + "general.computer_name": "Nome do computador", + "general.how_other_computers_see_this": "Como os outros computadores veem este", + "general.show_the_phone_s_wallpaper": "Mostrar o papel de parede do telefone", + "general.on_its_tile_and_overview": "No bloco do telefone e na Visão Geral. O DuoDesk no telefone o lê depois que a depuração sem fio estiver configurada", + "general.now_playing": "Tocando agora", + "general.what_plays_on_the_phone": "O que toca no telefone, com os controles", + "general.quick_actions": "Ações rápidas", + "general.wi_fi_bluetooth_torch_do": "Wi-Fi, Bluetooth, lanterna, Não perturbe e mais, com volume e toque", + "general.latest_notifications": "Últimas notificações", + "general.the_newest_few_with_copy": "As mais recentes, com Copiar para códigos de uso único", + "general.most_used_apps": "Aplicativos mais usados", + "general.the_phone_s_most_used": "Os aplicativos mais usados no telefone esta semana", + "general.its_recent_items_while_clipboard": "Os itens recentes dele, enquanto a Área de transferência está ativada", + "general.a_drop_zone_that_sends": "Uma área de soltar que envia arquivos ao dispositivo", + "general.startup": "Inicialização", + "general.appearance": "Aparência", + "general.when_the_mouse_and_keyboard": "Quando o mouse e o teclado passam de um dispositivo para outro", + "general.network_and_bluetooth": "Rede e Bluetooth", + "general.permissions": "Permissões", + "general.this_computer": "Este computador", + "general.checking": "Verificando…", + "general.ok": "OK", + "general.needs_a_fix": "Precisa de correção", + "general.changing": "Alterando…", + "general.no_network_adapter_here_can": "Nenhum adaptador de rede aqui pode ativar {me}", + "general.its_network_adapter_wakes_me": "O adaptador de rede ativa {me} com um pacote mágico. Pede direitos de administrador para alterar", + "general.shows_up_once_a_computer": "Aparece depois que um computador for pareado", + "general.starting": "Iniciando…", + "general.not_running": "Não está em execução", + "general.running": "Em execução", + "general.installing": "Instalando…", + "general.installed": "Instalado", + "general.not_installed": "Não instalado", + "general.adds_the_extra_screen_for": "Adiciona a tela extra para Compartilhar tela › Estender", + "general.needed_for_share_screen_extend": "Necessário para Compartilhar tela › Estender. Pede direitos de administrador uma vez", + "general.bluetooth_is_off_in_windows": "O Bluetooth está desativado nas configurações do Windows", + "general.this_pc_s_bluetooth_can": "O Bluetooth deste computador não suporta isso (requer Bluetooth LE)", + "general.only_phones_on_this_network": "Só se conectam telefones nesta rede ou por cabo USB", + "general.a_phone_nearby_connects_through": "Um telefone próximo se conecta por Bluetooth; arquivos e telas mudam para o Wi-Fi Direct por um momento", + "general.bluetooth_stays_on_beside_the": "O Bluetooth fica ativado junto com o Wi-Fi, como alternativa caso ele caia", + "general.off_now_the_session_is": "Desativado agora: a sessão está no mesmo Wi-Fi. O Bluetooth volta quando ela terminar", + "general.on_the_same_wi_fi": "Na mesma rede Wi-Fi (não Wi-Fi Direct), o Bluetooth é desativado até a sessão terminar. Com um computador, os telefones não encontram este enquanto isso", + "general.only_computers_on_this_network": "Só se conectam computadores nesta rede", + "general.a_computer_nearby_connects_through": "Um computador próximo se conecta por Bluetooth; arquivos e telas mudam para o Wi-Fi Direct por um momento", + "general.not_supported": "Não suportado", + "general.on": "Ativado", + "general.unknown": "Desconhecido", + "kit.status": "Status", + "kit.display": "Tela", + "kit.picture": "Imagem", + "kit.speed": "Velocidade", + "kit.round_trip": "Ida e volta", + "kit.codec": "Codec", + "kit.decoder": "Decodificador", + "kit.encoder": "Codificador", + "kit.delay": "Atraso", + "kit.frames_dropped": "Quadros perdidos", + "kit.freezes": "Travamentos", + "kit.details": "Detalhes", + "kit.never": "nunca", + "kit.just_now": "agora mesmo", + "kit.seconds_ago": "há {seconds} s", + "kit.minutes_ago": "há {minutes} min", + "kit.hours_ago": "há {hours} h", + "kit.coming_in_phase": "Chega na fase {phase}", + "kit.how_it_will_work": "Como vai funcionar", + "kit.settings_it_will_have": "Configurações que terá", + "kit.hardware": "Hardware", + "kit.software": "Software", + "kit.hardware_name": "Hardware ({name})", + "kit.software_name": "Software ({name})", + "kit.this_pc": "este computador", + "kit.the_other_computer": "outro computador", + "kit.fastest": "Mais rápido", + "kit.smooth": "Suave", + "kit.playback": "Reprodução", + "kit.even_motion_about_one_frame": "Movimento uniforme, cerca de um quadro depois. Igual em {name}", + "kit.each_frame_the_moment_it": "Cada quadro assim que chega. Igual em {name}", + "kit.press_keys": "Pressione as teclas…", + "kit.lock_the_cursor": "Travar o cursor", + "kit.lock_key": "Tecla de trava", + "kit.scroll_lock_or_f13_f24": "Scroll Lock ou F13–F24 isoladamente, ou uma combinação com Ctrl, Alt ou Win", + "kit.cursor_lock": "Trava do cursor", + "kit.keeps_pointer_one_computer": "Mantém o ponteiro em um computador, mesmo quando o mouse está conectado a outro.", + "kit.keeps_pointer_one_computer_keys": "Mantém o ponteiro em um computador, mesmo quando o mouse está conectado a outro. Enquanto o ponteiro estiver em {me}, {keys} em qualquer teclado o trava ou destrava (cada computador tem a sua própria tecla).", + "kit.pointer_stays_on_where": "O ponteiro fica em {where}: as bordas da tela não são atravessadas.", + "kit.pointer_stays_on_where_keys": "O ponteiro fica em {where}: as bordas da tela não são atravessadas. Enquanto o ponteiro estiver em {me}, {keys} em qualquer teclado o trava ou destrava (cada computador tem a sua própria tecla).", + "kit.keeps_pointer_on_where": "Mantém o ponteiro em {where}, onde ele está agora, mesmo quando o mouse está conectado a outro computador.", + "kit.keeps_pointer_on_where_keys": "Mantém o ponteiro em {where}, onde ele está agora, mesmo quando o mouse está conectado a outro computador. Enquanto o ponteiro estiver em {me}, {keys} em qualquer teclado o trava ou destrava (cada computador tem a sua própria tecla).", + "kit.keyboard_and_mouse": "Teclado e mouse", + "kit.on_me": "Em {me}", + "kit.on_name": "Em {name}", + "kit.name_is_using_me": "{Name} está usando {me}", + "kit.sharing_off": "Compartilhamento desativado", + "kit.locked_where": "Travado · {where}", + "kit.cursor_sharing_is_off_double_tap": "O compartilhamento do cursor está desativado. Pressione {hotkey} duas vezes para ativá-lo.", + "kit.cursor_sharing_is_off_over_bluetooth": "O compartilhamento do cursor está desativado via Bluetooth. Ele volta no Wi-Fi, ou pressione {hotkey} duas vezes para ativá-lo.", + "kit.waiting_for_name": "Aguardando {name}", + "kit.connected_to_name_double_tap": "Conectado a {name}. Pressione {hotkey} duas vezes para desativar o compartilhamento do cursor.", + "kit.double_tap_to_turn_cursor_off": "Pressione {hotkey} duas vezes para desativar o compartilhamento do cursor", + "kit.double_tap_to_come_back": "Pressione {hotkey} duas vezes para voltar e desativar o compartilhamento do cursor", + "kit.double_tap_to_take_it_back": "Pressione {hotkey} duas vezes para retomar", + "kit.double_tap_hotkey": "Pressione {hotkey} duas vezes", + "start.duodesk_on_name_asks_to": "O DuoDesk em {name} pede para parear com este Mac. Pressione Parear lá e compare os códigos.", + "start.check_that_name_shows_the": "Confirme que {name} mostra o mesmo código.", + "start.name_is_on_the_usb": "{name} está no cabo USB. Clique em Permitir para parear.", + "start.waiting_for_the_code": "Aguardando o código…", + "start.allowed_waiting_for_codes_match": "Permitido. Aguardando “Códigos coincidem” em {name}…", + "start.name_confirmed_the_code_click": "{name} confirmou o código. Clique em Permitir se coincidir.", + "start.ok": "OK", + "start.waiting_for_allow_on_name": "Aguardando Permitir em {name}…", + "start.the_other_device": "o outro dispositivo", + "start.moving_to_wifi_with_name": "Mudando para o Wi-Fi com {name}…", + "overview.starting_wifi_for": "Iniciando o Wi-Fi para {name}…", + "start.switch_on_names_hotspot": "Ative o ponto de acesso de {name}", + "start.couldnt_move_to_wifi": "Não foi possível mudar para o Wi-Fi", + "start.name_isnt_on_this_macs": "{name} não está na rede deste Mac. A tela precisa de Wi-Fi: ative o ponto de acesso no dispositivo e digite o nome e a senha da rede aqui.", + "start.error_still_connected_over": "{error}. Ainda conectado por Bluetooth.", + "start.name_isnt_on_this_network": "{name} não está nesta rede: um link Wi-Fi direto. Este Mac fica sem o próprio Wi-Fi enquanto isso.", + "start.name_isnt_on_this_network_files": "{name} não está nesta rede: um link Wi-Fi direto para os arquivos. Este Mac fica sem o próprio Wi-Fi enquanto isso.", + "start.name_isnt_on_this_network_screen": "{name} não está nesta rede: um link Wi-Fi direto para a tela. Este Mac fica sem o próprio Wi-Fi enquanto isso.", + "overview.its_address": "Seu endereço", + "overview.youre_using_name": "Você está usando {name}", + "overview.name_is_using_me": "{name} está usando {me}", + "overview.screen_recording": "Gravação de Tela", + "cursor.accessibility": "Acessibilidade", + "overview.input_monitoring": "Monitoramento de Entrada", + "overview.open_general": "Abrir Geral", + "overview.waiting_codes_match_on": "Aguardando “Códigos coincidem” em {name}…", + "overview.didnt_answer_is_duodesk_open": "{name} não respondeu. O DuoDesk está aberto lá?", + "overview.asked_to_pair_confirm_there": "Pedido de pareamento enviado a {name}. Confirme lá…", + "overview.perms_arent_allowed": "{list} não têm permissão", + "overview.perm_isnt_allowed": "{list} não tem permissão", + "overview.duodesk_needs_it_to_share": "O DuoDesk precisa dessa permissão para compartilhar este Mac com o outro computador. Depois de uma atualização, permita-a novamente.", + "overview.allow_local_network_for_duodesk": "Permita o acesso do DuoDesk à Rede Local ou conecte por endereço.", + "overview.open_other_to_connect": "Abra o DuoDesk no outro computador para conectar.", + "overview.pick_above": "Escolha um computador acima ou conecte por endereço.", + "overview.pair_with_a_computer_in": "Pareie com um computador na seção Por perto.", + "cursor.use_here_control_there": "Usar aqui, controlar lá", + "cursor.let_it_control_this": "Permitir que controle este computador", + "cursor.pinch_to_zoom_swipe_between": "Gesto de pinça para zoom, deslizar entre áreas de trabalho, Mission Control / Visão de Tarefas, avançar e voltar — do jeito nativo em {name}. O mesmo em ambos", + "cursor.reverse_scrolling_from_name": "Inverter rolagem de {name}", + "cursor.double_tap_the_hotkey": "Pressione o atalho duas vezes para recuperar tudo", + "cursor.pointer_speed_on_name": "Velocidade do ponteiro em {name}", + "clipboard.send": "Enviar", + "clipboard.receive": "Receber", + "clipboard.options": "Opções", + "clipboard.pics_taken_both_ways": "Imagens que você copiar e capturas de tela feitas com ⌃⇧⌘4, até 10 MB, em ambas as direções", + "clipboard.pics_taken_no_ble": "Imagens que você copiar e capturas de tela feitas com ⌃⇧⌘4, até 10 MB, em ambas as direções. Não disponível via Bluetooth", + "clipboard.turned_off_on_name": "Desativado em {name}.", + "clipboard.last_copy_not_sent": "Última cópia não enviada: {last}.", + "files.share_a_folder": "Compartilhar uma pasta", + "files.accept_files": "Aceitar arquivos", + "files.accept_files_from": "Aceitar arquivos de {name}", + "files.connect_the_shared_folder": "Conectar a pasta compartilhada", + "files.show_in_finder": "Mostrar no Finder", + "files.save_to": "Salvar em", + "files.downloads": "Downloads", + "files.they_go_to_the_other": "Vão para a pasta Downloads do outro computador", + "files.select_files_in_finder_first": "Selecione os arquivos no Finder primeiro", + "files.arriving_files": "Arquivos recebidos", + "files.select_files_press_copy_then": "Selecione os arquivos, pressione {copy} e depois {paste} em {name}", + "files.name_copied_file_press_keys": "{name} copiou {file} · pressione {keys}", + "files.name_copied_count_items_press": "{name} copiou {count} itens · pressione {keys}", + "files.into_the_app_in_front": "No aplicativo em primeiro plano (conversa, e-mail…), na pasta do Finder em primeiro plano ou, senão, na Mesa", + "files.waiting_for_your_password": "Aguardando sua senha…", + "files.couldnt_share_error": "Não foi possível compartilhar: {error}", + "files.in_finders_sidebar": "Na barra lateral do Finder", + "files.couldnt_connect_error": "Não foi possível conectar: {error}", + "files.waiting_for_name_share_folder": "Aguardando {name} compartilhar uma pasta", + "files.receiving_name_percent": "Recebendo {name} {percent}%", + "files.sending_name_percent": "Enviando {name} {percent}%", + "files.failed_error": "Falhou: {error}", + "files.show": "Mostrar", + "general.to_share_your_screen": "Para compartilhar sua tela", + "general.so_the_other_computer_can": "Para que o outro computador possa controlar este", + "general.to_use_this_keyboard_on": "Para usar este teclado no outro computador", + "general.local_network": "Rede Local", + "general.to_find_your_other_computers": "Para encontrar seus outros computadores e telefones", + "general.to_join_a_phones_or": "Para entrar no Wi-Fi Direct de um telefone ou PC (o macOS só mostra redes Wi-Fi com ela)", + "general.full_disk_access": "Acesso Total ao Disco", + "general.optional_to_share_any_folder": "Opcional: para compartilhar qualquer pasta com o outro computador", + "general.background_helper": "Auxiliar em segundo plano", + "general.open_at_login": "Abrir ao iniciar a sessão", + "general.keep_the_display_awake": "Manter a tela ativa", + "general.let_name_wake_me": "Permitir que {name} desperte {me}", + "general.turn_off_bluetooth_on_wifi": "Desativar o Bluetooth em conexões Wi-Fi", + "general.duodesk_in_the_share_menu": "DuoDesk no menu Compartilhar", + "general.share_duodesk_sends_files_to": "Compartilhar › DuoDesk envia arquivos para o outro computador", + "general.extensions": "Extensões…", + "general.show_the_phones_wallpaper": "Mostrar o papel de parede do telefone", + "general.wifi_bluetooth_torch_do_not": "Wi-Fi, Bluetooth, lanterna, Não perturbe e mais, com volume e toque", + "general.the_phones_most_used_apps": "Os aplicativos mais usados no telefone nesta semana", + "general.while_connected": "Enquanto conectado", + "general.changed_a_permission": "Mudou uma permissão?", + "general.restart_to_apply_it": "Reinicie para aplicar", + "general.restart": "Reiniciar", + "general.allowed_by_accessibility": "Permitido pela Acessibilidade", + "general.allowed": "Permitido", + "general.not_allowed": "Não permitido", + "general.wake_for_network_access_asks": "Despertar para acesso à rede. Pede sua senha para alterar", + "general.on_the_same_wifi_network_not": "Na mesma rede Wi-Fi (não Wi-Fi Direct), o Bluetooth fica desativado até a sessão terminar. Com um computador conectado, os telefones não encontram este computador enquanto isso", + "general.bluetooth_is_off": "O Bluetooth está desativado", + "general.allow_duodesk_in_system_settings": "Permita o DuoDesk em Ajustes do Sistema › Privacidade e Segurança › Bluetooth", + "general.this_mac_cant_advertise_over": "Este Mac não pode se anunciar por Bluetooth", + "general.phones_nearby_connect_over_bluetooth": "Telefones por perto se conectam por Bluetooth. Arquivos e telas passam para uma conexão Wi-Fi direta por um tempo", + "general.pcs_nearby_connect_over_bluetooth": "PCs por perto se conectam por Bluetooth. Arquivos e telas passam para uma conexão Wi-Fi direta por um tempo", + "display.starting": "Iniciando…", + "display.waiting_for_name_ellipsis": "Aguardando {name}…", + "display.live": "Ao vivo", + "display.ready_starts_when_name_opens": "Pronto — começa quando {name} abrir", + "display.waiting_for_wifi": "Aguardando o Wi-Fi", + "display.waiting_for_name": "Aguardando {name}", + "display.no_display_to_share": "Nenhuma tela para compartilhar", + "display.retrying": "Tentando novamente…", + "display.closed": "Fechado", + "display.something_went_wrong_in_the": "Algo deu errado em segundo plano. Reinicie o DuoDesk.", + "display.extend": "Estender", + "display.mirror": "Espelhar", + "display.mode": "Modo", + "display.display": "Tela", + "display.virtual_display": "Tela virtual", + "display.apply": "Aplicar", + "display.duodesk_virtual_display": "Tela virtual do DuoDesk", + "display.size": "Tamanho", + "display.1080p_fastest": "1080p, mais rápido", + "display.1440p_sharper": "1440p, mais nítido", + "display.full_size": "Tamanho original", + "display.low_10_mbps": "Baixa, 10 Mbps", + "display.medium_20_mbps": "Média, 20 Mbps", + "display.high_30_mbps": "Alta, 30 Mbps", + "display.best_50_mbps_wired": "Melhor, 50 Mbps (com cabo)", + "display.max_80_mbps_wired": "Máxima, 80 Mbps (com cabo)", + "display.remote_start": "Início remoto", + "display.let_name_start_and_switch": "Permitir que {name} inicie e troque esta tela", + "display.open_it_on_name_no": "Abra-a em {name} — sem precisar tocar em {me}", + "display.share_sound_with_the_screen": "Compartilhar o som com a tela", + "display.include_sound": "Incluir som", + "display.receive_input": "Receber entrada", + "display.let_name_use_me_in": "Permitir que {name} use {me} na própria janela", + "display.status": "Status", + "display.picture": "Imagem", + "display.speed": "Velocidade", + "display.round_trip": "Ida e volta", + "display.codec": "Codec", + "display.encoder": "Codificador", + "display.encode_time": "Tempo de codificação", + "display.screen": "Tela", + "display.resolution": "Resolução", + "display.quality": "Qualidade", + "display.sound_and_control": "Som e controle", + "display.details": "Detalhes", + "display.shows_the_duodesk_virtual_display": "Mostra a tela virtual do DuoDesk", + "display.shows_mes_main_screen": "Mostra a tela principal de {me}", + "display.label_main": "{label} (principal)", + "display.couldnt_create_it_error": "Não foi possível criá-la: {error}", + "display.on_width_height_pixelwidth_pixelheight": "Ativada, {width} × {height} ({pixelWidth} × {pixelHeight} px)", + "display.on_width_height": "Ativada, {width} × {height}", + "display.on_while_sharing": "Ativada durante o compartilhamento", + "display.mbps_of_target": "{mbps} Mbps de {target}", + "display.mbps": "{mbps} Mbps", + "display.ms_limited_by": "{ms} ms · limitado por {limit}", + "display_pc.stopped_on_the_other_computer": "Parado no outro computador", + "display_pc.open_full_screen": "Abrir em tela cheia", + "display_pc.control_it": "Controlar", + "display_pc.control_name_from_its_window": "Controlar {name} pela janela", + "display_pc.screen_window": "Janela da tela", + "display_pc.name_shares": "{name} compartilha", + "display_pc.frame_generation": "Geração de quadros", + "display_pc.fills_in_late_or_dropped": "Preenche quadros atrasados ou perdidos e adiciona quadros intermediários quando esta tela é mais rápida que a transmissão", + "display_pc.decoder": "Decodificador", + "display_pc.delay": "Atraso", + "display_pc.smoothness": "Fluidez", + "display_pc.ctrl_f_switches": "Ctrl ⌘ F alterna", + "display_pc.connect_to_choose_from_here": "Conecte para escolher daqui", + "display_pc.update_duodesk_on_the_other": "Atualize o DuoDesk no outro computador para escolher daqui", + "display_pc.the_other_computer_doesnt_allow": "O outro computador não permite escolher daqui", + "display_pc.an_extra_screen_for_it": "Uma tela extra para ele, mostrada aqui", + "display_pc.its_main_screen_shown_here": "A tela principal dele, mostrada aqui", + "display_pc.pick_mirror_or_extend_or": "Escolha Espelhar ou Estender — ou apenas pressione Abrir", + "display_pc.showing_name": "Mostrando {name}", + "display_pc.open_starts_it_on_name": "Abrir inicia em {name}", + "display_pc.choose_what_to_share_in": "Escolha o que compartilhar no DuoDesk em {name}", + "display_pc.ms_buffer_ms_decode": "{buffer} ms de buffer · {decode} ms de decodificação", + "control.this_mac": "Este Mac", + "control.the_other_computer": "o outro computador", + "control.fastest": "Mais rápido", + "control.smooth": "Suave", + "control.playback": "Reprodução", + "control.even_motion_about_one_frame": "Movimento uniforme, cerca de um quadro depois. O mesmo em {name}", + "control.each_frame_the_moment_it": "Cada quadro assim que chega. O mesmo em {name}", + "control.coming_in_phase": "Chega na fase {phase}", + "control.from_from_to_to": "De {from} para {to}", + "control.press_keys": "Pressione as teclas…", + "control.lock_the_cursor": "Travar o cursor", + "control.lock_key": "Tecla de trava", + "control.f13_f24_on_its_own": "F13–F24 sozinha (o Scroll Lock de um teclado de PC é F14) ou uma combinação com ⌃, ⌥ ou ⌘", + "control.cursor_lock": "Trava do cursor", + "control.keeps_the_pointer_on_one_key": "Mantém o ponteiro em um computador, mesmo com o mouse conectado a outro. Enquanto o ponteiro estiver em {me}, {keys} em qualquer um dos teclados trava ou destrava (cada computador tem a própria tecla).", + "control.keeps_the_pointer_on_one": "Mantém o ponteiro em um computador, mesmo com o mouse conectado a outro.", + "control.the_pointer_stays_on_where_key": "O ponteiro fica em {where}: não atravessa as bordas da tela. Enquanto o ponteiro estiver em {me}, {keys} em qualquer um dos teclados trava ou destrava (cada computador tem a própria tecla).", + "control.the_pointer_stays_on_where": "O ponteiro fica em {where}: não atravessa as bordas da tela.", + "control.keeps_the_pointer_on_where_key": "Mantém o ponteiro em {where}, onde está agora, mesmo com o mouse conectado a outro computador. Enquanto o ponteiro estiver em {me}, {keys} em qualquer um dos teclados trava ou destrava (cada computador tem a própria tecla).", + "control.keeps_the_pointer_on_where": "Mantém o ponteiro em {where}, onde está agora, mesmo com o mouse conectado a outro computador.", + "control.macos_is_blocking_the_mouse": "O macOS está bloqueando o mouse e o teclado. Permita Acessibilidade e Monitoramento de Entrada em Geral e reinicie.", + "control.cursor_sharing_is_off_double": "O compartilhamento do cursor está desativado. Pressione {hotkey} duas vezes para ativar.", + "control.cursor_sharing_is_off_over": "O compartilhamento do cursor fica desativado no Bluetooth. Ele volta no Wi-Fi, ou pressione {hotkey} duas vezes para ativar.", + "control.waiting_for_name": "Aguardando {name}.", + "control.youre_using_name_double_tap": "Você está usando {name}. Pressione {hotkey} duas vezes para voltar e desativar o compartilhamento do cursor.", + "control.name_is_using_me_double": "{name} está usando {me}. Pressione {hotkey} duas vezes para retomar.", + "control.connected_to_name_double_tap": "Conectado a {name}. Pressione {hotkey} duas vezes para desativar o compartilhamento do cursor.", + "control.never": "nunca", + "control.just_now": "agora mesmo", + "control.n_s_ago": "há {n} s", + "control.n_min_ago": "há {n} min", + "control.n_h_ago": "há {n} h", + "files.sending_files_to_one": "Enviando {count} arquivo para {name}", + "files.sending_files_to_other": "Enviando {count} arquivos para {name}", + "display_pc.dropped_freezes": "{dropped} perdidos · {freezes} travamentos", + "display_pc.dropped_freezes_frame_generation": "{dropped} descartados · {freezes} travamentos · geração de quadros ativada", + "overview.hotspot_password": "Senha do ponto de acesso", + "overview.fw_blocks_here": "O firewall bloqueia o DuoDesk aqui: use Corrigir firewall acima.", + "files.select_file_manager_first": "Selecione os arquivos no gerenciador de arquivos primeiro", + "files.to_the_or_right_click": "Para {the}, ou clique com o botão direito nos arquivos › Enviar para no gerenciador de arquivos", + "files.select_files_press": "Selecione os arquivos, pressione {copy} e depois {paste} em {the}", + "files.peer_copied_press": "{them} copiou {what} · pressione {keys}", + "files.n_items": "{count} itens", + "files.paste_into_app_front": "No aplicativo em primeiro plano (conversa, e-mail…), na pasta do gerenciador de arquivos em primeiro plano ou, senão, em {folder}", + "files.from_the_wayland_hint": "De {the}: solte em uma pasta ou na área de trabalho. Daqui: exige uma sessão Xorg", + "files.drag_edge_drop_folder": "Arraste pela borda da tela. Aqui, solte em uma pasta ou na área de trabalho", + "files.in_file_manager_sidebar": "Na barra lateral do gerenciador de arquivos", + "files.setting_up_samba": "Configurando o Samba…", + "files.folder_shares_samba": "{folder} · Compartilha com o Samba (pede sua senha uma vez)", + "files.sending_name_idx": "Enviando {name} ({idx} de {count})", + "files.sent_of_size": "{sent} de {size}", + "files.sent_of_size_queued": "{sent} de {size} · mais {queued} aguardando", + "about.kernel": "Kernel", + "about.whats_new": "Novidades", + "about.dont_skip": "Não ignorar", + "about.open_an_issue_on": "Abra uma issue no GitHub", + "about.version_number": "Versão {version}", + "about.version_available_skipped": "{version} está disponível (ignorada)", + "about.version_available": "{version} está disponível", + "about.couldnt_check": "Não foi possível verificar: {error}", + "about.you_have_download_linux": "Você tem a versão {version}. Baixar {file}", + "about.you_have_opens_release_linux": "Você tem a versão {version}. Abre a página da versão", + "about.version_no_releases_yet": "Versão {version}. Nenhuma versão publicada ainda", + "general.desktop_session": "Sessão da área de trabalho", + "general.input_access": "Acesso à entrada", + "general.keep_wifi_while_hosting_wifi": "Manter o Wi-Fi ao hospedar o Wi-Fi Direct", + "general.set_up": "Configurar", + "general.steadier_bluetooth_links": "Conexões Bluetooth mais estáveis", + "general.starts_in_the_tray": "Inicia na bandeja do sistema", + "general.quit": "Sair", + "general.quit_duodesk": "Sair do DuoDesk", + "general.stops_sharing_until_you_open": "Interrompe o compartilhamento até você abrir o aplicativo de novo", + "general.folder_isnt_there_now_downloads": "{folder} não está acessível agora: Downloads por enquanto. Arquivos enviados para {me} de outro computador ou de um telefone, e o que é salvo dos Arquivos e Fotos de um telefone", + "general.folder_files_sent_to_me": "{folder} · Arquivos enviados para {me} de outro computador ou de um telefone, e o que é salvo dos Arquivos e Fotos de um telefone", + "general.no_wired_network_adapter_here": "Nenhum adaptador de rede com fio aqui pode despertar {me}", + "general.its_wired_network_adapter_wakes": "O adaptador de rede com fio ativa {me} com um pacote mágico. Pede sua senha para alterar", + "general.input_through_method": "entrada via {method}", + "general.partly": "Parcial", + "general.reads_the_mouse_and_keyboard": "Lê o mouse e o teclado para a travessia; injeta pelo uinput", + "general.can_be_controlled_but_cant": "Pode ser controlado, mas não consegue ler o mouse e o teclado para atravessar (saia da sessão e entre de novo depois de Corrigir)", + "general.needed_to_share_the_mouse": "Necessário para compartilhar o mouse e o teclado no Wayland. Pede sua senha uma vez", + "general.needs_the_helper_running": "Precisa que o auxiliar esteja em execução", + "general.bluetooth_is_off_in_this": "O Bluetooth está desativado nas configurações deste computador", + "general.this_computers_bluetooth_cant_do": "O Bluetooth deste computador não consegue fazer isso (exige Bluetooth LE e BlueZ)", + "general.a_phone_nearby_connects_through_linux": "Um telefone por perto se conecta por Bluetooth; arquivos e telas passam para o Wi-Fi por um instante", + "general.a_computer_nearby_connects_through_linux": "Um computador por perto se conecta por Bluetooth; arquivos e telas passam para o Wi-Fi por um instante", + "general.waiting_for_your_password": "Aguardando sua senha…", + "general.setup_didnt_work": "A configuração não funcionou: {error}", + "general.a_phone_or_mac_busy_with": "Um telefone ou Mac ocupado com o Wi-Fi por um instante continua conectado (5 s até uma conexão Bluetooth ser considerada perdida, e não 0,4 s). Pede sua senha uma vez", + "general.hosting_wifi_direct_takes_this": "Hospedar o Wi-Fi Direct tira este computador da rede Wi-Fi até terminar", + "general.wifi_direct_runs_on_a_second": "O Wi-Fi Direct roda em uma segunda interface junto com a rede Wi-Fi deste computador, que continua conectada", + "general.not_set_up_the_password_prompt": "Não configurado: o pedido de senha foi cancelado. Até ser configurado, hospedar tira este computador da rede Wi-Fi", + "general.this_wifi_adapter_can_host": "Este adaptador Wi-Fi pode hospedar junto com a rede dele. Pede sua senha uma vez (na primeira vez que for necessário, ou em Configurar)", + "general.off": "Desativado", + "general.idle": "Inativo", + "kit.s_ago": "há {n} s", + "kit.min_ago": "há {n} min", + "kit.h_ago": "há {n} h", + "kit.kind_phone": "Telefone", + "kit.this_computer": "Este computador", + "kit.scroll_lock_or_f13_f24_linux": "Scroll Lock ou F13–F24 sozinha, ou uma combinação com Ctrl, Alt ou Super", + "kit.while_the_pointer_is_on": "Enquanto o ponteiro estiver em {me}, {keys} em qualquer um dos teclados trava ou destrava (cada computador tem a própria tecla).", + "kit.keeps_the_pointer_on_one": "Mantém o ponteiro em um computador, mesmo com o mouse conectado a outro.", + "kit.the_pointer_stays_on": "O ponteiro fica em {where}: não atravessa as bordas da tela.", + "kit.keeps_the_pointer_on_where": "Mantém o ponteiro em {where}, onde ele está agora, mesmo com o mouse conectado a outro computador.", + "kit.cursor_sharing_is_off_double": "O compartilhamento do cursor está desativado. Pressione {key} duas vezes para ativá-lo.", + "kit.cursor_sharing_is_off_over": "O compartilhamento do cursor fica desativado no Bluetooth. Ele volta no Wi-Fi, ou pressione {key} duas vezes para ativá-lo.", + "kit.waiting_for_the": "Aguardando {the}", + "kit.connected_to_name_double_tap_linux": "Conectado a {name}. Pressione {key} duas vezes para desativar o compartilhamento do cursor.", + "kit.double_tap_key_to_turn": "Pressione {key} duas vezes para desativar o compartilhamento do cursor", + "kit.double_tap_key_to_come": "Pressione {key} duas vezes para voltar e desativar o compartilhamento do cursor", + "kit.double_tap_key_to_take": "Pressione {key} duas vezes para retomar", + "kit.double_tap_key": "Pressione {key} duas vezes", + "pair.banner_ask_hint_computer": "O DuoDesk em {name} pede para parear com este computador. Pressione Parear lá e compare os códigos.", + "pair.connecting_to": "Conectando a {address}…", + "pair.waiting_for": "Aguardando {name}…", + "pair.check_code_match": "Verifique se {name} mostra o mesmo código e clique em Códigos coincidem.", + "pair.waiting_for_allow": "Aguardando Permitir em {name}…", + "pair.usb_cable_allow": "{name} está no cabo USB. Clique em Permitir para parear.", + "pair.waiting_for_the_code": "Aguardando o código…", + "pair.check_code_allow": "Verifique se {name} mostra o mesmo código e clique em Permitir.", + "app.phase_number": "Fase {phase}", + "app.not_on_linux_yet": "Ainda não disponível no Linux", + "app.from_to": "{from} para {to}", + "app.name_on_me": "{Name} em {me}", + "kit.name_on_me": "{name} em {me}", + "kit.me_on_name": "{me} em {name}", + "about.you_have_download_mac": "Você tem a versão {version}. Baixar {file}", + "about.you_have_opens_release_mac": "Você tem a versão {version}. Abre a página da versão", + "apps.share_apps": "Compartilhar aplicativos", + "apps.open_mes_apps_on": "Abrir os aplicativos de {me} em {name}", + "apps.open_there_now": "Abertos lá agora", + "apps.show_apps_here": "Mostrar aplicativos aqui", + "apps.open_names_apps_on": "Abrir os aplicativos de {name} em {me}", + "apps.open_here_now": "Abertos aqui agora", + "apps.names_apps": "Aplicativos de {Name}", + "apps.couldnt_open": "Não foi possível abrir: {error}", + "apps.open_app_on": "Abrir {app} em {name}", + "apps.opening": "Abrindo…", + "apps.failed": "Falhou", + "apps.add_to_the_dock": "Adicionar {app} ao Dock", + "apps.loading_names_apps": "Carregando os aplicativos de {name}…", + "apps.no_apps_yet_press_refresh": "Nenhum aplicativo ainda. Clique em Atualizar.", + "apps.screen_sharing_turns_on_while": "O compartilhamento de tela é ativado enquanto um aplicativo estiver aberto", + "apps.needs_accessibility_general": "Precisa de Acessibilidade (Geral)", + "apps.windows_one": "{count} janela", + "apps.windows_other": "{count} janelas", + "apps.nothing_open": "Nada aberto", + "apps.apps_one": "{count} aplicativo", + "apps.apps_other": "{count} aplicativos", + "audio.send_sound": "Enviar som", + "audio.mute_while_sending": "Silenciar durante o envio", + "audio.play_sound_here": "Reproduzir som aqui", + "audio.play_mes_sound_on": "Reproduzir o som de {me} em {name}", + "audio.play_names_sound_on": "Reproduzir o som de {name} em {me}", + "audio.playing_with_the_screen": "Reproduzindo com a tela", + "audio.cant_capture_sound": "Não foi possível capturar o som: {error}", + "keyboard.works_as_ctrl_so_c": "⌘ funciona como Ctrl, então ⌘C copia lá", + "keyboard.ctrl_works_as": "Ctrl funciona como ⌘", + "keyboard.so_ctrl_c_copies_here": "Assim Ctrl+C copia aqui", + "mount.phone_in_finder": "Telefone no Finder", + "mount.show_the_phone_in_finder": "Mostrar o telefone no Finder", + "mount.finder": "Finder", + "mount.adb_developer_options_off": "A montagem funciona via ADB, e as Opções do desenvolvedor estão desativadas no telefone. Ative as Opções do desenvolvedor e a Depuração sem fio (Conexão), ou conecte o telefone por USB com a depuração USB ativada. Arquivos do Telefone funciona sem isso.", + "mount.adb_wireless_debugging_off": "A montagem funciona via ADB, e a depuração sem fio está desativada no telefone. Ative-a (Conexão), ou conecte o telefone por USB com a depuração USB ativada. Arquivos do Telefone funciona sem isso.", + "mount.in_finder_via_cable": "No Finder, em Locais (pelo cabo).", + "mount.in_finder_via_wireless": "No Finder, em Locais (por depuração sem fio).", + "notifs.send_notifications": "Enviar notificações", + "notifs.show_mes_notifications_on": "Mostrar as notificações de {me} em {name}", + "notifs.allow_full_disk_access": "Permitir Acesso Total ao Disco", + "notifs.click_or_drag_duodesk_into": "Clique em + ou arraste o DuoDesk para a lista", + "notifs.show_notifications_here": "Mostrar notificações aqui", + "notifs.show_names_notifications_on": "Mostrar as notificações de {name} em {me}", + "notifs.needs_full_disk_access": "Precisa de Acesso Total ao Disco", + "notifs.count_sent": "{count} enviadas", + "notifs.count_shown": "{count} exibidas", + "notifs.as_native_notifications_from_duodesk": "Como notificações nativas, vindas do DuoDesk", + "notifs.apps_show_up_here_after_mac": "Os aplicativos aparecem aqui depois da primeira notificação", + "phone.duodesk_on_the_phone_taps_mac": "O DuoDesk no telefone toca e digita sozinho, via Wi-Fi, Wi-Fi Direct ou Bluetooth. Sem opções do desenvolvedor", + "phone.thats_all_after_pairing_once": "Pronto: depois de parear uma vez, o DuoDesk ativa a depuração sem fio sozinho.", + "phone.open_on_this_mac": "Abertos neste Mac", + "phone.return_sends_messages": "Return envia mensagens", + "phone.in_whatsapp_instagram_and_telegram_in": "No WhatsApp, Instagram e Telegram, em uma janela do telefone ou com este teclado no telefone. ⇧Return: uma nova linha", + "phone.show_the_phones_wallpaper_here": "Mostrar o papel de parede do telefone aqui", + "phone.push_the_pointer_off_the_edge": "Empurre o ponteiro para fora da borda da tela para usar o telefone. Pressione o atalho duas vezes para voltar.", + "phone.click_the_phone_above_overview_to": "Clique no telefone acima de Visão Geral para conectá-lo.", + "phone.android_version": "Android {version}", + "phone.wireless_debugging_is_off_on_the": "A depuração sem fio está desativada no telefone. A tela e o controle por ADB precisam dela; a Acessibilidade não.", + "phone.the_phones_screen_touch_mouse_and": "A tela, o toque, o mouse e o teclado do telefone, e a área de transferência dele em segundo plano", + "phone.duodesk_pairs_with_the_phones_wireless": "O DuoDesk pareia com a depuração sem fio do telefone uma vez. Depois disso, a tela, os aplicativos, o mouse e o teclado do telefone funcionam sem esta etapa.", + "phone.this_build_of_duodesk_doesnt": "Esta versão do DuoDesk não inclui o aplicativo Android.", + "phone.the_duodesk_you_downloaded_cant": "O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento são mantidos.", + "phone.the_duodesk_you_downloaded_cant_wd": "O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento são mantidos. Precisa de depuração sem fio.", + "phone.automatic_accessibility_until_wireless": "Automático: Acessibilidade até a depuração sem fio ficar pronta", + "phone.duodesk_on_the_phone_taps_asks_once": "O DuoDesk no telefone toca e digita sozinho. O telefone pede uma vez para permitir isso em Acessibilidade", + "phone.apps_open_in_their_own_windows": "Os aplicativos abrem em janelas próprias depois que a depuração sem fio estiver configurada.", + "phone.loading_the_phones_apps": "Carregando os aplicativos do telefone…", + "phone.open_app_in_a_window_mac": "Abrir {app} em uma janela (clique com o botão direito para adicioná-lo ao Dock)", + "setup.screen_recording": "Gravação de Tela", + "setup.to_share_this_macs_screen": "Para compartilhar a tela deste Mac", + "setup.accessibility": "Acessibilidade", + "setup.so_the_other_computer_can": "Para que o outro computador possa controlar este Mac", + "setup.input_monitoring": "Monitoramento de Entrada", + "setup.to_use_this_keyboard_on": "Para usar este teclado no outro computador", + "setup.local_network": "Rede Local", + "setup.to_find_your_other_computers": "Para encontrar seus outros computadores", + "setup.allowed": "Permitido", + "setup.macos_needs_your_ok_for": "O macOS precisa da sua permissão para algumas coisas.", + "setup.restart_duodesk": "Reiniciar o DuoDesk", + "setup.allowed_by_accessibility": "Permitido pela Acessibilidade", + "terminal.open_shells_there": "Abrir shells lá", + "terminal.open_shells_on_name_from": "Abrir shells em {name} a partir de {me}", + "terminal.in_terminal": "No Terminal", + "terminal.allow_shells_here": "Permitir shells aqui", + "terminal.let_name_open_shells_on": "Permitir que {name} abra shells em {me}", + "terminal.remote_login": "Login Remoto", + "terminal.waiting_for_name_ellipsis": "Aguardando {name}…", + "terminal.set_up_the_ssh_server_in": "Configure o servidor SSH no DuoDesk em {name}", + "terminal.the_terminal_doesnt_work_over": "O terminal não funciona por Bluetooth. Conecte-se por Wi-Fi Direct ou entre na rede de {name}.", + "terminal.ready_signed_in_as": "Pronto, conectado como {user}", + "terminal.not_ready": "Não está pronto: {reason}", + "terminal.turn_on_terminal_in_duodesk": "Ative o Terminal no DuoDesk em {name}", + "terminal.on": "Ativado", + "terminal.off_turn_it_on_in": "Desativado. Ative-o nas configurações de Compartilhamento.", + "apps.name_s_apps": "Aplicativos de {name}", + "apps.count_open_here": "{count} abertos aqui", + "apps.count_open_on_name": "{count} abertos em {name}", + "apps.needs_an_xorg_session_wayland": "Requer uma sessão Xorg: o Wayland não deixa aplicativos mostrarem as janelas de outros aplicativos", + "apps.add_to_the_app_menu": "Adicionar ao menu de aplicativos", + "apps.add_app_to_the_app": "Adicionar {app} ao menu de aplicativos", + "keyboard.double_tap_to_type_on_linux": "Pressione duas vezes para digitar em {the} e voltar", + "keyboard.hotkey_on_the": "Atalho em {the}", + "keyboard.set_in_duodesk_on_the": "Definido no DuoDesk em {the}", + "mount.show_the_phone_in_the": "Mostrar o telefone no gerenciador de arquivos", + "mount.dev_options_off": "A montagem funciona pelo ADB, e as Opções do desenvolvedor estão desativadas no telefone. Ative as Opções do desenvolvedor e a Depuração sem fio (Conexão), ou conecte o telefone por USB com a depuração USB ativada. Arquivos do Telefone funciona sem isso.", + "mount.wireless_off": "A montagem funciona pelo ADB, e a depuração sem fio está desativada no telefone. Ative-a (Conexão), ou conecte o telefone por USB com a depuração USB ativada. Arquivos do Telefone funciona sem isso.", + "mount.sidebar_cable": "Na barra lateral do gerenciador de arquivos, pelo cabo.", + "mount.sidebar_wireless": "Na barra lateral do gerenciador de arquivos, por depuração sem fio.", + "notifs.as_desktop_notifications_from_duodesk": "Como notificações da área de trabalho, pelo DuoDesk", + "notifs.can_t_read_this_desktop": "Não foi possível ler as notificações desta área de trabalho (dbus-monitor ausente)", + "phone.accessibility_tooltip": "O DuoDesk no telefone toca e digita sozinho, por Wi-Fi, Wi-Fi Direct ou Bluetooth. Sem opções do desenvolvedor", + "phone.open_on_this_computer": "Abertos neste computador", + "phone.the_screen_works_but_xiaomi": "A tela funciona, mas a Xiaomi recusa toque, mouse e teclado daqui. No telefone: Configurações › Opções do desenvolvedor › Depuração USB (Configurações de segurança): ativada (pede uma conta Mi).", + "phone.full_app_ready": "O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento são mantidos.", + "phone.full_app_needs_adb": "O DuoDesk que você baixou não consegue ler as notificações do telefone (o Play Protect bloqueia aplicativos baixados que conseguem). Instale o aplicativo completo por cima: as configurações e o pareamento são mantidos. Requer depuração sem fio.", + "phone.accessibility_hint": "O DuoDesk no telefone toca e digita sozinho. O telefone pede uma vez para permitir em Acessibilidade", + "phone.open_app_in_a_window_linux": "Abrir {app} em uma janela", + "receive.status": "Status", + "receive.display": "Tela", + "receive.speed": "Velocidade", + "receive.round_trip": "Ida e volta", + "receive.codec": "Codec", + "receive.decoder": "Decodificador", + "receive.delay": "Atraso", + "receive.frames_dropped": "Quadros perdidos", + "receive.freezes": "Travamentos", + "receive.fills_in_late_or_dropped": "Preenche quadros atrasados ou perdidos e adiciona quadros intermediários quando esta tela é mais rápida que a transmissão", + "receive.waiting_for_the": "Aguardando {the}", + "receive.sharing_on_the_open_to": "Compartilhando em {the}. Abra para assistir.", + "receive.open_starts_sharing_on_the": "Abrir inicia o compartilhamento em {the}", + "receive.turn_on_sharing_on_the": "Ative o compartilhamento em {the}", + "receive.mbps_mbps_received": "{mbps} Mbps recebidos", + "setup.desktop_session": "Sessão da área de trabalho", + "setup.input_access": "Acesso à entrada", + "setup.firewall": "Firewall", + "setup.you_can_change_these_later_linux": "Você pode mudar isso depois em Geral.", + "setup.no_desktop": "Sem área de trabalho", + "setup.no_x11_or_wayland_display": "Nenhuma tela X11 ou Wayland encontrada. Inicie o DuoDesk pela sua área de trabalho.", + "setup.wayland_lets_duodesk_share_the": "O Wayland permite que o DuoDesk compartilhe o mouse e o teclado por /dev/uinput e /dev/input. Corrigir configura isso uma vez (pede sua senha); depois saia da sessão e entre de novo.", + "setup.message_fix_lets_ports_port": "{message} Corrigir libera as portas {port} e {discovery} (pede sua senha).", + "setup.helper_restart_duodesk_if_it": "{helper}. Reinicie o DuoDesk se continuar assim.", + "share.status": "Status", + "share.speed": "Velocidade", + "share.round_trip": "Ida e volta", + "share.codec": "Codec", + "share.encoder": "Codificador", + "share.frames_dropped": "Quadros perdidos", + "share.on_the": "Ativado em {the}", + "share.waiting_for_the": "Aguardando {the}", + "share.ready_starts_when_the_opens": "Pronto, começa quando {the} abrir", + "share.virtual_monitor_width_height": "Monitor virtual, {width} × {height}", + "share.sent_network_allows": "{mbps} Mbps enviados, a rede permite {target}", + "share.mbps_mbps_sent": "{mbps} Mbps enviados", + "share.receive_input_from_them": "Receber entrada de {them}", + "share.let_the_start_and_switch": "Permitir que {the} inicie e troque esta tela", + "share.adds_an_extra_screen_for_linux": "Adiciona uma tela extra para Estender ativando uma saída de vídeo livre. Instala um pequeno auxiliar e pede sua senha uma vez.", + "share.extend_isn_t_available_on": "Estender não está disponível nesta área de trabalho.", + "share.wayland_asks_extend": "Wayland: sua área de trabalho pergunta qual tela compartilhar sempre que o compartilhamento começa; escolha “Virtual remote monitor”.", + "share.wayland_asks": "Wayland: sua área de trabalho pergunta qual tela compartilhar sempre que o compartilhamento começa.", + "share.input_from_the_needs_input": "A entrada de {the} requer acesso à entrada (Geral).", + "terminal.installs_and_starts_openssh_asks": "Instala e inicia o OpenSSH. Pede sua senha uma vez", + "terminal.set_up_ssh_first": "Configure primeiro o servidor SSH", + "terminal.set_up_the_ssh_server": "Configure o servidor SSH em {name}", + "tray.connect_to": "Conectar a", + "tray.nobody_nearby": "Ninguém por perto", + "tray.connect_by_address": "Conectar por endereço…", + "tray.look_again": "Procurar novamente", + "tray.open_duodesk": "Abrir o DuoDesk…", + "tray.quit": "Sair do DuoDesk", + "tray.bring_back": "Trazer o mouse e o teclado de volta", + "tray.cursor_sharing": "Compartilhamento do cursor", + "tray.mouse_keyboard": "Mouse e teclado", + "tray.share_keyboard": "Compartilhar teclado", + "tray.popup_switching": "Mostrar um aviso ao alternar", + "tray.screen": "Tela", + "tray.clipboard_sound": "Área de transferência e som", + "tray.share_clipboard": "Compartilhar área de transferência", + "tray.send_sound": "Enviar som", + "tray.files": "Arquivos", + "tray.drag_files": "Arrastar arquivos além da borda da tela", + "tray.connection": "Conexão", + "tray.open_log": "Abrir pasta de logs", + "tray.share_screen": "Compartilhar tela", + "tray.receive_screen": "Receber tela", + "tray.lock_cursor_on": "Travar o cursor em {name} ({keys})", + "tray.use_mk_on": "Usar mouse e teclado em {name}", + "tray.let_control": "Permitir que {name} controle {me}", + "tray.copy_paste_files": "Copiar e colar arquivos ({copy}, {paste})", + "tray.disconnect_name": "Desconectar {name}", + "tray.download_version": "Baixar o DuoDesk {version}…", + "tray.version_available": "DuoDesk {version} disponível…", + "tray.take_over_name": "Assumir {name}", + "tray.connect_to_name": "Conectar a {name}", + "tray.connected_to": "Conectado a {name}", + "tray.disconnected": "Desconectado", + "tray.pair_again": "Parear novamente", + "tray.continue_from": "Continuar {title} de {name}", + "tray.send_to": "Enviar {title} para {name}", + "mac_notifs.copy_code": "Copiar {code}", + "dialog.choose_files": "Escolher arquivos", + "dialog.open": "Abrir", + "dialog.choose_folder": "Escolher pasta", + "dialog.select_folder": "Selecionar pasta", + "firewall.no_network": "Sem conexão de rede.", + "firewall.network_public": "A rede \"{network}\" é Pública, portanto o Windows bloqueia as transmissões de {name}.", + "firewall.rule_blocks": "Uma regra do Firewall do Windows bloqueia o DuoDesk.", + "firewall.not_allowed_network": "O DuoDesk não tem permissão no Firewall do Windows nesta rede.", + "firewall.check_failed": "Não foi possível verificar o firewall: {error}", + "firewall.admin_declined": "Não corrigido: a solicitação de administrador foi recusada", + "firewall.not_fixed": "Não corrigido: {error}", + "firewall.firewalld_allows": "O firewalld permite o DuoDesk", + "firewall.firewalld_blocks": "O firewalld bloqueia o DuoDesk.", + "firewall.no_firewall": "Nenhum firewall ativado", + "terminal.remote_login_off": "O Login Remoto está desativado em {name} (Ajustes do Sistema → Geral → Compartilhamento).", + "terminal.sshd_off": "O servidor SSH não está em execução em {name} (lá, aba Terminal → Configurar).", + "terminal.not_allowed": "{Name} não permite terminais de {me} (lá, aba Terminal).", + "terminal.unavailable_bluetooth": "O terminal não funciona por Bluetooth. Conecte-se por Wi-Fi Direct ou entre na rede de {name}.", + "terminal.no_terminal_app": "Nenhum aplicativo de terminal encontrado. Execute ssh duodesk em qualquer terminal.", + "terminal.could_not_open_terminal": "Não foi possível abrir {app}: {error}", + "vdd.check_failed": "Não foi possível verificar o driver de vídeo: {error}", + "vdd.admin_declined": "A solicitação de administrador foi recusada", + "vdd.arm_unsupported": "Estender ainda não está disponível no Windows em ARM: o Windows aceita apenas drivers de vídeo assinados pela Microsoft, e o build ARM64 do driver virtual não é um deles (Virtual-Display-Driver#465)", + "vdd.install_failed": "A instalação do driver de vídeo falhou: {error}", + "vdd.switch_failed": "Não foi possível alternar o monitor virtual: {error}", + "updates.notif_available_title": "DuoDesk {version} está disponível", + "updates.notif_manual_body": "Clique para ver os detalhes da atualização.", + "updates.notif_available_body": "Você tem a versão {current}. Clique para ver os detalhes da atualização e as notas da versão.", + "updates.could_not_reach_github": "Não foi possível acessar o GitHub", + "appview.title": "Aplicativo — DuoDesk", + "appview.connecting": "Conectando…", + "appview.reconnecting": "Reconectando…", + "appview.could_not_show": "Não foi possível exibir a janela: {error}", + "phoneview.title": "Telefone", + "phoneview.connecting": "Conectando ao telefone…", + "phoneview.controls_toggle": "Mostrar ou ocultar os controles do telefone", + "phoneview.fullscreen": "Tela cheia", + "phoneview.fullscreen_f11": "Tela cheia (F11)", + "phoneview.panel_aria": "Controles do telefone", + "phoneview.navbar_aria": "Navegação do telefone", + "phoneview.via_usb": "Pelo cabo USB", + "phoneview.via_wireless": "Pela depuração sem fio", + "phoneview.stopped_sharing": "O telefone parou de compartilhar ({reason}).", + "phoneview.waiting_for_picture": "Aguardando a imagem…", + "phoneview.vol_up": "Aumentar volume", + "phoneview.vol_down": "Diminuir volume", + "phoneview.mute": "Silenciar", + "phoneview.rotate": "Girar", + "phoneview.rotate_window": "Girar a janela", + "phoneview.torch": "Lanterna", + "phoneview.flip": "Câmera frontal ou traseira", + "phoneview.zoom_in": "Aumentar zoom", + "phoneview.zoom_out": "Reduzir zoom", + "phoneview.shot": "Captura de tela (é copiada: cole com Ctrl+V)", + "phoneview.notifs": "Notificações", + "phoneview.settings": "Configurações rápidas", + "phoneview.power": "Energia (bloquear ou despertar o telefone)", + "phoneview.screen_off": "Tela do telefone apagada (continua aparecendo aqui e economiza bateria)", + "phoneview.screen_off_mac": "Tela do telefone apagada: continua aparecendo aqui e economiza bateria (clique com botão direito: botão liga/desliga)", + "phoneview.enter_sends": "Enter envia no WhatsApp, Instagram e Telegram (Shift+Enter: nova linha)", + "phoneview.return_sends_mac": "Return envia no WhatsApp, Instagram e Telegram (⇧Return: nova linha)", + "phoneview.arrow_swipe": "Teclas de seta deslizam a tela (feeds, Reels, Shorts)", + "phoneview.arrow_swipe_aria": "Setas deslizam a tela", + "phoneview.pin": "Manter no topo", + "phoneview.back_esc": "Voltar (Esc)", + "phoneview.back_nav": "Voltar (botão direito, Esc)", + "phoneview.back": "Voltar", + "phoneview.home_nav": "Início (botão do meio)", + "phoneview.home": "Início", + "phoneview.recents": "Aplicativos recentes", + "phoneview.torch_tooltip": "Lanterna", + "phoneview.switch_camera": "Alternar câmera", + "phoneview.screen_off_aria": "Tela do telefone apagada", + "phoneview.return_sends_aria": "Return envia mensagens", + "monitor.not_sharing": "O Mac não está compartilhando", + "monitor.extend": "Estender", + "monitor.extend_title": "Usar esta janela como uma tela extra do outro computador", + "monitor.mirror": "Espelhar", + "monitor.mirror_title": "Mostrar a tela principal do outro computador", + "monitor.fg": "Geração de quadros", + "monitor.fg_title": "Geração de quadros: preenche quadros atrasados ou perdidos", + "monitor.fullscreen": "Tela cheia", + "monitor.fullscreen_title": "Tela cheia (F11)", + "monitor.fullscreen_mac": "Tela cheia (Ctrl ⌘ F)", + "monitor.stop": "Parar", + "monitor.stop_title": "Parar o compartilhamento no outro computador", + "monitor.waiting_for_picture": "Aguardando {target}…", + "monitor.starting_screen": "Iniciando a tela no outro computador…", + "monitor.turn_on_sharing": "Não está compartilhando. Ative o compartilhamento no outro computador.", + "monitor.connecting_to": "Conectando a {name}…", + "monitor.reconnecting": "Reconectando…", + "monitor.interrupted": "A conexão de vídeo foi interrompida…", + "monitor.could_not_start": "Não foi possível iniciar o vídeo: {error}", + "monitor.waiting_for_peer": "Aguardando {name}…", + "monitor.the_picture": "a imagem", + "monitor.the_other_computer": "o outro computador", + "pcview.connecting_to_pc": "Conectando ao PC…", + "pcview.connecting": "Conectando…", + "pcview.reconnecting": "Reconectando…", + "pcview.could_not_show": "Não foi possível exibir a tela: {error}", + "general.later": "Depois", + "general.choose": "Escolher…", + "cursor.through": "Conexão", + "cursor.through_hint": "ADB: controle total. Acessibilidade: o DuoDesk no telefone toca e digita sozinho, via Wi-Fi, Wi-Fi Direct ou Bluetooth, sem opções do desenvolvedor", + "cursor.which_edge_hint": "Para qual dispositivo leva cada borda da tela: Múltiplos dispositivos › Layout.", + "general.create": "Criar", + "general.cancel": "Cancelar", + "general.copy": "Copiar", + "general.refresh": "Atualizar", + "general.nothing_yet": "Nada ainda", + "general.loading": "Carregando…", + "general.turn_off": "Desativar", + "general.restarting": "Reiniciando…", + "hub.wifi_only": "Apenas Wi-Fi", + "hub.adb_ble_hint": "Disponível apenas por Wi-Fi: você está conectado via Bluetooth. Conecte via Wi-Fi Direct ou entre na mesma rede Wi-Fi.", + "hub.hotspot": "Ponto de acesso", + "hub.wifi_direct": "Wi-Fi Direct", + "hub.temp_prefix": "{name} temporário", + "hub.your_phone": "seu telefone", + "hub.sound_playing": "Reproduzindo. {phone} captura o áudio, então ele toca lá também (a depuração sem fio tira o som do telefone)", + "hub.sound_tap_start": "Toque em Iniciar em {phone} (na notificação ou em Som, no DuoDesk de lá)", + "hub.sound_asking": "Consultando {phone}…", + "hub.sound_through_adb": "Via depuração sem fio", + "hub.sound_over_wifi": "Via Wi-Fi: pela depuração sem fio ou capturado por {phone}", + "hub.need_calls_state": "as chamadas", + "hub.need_calls_numbers": "quem está ligando e o histórico de chamadas", + "hub.need_calls_dial": "fazer chamadas", + "hub.need_calls_answer": "atender e encerrar chamadas", + "hub.need_contacts": "nomes dos contatos", + "hub.need_msg_read": "ler mensagens", + "hub.need_msg_send": "enviar mensagens", + "hub.allow_on_phone": "Permitir no telefone", + "hub.install": "Instalar", + "hub.off_msg": "Desativado. Ao ativar, {phone} solicitará as permissões necessárias.", + "hub.connect_msg": "Conecte {phone} para usar {label}: clique no dispositivo no topo da barra lateral.", + "hub.waiting_msg": "Aguardando {phone}… O DuoDesk de lá precisa estar atualizado para usar {label}.", + "hub.files_need_a11": "Arquivos requer o Android 11 ou superior em {phone}. Já a montagem funciona via ADB.", + "hub.install_puts_adb": "Instalar transfere o aplicativo para o telefone via depuração sem fio; suas configurações são mantidas.", + "hub.setup_adb_phone": "Configure a depuração sem fio na página Telefone e depois clique em Instalar.", + "hub.need_notifs_apk": "{label} precisa do DuoDesk com notificações em {phone} (o Android não permite que aplicativos baixados leiam mensagens). {adb}", + "hub.allow_media": "Permita que {phone} compartilhe fotos e vídeos com o DuoDesk.", + "hub.allow_files": "Permita o Acesso a todos os arquivos para o DuoDesk em {phone}: ele lê e grava no armazenamento do telefone diretamente, sem ADB. O Android abrirá a configuração.", + "hub.allow_general": "Permita {label} em {phone}: o DuoDesk solicita acesso a {needs}.", + "hub.partial_media": "Apenas as fotos que você selecionou em {phone} aparecem aqui.", + "hub.partial_general": "Parte de {label} requer mais permissões em {phone}: {missing}.", + "hub.check_phone_android": "Verifique {phone}: o Android está solicitando confirmação.", + "hub.tap_notif_phone": "Toque na notificação em {phone}.", + "hub.connect_wifi_direct": "Conectar com Wi-Fi Direct", + "hub.wifi_gate_moving": "Disponível apenas via Wi-Fi Direct. Conectando…", + "hub.wifi_gate_failed": "Disponível apenas via Wi-Fi Direct. {error}.", + "hub.wifi_direct_failed": "O Wi-Fi Direct não foi iniciado", + "hub.wifi_gate_ble_can": "Disponível apenas por Wi-Fi Direct: você está conectado via Bluetooth. Ou conecte-se à mesma rede Wi-Fi.", + "hub.wifi_gate_ble_cannot": "Disponível apenas por Wi-Fi Direct ou na mesma rede Wi-Fi: você está conectado via Bluetooth.", + "hub.connecting_dots": "Conectando…", + "hub.try_again": "Tentar novamente", + "calls.desc": "Atenda e faça as chamadas do seu telefone aqui.", + "calls.card_now": "Agora", + "calls.card_call": "Ligar", + "calls.card_contacts": "Contatos", + "calls.card_sound": "Som", + "calls.card_bt_setup": "Configuração do Bluetooth", + "calls.card_recent": "Recentes", + "calls.answer": "Atender", + "calls.decline": "Recusar", + "calls.mute": "Silenciar", + "calls.unmute": "Ativar som", + "calls.sound_here": "Som aqui", + "calls.sound_phone": "Som no telefone", + "calls.end": "Encerrar", + "calls.enter_number": "Digite um número", + "calls.number_aria": "Número", + "calls.call": "Ligar", + "calls.keypad": "Teclado", + "calls.delete": "Apagar", + "calls.search_contacts": "Pesquisar contatos", + "calls.show_more": "Mostrar mais", + "calls.n_numbers": "{count} números", + "calls.no_contacts_match": "Nenhum contato correspondente", + "calls.no_contacts_phone": "Nenhum contato no telefone", + "calls.talk_listen_computer": "Falar e ouvir neste computador", + "calls.talk_listen_row": "Falar e ouvir em {me}", + "calls.which_phone_aria": "Qual telefone", + "calls.open_bt_settings": "Abrir configurações de Bluetooth", + "calls.step3_confirm": "3. Confirme o código em ambos", + "calls.forget": "Esquecer", + "calls.forget_confirm": "Esquecer?", + "calls.forget_hint": "{phone} e {me} esquecem um ao outro, via Bluetooth clássico e LE, e depois pareiam novamente do início", + "calls.type_incoming": "Recebida", + "calls.type_outgoing": "Efetuada", + "calls.type_missed": "Perdida", + "calls.type_declined": "Recusada", + "calls.type_blocked": "Bloqueada", + "calls.type_voicemail": "Correio de voz", + "calls.unknown_number": "Número desconhecido", + "calls.no_calls_yet": "Nenhuma chamada ainda", + "calls.incoming_call": "Chamada recebida{number}", + "calls.calling": "Chamando", + "calls.on_call": "Em chamada", + "calls.status_audio_off": "Desativado: o som das chamadas toca em {phone}", + "calls.status_when_connected": "Quando {phone} se conectar", + "calls.status_starting": "Iniciando…", + "calls.status_bonding": "Pareando… Confirme o código em {phone} e em {me}", + "calls.status_le_only": "{phone} e {me} estão pareados apenas via Bluetooth LE, que não suporta chamadas: clique em Esquecer abaixo e pareie novamente nas configurações de Bluetooth", + "calls.status_forget": "{phone} mantém o pareamento antigo com {me}: esqueça {me} nas configurações de Bluetooth de {phone} (já abertas lá) e pareie novamente nas configurações de Bluetooth", + "calls.status_radio_off": "O Bluetooth está desativado em {phone}", + "calls.status_needs_pair": "Não pareado com {phone} via Bluetooth clássico: pareie-os nas configurações de Bluetooth, como abaixo. O DuoDesk conecta assim que forem pareados", + "calls.which_one_is": "Qual deles é {phone}?", + "calls.paired_with": "Pareado com {phone}", + "calls.paired_hint": "Via Bluetooth clássico, que transmite o som das chamadas", + "calls.step1_label": "1. Em {phone}: Configurações › Bluetooth › Parear novo dispositivo", + "calls.step1_hint": "É possível encontrar {phone} enquanto essa tela estiver aberta", + "calls.step2_label": "2. Parear a partir de {me}", + "calls.step2_hint_default": "Nas configurações de Bluetooth de {me}, adicione um dispositivo e escolha {phone}", + "calls.step3_hint_bonding": "Pareando… Confirme em {phone} e em {me}", + "calls.step3_hint_watch": "Procurando {phone}… O DuoDesk conecta assim que forem pareados", + "calls.step3_hint_default": "O DuoDesk conecta assim que forem pareados", + "messages.desc": "Leia e envie as mensagens de texto do telefone aqui.", + "messages.new_message": "Nova mensagem", + "messages.earlier_messages": "Mensagens anteriores", + "messages.to_placeholder": "Para: um número", + "messages.to_aria": "Para", + "messages.text_message_placeholder": "Mensagem de texto", + "messages.message_aria": "Mensagem", + "messages.send": "Enviar", + "messages.group_note": "Responda a conversas em grupo no telefone.", + "messages.choose_conversation": "Escolha uma conversa", + "messages.chat_all": "Todas", + "messages.chat_texts": "SMS", + "messages.chats_sw_label": "Aplicativos de conversa em Mensagens", + "messages.chats_row_desc": "WhatsApp, Instagram, Telegram e Messenger junto aos seus SMS. Responda por aqui.", + "messages.reply_placeholder": "Responder", + "messages.reply_aria": "Responder", + "messages.you_prefix": "Você: ", + "messages.text_prefix": "SMS · ", + "messages.turn_on_notifs_hint": "Ative as Notificações para ver as conversas aqui", + "messages.no_chats_yet": "Nenhuma conversa ainda. Elas aparecerão aqui conforme as mensagens chegarem.", + "messages.group_suffix": " · Grupo", + "messages.chat_note_msgs": "Responda aqui assim que o telefone exibir a notificação desta conversa novamente.", + "messages.chat_note_notif": "Responda a esta mensagem no telefone: a notificação não possui opção de resposta.", + "messages.no_conversations": "Nenhuma conversa", + "messages.status_sending": "Enviando…", + "messages.status_not_sent": "Não enviada", + "messages.status_not_sent_err": "Não enviada: {error}", + "messages.allow_sending_hint": "Permita o envio no telefone para responder por aqui", + "media.desc": "Veja as fotos e vídeos do seu telefone e copie-os para cá.", + "media.filter_all": "Tudo", + "media.filter_photos": "Fotos", + "media.filter_videos": "Vídeos", + "media.filter_screenshots": "Capturas de tela", + "media.select": "Selecionar", + "media.done": "Concluído", + "media.video_label": "Vídeo", + "media.save_n_to_me": "Salvar {count} em {me}", + "media.items_count": "{count}{more} {kind}", + "media.saving_to": "Salvando {count} na pasta {folder} de {me}…", + "media.no_photos_videos": "Nenhuma foto ou vídeo", + "media.no_items_kind": "Nenhum item em {kind}", + "media.save_to_me": "Salvar em {me}", + "pfiles.desc": "Navegue pelo armazenamento do telefone e copie arquivos em ambos os sentidos. Sem necessidade de depuração sem fio.", + "pfiles.up": "Subir", + "pfiles.hidden": "Ocultos", + "pfiles.hidden_hint": "Mostrar arquivos cujos nomes começam com ponto", + "pfiles.new_folder": "Nova pasta", + "pfiles.upload": "Enviar…", + "pfiles.folder_name_aria": "Nome da pasta", + "pfiles.done": "Concluído", + "pfiles.open": "Abrir", + "pfiles.eject": "Ejetar", + "pfiles.auto_sw_label": "Abrir a pasta compartilhada do telefone quando ele compartilhar uma", + "pfiles.phone_row_title": "Pasta compartilhada do telefone", + "pfiles.serve_sw_label": "Compartilhar uma pasta com o telefone", + "pfiles.mine_row_title": "Compartilhar uma pasta com o telefone", + "pfiles.shared_folders": "Pastas compartilhadas", + "pfiles.import_row_hint": "Escolha os arquivos no telefone e clique em Importar. Eles irão para esta pasta.", + "pfiles.phone_shared_folder": "Pasta compartilhada de {phone}", + "pfiles.show_in_fm": "Mostrar no {fm}", + "pfiles.files_app": "Arquivos", + "pfiles.busy_opening": "Abrindo…", + "pfiles.busy_wifi": "Conectando com Wi-Fi Direct…", + "pfiles.share_folder_with": "Compartilhar uma pasta com {phone}", + "pfiles.saving_status": "Salvando {count} na pasta {folder} de {me}…", + "pfiles.n_items": "{count} itens", + "pfiles.folder": "Pasta", + "pfiles.storage": "Armazenamento", + "pfiles.folder_empty": "Esta pasta está vazia", + "pfiles.import_to": "Importar para {name}", + "pfiles.save_to_me": "Salvar em {me}", + "pfiles.delete_confirm": "Excluir {item}?", + "pfiles.storage_free_of_total": "{free} livres de {total}", + "pfiles.sending_items_to": "Enviando {count} para {dest}…", + "pfiles.a_file": "um arquivo", + "pfiles.capturing_into": "Capturando em {name}", + "pfiles.importing_into": "Importando para {name}", + "pfiles.capture_hint": "Tire fotos com a câmera do telefone. Cada uma virá para esta pasta.", + "pfiles.upload_from_me": "Enviar de {me}…", + "device.qs_wifi": "Wi-Fi", + "device.qs_data": "Dados móveis", + "device.qs_torch": "Lanterna", + "device.qs_dnd": "Não perturbe", + "device.qs_rotate": "Rotação automática", + "device.qs_saver": "Economia de bateria", + "device.ringer_ring": "Tocar", + "device.ringer_vibrate": "Vibrar", + "device.ringer_silent": "Silencioso", + "device.show_screen": "Mostrar tela", + "device.ring": "Tocar", + "device.ring_stop": "Parar de tocar", + "device.lock": "Bloquear", + "device.sleep": "Suspender", + "device.use_wifi_direct": "Usar Wi-Fi Direct", + "device.back_to_bt": "Voltar para Bluetooth", + "device.use_hotspot": "Usar ponto de acesso", + "device.disconnect": "Desconectar", + "device.ring_note": "Toca no volume máximo, mesmo no modo silencioso, até você parar aqui ou lá.", + "device.not_connected": "Nada conectado. Conecte um telefone ou computador na página Conexão.", + "device.media_volume": "Volume de mídia", + "device.quick_actions": "Ações rápidas", + "device.customize": "Personalizar", + "device.volume": "Volume", + "device.controls_card": "Controles", + "device.latest_notifications": "Últimas notificações", + "device.see_all": "Ver todas", + "device.clipboard": "Área de transferência", + "device.most_used": "Mais usados", + "device.all_apps": "Todos os aplicativos", + "device.send_files": "Enviar arquivos", + "device.drop_files_here": "Solte arquivos aqui", + "device.charging": "Carregando", + "device.needs_wireless_debugging": "Requer depuração sem fio (Conexão)", + "device.opens_setting_on_phone": "Abre a configuração no telefone", + "device.copy_code": "Copiar {code}", + "device.no_notifs_hint": "Novas notificações de {name} aparecerão aqui", + "device.drop_hint": "Vão para a pasta Downloads de {name}", + "device.open_app": "Abrir {name}", + "device.fact_network": "Rede", + "device.fact_control": "Controle", + "device.fact_signal": "Sinal", + "device.fact_link": "Link", + "device.fact_system": "Sistema", + "device.fact_address": "Endereço", + "mirror.adb_not_setup_title": "A depuração sem fio não está configurada", + "mirror.adb_not_setup_desc": "O espelhamento e os aplicativos do telefone precisam dela. Configure-a uma vez na página Conexão.", + "mirror.adb_connecting": "Conectando à depuração sem fio do telefone…", + "mirror.setup_btn": "Configurar", + "mirror.show_screen_btn": "Mostrar tela do telefone", + "mirror.phone_screen_desc": "Abre em uma janela própria. Feche-a a qualquer momento; o telefone continua funcionando.", + "mirror.phone_screen": "Tela do telefone", + "mirror.open_on_here": "Abrir em {here}", + "mirror.saver_mbps": "Economia de dados · 4 Mb/s", + "mirror.balanced_mbps": "Equilibrado · 8 Mb/s", + "mirror.sharp_mbps": "Nítido · 16 Mb/s", + "mirror.sharpest_mbps": "Mais nítido · 24 Mb/s", + "mirror.sound_title": "Tocar som do telefone aqui", + "mirror.sound_hint": "Android 11 ou superior", + "mirror.quality_title": "Qualidade da imagem", + "mirror.quality_hint": "Para a tela do telefone e janelas de aplicativos", + "mirror.controls_title": "Controles do telefone", + "mirror.controls_hint": "Onde ficam os botões Voltar, Início, Recentes e outros. O botão do painel na barra de título de cada janela os mostra ou oculta.", + "mirror.ctrl_top": "Barra de título", + "mirror.ctrl_side": "Painel lateral", + "mirror.ctrl_bottom": "Barra inferior", + "mirror.enter_sends_title": "{key} envia mensagens", + "mirror.enter_sends_hint": "No WhatsApp, Instagram e Telegram. {combo} adiciona uma nova linha.", + "mirror.arrow_swipe_title": "Setas deslizam a tela", + "mirror.arrow_swipe_hint": "Para cima e para baixo em feeds e Shorts, para os lados nas páginas. Desativado: as setas movem o cursor de texto.", + "mirror.phone_windows": "Janelas do telefone", + "mirror.kb_title": "Mouse e teclado", + "mirror.kb_hint": "Passe o ponteiro além da borda da tela para controlar o telefone.", + "mirror.mouse_settings": "Configurações do mouse", + "mirror.search_apps": "Pesquisar aplicativos", + "mirror.phone_apps_heading": "Aplicativos do telefone", + "mirror.phone_apps_desc": "Abra qualquer aplicativo do telefone em sua própria janela.", + "mirror.loading_apps": "Carregando aplicativos do telefone…", + "mirror.n_of_total_apps": "{shown} de {total}", + "mirror.n_apps": "{count} aplicativos", + "mirror.tile_title": "Abrir {name}{menu}", + "mirror.dock_menu": " · Clique com o botão direito para adicionar ao Dock", + "mirror.pin_menu": " · Clique com o botão direito para fixar em Iniciar", + "nowplaying.media_controls_sw": "Controles de mídia na página Telefone", + "nowplaying.needs_full_app": "Requer o aplicativo DuoDesk completo no telefone, com acesso a notificações ativado", + "nowplaying.media_controls_hint": "O que toca no telefone conectado, com controles de reprodução na página Telefone enquanto estiver tocando", + "nowplaying.play_sound_bt": "Tocar som do telefone aqui (Bluetooth)", + "nowplaying.the_phone": "O telefone", + "nowplaying.paired_bt": "Pareado com este computador via Bluetooth", + "nowplaying.mac_no_speaker": "Este computador não pode receber o áudio do telefone via Bluetooth (o macOS não possui modo de alto-falante Bluetooth)", + "nowplaying.speaker_desc": "Este computador como alto-falante Bluetooth de {name}: músicas, vídeos e outros sons tocam aqui. Pareie-os nas configurações de Bluetooth primeiro", + "nowplaying.needs_full_name": "Requer o aplicativo DuoDesk completo em {name}, com acesso a notificações ativado", + "nowplaying.what_plays_name": "O que toca em {name}, com controles de reprodução na página Telefone enquanto estiver tocando", + "nowplaying.previous": "Anterior", + "nowplaying.play": "Reproduzir", + "nowplaying.pause": "Pausar", + "nowplaying.next": "Próxima", + "camera.tab_desc": "A câmera do outro dispositivo aqui e como câmera que outros aplicativos podem escolher.", + "camera.not_connected": "Não conectado", + "camera.needs_adb": "Requer depuração sem fio: configure-a na página Telefone", + "camera.bt_blocked": "A câmera não passa pelo Bluetooth: conecte-se via Wi-Fi ou cabo", + "camera.mesh_turn_on": "Ative o compartilhamento na aba Câmera de {name} primeiro", + "camera.peer_turn_on": "Ative “Permitir que {me} veja esta câmera” em {name} primeiro", + "camera.open_in_window": "Abrir em uma janela", + "camera.back": "Traseira", + "camera.front": "Frontal", + "camera.rotate": "Girar", + "camera.rotate_title": "Um quarto de volta no sentido horário: aqui, na janela e na câmera virtual", + "camera.window": "Janela", + "camera.window_checked": "Janela ✓", + "camera.start": "Iniciar", + "camera.stop": "Parar", + "camera.peer_camera": "Câmera de {name}", + "camera.virtual_title": "Câmera virtual", + "camera.remove": "Remover", + "camera.send_to": "Enviar para", + "camera.camera_apps_pick": "A câmera que outros aplicativos selecionam", + "camera.share_sw_label": "Compartilhar esta câmera", + "camera.share_row_title": "Permitir que {name} veja esta câmera", + "camera.default_camera": "A câmera padrão", + "camera.device_row_hint": "Qual câmera de {me} é exibida", + "camera.viewing_now": "{name} está visualizando agora", + "camera.camera_on_while_running": "A câmera fica ativa enquanto estiver em execução lá", + "camera.our_camera": "Câmera de {me}", + "camera.off_top": "Desativado: ative a Câmera no topo", + "camera.press_start": "Clique em Iniciar para exibir a câmera de {name} aqui", + "camera.it_stopped": "Parou: {error}", + "camera.it_didnt_start": "Não foi iniciada: {error}", + "camera.peer_stopped": "{name} parou a câmera", + "camera.starting_phone": "Iniciando a câmera do telefone…", + "camera.asking_peer": "Solicitando a câmera de {name}…", + "camera.turned_hint": "Girada {rotate}°. Clique na imagem ou em Janela para abrir em uma janela própria", + "camera.mesh_share_all": "Permitir que seus outros dispositivos vejam esta câmera", + "camera.mesh_share_hint": "Seus outros computadores podem executá-la. Um aviso aparecerá aqui quando um deles fizer isso", + "camera.peer_share_hint": "{name} pode executá-la. Um aviso aparecerá aqui quando fizer isso", + "camera.nobody_sees_it": "Desativado: ninguém pode vê-la", + "camera.apps_see_it": "Os aplicativos daqui a veem como {name}: escolha essa opção, não a câmera própria de {me}.{extra}", + "camera.turn_on_vcam_hint": "Ative a Câmera virtual para usá-la como câmera real em outros aplicativos (Zoom, Teams, navegador…).{extra}", + "camera.straight_hint": " A imagem é transmitida diretamente entre os dois computadores.", + "support.not_available": "Não disponível nesta compilação do DuoDesk", + "support.went_wrong": "Algo deu errado", + "tip.tab_title": "Contribuição", + "tip.heading": "Deixe uma contribuição", + "tip.desc": "O DuoDesk é gratuito e de código aberto. Uma contribuição ajuda a mantê-lo assim.", + "tip.amount_aria": "Valor", + "tip.other_placeholder": "Outro", + "tip.other_aria": "Outro valor", + "tip.one_time": "Única", + "tip.monthly": "Mensal", + "tip.anon_placeholder": "Anônimo", + "tip.say_something": "Deixe uma mensagem gentil (opcional)", + "tip.cta_button": "Deixar uma contribuição", + "tip.fine_print": "Abre o Stripe Checkout no navegador. Nada é cobrado até você concluir lá.", + "tip.your_tip": "Sua contribuição", + "tip.monthly_hint": "A contribuição mensal pode ser cancelada a qualquer momento pelo recibo do Stripe.", + "tip.name_field": "Nome na lista de apoiadores", + "tip.msg_field": "Mensagem", + "tip.supporters": "Apoiadores", + "tip.no_tips_yet": "Nenhuma contribuição ainda. A sua pode ser a primeira.", + "tip.cta_amount": "Deixar uma contribuição · {amount}{suffix}", + "tip.per_month": " / mês", + "tip.enter_range": "Digite entre {min} e {max}", + "tip.sup_count": "{count} {label}{monthly}", + "tip.supporter": "apoiador", + "tip.supporters_label": "apoiadores", + "tip.monthly_count": " · {count} mensais", + "tip.err_default": "A página de contribuição não respondeu.", + "tip.opening_stripe": "Abrindo o Stripe…", + "tip.opened_stripe": "Abrimos {opened} no seu navegador. Muito obrigado!", + "tip.couldnt_start": "Não foi possível iniciar a contribuição", + "feedback.tab_title": "Feedback", + "feedback.heading": "Enviar feedback", + "feedback.desc": "Um bug, uma ideia ou apenas um olá. Vai direto para a equipe do DuoDesk.", + "feedback.bug": "Bug", + "feedback.bug_hint": "O que aconteceu e o que você esperava? Passos para reproduzir ajudam muito.", + "feedback.idea": "Ideia", + "feedback.idea_hint": "O que tornaria o DuoDesk melhor para você?", + "feedback.love": "Elogio", + "feedback.love_hint": "Do que você gosta? (Pode deixar em branco.)", + "feedback.what_it_is": "Tipo de feedback", + "feedback.your_msg_aria": "Sua mensagem", + "feedback.email_aria": "E-mail para resposta (opcional)", + "feedback.info_sw_label": "Incluir versão e informações do sistema", + "feedback.preview_aria": "O que será enviado", + "feedback.send_email": "Enviar e-mail", + "feedback.report_gh": "Relatar no GitHub", + "feedback.your_msg_card": "Sua mensagem", + "feedback.reply_email_field": "E-mail para resposta (opcional)", + "feedback.answer_hint": "Apenas caso deseje uma resposta.", + "feedback.info_row_title": "Incluir versão e informações do sistema", + "feedback.info_row_desc": "Ajuda a reproduzir bugs. É só isto que será adicionado:", + "feedback.send_it_card": "Enviar", + "feedback.fine_print": "Enviar abre seu aplicativo de e-mail com os dados preenchidos; nada sai até você clicar em Enviar lá. O GitHub abre uma nova issue pública no navegador.", + "feedback.opening_gh": "Abrindo o GitHub…", + "feedback.opening_mail": "Abrindo o aplicativo de e-mail…", + "feedback.copied": "Copiado. Cole em um e-mail para contact@beyond-media.ai.", + "feedback.opened_gh": "Nova issue aberta no GitHub no seu navegador.", + "feedback.opened_mail_trunc": "Aplicativo de e-mail aberto. A mensagem era longa e foi cortada lá; o texto completo foi copiado para a área de transferência.", + "feedback.opened_mail": "Aplicativo de e-mail aberto. Clique em Enviar por lá. Obrigado!", + "feedback.couldnt_open": "Não foi possível abrir", + "updater.no_notes": "Nenhuma nota de versão fornecida para esta versão.", + "updater.aria_label": "Atualização de software", + "updater.title": "Uma nova versão do DuoDesk está disponível!", + "updater.notes_label": "Notas da versão", + "updater.skip_version": "Pular esta versão", + "updater.view_gh": "Ver no GitHub ↗", + "updater.remind_later": "Lembrar mais tarde", + "updater.update_now": "Atualizar agora", + "updater.download_install": "Baixar e instalar", + "updater.banner_aria": "Notificação de atualização de software", + "updater.banner_lead": "DuoDesk {version} está disponível.", + "updater.banner_sub": "(atual: v{version})", + "updater.banner_notes": "Notas da versão", + "updater.banner_download": "Baixar", + "updater.banner_update": "Atualizar", + "updater.banner_dismiss": "Dispensar banner", + "updater.modal_title": "DuoDesk {version} está disponível", + "updater.modal_sub": "Uma nova versão do DuoDesk está pronta para baixar e instalar{current}.", + "updater.modal_cur_suffix": " (você possui a {version})", + "updater.pill_current": "Atual: {version}", + "updater.pill_released": "Lançamento: {date}", + "adb.ready": "Pronto", + "adb.connecting": "Conectando…", + "adb.needs_pair": "Não pareado", + "adb.off": "Desativado", + "adb.missing": "Ausente", + "adb.problem": "Problema", + "adb.touch_blocked": "Toque bloqueado", + "adb.title": "Depuração sem fio", + "adb.show_steps": "Mostrar passos", + "adb.hide_steps": "Ocultar passos", + "adb.step1": "No telefone, abra Configurações › Sobre o telefone e toque em Número da versão 7 vezes.", + "adb.step2": "Abra Configurações › Opções do desenvolvedor e ative Depuração USB.", + "adb.step3": "Ative Depuração sem fio na mesma página. O telefone precisa estar conectado a uma rede Wi-Fi.", + "adb.step4": "Toque em Parear dispositivo com código de pareamento e digite o código abaixo, ou toque em Parear dispositivo com código QR e escaneie o código QR aqui.", + "adb.step5": "Após o primeiro pareamento, o DuoDesk ativará a depuração sem fio automaticamente.", + "adb.pairing_code_placeholder": "123456", + "adb.pairing_code_aria": "Código de pareamento", + "adb.address_placeholder": "Endereço:porta (opcional)", + "adb.address_aria": "Endereço de pareamento", + "adb.pair_btn": "Parear", + "adb.pairing_code_row": "Código de pareamento", + "adb.pairing_code_hint": "Obtido em Parear dispositivo com código de pareamento no telefone, ou digite-o na notificação do DuoDesk lá", + "adb.notifs_row": "Notificações do telefone", + "adb.hint_off_phone": "Desativado no telefone. O espelhamento e o controle ADB precisam dele; o controle por Acessibilidade não.", + "adb.hint_blocked_xiaomi": "A tela funciona, mas este Xiaomi bloqueia comandos. No telefone: Opções do desenvolvedor › Depuração USB (Configurações de segurança).", + "adb.hint_ready": "Tela, aplicativos, toque, teclado e área de transferência em segundo plano", + "adb.steps_info": "O DuoDesk pareia com a depuração sem fio do telefone uma única vez. Depois disso, o espelhamento, os aplicativos do telefone e o controle ADB funcionam sem este passo.", + "adb.no_android_apk": "Esta compilação do DuoDesk não inclui o aplicativo Android.", + "adb.full_apk_hint": "{error}O aplicativo baixado não consegue ler notificações. Instale o aplicativo completo sobre ele; configurações e pareamento permanecem.{wireless}", + "adb.needs_wireless_suffix": " Requer depuração sem fio.", + "adbqr.btn_show": "Mostrar código QR", + "adbqr.btn_hide": "Ocultar", + "adbqr.row_title": "Parear com código QR", + "adbqr.row_hint": "No telefone: Depuração sem fio › Parear dispositivo com código QR", + "adbqr.img_aria": "Código QR de depuração sem fio", + "adbqr.scan_with_phone": "Escanear com o telefone", + "adbqr.step1": "Configurações › Opções do desenvolvedor › Depuração sem fio.", + "adbqr.step2": "Toque em Parear dispositivo com código QR.", + "adbqr.step3": "Escaneie este código. O DuoDesk conectará automaticamente.", + "adbqr.paired_connecting": "Pareado. Conectando…", + "adbqr.timeout": "O código QR expirou. Exiba-o novamente para tentar de novo.", + "adbqr.didnt_pair": "Não foi possível parear: ", + "adbqr.waiting_phone": "Aguardando o telefone…", + "adbqr.not_available": "A depuração sem fio não está disponível aqui.", + "remote.desc": "Use o telefone como touchpad, teclado ou controle para este computador.", + "remote.now_row": "Agora", + "remote.on_name": "Em {name}", + "remote.on_name_hint": "Abra DuoDesk › Controle remoto lá, depois Touchpad e teclado ou Gamepad. A velocidade, o toque para clicar e as teclas do gamepad são configurados lá", + "remote.remote_card": "{name} como controle remoto", + "remote.real_gamepad": "Controle de jogo real", + "remote.gamepad_card": "Controle de jogo", + "remote.not_on_computer": "Não disponível neste computador", + "remote.pad_off_hint": "Desativado: os analógicos e botões da página Gamepad acionam teclas (WASD, mouse), conforme definido em {name}", + "remote.pad_live_hint": "Ativado: a página Gamepad de {name} atua como controle de jogo aqui{name_suffix}", + "remote.pad_ready_hint": "Ativado: pronto quando {name} se conectar", + "remote.status_off": "Desativado: a página Controle remoto de {name} não pode mover o cursor nem digitar aqui", + "remote.status_in_use": "Em uso: {name} está movendo o cursor ou digitando aqui", + "remote.status_opened": "A página Controle remoto de {name} está aberta e pronta", + "remote.status_ready": "Pronto: abra a página Controle remoto em {name}", + "rezume.page": "Página", + "rezume.document": "Documento", + "rezume.app": "Aplicativo", + "rezume.dismiss": "Dispensar", + "rezume.continue_from": "Continuar a partir de {name}", + "rezume.desc": "Como o Handoff da Apple: continue aqui o que você estava fazendo no outro dispositivo, e vice-versa.", + "rezume.send_to_name": "Enviar para {name}", + "rezume.send_to_hint": "Abre lá agora o que estava em primeiro plano aqui por último", + "rezume.offered_to": "Oferecido para {name}", + "rezume.web_pages": "Páginas web", + "rezume.web_hint": "A aba ativa no Chrome, Edge, Firefox, Safari, Brave, Vivaldi, Opera ou Arc", + "rezume.videos": "Vídeos", + "rezume.videos_hint": "Um vídeo do YouTube em reprodução aqui abre lá exatamente no mesmo segundo", + "rezume.documents": "Documentos", + "rezume.phone_apps": "Aplicativos do telefone", + "rezume.phone_apps_hint": "O aplicativo em primeiro plano no telefone", + "rezume.mirror_apps": "Aplicativos espelhados", + "rezume.what_goes": "O que é transmitido", + "rezume.offer_me": "Oferecer o que está em uso em {me}", + "rezume.offer_me_hint": "{name} pode continuar com isso", + "rezume.take_peer": "Receber de {name}", + "rezume.take_peer_hint": "O que está em uso lá aparece aqui", + "rezume.push_row": "Abrir o que for enviado imediatamente", + "rezume.push_hint": "Enviar para em {name} (na bandeja ou em Abrir no computador, no menu de compartilhar) abre aqui sem perguntar", + "rezume.which_ways": "Direções", + "rezume.notification": "Notificação", + "rezume.notify_hint": "Uma discreta, substituída pela próxima", + "rezume.dock_bar": "Dock", + "rezume.taskbar_dock": "Barra de tarefas ou dock", + "rezume.taskbar": "Barra de tarefas", + "rezume.bar_hint": "Um botão com o ícone do aplicativo: clique nele para continuar", + "rezume.menu_bar": "Barra de menus", + "rezume.tray": "Bandeja", + "rezume.tray_hint": "Continuar e Enviar para em seu menu", + "rezume.tab_row": "Aba Aplicativos e página Telefone", + "rezume.tab_hint": "O card acima, lá também", + "rezume.where_shows": "Onde aparece o conteúdo de {name}", + "rezume.doc_phone_hint": "O arquivo aberto em primeiro plano aqui vai para o telefone e abre lá; o telefone não tem arquivos para enviar", + "rezume.doc_peer_hint": "O arquivo aberto em primeiro plano (Word, Pages, Pré-Visualização, editor de texto…): é transferido e abre do outro lado", + "rezume.mirror_need_adb": "Requer depuração sem fio (página Telefone): até lá os aplicativos do telefone não serão oferecidos aqui", + "rezume.mirror_ready": "Um aplicativo do telefone abre aqui em uma janela própria, como estava", + "rezume.not_connected": "Não conectado", + "rezume.off_here": "Desativado aqui", + "rezume.peer_update": "ReZume indisponível lá ainda: atualize o DuoDesk em {name}", + "rezume.peer_off": "Desativado em {name}: ative-o lá também", + "rezume.phone_ready_adb": "Pronto: aplicativos do telefone via depuração sem fio (páginas precisam de Acessibilidade no DuoDesk lá)", + "rezume.phone_ready_acc": "Pronto para páginas e documentos. Para o que estiver em uso no telefone, ative Acessibilidade no DuoDesk lá ou depuração sem fio", + "rezume.ready_incoming": "Pronto: há algo para continuar acima", + "rezume.ready": "Pronto", + "rezume.opens_there_now": "Abre lá agora: {title}", + "rezume.nothing_in_front": "Nada em primeiro plano aqui para enviar ainda", + "rezume.getting_waiting": "Obtendo {item}…", + "mesh_overview.using_there": "Você está usando {there}", + "mesh_overview.there_using_me": "{There} está usando {me}", + "mesh_overview.disconnect": "Desconectar", + "mesh_overview.connect": "Conectar", + "mesh_overview.location_settings": "Configurações de localização", + "mesh_overview.connect_wifi_direct": "Conectar com Wi-Fi Direct", + "mesh_overview.connect_hotspot": "Conectar com ponto de acesso", + "mesh_overview.hotspot_name_ph": "Nome do ponto de acesso", + "mesh_overview.password_ph": "Senha", + "mesh_overview.join": "Entrar", + "mesh_overview.not_on_linux": "Ainda não disponível no Linux", + "mesh_overview.shared_folder": "Pasta compartilhada", + "mesh_overview.connect_by_address": "Conectar por endereço", + "mesh_overview.cant_look_network": "Não foi possível buscar computadores nesta rede.", + "mesh_overview.fix_firewall": "Corrigir firewall", + "mesh_overview.bt_phones": "Bluetooth com telefones", + "mesh_overview.bt_computers": "Bluetooth com computadores", + "mesh_overview.looking": "Procurando…", + "mesh_overview.pair_once": "Parear uma vez", + "mesh_overview.phone_screen_mouse_kb": "Tela, mouse e teclado do telefone", + "mesh_overview.or_type_on_phone": "Ou digite no telefone, na notificação do DuoDesk", + "mesh_overview.phones_need_fixing": "Telefones que precisam de ajustes", + "mesh_overview.paired": "Pareado", + "mesh_overview.the_other_computer": "O outro computador", + "mesh_overview.identity_changed": "Este {kind} parece diferente agora. Esqueça-o e pareie novamente.", + "mesh_overview.open_on_peer": "Abra o DuoDesk em {name}.", + "mesh_overview.pick_below": "Escolha um computador abaixo ou conecte por endereço.", + "mesh_overview.disconnected": "Desconectado", + "mesh_overview.fix_waiting_wifi": "Ative Opções do desenvolvedor › Depuração sem fio no telefone (mesma rede Wi-Fi) e clique em Corrigir.", + "mesh_overview.fix_needs_pair": "Pareie uma vez: Depuração sem fio › Parear dispositivo com código de pareamento no telefone, depois digite o código na linha Código de pareamento abaixo.", + "mesh_overview.fix_missing": "O adb não está incluído nesta compilação.", + "mesh_overview.fix_connecting": "Procurando a depuração sem fio do telefone… Se persistir, clique em Corrigir.", + "mesh_overview.fix_error": "A conexão foi interrompida. Clique em Corrigir para tentar novamente.", + "mesh_share.title": "Compartilhar tela", + "mesh_share.desc": "Ver {me} em uma janela no outro computador.", + "mesh_multi.desc": "Vários computadores e telefones conectados ao mesmo tempo", + "mesh_multi.did_not_move": "Não foi possível mover: um dispositivo deve ficar ao lado de outro, lado a lado.", + "mesh_multi.move_here": "Mover para cá", + "mesh_multi.empty_place": "Espaço vazio", + "mesh_multi.mesh_mode": "Modo Mesh", + "mesh_multi.use_several_devices": "Usar vários dispositivos ao mesmo tempo", + "mesh_multi.restart_hint": "Ativado. O DuoDesk reinicia ao ativar ou desativar", + "mesh_multi.layout": "Layout", + "mesh_multi.joining": "Conexão", + "mesh_multi.join_auto": "Conectar a todos os dispositivos automaticamente", + "adb.try_again": "Tentar novamente", + "media.kind_videos": "vídeos", + "media.kind_items": "itens", + "connections.connect": "Conectar", + "connections.bt": "Bluetooth", + "connections.wifi": "Wi-Fi", + "general.save": "Salvar", + "general.close": "Fechar", + "general.rename": "Renomear", + "general.delete": "Excluir", + "general.default": "Padrão", + "qrpair.show": "Mostrar código QR", + "qrpair.title": "Parear um telefone com código QR", + "qrpair.hint": "Escaneie com a câmera do telefone ou com Ler código QR no DuoDesk do telefone", + "qrpair.aria_code": "Código QR de pareamento", + "qrpair.scan_heading": "Escanear com o telefone", + "qrpair.step1": "Abra a câmera ou DuoDesk › Ler código QR.", + "qrpair.step2": "Aponte para este código e abra o link.", + "qrpair.step3": "Clique em Permitir aqui quando solicitado.", + "qrpair.hide": "Ocultar", + "qrpair.not_ready": "Ainda não está pronto", + "qrpair.note": "Um novo código é gerado a cada 10 minutos. Apenas quem vê esta tela pode usá-lo.", + "aurora.this_computer": "Este computador", + "aurora.encrypted": "criptografado", + "aurora.encrypted_title": "TLS com certificado fixado em todas as rotas", + "aurora.ask_kbd_title": "Pergunte ao DuoDesk ({mod}+K)", + "aurora.hello_prefix": "O que suas ", + "aurora.hello_desks": "mesas", + "aurora.hello_suffix": " devem fazer?", + "aurora.home_aria": "Início", + "aurora.more_on_dev": "Mais em {name}", + "aurora.open_def_title": "Abrir {title}", + "aurora.pair_phone": "Parear um telefone", + "aurora.find_nearby": "Procurar por perto", + "aurora.add_device": "Adicionar dispositivo", + "aurora.add_device_sub": "Outro computador ou um telefone", + "aurora.this_desk": "esta mesa · {os}", + "aurora.ask_placeholder": "Pergunte algo ao DuoDesk…", + "aurora.ask_aria": "Pergunte ao DuoDesk", + "aurora.send_files_title": "Enviar arquivos…", + "aurora.send_files": "Enviar arquivos", + "aurora.all_devices": "Todos os dispositivos", + "aurora.which_device": "Qual dispositivo", + "aurora.send_title": "Enviar (Enter)", + "aurora.send_aria": "Enviar", + "aurora.ask_something_else": "Perguntar outra coisa ({mod}+K)", + "aurora.ask_something_else_aria": "Perguntar outra coisa", + "aurora.close_esc": "Fechar (Esc)", + "aurora.close_aria": "Fechar", + "kvm.partner_driving_me": "{Name} está controlando {me}", + "kvm.not_accept_input": "{Name} não aceita entrada de {me}", + "kvm.partner_refused": "{Name} recusou", + "kvm.took_input_back": "{Name} retomou o controle", + "kvm.back_for_admin_or_lock": "De volta aqui para a solicitação de administrador ou tela de bloqueio", + "kvm.admin_or_lock": "Use o próprio mouse deste PC para a solicitação de administrador ou tela de bloqueio", + "kvm.partner_no_answer": "Seu Mac não respondeu", + "kvm.another_app_grab": "Outro aplicativo está usando o mouse ou teclado", + "kvm.partner_disconnected": "{Name} desconectou", + "kvm.tried_use_ble_off": "{Name} tentou usar {me} via Bluetooth. Está desativado aqui.", + "kvm.tried_use_off": "{Name} tentou usar {me}. Está desativado aqui.", + "kvm.stopped_answering": "{Name} parou de responder", + "kvm.off_bluetooth": "O compartilhamento do cursor está desativado via Bluetooth", + "kvm.partner_driving_me_mac": "{them} está usando este computador agora", + "kvm.not_accept_input_mac": "{them} não aceita entrada daqui", + "kvm.partner_refused_mac": "{them} recusou", + "kvm.partner_disconnected_mac": "{them} desconectou", + "kvm.stopped_answering_mac": "{them} parou de responder", + "kvm.partner_no_answer_mac": "{them} não respondeu", + "firewall.ufw_allows": "o ufw permite o acesso do DuoDesk", + "firewall.ufw_blocks": "o ufw está ativo e pode bloquear o DuoDesk.", + "general.send": "Enviar", + "files.folder_for_received": "Pasta para arquivos recebidos", + "files.use_this_folder": "Usar esta pasta", + "files.use_this_folder_cap": "Usar esta pasta", + "files.share_this_folder": "Compartilhar esta pasta", + "files.folder_to_share_with_peer": "Pasta para compartilhar com o outro computador", + "cursor.gestures_hint_mac": "Pinçar para aplicar zoom, deslizar entre áreas de trabalho, Mission Control / Visão de Tarefas, voltar e avançar — tudo do jeito nativo em {name}. O mesmo nos dois", + "mesh_display.desc": "Use {me} como segunda tela para {name}.", + "main.code_copied": "Código copiado", + "main.cursor_sharing_on": "Compartilhamento do cursor ativado", + "main.cursor_sharing_off": "Compartilhamento do cursor desativado", + "main.cursor_sharing_off_ble": "Compartilhamento do cursor desativado via Bluetooth", + "main.turned_on_on": "Ativado em {name}", + "main.turned_off_on": "Desativado em {name}", + "main.with_peer_double_tap_off": "Com {name}. Pressione {key} duas vezes para desativar", + "main.double_tap_off": "Pressione {key} duas vezes para desativar", + "main.comes_back_wifi_double_tap_on": "Volta pelo Wi-Fi. Pressione {key} duas vezes para ativar", + "main.double_tap_on": "Pressione {key} duas vezes para ativar", + "main.typing_on": "Digitando em {name}", + "main.using_peer": "Usando {name}", + "main.peer_is_using_me": "{name} está usando {me}", + "main.back_on_me": "De volta a {me}", + "main.cursor_locked_on": "Cursor travado em {where}", + "main.cursor_unlocked": "Cursor destravado", + "main.sending_to_percent": "Enviando {name} para {peer} · {percent} %", + "main.sending_name": "Enviando {name}", + "main.files_stopped": "Transferência interrompida", + "main.peer_disconnected": "{name} desconectou", + "main.received_one_file": "1 arquivo recebido", + "main.received_n_files": "{count} arquivos recebidos", + "main.nothing_arrived": "Nada recebido", + "main.from_peer": "De {name}", + "main.opening_wireless_debugging_ready": "Abrindo quando a depuração sem fio estiver pronta…", + "main.sent_to_peer_colon": "Enviado para {name}: ", + "main.from_peer_colon": "De {name}: ", + "main.moving_to_wifi": "Mudando para Wi-Fi com {name}…", + "main.wifi_didnt_come_up": "O Wi-Fi com {name} não conectou", + "main.opening_phone_ready": "Abrindo quando o telefone estiver pronto…", + "main.opening_peer_connects": "Abrindo quando {name} conectar…", + "main.not_connected": "Não conectado", + "main.open_duodesk_other_first": "Abra o DuoDesk no outro computador primeiro", + "main.sending_item_to_peer_one": "Enviando 1 item para {name}", + "main.sending_item_to_peer_other": "Enviando {count} itens para {name}", + "main.received_file_from_peer_one": "1 arquivo recebido de {name}", + "main.received_file_from_peer_other": "{count} arquivos recebidos de {name}", + "main.the_other_computer": "o outro computador", + "rezume.continue_title_from": "Continuar {title} de {from}", + "rezume.from_name_what": "De {from} · {what}", + "apps.opening_on_peer": "Abrindo {name} em {peer}…", + "apps.the_app": "o aplicativo", + "dragrecv.drop_on_folder_or_desktop": "Solte {name} em uma pasta ou na área de trabalho", + "pcscreen.choose_virtual_monitor": "Escolha “Monitor remoto virtual” para estender até {name}", + "sendto.not_connected_yet": "Ainda não conectado", + "sendto.sending_once_connected": "Enviando assim que {name} conectar", + "sendto.nothing_to_send": "Nada para enviar", + "sendto.couldnt_read_item": "Não foi possível ler {name}", + "sendto.those_items": "esses itens", + "sendto.sending_n_items_to": "Enviando {items} para {who}", + "sendto.n_items_other": "{count} itens", + "fclip.files_not_there_anymore": "Esses arquivos não estão mais lá", + "fclip.paste_with_shortcut": "{done}: estão na área de transferência, cole com {shortcut}", + "fclip.select_files_explorer": "Selecione os arquivos no Explorador de Arquivos primeiro", + "fclip.select_files_file_manager": "Selecione os arquivos no gerenciador de arquivos primeiro", + "fclip.nothing_to_copy_there": "Nada para copiar lá", + "fclip.copied_items_for_peer_one": "{name} copiado para {peer}", + "fclip.copied_items_for_peer_other": "{count} itens copiados para {peer}", + "fclip.nothing_copied_on_peer": "Nada copiado em {peer}", + "fclip.pasting_files_one": "Colando 1 arquivo…", + "fclip.pasting_files_other": "Colando {count} arquivos…", + "explorer.connect_your_phone": "Conecte seu telefone", + "explorer.then_choose_files": "Depois escolha os arquivos em Arquivos do telefone", + "explorer.capture_needs_it": "A captura pelo telefone precisa disso", + "explorer.take_photos_on_phone": "Tire fotos no seu telefone", + "explorer.they_come_into_folder": "Elas vão para {folder}", + "camshare.peer_viewing_camera": "{name} está visualizando a câmera deste computador", + "camshare.camera_didnt_start": "A câmera não iniciou: {error}", + "clipimage.copied_paste_with": "{kind} de {name} copiada: cole com {keys}", + "clipimage.kind_screenshot": "Captura de tela", + "clipimage.kind_picture": "Imagem", + + // Remaining pages (Windows, Linux, macOS) + 'mirror.open_on_this_mac': 'Abrir neste Mac', + 'mirror.open_on_this_computer': 'Abrir neste computador', + 'mirror.open_on_this_pc': 'Abrir neste PC', + 'sh_support.someone': 'Alguém', + 'sh_support.tip_unavailable': 'Esta página de gorjetas não está disponível', + 'sh_support.service_answered': 'O serviço de gorjetas respondeu {status}', + 'sh_support.service_unexpected': 'O serviço de gorjetas enviou algo inesperado', + 'sh_support.cant_reach': 'Não foi possível acessar beyond-media.ai. Verifique sua conexão.', + 'sh_support.enter_amount': 'Informe um valor', + 'sh_support.amount_between': 'Informe um valor entre {min} e {max}', + 'sh_support.one_moment': 'Um momento…', + 'sh_support.link_wont_open': 'O serviço de gorjetas enviou um link que o DuoDesk não abre', + 'sh_support.took_too_long': 'O serviço de gorjetas demorou demais. Tente novamente.', + 'sh_support.cant_open_browser': 'Não foi possível abrir o navegador', + 'sh_support.bad_email': 'Esse e-mail de resposta não parece correto', + 'sh_support.write_first': 'Escreva algumas palavras primeiro', + 'sh_support.github_link_failed': 'Não foi possível criar o link do GitHub', + 'sh_support.email_failed': 'Não foi possível criar o e-mail', + 'sh_support.no_mail_app': 'Nenhum aplicativo de e-mail respondeu. Use Copiar e envie para {contact}.', + 'sh_support.went_wrong': 'Algo deu errado', + 'aurora.group_input': 'Entrada', + 'aurora.group_sharing': 'Compartilhamento', + 'aurora.group_media': 'Mídia', + 'aurora.group_more': 'Mais', + 'aurora.group_devices': 'Dispositivos', + 'aurora.group_phones': 'Telefones', + 'aurora.computer': 'Computador', + 'aurora.other_computer': 'O outro computador', + 'aurora.why_linux': "ainda não disponível no Linux", + 'aurora.why_device': 'não disponível com este dispositivo', + 'aurora.why_now': 'indisponível agora', + 'aurora.why_peer': 'requer um dispositivo conectado', + 'aurora.chip_pair_qr': 'Parear um telefone com código QR', + 'aurora.chip_refresh': 'Atualizar dispositivos por perto', + 'aurora.chip_reconnect': 'Reconectar a {name}', + 'aurora.chip_open_general': 'Abrir as configurações gerais', + 'aurora.chip_turn_on': 'Ativar {name}', + 'aurora.chip_open_clipboard': 'Abrir a área de transferência', + 'aurora.state_on': 'ativado', + 'aurora.state_off': 'desativado', + 'aurora.tip_opens_page': '{tip} (abre a página)', + 'aurora.tip_select_first': '{title} · selecione {name} primeiro', + 'aurora.tip_connect_first': '{title} · conecte {name} primeiro', + 'aurora.head_open': 'Abrir {name}', + 'aurora.head_select': 'Selecionar {name}', + 'aurora.head_open_connection': 'Abrir Conexão', + 'aurora.head_connect': 'Conectar a {name}', + 'aurora.unit_screen_one': 'tela', + 'aurora.unit_screen_other': 'telas', + 'aurora.unit_on': 'ativados', + 'aurora.paired_offline': 'Pareado · offline', + 'aurora.unit_connecting': 'conectando', + 'aurora.unit_offline': 'offline', + 'aurora.nearby_click': 'Por perto · clique para conectar', + 'aurora.unit_battery': '% de bateria', + 'aurora.unit_nearby': 'por perto', + 'aurora.empty_own_pages': "Tudo está em páginas próprias", + 'aurora.empty_select': 'Selecione-o para usar os recursos', + 'aurora.empty_connect_it': 'Conecte-o para usar os recursos', + 'aurora.empty_connect': 'Conecte para usar os recursos', + 'aurora.greet_night': 'Boa noite', + 'aurora.greet_morning': 'Bom dia', + 'aurora.greet_afternoon': 'Boa tarde', + 'aurora.greet_evening': 'Boa noite', + 'aurora.menu_this_desk': '{name} (esta mesa)', + 'aurora.menu_phone': 'telefone', + 'aurora.menu_live': 'conectado', + 'aurora.menu_offline': 'offline', + 'aurora.step_opening_connection': 'Abrindo Conexão para escolher um dispositivo', + 'aurora.no_switch_opening': "{title} não tem botão de ativar: abrindo a página", + 'aurora.hint_try': "Experimente, em inglês: “turn on clipboard”, “open mouse”, “connect 192.168.1.20”, “refresh” ou “pair a phone”.", + 'aurora.step_opening': 'Abrindo {title}', + 'aurora.unavailable_device': '{title} não está disponível com este dispositivo', + 'aurora.is_open': "A página {title} está aberta", + 'aurora.step_turning_on': 'Ativando {title}', + 'aurora.step_turning_off': 'Desativando {title}', + 'aurora.was_already_on': "O recurso {title} já estava ativado", + 'aurora.was_already_off': "O recurso {title} já estava desativado", + 'aurora.opened_linux': "{title} ainda não está disponível no Linux: abri a página", + 'aurora.opened_device': '{title} não está disponível com este dispositivo: abri a página', + 'aurora.opened_now': '{title} está indisponível agora: abri a página', + 'aurora.opened_peer': '{title} requer um dispositivo conectado: abri a página', + 'aurora.is_on': "O recurso {title} está ativado", + 'aurora.is_off': "O recurso {title} está desativado", + 'aurora.step_connecting_to': 'Conectando a {name}', + 'aurora.didnt_work': 'Isso não funcionou', + 'aurora.no_connect_by_address': 'A conexão por endereço não está disponível aqui', + 'aurora.couldnt_reach': 'Não foi possível alcançar {addr}', + 'aurora.asked_to_connect': 'Pedi a {addr} que conecte: acompanhe em Conexão', + 'aurora.step_looking': 'Procurando dispositivos por perto', + 'aurora.no_refresh': "A atualização não está disponível aqui", + 'aurora.refreshed': 'Lista de dispositivos por perto atualizada', + 'aurora.step_showing_qr': 'Exibindo o código QR de pareamento', + 'aurora.pair_from_nearby': 'Pareie telefones em Conexão › Por perto', + 'aurora.pair_from_connection': 'Pareie um telefone em Conexão (o cartão do código QR aparece enquanto nenhum telefone estiver conectado)', + 'aurora.scan_code': 'Escaneie o código com a câmera do telefone', + 'aurora.step_disconnecting': 'Desconectando', + 'aurora.nothing_connected': 'Nada está conectado', + 'aurora.step_choosing_files': 'Escolhendo arquivos para enviar', + 'aurora.connect_first_send': 'Conecte um dispositivo antes de enviar arquivos', + 'aurora.drop_on_overview': 'Solte arquivos na Visão Geral para enviá-los', + 'aurora.pick_files': 'Escolha os arquivos na janela que foi aberta', + 'aurora.step_reconnecting': 'Reconectando', + 'aurora.reconnecting_paired': 'Reconectando ao computador pareado', + 'aurora.pick_on_connection': 'Escolha um dispositivo em Conexão', + 'aurora.switched_to': 'Alternado para {name}', + 'aurora.already_connected': "A conexão com {name} já está ativa", + 'aurora.joins_by_itself': "{name} está sem conexão: conecta-se por conta própria quando estiver em execução, ou a partir de Conexão", + 'aurora.connect_from_connection': 'Conecte {name} em Conexão', + 'media.kind_photos': 'fotos', + 'media.kind_screenshots': 'capturas de tela', + 'device.os_win': 'PC com Windows', + 'device.os_linux': "Computador com Linux", + 'device.adb_ready': 'ADB · pronto', + 'device.adb_connecting': 'ADB · conectando', + 'device.adb_not_paired': 'ADB · não pareado', + 'device.adb_off': 'ADB · desativado', + 'device.not_set_up': 'Não configurado', + 'device.storage_used_of': '{used} de {total} GB', + 'device.recent_off_hint': 'Ative-os em Área de transferência', + 'device.clip_empty_hint': 'O que for copiado em qualquer um dos lados aparece aqui', + 'sh_vcam.not_on_computer': 'Não disponível neste computador', + 'sh_vcam.check_failed': 'Não foi possível verificar a câmera virtual: {error}', + 'sh_vcam.didnt_install': 'A instalação não foi concluída', + 'sh_vcam.remove_failed': 'Não foi possível removê-la: {error}', + 'pfiles.the_file_manager': 'gerenciador de arquivos', + 'pfiles.hint_wifi_open': "“{name}”: Abrir conecta com Wi-Fi Direct e mostra em {fm}", + 'pfiles.hint_none_shared': "Nenhuma pasta compartilhada: em {phone}, DuoDesk › Acesso a arquivos › Compartilhar uma pasta", + 'pfiles.hint_mounted_finder': '“{name}”, no Finder, em Locais', + 'pfiles.hint_mounted': '“{name}”, no {fm}', + 'pfiles.hint_open_shows': '“{name}”: Abrir mostra no {fm}', + 'pfiles.share_failed': 'Não foi possível compartilhar: {error}', + 'pfiles.mine_on': '{folder}: no aplicativo Arquivos e nos seletores de arquivos de {phone}', + 'pfiles.mine_on_ble': '{folder}: no aplicativo Arquivos e nos seletores de arquivos de {phone}, via Wi-Fi Direct (Abrir no telefone faz a conexão)', + 'pfiles.choose_aria': 'Selecionar {name}', + 'pfiles.dir_items_one': '{count} item', + 'pfiles.new_name_aria': 'Novo nome', + 'pfiles.chosen_count_one': '{count} selecionado', + 'pfiles.chosen_count_other': '{count} selecionados', + 'pfiles.didnt_work': 'Isso não funcionou', + 'camera.error_unknown': 'desconhecido', + 'camera.sharing_now': 'Compartilhando agora: no Zoom, no Teams, no navegador…, escolha apenas {name} como câmera', + 'camera.ready_hint': 'Pronta: a câmera em execução aqui vai para {name}. Escolha apenas essa no aplicativo em que você faz a chamada', + 'camera.off_hint': 'Desativada: a imagem fica no DuoDesk. Ativada: ela também é {name}, uma câmera que outros aplicativos podem escolher', + 'camera.sending_to_one': '{names} está visualizando agora', + 'camera.sending_to_other': '{names} estão visualizando agora', + 'sh_rezume.couldnt_be_sent': 'Não foi possível enviar', + 'sh_rezume.peer_no_rezume': '{name} ainda não tem o ReZume: atualize o DuoDesk lá', + 'sh_rezume.rezume_off_on_peer': 'O ReZume está desativado em {name}', + 'sh_rezume.apps_need_adb': 'Os aplicativos do telefone abrem aqui quando a depuração sem fio estiver ativada (página Telefone)', + 'sh_rezume.didnt_come': 'Não chegou', + 'sh_rezume.didnt_arrive': '{title} não chegou', + 'rezume.in_window_here': ', em uma janela aqui', + 'rezume.doc_here_hint': "O arquivo aberto em primeiro plano (Word, Pages, Pré-Visualização, um editor de texto…): ele passa para cá e abre aqui", + 'rezume.mirror_here_hint': 'Um aplicativo do telefone abre aqui em uma janela própria, como estava (depuração sem fio)', + 'feature_art.connected_other': 'Conectado ao outro computador', + 'feature_art.show_settings': 'Mostrar as configurações', + 'feature_art.cursor_title': 'Compartilhamento do cursor', + 'feature_art.cursor_desc': 'Empurre o ponteiro além da borda da tela e ele continua no outro dispositivo. Um só mouse ou trackpad para os dois.', + 'feature_art.keyboard_title': 'Compartilhamento do teclado', + 'feature_art.keyboard_desc': 'Este teclado digita em qualquer dispositivo em que o ponteiro estiver, atalhos incluídos.', + 'feature_art.clipboard_title': 'Sincronização da área de transferência', + 'feature_art.clipboard_desc': "Copie algo em um dispositivo e cole no outro. A transferência é automática.", + 'feature_art.notifications_title': 'Sincronização de notificações', + 'feature_art.notifications_desc': 'As notificações do outro dispositivo aparecem neste, e vice-versa.', + 'feature_art.audio_title': 'Compartilhamento de som', + 'feature_art.audio_desc': "Reproduza o som de um dispositivo nos alto-falantes ou nos fones do outro.", + 'feature_art.apps_title': 'Compartilhamento de aplicativos', + 'feature_art.apps_desc': 'Abra um aplicativo do outro dispositivo: ele roda lá e aparece aqui em uma janela própria.', + 'feature_art.share_title': 'Segunda tela', + 'feature_art.share_desc': 'Esta tela vira uma segunda tela do outro dispositivo: mova janelas para ela.', + 'feature_art.receive_title': 'Tela remota', + 'feature_art.receive_desc': 'A tela do outro dispositivo em uma janela aqui, para ver e usar a partir daqui.', + 'feature_art.pc_mac_title': 'Compartilhamento de tela', + 'feature_art.pc_mac_desc': 'Esta tela em uma janela no outro dispositivo, para mostrar ou usar de lá.', + 'feature_art.files_title': 'Compartilhamento de arquivos', + 'feature_art.files_desc': 'Arraste arquivos pela borda da tela, receba arquivos enviados a você ou compartilhe uma pasta.', + 'feature_art.terminal_title': 'Terminal remoto', + 'feature_art.terminal_desc': 'Abra um terminal no outro computador a partir deste. Sem precisar de senhas.', + 'feature_art.mount_title': 'Unidade do telefone', + 'feature_art.mount_desc': 'O armazenamento do telefone como uma unidade aqui, para abrir e copiar os arquivos como em qualquer outra pasta.', + 'feature_art.calls_title': 'Chamadas do telefone', + 'feature_art.calls_desc': 'Atenda e faça as chamadas do seu telefone neste computador e converse por ele.', + 'feature_art.messages_title': 'Mensagens de texto', + 'feature_art.messages_desc': 'Leia e envie as mensagens de texto do seu telefone aqui.', + 'feature_art.media_title': 'Fotos do telefone', + 'feature_art.media_desc': 'Veja as fotos e os vídeos do seu telefone e copie-os para cá.', + 'feature_art.pfiles_title': 'Arquivos do telefone', + 'feature_art.pfiles_desc': 'Navegue pelo armazenamento do telefone e copie arquivos de e para ele, sem cabo.', + 'feature_art.camera_title': 'Compartilhamento de câmera', + 'feature_art.camera_desc': 'A câmera do outro dispositivo aqui: veja a imagem ou escolha-a como câmera em qualquer aplicativo.', + 'feature_art.remote_title': 'Telefone como controle remoto', + 'feature_art.remote_desc': 'Use o telefone como touchpad, teclado ou gamepad deste computador.', + 'feature_art.rezume_desc': 'Como o Handoff nos dispositivos Apple: continue aqui a página, o documento ou o aplicativo do telefone que você estava usando no outro dispositivo, e vice-versa.', + 'updater_modal.new_version': 'Nova versão', + 'nav.mirror': 'Espelhamento', + 'nav.papps': 'Aplicativos', + 'nav.pfiles': 'Arquivos do telefone', + 'tab.mirror.desc': 'A tela do telefone em uma janela, com toque, mouse e teclado.', + 'tab.papps.heading': 'Aplicativos do telefone', + 'tab.papps.desc': 'Abra qualquer aplicativo do telefone em sua própria janela.', + 'tab.media.desc': 'Veja as fotos e vídeos do seu telefone e copie-os para cá.', + 'tab.pfiles.desc': 'Navegue pelo armazenamento do telefone e copie arquivos em ambos os sentidos. Sem necessidade de depuração sem fio.', + 'tab.camera.desc': "A câmera do outro dispositivo aqui, e como câmera que outros aplicativos podem escolher.", + 'tab.rezume.desc': 'Como o Handoff da Apple: continue aqui o que você estava fazendo no outro dispositivo, e vice-versa.', + 'tab.overview.heading': 'Visão Geral', + 'win_apps.couldnt_open': 'Não foi possível abrir {name}', + 'win_apps.couldnt_open_why': 'Não foi possível abrir {name}: {why}', + 'win_apps.opening': 'Abrindo {name}…', + 'win_apps.shortcut_refused': 'O Windows recusou o atalho', + 'win_apps.couldnt_add_start': "Não foi possível adicionar {name} ao menu Iniciar: {error}", + 'win_apps.in_start_folder': "{name} está em Início › {folder}. Lá, clique com o botão direito para fixá-lo no Início ou na barra de tarefas.", + 'win_peerapps.couldnt_open': 'Não foi possível abrir {name}', + 'win_peerapps.couldnt_open_why': 'Não foi possível abrir {name}: {why}', + 'win_fclip.couldnt_use_one': 'Não foi possível usar {keys}. Outro aplicativo pode estar usando.', + 'win_fclip.couldnt_use_two': 'Não foi possível usar {first} e {second}. Outro aplicativo pode estar usando.', + 'win_gamepad.not_in_build': 'Não incluído nesta versão do DuoDesk', + 'win_gamepad.setup_unfinished': 'a configuração não terminou', + 'win_gamepad.vigem_restart': 'O ViGEmBus foi instalado, mas ainda não responde: reinicie o Windows', + 'win_helper.not_built': 'Auxiliar não compilado (execute npm run build:helper)', + 'win_ipc.open_in_window': 'Abrir em uma janela', + 'win_main.no_certificate': 'Sem certificado: {error}', + 'win_monitor_drop.sending': 'Enviando {name}, {pct}% {sent} / {size}', + 'win_monitor_drop.sending_multi': 'Enviando {name} ({index} de {count}), {pct}% {sent} / {size}', + 'win_pcapps.couldnt_list': 'Não foi possível listar os aplicativos deste PC: {error}', + 'win_phoneview.the_phone': 'o telefone', + 'win_phoneview.unlock_to_open': 'Desbloqueie {phone} para abrir {app}', + 'win_phoneview.setup_adb_first': 'Configure primeiro a depuração sem fio na página Telefone', + 'win_phoneview.screenshot_copied': 'Captura de tela copiada: cole com Ctrl+V', + 'win_phoneview.shortcut_refused': 'O Windows recusou o atalho', + 'win_phoneview.in_start_folder': "{name} está em Iniciar › {folder}", + 'win_phoneview.couldnt_add_start': "Não foi possível adicionar {name} ao menu Iniciar: {error}", + 'win_vcam.needs_win11': 'Requer o Windows 11: o Windows 10 não tem câmeras virtuais', + 'win_vcam.not_in_build': 'Não incluído nesta versão do DuoDesk', + 'win_vcam.still_legacy_name': 'Ainda se chama “TwinDesk Camera” aqui: será renomeada na próxima inicialização', + 'win_vcam.setup_unfinished': 'a configuração não terminou', + 'win_vcam.didnt_add': 'O Windows não adicionou a câmera: {error}', + 'win_sound_renderer.mac_sound': 'Som do Mac: {error}', + 'win_sound_renderer.sending_pc_sound': 'Erro ao enviar o som deste PC: {error}', + 'win_sound_renderer.no_system_sound': 'O Windows não forneceu o som do sistema', + 'lin_monitor_drop.sending': 'Enviando {name}, {pct}% {sent} / {size}', + 'lin_monitor_drop.sending_multi': 'Enviando {name} ({index} de {count}), {pct}% {sent} / {size}', + 'lin_sound_renderer.peer_sound': 'Som de {Name}: {error}', + 'lin_sound_renderer.sending_sound': 'Erro ao enviar o som deste computador: {error}', + 'lin_sound_renderer.no_loopback': 'o dispositivo de loopback de som não apareceu', + 'lin_sound_renderer.no_track': 'sem faixa de som', + 'lin_apps.couldnt_open': 'Não foi possível abrir {name}', + 'lin_apps.couldnt_open_why': 'Não foi possível abrir {name}: {why}', + 'lin_apps.opening': 'Abrindo {name}…', + 'lin_apps.couldnt_add_menu': 'Não foi possível adicionar {name} ao menu de aplicativos: {error}', + 'lin_apps.in_app_menu': '{name} agora está no menu de aplicativos (como "{name}"). Fixe-o no dock a partir de lá.', + 'lin_peerapps.couldnt_open': 'Não foi possível abrir {name}', + 'lin_peerapps.couldnt_open_why': 'Não foi possível abrir {name}: {why}', + 'lin_pcapps.couldnt_list': 'Não foi possível listar os aplicativos deste computador: {error}', + 'lin_gamepad.not_in_build': 'Não incluído nesta versão do DuoDesk', + 'lin_gamepad.password_closed': 'A solicitação de senha foi fechada', + 'lin_gamepad.uinput_not_yours': '/dev/uinput existe, mas ainda não é deste usuário: saia da sessão e entre de novo', + 'lin_helper.not_built': 'Auxiliar não compilado (execute npm run build:helper)', + 'lin_helper.stopped': 'O auxiliar parou ({code})', + 'lin_main.no_certificate': 'Sem certificado: {error}', + 'lin_pcscreen.sound_error': 'Som: {error}', + 'lin_phoneview.the_phone': 'o telefone', + 'lin_phoneview.unlock_to_open': 'Desbloqueie {phone} para abrir {app}', + 'lin_phoneview.setup_adb_first': 'Configure primeiro a depuração sem fio na página Telefone', + 'lin_sendto.send_to_menu': 'Enviar para {name} (DuoDesk)', + 'lin_sound.sending_sound': 'Erro ao enviar o som deste computador: {error}', + 'lin_sshd.couldnt_add_key': 'Não foi possível adicionar a chave de {name}: {error}', + 'lin_sshd.key_still_installed': 'A chave de {Name} ainda está instalada: {error}', + 'lin_sshd.password_closed': 'A solicitação de senha foi fechada', + 'lin_sshd.setup_failed': 'A configuração falhou: {error}', + 'lin_vcam.not_in_build': 'Não incluído nesta versão do DuoDesk', + 'lin_vcam.still_legacy_name': 'Ainda se chama “{legacy}” aqui: será renomeada na próxima inicialização', + 'lin_vcam.password_closed': 'A solicitação de senha foi fechada', + 'lin_vcam.no_device': 'O v4l2loopback está carregado, mas não tem um dispositivo “{name}”', + 'lin_vdd.mutter_needs_gnome': 'Estender no Wayland requer o GNOME (os monitores virtuais dele)', + 'lin_vdd.needs_pipewire_plugin': 'Estender requer o plugin PipeWire do GStreamer (gstreamer1.0-pipewire)', + 'lin_vdd.nvidia_no_x11_monitor': 'O driver da NVIDIA não permite que o DuoDesk adicione um monitor no X11. Estender funciona no GNOME com Wayland ou com o driver de código aberto', + 'lin_vdd.no_spare_output': 'Seu driver de vídeo não tem uma saída livre para um monitor virtual', + 'lin_vdd.needs_python_gi': 'Estender requer o Python 3 com GObject (python3-gi)', + 'lin_vdd.couldnt_check_monitors': 'Não foi possível verificar os monitores: {error}', + 'lin_vdd.switch_off_title': 'Desativar a tela extra do DuoDesk?', + 'lin_vdd.switch_off_detail': 'A tela extra do DuoDesk para Estender está ativada ({names}); por isso, as janelas podem acabar em uma tela que ninguém vê até Estender ser ativado. Desativá-la deixa seus monitores pretos por um instante.', + 'lin_vdd.switch_it_off': 'Desativar', + 'lin_vdd.leave_it_on': 'Deixar ativada', + 'lin_vdd.nv_removed_logout': 'Removida. Saia da sessão e entre de novo para concluir.', + 'lin_vdd.nv_logout_installing': 'Saia da sessão e entre de novo uma vez para concluir a instalação.', + 'lin_vdd.nv_needs_settings': 'O driver da NVIDIA precisa da tela extra nas configurações dele. Instalar pede sua senha uma vez; depois, saia da sessão e entre de novo. Se você conectar um monitor em outra porta mais tarde, instale de novo.', + 'lin_vdd.nv_removed_msg': 'Removida: saia da sessão e entre de novo para concluir', + 'lin_vdd.nv_logout_adding': 'Saia da sessão e entre de novo uma vez para concluir a adição da tela extra para Estender', + 'lin_vdd.nv_no_port': 'O driver da NVIDIA não permite que o DuoDesk adicione um monitor no X11, e esta placa não tem uma porta DisplayPort livre para isso', + 'lin_vdd.couldnt_add': 'Não foi possível adicionar o monitor virtual: {error}', + 'lin_vdd.couldnt_remove': 'Não foi possível remover o monitor virtual: {error}', + 'lin_vdd.monitor_went_away': 'O monitor virtual desapareceu', + 'lin_vdd.switched_off_msg': 'Algo neste computador desativou a tela extra (em uma máquina virtual, as ferramentas do convidado fazem isso)', + 'lin_vdd.couldnt_resize': 'Não foi possível redimensionar o monitor virtual: {error}', + 'lin_vdd.too_long': 'demorou demais', + 'lin_vdd.monitor_stopped': 'o monitor virtual parou', + 'lin_vdd.no_spare_output_short': 'nenhuma saída livre', + 'lin_vdd.didnt_come_on': "a saída {output} não foi ativada", + 'lin_vdd.desktop_didnt_switch_on': 'a área de trabalho não ativou {output}', + 'lin_vdd.switched_off_again': 'algo neste computador a desativou de novo (em uma máquina virtual, as ferramentas do convidado fazem isso)', + 'lin_vdd.password_closed': 'a solicitação de senha foi fechada', + 'lin_vdd.not_allowed': 'sem permissão para ativar a saída', + 'lin_vdd.desktop_no_answer': 'a área de trabalho não respondeu', + 'lin_vdd.no_free_dp': 'nenhuma porta DisplayPort livre', + 'lin_vdd.logout_to_finish': 'saia da sessão e entre de novo uma vez para concluir a instalação', + 'lin_vdd.no_sizes': 'a tela extra não tem tamanhos', + 'lin_vdd.desktop_didnt_switch_it_on': 'a área de trabalho não a ativou', + 'lin_vdd.password_closed_cap': 'A solicitação de senha foi fechada', + 'lin_vdd.install_failed': 'A instalação do auxiliar de tela virtual falhou: {error}', + 'lin_vdd.remove_failed': 'A remoção do auxiliar de tela virtual falhou: {error}', + 'mac_ipc.open_in_window': 'Abrir em uma janela', + 'mac_ipc.add_to_dock': 'Adicionar ao Dock', + 'mac_fclip.couldnt_use_one': 'Não foi possível usar {keys}. Outro aplicativo pode estar usando.', + 'mac_fclip.couldnt_use_two': 'Não foi possível usar {first} e {second}. Outro aplicativo pode estar usando.', + 'mac_phoneview.the_phone': 'o telefone', + 'mac_phoneview.unlock_to_open': 'Desbloqueie {phone} para abrir {app}', + 'mac_phoneview.setup_adb_first': 'Configure primeiro a depuração sem fio na página Telefone', + 'mac_phoneview.in_dock': '{name} está no Dock', + 'mac_phoneview.couldnt_add_dock': 'Não foi possível adicionar {name} ao Dock', + 'mac_vcam.not_in_build': 'Não incluído nesta versão', + 'mac_vcam.obs_turn_on': "Ative a Câmera Virtual do OBS em Ajustes do Sistema › Geral › Itens de Início e Extensões › Extensões de Câmera (ou clique em Iniciar Câmera Virtual no OBS uma vez) e depois ative isto de novo", + 'mac_vcam.obs_install': 'Instale o OBS Studio e clique em Iniciar Câmera Virtual nele uma vez; depois ative isto de novo', + 'mac_vcam.not_in_build_release': "Não incluído nesta versão: o macOS só aceita extensões de câmera do DuoDesk assinado pelo desenvolvedor (uma versão de lançamento). Escolha a Câmera Virtual do OBS em vez disso", + 'mac_vcam.move_to_applications': 'Mova primeiro o DuoDesk para a pasta Aplicativos: o macOS só instala extensões de câmera a partir dela', + 'mac_vcam.allow_in_settings': "Permita em Ajustes do Sistema › Geral › Itens de Início e Extensões › Extensões de Câmera (o macOS pergunta uma vez)", + 'mac_vcam.obs_missing': "A OBS Virtual Camera não está aqui", + 'mac_vcam.didnt_install': 'O macOS não instalou a câmera: {error}', + 'mac_vcam.installed_after_restart': 'Será instalada depois que o Mac reiniciar', + 'mesh_app.name_is_reached_through': "{name} é acessível por {via}", + 'mesh_app.forget_name': 'Esquecer {name}', + 'mesh_share.displays': 'Telas', + 'mesh_overview.via_not_linked_to_this': 'Via {via} · não vinculado a este PC', + 'mesh_overview.linked_to_count': 'vinculado a {count}', + 'mesh_overview.looks_different_now_forget_it': "Parece diferente agora. Esqueça e pareie de novo.", + 'mesh_overview.selected': 'Selecionado', + 'mesh_overview.use': 'Usar', + 'mesh_overview.cursor': 'Cursor', + 'mesh_overview.device': 'Dispositivo', + 'mesh_overview.cursor_sharing_is_off_for': 'O compartilhamento do cursor está desativado para este dispositivo', + 'mesh_overview.no_devices_yet': 'Nenhum dispositivo ainda', + 'meshl_overview.error_connect_by_address': '{error}. Conectar por endereço ainda funciona.', + 'meshl_overview.via_not_linked': 'Via {via} · sem vínculo com este computador', + 'meshl_overview.linked_to': 'vinculado a {count}', + 'meshl_overview.looks_different_now': "Parece diferente agora. Esqueça e pareie de novo.", + 'meshl_overview.selected': 'Selecionado', + 'meshl_overview.use': 'Usar', + 'meshl_overview.cursor': 'Cursor', + 'meshl_overview.device': 'Dispositivo', + 'meshl_overview.cursor_sharing_off': 'O compartilhamento do cursor está desativado para ele', + 'meshl_overview.no_devices_yet': 'Nenhum dispositivo ainda', + 'meshl_multi.not_paired_here': 'Não pareado aqui', + 'meshl_multi.out_of_reach': 'Fora de alcance', + 'meshl_multi.name_state_blocked': "{name} — {state}: sem conexão com este computador, então o ponteiro não chega lá", + 'meshl_multi.name_state_behind': '{name} — {state}: o ponteiro só chega lá passando por um dispositivo que ele não alcança daqui', + 'meshl_multi.name_state': '{name} — {state}', + 'meshl_multi.blocked_many_behind': "{names} estão sem conexão com este computador, então o ponteiro não chega lá nem aos dispositivos que ficam depois.", + 'meshl_multi.blocked_many': "{names} estão sem conexão com este computador, então o ponteiro não chega lá.", + 'meshl_multi.blocked_one_behind': "{names} está sem conexão com este computador, então o ponteiro não chega lá nem aos dispositivos que ficam depois.", + 'meshl_multi.blocked_one': "{names} está sem conexão com este computador, então o ponteiro não chega lá.", + 'meshl_multi.pair_them': 'Pareie-os com este computador.', + 'meshl_multi.pair_them_or_join': 'Pareie-os com este computador ou ative Conectar a todos os dispositivos automaticamente.', + 'meshl_multi.pair_it': 'Pareie-o com este computador.', + 'meshl_multi.pair_it_or_join': 'Pareie-o com este computador ou ative Conectar a todos os dispositivos automaticamente.', + 'meshl_multi.now_click_lit_place': 'Agora clique em um lugar iluminado ao lado de outro dispositivo para movê-lo para lá, ou em outro dispositivo para trocar de lugar.', + 'meshl_multi.click_device_then_place': 'Clique em um dispositivo e depois em um lugar ao lado de outro dispositivo para movê-lo para lá, ou em outro dispositivo para trocar de lugar. Os dispositivos ficam lado a lado, sem espaço vazio entre eles.', + 'meshl_multi.computers': 'Computadores', + 'meshl_multi.connect_same_network_only': 'Conexão com este só pela mesma rede, não por Bluetooth. Telefones por Wi-Fi, cabo USB ou Bluetooth, como antes', + 'meshl_multi.join_on_hint': 'Pareie com um dispositivo e os demais se conectam a este sozinhos. Os dispositivos com que você parear podem apresentar outros, sem código de pareamento', + 'meshl_multi.join_off_hint': 'Desativado: este computador não apresenta os dispositivos entre si nem aceita apresentação. Pareie cada dispositivo você mesmo', + 'meshl_app.is_reached_through': "{name} é acessível por {via}", + 'meshl_app.forget_name': 'Esquecer {name}', + 'meshm_cursor.another_computers_mouse_on': 'O mouse de outro computador neste Mac e o deste Mac em um telefone', + 'meshm_display.as_set_above': 'Como definido acima', + 'meshm_display.mirror_display': 'Espelhar {display}', + 'meshm_display.displays': 'Telas', + 'meshm_multi.this_mac': 'Este Mac', + 'meshm_multi.not_paired_here': 'Não pareado aqui', + 'meshm_multi.out_of_reach': 'Fora de alcance', + 'meshm_multi.name_state': '{name} — {state}', + 'meshm_multi.name_state_not_connected_to': "{name} — {state}: sem conexão com este Mac, então o ponteiro não chega lá", + 'meshm_multi.name_state_the_pointer_gets': '{name} — {state}: o ponteiro só chega lá passando por um dispositivo que ele não alcança daqui', + 'meshm_multi.names_isnt_connected_to_this': "{names} está sem conexão com este Mac, então o ponteiro não chega lá.", + 'meshm_multi.names_arent_connected_to_this': "{names} estão sem conexão com este Mac, então o ponteiro não chega lá.", + 'meshm_multi.names_isnt_connected_to_this_behind': "{names} está sem conexão com este Mac, então o ponteiro não chega lá nem aos dispositivos que ficam depois.", + 'meshm_multi.names_arent_connected_to_this_behind': "{names} estão sem conexão com este Mac, então o ponteiro não chega lá nem aos dispositivos que ficam depois.", + 'meshm_multi.pair_it_with_this_mac': 'Pareie-o com este Mac.', + 'meshm_multi.pair_them_with_this_mac': 'Pareie-os com este Mac.', + 'meshm_multi.pair_it_with_this_mac_join': 'Pareie-o com este Mac ou ative Conectar a todos os dispositivos automaticamente.', + 'meshm_multi.pair_them_with_this_mac_join': 'Pareie-os com este Mac ou ative Conectar a todos os dispositivos automaticamente.', + 'meshm_multi.now_click_a_lit_place': 'Agora clique em um lugar iluminado ao lado de outro dispositivo para movê-lo para lá, ou em outro dispositivo para trocar de lugar.', + 'meshm_multi.click_a_device_then_a': 'Clique em um dispositivo e depois em um lugar ao lado de outro dispositivo para movê-lo para lá, ou em outro dispositivo para trocar de lugar. Os dispositivos ficam lado a lado, sem espaço vazio entre eles.', + 'meshm_multi.pair_with_one_device_and': "Pareie com um dispositivo e os demais se conectam a este Mac sozinhos. Os dispositivos com que você parear podem apresentar outros, sem código de pareamento", + 'meshm_multi.off_this_mac_neither_introduces': 'Desativado: este Mac não apresenta dispositivos uns aos outros nem aceita apresentação. Pareie cada dispositivo você mesmo', + 'meshm_overview.devices': 'Dispositivos', + 'meshm_overview.another_device': 'outro dispositivo', + 'meshm_overview.count_direct_link_one': '{count} link direto', + 'meshm_overview.count_direct_link_other': '{count} links diretos', + 'meshm_overview.device': 'Dispositivo', + 'meshm_overview.device_lower': 'dispositivo', + 'meshm_overview.in_use': 'Em uso', + 'meshm_overview.use': 'Usar', + 'meshm_overview.no_devices_yet': 'Nenhum dispositivo ainda', + 'meshm_start.is_reached_through': "{name} é acessível por {via}", + 'meshm_start.forget_name': 'Esquecer {name}', + 'app.sections': 'Seções', + 'pair.code': 'Código', + 'app.mesh_on': "Múltiplos dispositivos: ativado (modo Mesh)", + 'app.hotspot_password': 'Senha do ponto de acesso', + 'rezume.aria_web': 'Páginas da web', + 'rezume.aria_video': 'Vídeos', + 'rezume.aria_docs': 'Documentos', + 'rezume.aria_apps': 'Aplicativos', + 'rezume.aria_mirror': 'Espelhamento de tela', + 'rezume.aria_send': 'Enviar', + 'rezume.aria_receive': 'Receber', + 'rezume.aria_push': 'Enviar automaticamente', + 'rezume.aria_notify': 'Notificar', + 'rezume.aria_taskbar': 'Barra de tarefas', + 'rezume.aria_tray': 'Bandeja', + 'rezume.aria_tab': 'Aba', + + // Remaining pages (Windows, Linux, macOS) + 'win_filedrop.drop_off': 'Soltar arquivos no Monitor 2 está desativado (aba Arquivos)', + 'win_filedrop.only_files': 'Só é possível enviar arquivos (não pastas)', + 'win_filedrop.sent': 'Enviado', + 'win_filedrop.sent_to': 'Enviado para {where}', + 'win_filedrop.not_everything': 'Nem tudo chegou', + 'win_filedrop.dropped_on': 'Solto em {name}', + 'win_filedrop.dropped_on_in': 'Solto em {name}, em {where}', + 'win_filedrop.drag_refused': '{Name} não conseguiu receber o arraste', + 'win_filedrop.drag_cancelled': 'Arraste cancelado', + 'win_filedrop.not_connected': 'Sem conexão com {name}', + 'win_filedrop.too_big': 'Grande demais', + 'win_filedrop.cancelled': 'Cancelado', + 'win_filedrop.saved_on': 'Salvo em {name}', + 'win_filedrop.saved_on_path': 'Salvo em {name}: {path}', + 'win_filedrop.couldnt_save': '{Name} não conseguiu salvar', + 'win_filedrop.refuse_not_allowed': '{Name} não aceita arquivos soltos (aba Arquivos de lá)', + 'win_filedrop.refuse_too_big': 'Grande demais para {name}', + 'win_filedrop.refuse_busy': '{Name} está com outro arquivo em andamento', + 'win_filedrop.refuse_other': '{Name} recusou o arquivo', + 'win_filerecv.saved_to': 'Salvo em {dir}', + 'win_filerecv.n_of_count_failed': '{failed} de {count} falharam', + 'win_dragrecv.dropped': 'Solto: {label}', + 'win_dragrecv.dropped_in': 'Solto em {where}: {label}', + 'win_dragrecv.failed': '{label}: falhou', + 'win_dragrecv.cancelled': '{label}: foi cancelado', + 'win_helper.exited': 'o auxiliar foi encerrado', + 'win_helper.not_running': 'o auxiliar não está em execução', + 'win_helper.cmd_timed_out': 'auxiliar: tempo esgotado em {cmd}', + 'win_link.pair_failed_code': 'Falha ao parear ({code}).', + 'win_link.no_duodesk_at': 'Não há DuoDesk em {address}.', + 'win_link.could_not_connect': 'Não foi possível conectar a {address}.', + 'win_link.could_not_connect_why': 'Não foi possível conectar a {address} ({why}).', + 'win_link.connection_closed': 'A conexão com {name} foi encerrada.', + 'win_link.pair_refused': '{Name} recusou o pareamento.', + 'win_link.pair_timeout': 'O pareamento expirou.', + 'win_link.pair_busy': '{Name} já está pareando com outro dispositivo.', + 'win_link.version_mismatch': '{Name} usa outra versão do DuoDesk. Atualize os dois aplicativos.', + 'win_link.not_nearby_any_more': '{Name} não está mais por perto.', + 'win_link.pair_cancelled_on': 'O pareamento foi cancelado em {name}.', + 'win_link.bad_pair_message': '{Name} enviou uma mensagem de pareamento inválida.', + 'win_link.mac_forgot_me': 'O Mac esqueceu {me}. Pareie novamente.', + 'win_link.not_nearby': '{Name} não está por perto', + 'win_link.no_welcome': 'Sem resposta de {name}', + 'win_link.took_over': 'Outro dispositivo assumiu', + 'win_link.in_use': 'Em uso por outro dispositivo', + 'win_link.closed_link': '{Name} fechou a conexão ({code})', + 'win_main.pasting_files_from_one': 'Colando {count} arquivo de {name}', + 'win_main.pasting_files_from_other': 'Colando {count} arquivos de {name}', + 'win_main.sent_name_to_peer': '{name} enviado para {peer}', + 'win_main.not_everything_on': 'Nem tudo chegou em {peer}', + 'win_main.on_peer_some_failed': 'Em {name}: alguns arquivos não chegaram', + 'win_smb.cant_create': 'Não foi possível criar {folder}: {error}', + 'win_smb.pick_folder': 'Escolha uma pasta primeiro', + 'win_smb.no_dpapi': 'O Windows não pode proteger a senha aqui (DPAPI indisponível)', + 'win_smb.sharing_failed': 'O compartilhamento falhou: {error}', + 'win_smb.cancelled_still_shared': 'Cancelado. A pasta continua compartilhada.', + 'win_smb.couldnt_connect_folder': 'Não foi possível conectar a pasta de {name}: {error}', + 'win_vdd.remove_failed': 'A remoção do driver de vídeo falhou: {error}', + 'win_vdd.didnt_finish': 'a operação não terminou', + 'win_vdd.cant_read_account': 'não foi possível ler o ID desta conta', + 'win_vdd.didnt_appear': 'O monitor virtual não apareceu', + 'win_vdd.didnt_go_away': 'O monitor virtual não sumiu', + 'win_sender.window_went_away': 'A janela capturada desapareceu', + 'win_sender.monitor_went_away': 'O monitor capturado desapareceu', + 'win_sender.capturing_error': 'Captura: {error}', + 'win_sender.answer_error': 'Resposta de {Name}: {error}', + 'lin_dragrecv.dropped_in': '{file} solto em {where}', + 'lin_dragrecv.desktop': 'Área de trabalho', + 'lin_filedrop.drop_off': 'Soltar arquivos no Monitor 2 está desativado (aba Arquivos)', + 'lin_filedrop.only_files': 'Só é possível enviar arquivos (não pastas)', + 'lin_filedrop.sent': 'Enviado', + 'lin_filedrop.sent_to': 'Enviado para {where}', + 'lin_filedrop.not_everything': 'Nem tudo chegou', + 'lin_filedrop.dropped_on': 'Solto em {name}', + 'lin_filedrop.dropped_on_in': 'Solto em {name}, na pasta {where}', + 'lin_filedrop.drag_failed': 'Não foi possível soltar o arraste em {Name}', + 'lin_filedrop.drag_cancelled': 'Arraste cancelado', + 'lin_filedrop.cancelled': 'Cancelado', + 'lin_filedrop.saved_on': 'Salvo em {name}', + 'lin_filedrop.saved_on_path': 'Salvo em {name}: {path}', + 'lin_filedrop.couldnt_save': 'Não foi possível salvar em {Name}', + 'lin_main.pasting_files_one': 'Colando {count} arquivo', + 'lin_main.pasting_files_other': 'Colando {count} arquivos', + 'lin_main.receiving_files_one': 'Recebendo {count} arquivo', + 'lin_main.receiving_files_other': 'Recebendo {count} arquivos', + 'lin_main.transfer_from_percent': '{what} de {name} · {percent} %', + 'lin_main.sent_file_to': '{file} enviado para {name}', + 'lin_main.not_everything_arrived': 'Nem tudo chegou', + 'lin_main.not_everything_arrived_on': 'Nem tudo chegou em {name}', + 'lin_main.on_peer': 'Em {name}', + 'lin_main.to_peer': 'Para {name}', + 'lin_main.sending_to_percent': 'Enviando {file} para {name} · {percent} %', + 'lin_main.fix_input_done': 'Pronto. Saia da sessão e entre de novo uma vez para concluir.', + 'lin_filerecv.saved_to': 'Salvo em {dir}', + 'lin_filerecv.n_failed': '{failed} de {count} falharam', + 'lin_helper.timed_out': 'auxiliar: tempo limite excedido em {cmd}', + 'lin_helper.not_running': 'auxiliar não está em execução', + 'lin_helper.exited': 'auxiliar encerrado', + 'lin_smb.password_closed': 'A solicitação de senha foi fechada', + 'lin_smb.sharing_failed': 'Falha no compartilhamento: {error}', + 'lin_smb.cancelled_still_shared': 'Cancelado. A pasta continua compartilhada.', + 'lin_link.pair_refused': '{Name} recusou o pareamento.', + 'lin_link.pair_timeout': 'O pareamento expirou.', + 'lin_link.pair_busy': '{Name} já está pareando com outro dispositivo.', + 'lin_link.version_mismatch': '{Name} usa outra versão do DuoDesk. Atualize os dois aplicativos.', + 'lin_link.pair_failed_code': 'Falha no pareamento ({code}).', + 'lin_link.not_nearby_pair': '{Name} não está mais por perto.', + 'lin_link.not_nearby': '{Name} não está por perto', + 'lin_link.pair_cancelled': 'O pareamento foi cancelado em {name}.', + 'lin_link.bad_pair_message': '{Name} enviou uma mensagem de pareamento inválida.', + 'lin_link.no_duodesk_at': 'Não há DuoDesk em {address}.', + 'lin_link.could_not_connect': 'Não foi possível conectar a {address}.', + 'lin_link.could_not_connect_why': 'Não foi possível conectar a {address} ({why}).', + 'lin_link.connection_closed': 'A conexão com {name} foi encerrada.', + 'lin_link.identity_changed': 'Este computador parece diferente agora. Esqueça-o e pareie de novo.', + 'lin_link.forgot_me': 'O outro computador esqueceu {me}. Pareie de novo.', + 'lin_link.no_welcome': 'Sem resposta de boas-vindas de {name}', + 'lin_link.stopped_answering': '{Name} parou de responder', + 'lin_link.asleep': '{Name} está em repouso', + 'lin_link.disconnected': '{Name} desconectou', + 'lin_link.took_over': 'Outro dispositivo assumiu', + 'lin_link.in_use': 'Em uso por outro dispositivo', + 'lin_link.closed_link': '{Name} encerrou a conexão ({code})', + 'lin_sender.window_went_away': 'A janela capturada foi fechada', + 'lin_sender.monitor_went_away': 'O monitor capturado foi desconectado', + 'lin_sender.capturing_error': 'Capturando: {error}', + 'lin_sender.answer_error': 'Resposta de {Name}: {error}', + 'mac_appsend.window_went_away': 'A janela capturada foi fechada', + 'mac_appsend.monitor_went_away': 'O monitor capturado foi desconectado', + 'mac_appsend.capturing_error': 'Capturando: {error}', + 'mac_appsend.answer_error': 'Resposta de {Name}: {error}', + 'mac_activity.let_control': 'Permita que o DuoDesk controle {app} para oferecer as abas: Ajustes do Sistema › Privacidade e Segurança › Automação › DuoDesk', + 'mac_activity.let_control_events': 'Permita que o DuoDesk controle o System Events para oferecer documentos: Ajustes do Sistema › Privacidade e Segurança › Automação › DuoDesk', + 'lin_smb.pick_folder': 'Escolha uma pasta primeiro', + 'lin_smb.folder_name_cant': 'O nome dessa pasta não pode ser compartilhado', + 'lin_smb.unexpected_user': 'Nome de usuário inesperado', + 'lin_filedrop.refuse_not_allowed': '{Name} não aceita arquivos soltos (aba Arquivos)', + 'lin_filedrop.refuse_too_big': 'Grande demais para {name}', + 'lin_filedrop.refuse_busy': '{Name} está ocupado com outro arquivo', + 'lin_filedrop.refuse_other': '{Name} recusou', + 'sh_camera_view.picture_cant_get_through': 'A imagem de {name} não está chegando: os dois estão na mesma rede?', + 'sh_camera_view.doesnt_share_camera': 'A câmera de {name} não está compartilhada: ative Câmera › “Permitir que este computador veja a câmera” lá.', + 'sh_camera_view.peer_camera_didnt_start': 'A câmera de {name} não iniciou: {error}', + 'sh_camera_view.unknown_error': 'desconhecido', + 'sh_camera_view.peer_stopped_camera': '{name} parou a câmera.', + 'pfx_home.paused': 'Pausado', + 'pfx_home.picture_sent': 'Imagem enviada', + 'pfx_home.picture_received': 'Imagem recebida', + 'pfx_home.copied_to': 'Copiado para {name}', + 'pfx_home.copied_from': 'Copiado de {name}', + 'pfx_home.battery': 'Bateria', + 'pfx_home.this_desk': 'Este computador', + 'pfx_home.cant_look_network': 'Não é possível procurar nesta rede', + 'pfx_home.identity_changed': 'A identidade mudou: pareie de novo', + 'pfx_home.linked_with': 'Conectado a {name}', + 'pfx_home.linked_with_device': 'Conectado a um dispositivo', + 'pfx_home.same_code': 'O mesmo código nos dois?', + 'pfx_home.pairing_failed': 'O pareamento não terminou', + 'pfx_home.devices_nearby_one': '{n} dispositivo por perto', + 'pfx_home.devices_nearby_other': '{n} dispositivos por perto', + 'pfx_home.device': 'Dispositivo', + 'pfx_home.mesh': 'Mesh', + 'pfx_home.mesh_preview': 'Prévia da mesh', + 'pfx_home.device_in_mesh': 'dispositivo na mesh', + 'pfx_home.devices_in_mesh': 'dispositivos na mesh', + 'pfx_home.device_could_join': 'dispositivo pode participar', + 'pfx_home.devices_could_join': 'dispositivos podem participar', + 'pfx_home.restarting_mesh': 'Reiniciando no modo mesh…', + 'pfx_home.connected_now_one': '{n} conectado agora', + 'pfx_home.connected_now_other': '{n} conectados agora', + 'pfx_home.pair_first': 'Pareie os dispositivos primeiro; eles aparecem aqui', + 'pfx_home.one_clipboard_all': 'Uma única área de transferência e um único conjunto de notificações para todos', + 'pfx_home.lamp_helper': 'Auxiliar', + 'pfx_home.no_le': 'Sem LE', + 'pfx_home.lamp_display_driver': 'Driver de tela', + 'pfx_home.removing': 'Removendo…', + 'pfx_home.status_of_computer': 'Status deste computador', + 'pfx_home.lamp_aria': '{label}: {value}', + 'pfx_home.lamp_aria_go': '{label}: {value}. Ir para a configuração', + 'pfx_home.needs_fix_one': '{n} precisa de correção', + 'pfx_home.needs_fix_other': '{n} precisam de correção', + 'pfx_home.all_good': 'Tudo certo', + 'pfx_home.checks_line': '{n} verificações · {name}', + 'pfx_home.n_of_6_on': '{n} de 6 ativados', + 'pfx_home.ovmap_sub': 'O que a Visão Geral mostra. Cada parte é desenhada enquanto está ativada.', + 'pfx_home.checking_updates': 'Verificando atualizações…', + 'pfx_home.version_skipped': 'Versão {version} ignorada', + 'pfx_home.version_available': 'Versão {version} disponível', + 'pfx_home.new_version_skipped': 'Nova versão ignorada', + 'pfx_home.new_version_available': 'Nova versão disponível', + 'pfx_home.couldnt_check_updates': 'Não foi possível verificar atualizações', + 'pfx_input.on_name': 'Em {name}', + 'pfx_input.is_using': '{Name} está usando {me}', + 'pfx_input.paused_bluetooth': 'Pausado · por Bluetooth', + 'pfx_input.sharing_off': 'Compartilhamento desativado', + 'pfx_input.edges_locked': 'Bordas travadas · {where}', + 'pfx_input.speed': 'velocidade', + 'pfx_input.edge_px': 'borda {n} px', + 'pfx_input.no_edge': 'sem borda', + 'pfx_input.keyboard_stays_here': 'o teclado fica aqui', + 'pfx_input.keyboard_off': 'teclado desativado', + 'pfx_input.sharing_paused': 'compartilhamento pausado', + 'pfx_input.typing_from': 'digitando a partir de {name}', + 'pfx_input.keys_go_to': 'as teclas vão para', + 'pfx_input.typing_here': 'digitando aqui', + 'pfx_input.follows_pointer': 'acompanha o ponteiro', + 'pfx_input.double_tap_switch': 'toque duas vezes em {key} para alternar', + 'pfx_input.double_tap': 'toque duas vezes em {key}', + 'pfx_input.unavailable': 'Indisponível', + 'pfx_input.not_available_here': 'indisponível aqui', + 'pfx_input.as_controller': '{name} como controle', + 'pfx_input.open_remote_on': 'abra o controle remoto em {name}', + 'pfx_input.as_remote': '{name} como controle remoto', + 'pfx_input.gamepad_not_here': 'controle de jogo · não está aqui', + 'pfx_input.gamepad_off': 'controle de jogo · desativado', + 'pfx_input.gamepad_live': 'controle de jogo · ativo', + 'pfx_input.gamepad_ready': 'controle de jogo · pronto', + 'pfx_input.controller': 'Controle', + 'pfx_input.hash_no_connection': '# sem conexão', + 'pfx_input.hash_needs_wifi': '# precisa de Wi-Fi', + 'pfx_input.hash_off': '# desativado', + 'pfx_input.connected_as': 'conectado como', + 'pfx_input.you': 'você', + 'pfx_input.asking_name': 'perguntando a {name}', + 'pfx_input.waiting_for_name': 'aguardando {name}', + 'pfx_input.not_available_on': 'indisponível em {name}', + 'pfx_input.problem': 'problema', + 'pfx_input.to_name': 'para {name}', + 'pfx_input.from_name': 'de {name}', + 'pfx_input.setting_up': 'configurando…', + 'pfx_input.listening': 'ouvindo :22', + 'pfx_input.x_not_installed': '✗ não instalado', + 'pfx_input.x_stopped': '✗ parado', + 'pfx_input.checking': 'verificando…', + 'pfx_input.can_connect': '{name} pode se conectar', + 'pfx_input.badge_update': 'atualizar', + 'pfx_input.getting_what': 'Obtendo {what}…', + 'pfx_input.untitled': 'Sem título', + 'pfx_input.page': 'página', + 'pfx_input.document': 'documento', + 'pfx_input.app': 'aplicativo', + 'pfx_input.connect_pc_or_phone': 'conecte um computador ou telefone', + 'pfx_input.rezume_off': 'O ReZume está desativado', + 'pfx_input.turn_on_carry_on': 'ative para continuar em outro lugar', + 'pfx_input.update_name': 'Atualize {name}', + 'pfx_input.no_rezume_there': 'ainda não há ReZume lá', + 'pfx_input.off_on_name': 'Desativado em {name}', + 'pfx_input.turn_on_there_too': 'ative lá também', + 'pfx_input.from_name_cap': 'De {name}', + 'pfx_input.offered': 'Oferecido', + 'pfx_input.getting_it': 'Obtendo…', + 'pfx_input.ready_to_send': 'pronto para enviar', + 'pfx_input.nothing_handed_over': 'nada transferido ainda', + 'sh_kvm_map_ui.identify': 'Identificar', + 'sh_kvm_map_ui.identify_title': 'Mostrar o número de cada monitor nele, nos dois computadores', + 'sh_kvm_map_ui.drag_to_desk_position': 'Arraste {them} para a posição em que está na sua mesa. O ponteiro só atravessa onde as telas se tocam (em destaque).', + 'sh_kvm_map_ui.drag_to_side': 'Arraste {them} para o lado em que está. As telas aparecem aqui assim que a conexão for feita (com o DuoDesk atualizado).', + 'sh_kvm_map_ui.is_left_of': '{them} fica à esquerda de {me}', + 'sh_kvm_map_ui.is_right_of': '{them} fica à direita de {me}', + 'sh_kvm_map_ui.is_above': '{them} fica acima de {me}', + 'sh_kvm_map_ui.is_below': '{them} fica abaixo de {me}', + 'sh_mesh_intro.every_device_linked': 'Todos os dispositivos conectados entre si: uma única área de transferência e um único conjunto de notificações para todos, além do mouse e do teclado em todos eles.', + 'sh_mesh_intro.turn_on_multi_device': 'Ativar Múltiplos Dispositivos?', + 'sh_mesh_intro.mesh_links_three_more': 'O modo mesh liga três ou mais computadores e telefones ao mesmo tempo: cada dispositivo a todos os outros.', + 'sh_mesh_intro.only_two_keep_off': 'Se você conectar apenas dois dispositivos, deixe desativado.', + 'pfx_phone_media.this_computer': 'este computador', + 'pfx_phone_media.connect_phone': 'Conecte {phone}', + 'pfx_phone_media.waiting_permission': 'Aguardando permissão em {phone}', + 'pfx_phone_media.waiting_for': 'Aguardando {phone}…', + 'pfx_phone_media.no_conversations': 'Nenhuma conversa ainda', + 'pfx_phone_media.unread_phone': 'Não lidas · {phone}', + 'pfx_phone_media.chat_apps_on': 'Aplicativos de chat ativados', + 'pfx_phone_media.read_only': 'Somente leitura', + 'pfx_phone_media.you_said': 'Você: {text}', + 'pfx_phone_media.n_this_week': '{n} nesta semana', + 'pfx_phone_media.n_missed_today': '{n} perdidas hoje', + 'pfx_phone_media.this_week': 'Esta semana', + 'pfx_phone_media.last_call': 'Última · {name} · {time}', + 'pfx_phone_media.calling_phone': 'Chamando · {phone}', + 'pfx_phone_media.answer_or_decline': 'Atenda ou recuse abaixo', + 'pfx_phone_media.outgoing': 'Chamada de saída', + 'pfx_phone_media.on_call': 'Em chamada', + 'pfx_phone_media.muted': 'Silenciada', + 'pfx_phone_media.sound_here': 'Som neste computador', + 'pfx_phone_media.sound_on_phone': 'Som em {phone}', + 'pfx_phone_media.ended': 'Encerrada', + 'pfx_phone_media.call_ended': 'Chamada encerrada', + 'pfx_phone_media.calls_ring_here': 'As chamadas tocam aqui · {phone}', + 'pfx_phone_media.no_recent_calls': 'Nenhuma chamada recente', + 'pfx_phone_media.no_phone': 'Sem telefone', + 'pfx_phone_media.waiting': 'Aguardando', + 'pfx_phone_media.turn_on_calls_top': 'Ative Chamadas no topo', + 'pfx_phone_media.items': 'Itens', + 'pfx_phone_media.n_videos': '{n} vídeos', + 'pfx_phone_media.newest_time': 'Mais recente {time}', + 'pfx_phone_media.only_chosen_photos': 'Somente as fotos escolhidas', + 'pfx_phone_media.photos_need_wifi_usb': 'As fotos precisam de Wi-Fi ou USB', + 'pfx_phone_media.loading_phone': 'Carregando {phone}…', + 'pfx_phone_media.connect_a_device': 'Conecte um dispositivo', + 'pfx_phone_media.playing_bluetooth': 'Tocando por Bluetooth', + 'pfx_phone_media.from_name': 'De {name}', + 'pfx_phone_media.waiting_for_name': 'Aguardando {name}', + 'pfx_phone_media.turned_off_on': 'Desativado em {name}', + 'pfx_phone_media.error': 'Erro', + 'pfx_phone_media.to_name': 'Para {name}', + 'pfx_phone_media.lane_in': 'Entrada', + 'pfx_phone_media.lane_out': 'Saída', + 'pfx_phone_media.no_device': 'Sem dispositivo', + 'pfx_phone_media.starting': 'Iniciando', + 'pfx_phone_media.connect_to_use_camera': 'Conecte um dispositivo para usar a câmera dele', + 'pfx_phone_media.live_fps': 'Ao vivo · {n} fps', + 'pfx_phone_media.vcam_live': 'Câmera virtual ao vivo', + 'pfx_phone_media.vcam_ready': 'Câmera virtual pronta', + 'pfx_phone_media.turned_deg': 'Girada {n}°', + 'pfx_phone_media.window_open': 'Janela aberta', + 'pfx_phone_media.names_viewing_camera': '{names} estão vendo a câmera de {me}', + 'pfx_phone_media.name_viewing_camera': '{name} está vendo a câmera de {me}', + 'pfx_screens.n_window_one': '{n} janela', + 'pfx_screens.n_window_other': '{n} janelas', + 'pfx_screens.n_app_one': '{n} aplicativo', + 'pfx_screens.n_app_other': '{n} aplicativos', + 'pfx_screens.from_who': 'De {name}', + 'pfx_screens.waiting': 'Aguardando', + 'pfx_screens.extra_screen': 'Tela extra', + 'pfx_screens.main_screen': 'Tela principal', + 'pfx_screens.window_closed': 'janela fechada', + 'pfx_screens.nobody_watching': 'Ninguém está assistindo', + 'pfx_screens.open_starts_sharing': 'Abrir inicia o compartilhamento em {name}', + 'pfx_screens.turn_on_sharing': 'Ative o compartilhamento em {name}', + 'pfx_screens.ms_delay': 'atraso de {n} ms', + 'pfx_screens.view_only': 'somente visualização', + 'pfx_screens.muted': 'sem som', + 'pfx_screens.extra_screen_extend': 'Tela extra · Estender', + 'pfx_screens.screen_mirror': '{name} · Espelhar', + 'pfx_screens.this_screen': 'Esta tela', + 'pfx_screens.of_cap_mbps': 'de {n} Mbps', + 'pfx_screens.starting': 'Iniciando', + 'pfx_screens.connecting': 'Conectando', + 'pfx_screens.adding_virtual_display': 'Adicionando a tela virtual…', + 'pfx_screens.starts_when_opens': 'Começa quando {name} abrir', + 'pfx_screens.connecting_to': 'Conectando a {name}', + 'pfx_screens.sound': 'som', + 'pfx_screens.input_from': 'entrada de {name}', + 'pfx_screens.remote_start': 'início remoto', + 'pfx_screens.gauge_network': '{n} de {cap} Mbps · rede {net}', + 'pfx_screens.gauge': '{n} de {cap} Mbps', + 'pfx_screens.unit_app': 'aplicativo', + 'pfx_screens.unit_apps': 'aplicativos', + 'pfx_screens.loading': 'Carregando', + 'pfx_screens.no_apps': 'Nenhum aplicativo', + 'pfx_screens.opening_here_off': 'Abri-los aqui está desativado', + 'pfx_screens.each_opens_here': 'Cada um abre em uma janela própria aqui', + 'pfx_screens.open_here': 'Abertos aqui', + 'pfx_screens.sharing_yours_off': 'O compartilhamento dos seus está desativado', + 'pfx_screens.windows_on_name': '{windows} em {name}', + 'pfx_screens.yours_can_open': 'Os seus podem abrir lá', + 'pfx_screens.shown_of_total': '{shown} de {total}', + 'pfx_screens.unit_window': 'janela', + 'pfx_screens.unit_windows': 'janelas', + 'pfx_screens.wireless_debugging_once': 'Depuração sem fio, uma vez, em Conexão', + 'pfx_screens.connecting_to_phone': 'Conectando ao telefone…', + 'pfx_screens.show_phone_screen_opens': 'Mostrar Tela do Telefone abre aqui', + 'pfx_screens.phone_screen_open_here': 'A tela do telefone, aberta aqui', + 'pfx_screens.phone_camera_open_here': 'A câmera do telefone, aberta aqui', + 'pfx_screens.app_open_here': '{app}, aberto aqui', + 'pfx_screens.an_app': 'Um aplicativo', + 'pfx_screens.pct_charging': '{n}% carregando', + 'pfx_screens.sound_on': 'som ativado', + 'pfx_screens.unit_of_n': 'de {n}', + 'pfx_screens.app_drawer': 'Gaveta de aplicativos', + 'pfx_screens.each_opens_own_window': 'Cada um abre em uma janela própria', + 'pfx_screens.needs_wireless_debugging': 'Precisa de depuração sem fio', + 'pfx_screens.in_windows': 'Em janelas', + 'pfx_sharing.clipboard_between': 'Área de transferência entre os seus computadores', + 'pfx_sharing.nothing_copied': 'Nada copiado ainda', + 'pfx_sharing.copy_it_again': 'Copiar de novo', + 'pfx_sharing.copy_latest_again': 'Copiar o item mais recente de novo', + 'pfx_sharing.latest_to': 'Último · para {name}', + 'pfx_sharing.latest_from': 'Último · de {name}', + 'pfx_sharing.copied': 'Copiado', + 'pfx_sharing.clipboard_off_on': 'A área de transferência está desativada em {name}', + 'pfx_sharing.copies_still_go': 'As cópias continuam passando', + 'pfx_sharing.copy_either_paste_other': 'Copie em um, cole no outro', + 'pfx_sharing.copies_there_paste_here': 'O que for copiado em {name} é colado aqui', + 'pfx_sharing.copies_here_paste_there': 'O que for copiado aqui é colado em {name}', + 'pfx_sharing.both_directions_off': 'Os dois sentidos estão desativados', + 'pfx_sharing.on_switch': 'Ao alternar', + 'pfx_sharing.instant': 'Instantâneo', + 'pfx_sharing.not_sent_reason': 'Não enviado: {reason}', + 'pfx_sharing.off_lc': 'desativado', + 'pfx_sharing.shown_here': 'exibidas aqui', + 'pfx_sharing.sent_lc': 'enviadas', + 'pfx_sharing.quiet_new_land': 'Tudo quieto. As novas chegam aqui.', + 'pfx_sharing.text_hidden': 'Texto oculto', + 'pfx_sharing.cant_read_windows_list': 'Não é possível ler a lista do Windows', + 'pfx_sharing.cant_read_list': 'Não é possível ler a lista', + 'pfx_sharing.nothing_comes_in': 'Nada chega até {name} se conectar', + 'pfx_sharing.waiting_first_one': 'Aguardando a primeira', + 'pfx_sharing.receiving_off': 'O recebimento está desativado', + 'pfx_sharing.latest_what': 'Mais recente: {what}', + 'pfx_sharing.gets_your_files': 'Recebe os seus arquivos', + 'pfx_sharing.sending_off': 'Envio desativado', + 'pfx_sharing.takes_files': 'Aceita arquivos', + 'pfx_sharing.taking_off': 'Não aceita arquivos', + 'pfx_sharing.n_files_one': '{n} arquivo', + 'pfx_sharing.n_files_other': '{n} arquivos', + 'pfx_sharing.failed_error': 'Falhou: {error}', + 'pfx_sharing.file_token': 'ARQ', + 'pfx_sharing.i_of_n': '{i} de {n}', + 'pfx_sharing.pasting_to': 'Colando em {name}', + 'pfx_sharing.sending_to': 'Enviando para {name}', + 'pfx_sharing.mb_of_mb': '{sent} de {total}', + 'pfx_sharing.n_more_waiting': 'mais {n} aguardando', + 'pfx_sharing.copying_across_edge': 'Copiando pela borda', + 'pfx_sharing.dragging_across_edge': 'Arrastando pela borda', + 'pfx_sharing.into_folder': 'Em {folder}', + 'pfx_sharing.receiving_from': 'Recebendo de {name}', + 'pfx_sharing.connect_to_send': 'Conecte para enviar arquivos', + 'pfx_sharing.last_file': 'Último: {name} · {ago}', + 'pfx_sharing.sent_to': 'Enviado para {name}', + 'pfx_sharing.received_from': 'Recebido de {name}', + 'pfx_sharing.didnt_go_through': 'Não foi concluído', + 'pfx_sharing.ready_when_you_are': 'Pronto quando você estiver', + 'pfx_sharing.drop_files_below': 'Solte arquivos abaixo ou arraste-os pela borda da tela', + 'pfx_sharing.their_folder': 'Pasta de lá · {drive}', + 'pfx_sharing.folder_shared_open': 'Pasta compartilhada · aberta lá', + 'pfx_sharing.sharing_problem': 'Compartilhamento: problema', + 'pfx_sharing.folder_shared': 'Pasta compartilhada', + 'pfx_sharing.n_chosen': 'Escolhidos: {n}', + 'pfx_sharing.gb_free': 'GB livres', + 'pfx_sharing.needs_wifi': 'Precisa de Wi-Fi', + 'pfx_sharing.not_ready': 'Não está pronto', + 'pfx_sharing.cant_open_that': 'Não é possível abrir', + 'pfx_sharing.reading': 'Lendo…', + 'pfx_sharing.folders': 'pastas', + 'pfx_sharing.files': 'arquivos', + 'pfx_sharing.in_this_folder': 'nesta pasta', + 'pfx_sharing.waiting_all_files_access': 'Aguardando o acesso a Todos os arquivos', + 'pfx_sharing.getting_ready': 'Preparando {phone}', + 'pfx_sharing.over_bluetooth_browse': 'Por Bluetooth · conecte com Wi-Fi Direct para navegar', + 'pfx_sharing.opening_storage': 'Abrindo Armazenamento', + 'pfx_sharing.of_gb_used_in': 'de {total} GB · {pct}% usados · em {folder}', + 'pfx_sharing.capturing_into': 'Capturando em {name}', + 'pfx_sharing.importing_into': 'Importando para {name}', + 'pfx_sharing.phone_folder_open': 'Pasta do telefone aberta', + 'pfx_sharing.sharing_a_folder': 'Compartilhando uma pasta', + 'pfx_sharing.pct_charging': '{n}% · carregando', + 'pfx_sharing.this_pc': 'Este computador', + 'pfx_sharing.via': 'Via', + 'pfx_sharing.wireless': 'Sem fio', + 'pfx_sharing.mounted': 'Montada', + 'pfx_sharing.in_explorer_as': 'No Explorador de Arquivos como {letter}', + 'pfx_sharing.in_manager_as': 'No gerenciador de arquivos como {letter}', + 'pfx_sharing.in_your_manager': 'No seu gerenciador de arquivos', + 'pfx_sharing.needs_wifi_bt_no_drive': 'Precisa de Wi-Fi · o Bluetooth não consegue levar uma unidade', + 'pfx_sharing.wd_off_on_phone': 'A depuração sem fio está desativada no telefone', + 'pfx_sharing.unmounting': 'Desmontando…', + 'pfx_sharing.where_cable': '{where}, pelo cabo', + 'pfx_sharing.where_wireless': '{where}, por depuração sem fio', + 'pfx_sharing.ready_mount_this_pc': 'Pronto · Montar a exibe em Este computador', + 'pfx_sharing.ready_mount_manager': 'Pronto · Montar a exibe no gerenciador de arquivos', + 'pfx_support.offline': 'Sem conexão', + 'pfx_support.per_month': '/ mês', + 'pfx_support.cant_reach_tip_jar': 'não foi possível acessar o pote de gorjetas', + 'pfx_support.checkout_opened': 'pagamento aberto no seu navegador', + 'pfx_support.monthly_tip': 'gorjeta mensal', + 'pfx_support.one_time_tip': 'gorjeta única', + 'pfx_support.to_name_stripe': 'para {name} · pelo Stripe', + 'pfx_support.through_stripe': 'pelo Stripe', + 'pfx_support.copied_clipboard': 'copiado para a área de transferência', + 'pfx_support.opened_mail_app': 'aberto no seu aplicativo de e-mail', + 'pfx_support.just_your_words': 'só as suas palavras', + 'pfx_support.with_version_info': 'com a versão e informações do sistema', + 'pfx_support.contact_or_issue': 'contact@beyond-media.ai · ou uma issue no GitHub', + 'pfx_support.characters': 'caracteres', + 'sh_ui_support.nothing_about_computer': 'Nada sobre este computador: só a sua mensagem.', + 'sh_ui_support.nothing_about_computer_reply': 'Nada sobre este computador: só a sua mensagem e o seu endereço de resposta.', + 'camview.asking': 'Pedindo a câmera…', + 'camview.mirror_title': 'Mostrar como em um espelho' + }; +}); \ No newline at end of file diff --git a/shared/mesh-intro.js b/shared/mesh-intro.js index 7e0bd546..b6166c68 100644 --- a/shared/mesh-intro.js +++ b/shared/mesh-intro.js @@ -4,6 +4,7 @@ // MeshIntro.art() -> an element: devices, each one linked to every other // MeshIntro.confirm(onTurnOn) -> the popup (styled as pairpop.js's .pair-pop); Turn on calls onTurnOn (function () { + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); // Each device: [kind, x, y]. Lines join every pair, as the mesh does. const NODES = [['monitor', 110, 78], ['laptop', 320, 46], ['monitor', 530, 84], ['phone', 214, 196], ['laptop', 430, 200]]; @@ -28,7 +29,8 @@ wrap.className = 'mesh-art'; wrap.setAttribute('aria-hidden', 'true'); wrap.innerHTML = `${lines.join('')}${dots.join('')}${NODES.map((n) => device(...n)).join('')}` - + '

Every device linked to every other: one clipboard and one set of notifications for all, and the mouse and keyboard across all of them.

'; + + '

'; + wrap.querySelector('p').textContent = tr('sh_mesh_intro.every_device_linked', null, 'Every device linked to every other: one clipboard and one set of notifications for all, and the mouse and keyboard across all of them.'); return wrap; } @@ -45,15 +47,15 @@ pop.setAttribute('role', 'dialog'); pop.setAttribute('aria-modal', 'true'); const body = el('div', 'pop-body'); - const title = el('strong', '', 'Turn on Multi-device?'); + const title = el('strong', '', tr('sh_mesh_intro.turn_on_multi_device', null, 'Turn on Multi-device?')); body.append( title, - el('p', '', 'Mesh mode links three or more computers and phones at once: every device to every other.'), - el('p', '', 'If you connect only two devices, keep it off.'), - el('div', 'hint', 'DuoDesk restarts when you turn it on or off.'), + el('p', '', tr('sh_mesh_intro.mesh_links_three_more', null, 'Mesh mode links three or more computers and phones at once: every device to every other.')), + el('p', '', tr('sh_mesh_intro.only_two_keep_off', null, 'If you connect only two devices, keep it off.')), + el('div', 'hint', tr('multi.duodesk_restarts_when_you_turn', null, 'DuoDesk restarts when you turn it on or off.')), ); - const cancel = el('button', 'btn', 'Cancel'); - const ok = el('button', 'btn primary', 'Turn on'); + const cancel = el('button', 'btn', tr('pair.cancel', null, 'Cancel')); + const ok = el('button', 'btn primary', tr('multi.turn_on', null, 'Turn on')); const actions = el('div', 'banner-actions'); actions.append(cancel, ok); pop.append(body, actions); diff --git a/shared/pagefx/core.js b/shared/pagefx/core.js index 65af5eb1..7c55b050 100644 --- a/shared/pagefx/core.js +++ b/shared/pagefx/core.js @@ -18,6 +18,7 @@ (() => { if (window.PageFX) return; const UI = window.UI || {}; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const api = UI.api || window.macshare || {}; const html = document.documentElement; const pagesEl = document.getElementById('pages'); @@ -77,7 +78,7 @@ const session = isPhone(s); if (!c && !session) return null; const info = ph.info || {}; - const name = (c && c.name) || (session && ((s.peer && s.peer.name) || (s.client && s.client.name) || s.link && s.link.macName)) || safe(() => UI.phoneName(s), '') || 'Phone'; + const name = (c && c.name) || (session && ((s.peer && s.peer.name) || (s.client && s.client.name) || s.link && s.link.macName)) || safe(() => UI.phoneName(s), '') || tr('nav.phone', null, 'Phone'); const rtt = num(c && (c.rttMs != null ? c.rttMs : c.rtt)) ?? (session ? num(get(s, 'link.rtt')) ?? num(get(s, 'client.rttMs')) : null); return { id: (c && c.id) || null, name, usb: !!(c && c.usb), rtt, session, @@ -121,7 +122,7 @@ return (s.peer && s.peer.os) || (s.client && s.client.os) || (mp && mp.os) || (s.paired && !Array.isArray(s.paired) && s.paired.os) || (p0 && p0.os) || null; } - const myName = (s) => (s && ((s.device && s.device.name) || s.macName)) || safe(() => UI.peer(s).me, '') || 'This computer'; + const myName = (s) => (s && ((s.device && s.device.name) || s.macName)) || safe(() => UI.peer(s).me, '') || tr('general.this_computer', null, 'This computer'); // Round trip in ms of the link the pages are about; null when not linked or unknown. function rtt(s) { if (!linked(s)) return null; @@ -161,7 +162,7 @@ if (!s) return out; const add = (d) => { if (d && d.name && !out.some((x) => (d.id && x.id === d.id) || (x.kind === d.kind && x.name === d.name))) out.push(d); }; const ps = meshPeers(s); - if (ps) for (const p of ps) add({ id: p.id, name: p.name || 'Computer', os: p.os || 'win', kind: 'pc', live: peerLive(p), wait: p.state === 'connecting', rtt: num(p.rtt), selected: !!p.selected, paired: true }); + if (ps) for (const p of ps) add({ id: p.id, name: p.name || tr('aurora.computer', null, 'Computer'), os: p.os || 'win', kind: 'pc', live: peerLive(p), wait: p.state === 'connecting', rtt: num(p.rtt), selected: !!p.selected, paired: true }); if (s.link) { const st = s.link.state; const pr = s.paired && !Array.isArray(s.paired) ? s.paired : null; @@ -182,7 +183,7 @@ for (const d of list) { if (!d) continue; const on = !!(d.connected || d.state === 'connected' || (ph.connected && ph.connected.id === d.id)); - add({ id: d.id || null, name: d.name || 'Phone', os: 'android', kind: 'phone', live: on, wait: !!(ph.connecting && ph.connecting.id === d.id), rtt: on && pc ? pc.rtt : null, selected: on, paired: true, usb: !!(d.usb || (on && pc && pc.usb)) }); + add({ id: d.id || null, name: d.name || tr('nav.phone', null, 'Phone'), os: 'android', kind: 'phone', live: on, wait: !!(ph.connecting && ph.connecting.id === d.id), rtt: on && pc ? pc.rtt : null, selected: on, paired: true, usb: !!(d.usb || (on && pc && pc.usb)) }); } if (pc && pc.session) add({ id: pc.id, name: pc.name, os: 'android', kind: 'phone', live: true, wait: false, rtt: pc.rtt, selected: true, paired: true, usb: pc.usb }); return out; diff --git a/shared/pagefx/home.js b/shared/pagefx/home.js index 5c4b91a1..35e8cfda 100644 --- a/shared/pagefx/home.js +++ b/shared/pagefx/home.js @@ -19,12 +19,17 @@ const FX = window.PageFX; if (!FX) return; const G = FX.get; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const num = (v) => (typeof v === 'number' && isFinite(v) ? v : null); const arr = (v) => (Array.isArray(v) ? v : []); const clamp = (v, a, b) => Math.max(a, Math.min(b, v)); const titleOf = (wrap) => { const t = wrap && wrap.querySelector(':scope > .card-title > span:first-child'); return t ? t.textContent.trim() : ''; }; - const wrapByTitle = (body, re) => (body ? [...body.querySelectorAll('.card-wrap')].find((w) => re.test(titleOf(w))) : null) || null; - const rowByLabel = (root, re) => (root ? [...root.querySelectorAll('.row')].find((r) => { const l = r.querySelector(':scope > .text > .label'); return l && re.test(l.textContent.trim()); }) : null) || null; + // The page is in the user's language: a title / label counts when the English pattern hits or when it is the + // page's own translated text (key + English default), a control by its aria-label the same way. + const sameT = (text, key, en) => !!key && String(text || '').trim().toLowerCase() === String(tr(key, null, en)).toLowerCase(); + const wrapByTitle = (body, re, key, en) => (body ? [...body.querySelectorAll('.card-wrap')].find((w) => re.test(titleOf(w)) || sameT(titleOf(w), key, en)) : null) || null; + const rowByLabel = (root, re, key, en) => (root ? [...root.querySelectorAll('.row')].find((r) => { const l = r.querySelector(':scope > .text > .label'); return l && (re.test(l.textContent.trim()) || sameT(l.textContent, key, en)); }) : null) || null; + const byAria = (root, sel, key, en) => (root ? [...root.querySelectorAll(sel)].find((i) => { const a = i.getAttribute('aria-label'); return a === en || a === tr(key, null, en); }) : null) || null; const hexLum = (hex) => { const m = String(hex || '').match(/^#([0-9a-f]{3}|[0-9a-f]{6})/i); if (!m) return 0; @@ -74,17 +79,18 @@ if (V && V.h === h) return V; h.replaceChildren(); // round trip: the figure + const rttK = el('span'); const viaT = el('span'); const rttN = el('span'); const rttFig = el('div', 'pg-fig', [rttN, el('small', null, 'ms')]); - const rtt = col(ctx, 'pg-v-rtt', [el('div', 'pg-kick', [el('span', null, 'Round trip · '), viaT]), rttFig]); + const rtt = col(ctx, 'pg-v-rtt', [el('div', 'pg-kick', [rttK, viaT]), rttFig]); // the heartbeat: a grey hairline, one accent pulse that walks it and rests const trace = svg('path', { class: 'pg-v-trace', d: beatPath(600), pathLength: '1' }); const base = svg('path', { class: 'pg-v-base', d: beatPath(600), pathLength: '1' }); const beatSvg = svgRoot('0 0 600 40', 'pg-v-svg', [base, trace], { preserveAspectRatio: 'xMidYMid meet' }); const pulse = el('div', 'pg-v-pulse', [beatSvg]); // battery: figure + hairline meter - const battK = el('div', 'pg-kick', 'Battery'); + const battK = el('div', 'pg-kick'); const battN = el('span'); const meter = el('div', 'pg-meter', [el('i')]); const batt = col(ctx, 'pg-v-batt', [battK, el('div', 'pg-fig pg-v-small', [battN, el('small', null, '%')]), meter]); @@ -99,16 +105,16 @@ h.append(rtt, pulse, vr1, batt, vr2, now); [rtt, pulse, batt, now].forEach((e, i) => { e.classList.add('pg-stagger'); ctx.css(e, '--i', i); }); try { new ResizeObserver((es) => { const r = es[0] && es[0].contentRect; if (r && r.width) fitBeat(ctx, r.width); }).observe(pulse); } catch (e) { /* stays 600 wide */ } - V = { h, viaT, rttN, rtt, pulse, svg: beatSvg, base, trace, beatW: 0, battK, battN, meter, batt, vr1, vr2, nowK, nowEq, nowT, nowSub, now }; + V = { h, rttK, viaT, rttN, rtt, pulse, svg: beatSvg, base, trace, beatW: 0, battK, battN, meter, batt, vr1, vr2, nowK, nowEq, nowT, nowSub, now }; return V; } function tagCards(page) { const two = page.querySelector('.dv-two'); if (two && !two._pgTagged) { - const map = [[/notification/i, 'notifs'], [/clipboard/i, 'clip'], [/most used|apps/i, 'apps'], [/send files|files/i, 'drop']]; + const map = [[/notification/i, 'notifs', 'device.latest_notifications', 'Latest notifications'], [/clipboard/i, 'clip', 'device.clipboard', 'Clipboard'], [/most used|apps/i, 'apps', 'device.most_used', 'Most used'], [/send files|files/i, 'drop', 'device.send_files', 'Send files']]; let n = 0; for (const w of two.querySelectorAll('.card-wrap')) { - const hit = map.find(([re]) => re.test(titleOf(w))); + const hit = map.find(([re, , key, en]) => re.test(titleOf(w)) || sameT(titleOf(w), key, en)); if (hit && !w.dataset.pg) { w.dataset.pg = hit[1]; n++; } } if (n) two._pgTagged = true; @@ -165,18 +171,18 @@ const x = p.x; ctx.cls(V.nowEq, 'pg-gone', p.k !== 'm'); ctx.cls(V.nowEq, 'paused', p.k === 'm' && !x.playing); - const peer = G.peerName(s) || 'the other device'; + const peer = G.peerName(s) || tr('start.the_other_device', null, 'the other device'); if (p.k === 'm') { - ctx.text(V.nowK, x.playing ? 'Now playing' : 'Paused'); + ctx.text(V.nowK, x.playing ? tr('general.now_playing', null, 'Now playing') : tr('pfx_home.paused', null, 'Paused')); ctx.text(V.nowT, x.title); ctx.text(V.nowSub, x.artist || x.appName || ''); } else if (p.k === 'n') { - ctx.text(V.nowK, 'Notification'); - ctx.text(V.nowT, x.title || x.appName || x.app || 'Notification'); + ctx.text(V.nowK, tr('notifs.notification', null, 'Notification')); + ctx.text(V.nowT, x.title || x.appName || x.app || tr('notifs.notification', null, 'Notification')); ctx.text(V.nowSub, [x.appName || x.app, G.ago(x.at)].filter(Boolean).join(' · ')); } else { - ctx.text(V.nowK, 'Clipboard'); - ctx.text(V.nowT, x.image ? (x.dir === 'out' ? 'Picture sent' : 'Picture received') : (x.dir === 'out' ? 'Copied to ' : 'Copied from ') + peer); + ctx.text(V.nowK, tr('clipboard.title', null, 'Clipboard')); + ctx.text(V.nowT, x.image ? (x.dir === 'out' ? tr('pfx_home.picture_sent', null, 'Picture sent') : tr('pfx_home.picture_received', null, 'Picture received')) : (x.dir === 'out' ? tr('pfx_home.copied_to', { name: peer }, 'Copied to {name}') : tr('pfx_home.copied_from', { name: peer }, 'Copied from {name}'))); ctx.text(V.nowSub, G.ago(x.at)); } ctx.attr(V.now, 'data-k', p.k); @@ -201,6 +207,7 @@ if (!on) { primed = false; return; } // round trip and the beat: a slower link walks the line more slowly (3.5–7 s, then rests) const rtt = G.rtt(s); + ctx.text(V.rttK, tr('kit.round_trip', null, 'Round trip') + ' · '); ctx.text(V.viaT, G.via(s)); ctx.cls(V.h, 'no-rtt', rtt == null); ctx.count(V.rttN, rtt); @@ -215,7 +222,7 @@ ctx.css(V.meter, '--v', (lvl / 100).toFixed(3)); ctx.cls(V.batt, 'low', lvl <= 20 && !b.charging); ctx.cls(V.batt, 'charging', !!b.charging); - ctx.text(V.battK, b.charging ? 'Charging' : 'Battery'); + ctx.text(V.battK, b.charging ? tr('device.charging', null, 'Charging') : tr('pfx_home.battery', null, 'Battery')); } // now const p = pickNow(s); @@ -252,12 +259,13 @@ if (!h) return null; if (R && R.h === h) return R; h.replaceChildren(); + const deskK = el('div', 'pg-kick'); const name = el('div', 'pg-fig pg-rd-name'); const addr = el('div', 'pg-rd-addr pg-mono'); const dot = el('span', 'pg-dot'); const cap = el('span', 'pg-rd-cap'); const code = el('span', 'pg-rd-code pg-mono'); - const info = col(ctx, 'pg-rd-info pg-stagger', [el('div', 'pg-kick', 'This desk'), name, addr, el('div', 'pg-row pg-rd-status', [dot, cap, code])]); + const info = col(ctx, 'pg-rd-info pg-stagger', [deskK, name, addr, el('div', 'pg-row pg-rd-status', [dot, cap, code])]); const beams = svg('g', { class: 'pg-rd-beams' }); const grid = [36, 60, 84].map((r, i) => svg('ellipse', { class: 'pg-rd-grid', cx: '0', cy: '0', rx: String(r * RX), ry: String(r * RY), pathLength: '1', data: { i, r } })); const plot = svg('svg', { class: 'pg-rd-plot', width: '1', height: '1', 'aria-hidden': 'true', focusable: 'false' }, [...grid, beams]); @@ -266,7 +274,7 @@ const layer = el('div', 'pg-rd-blips'); const field = el('div', 'pg-rd-field pg-stagger', [ring, plot, me, layer], { css: { '--i': 1 } }); h.append(info, field); - R = { h, name, addr, dot, cap, code, beams, me, layer, field, grid, ring, blips: new Map(), beam: null }; + R = { h, deskK, name, addr, dot, cap, code, beams, me, layer, field, grid, ring, blips: new Map(), beam: null }; const fit = (w, hgt) => { const rx = Math.round(clamp((w / 2 - 36) / 84, 1.3, 2.3) * 20) / 20; const ry = Math.round(clamp((hgt / 2 - 21) / 84, 0.3, 0.5) * 100) / 100; @@ -309,9 +317,9 @@ if (after && !after.dataset.pg && after.matches('.card-wrap')) after.dataset.pg = 'adb'; for (const c of kids) { if (c.dataset.pg) continue; - if (c.querySelector('.value.addr, input[aria-label="Address"]')) c.dataset.pg = 'addr'; - else if (/found|nearby/i.test(titleOf(c))) c.dataset.pg = 'found'; - else if (/paired/i.test(titleOf(c))) c.dataset.pg = 'paired'; + if (c.querySelector('.value.addr') || byAria(c, 'input', 'overview.address_aria', 'Address')) c.dataset.pg = 'addr'; + else if (/found|nearby/i.test(titleOf(c)) || sameT(titleOf(c), 'overview.found_nearby', 'Found nearby')) c.dataset.pg = 'found'; + else if (/paired/i.test(titleOf(c)) || sameT(titleOf(c), 'overview.paired', 'Paired')) c.dataset.pg = 'paired'; else if (c.querySelector('.qr-box')) c.dataset.pg = 'qr'; } if (!body.querySelector('[data-pg="found"]') && kids[1] && !kids[1].dataset.pg) kids[1].dataset.pg = 'found'; @@ -361,18 +369,19 @@ const fw = s.firewall || {}; const blocked = disc.on === false || (fw.ok === false && !fw.checking); // the typographic column + ctx.text(R.deskK, tr('pfx_home.this_desk', null, 'This desk')); ctx.text(R.name, G.myName(s)); const addrs = arr(s.addresses); - ctx.text(R.addr, addrs[0] || s.address || 'No network'); + ctx.text(R.addr, addrs[0] || s.address || tr('overview.no_network', null, 'No network')); const pairing = s.pairing && s.pairing.role !== 'host' ? s.pairing : null; let st = 'off'; let capT; - if (blocked) { st = 'bad'; capT = 'Can’t look on this network'; } - else if (linkState === 'identity_changed') { st = 'bad'; capT = 'Identity changed: pair again'; } - else if (connected) { st = 'on'; capT = 'Linked with ' + (G.peerName(s) || 'a device'); } - else if (pairing) { st = pairing.phase === 'failed' ? 'bad' : 'busy'; capT = pairing.phase === 'code' ? 'Same code on both?' : pairing.phase === 'failed' ? 'Pairing didn’t finish' : 'Pairing…'; } - else if (found.length) { capT = found.length + (found.length === 1 ? ' device nearby' : ' devices nearby'); } - else { st = 'busy'; capT = 'Looking…'; } + if (blocked) { st = 'bad'; capT = tr('pfx_home.cant_look_network', null, 'Can’t look on this network'); } + else if (linkState === 'identity_changed') { st = 'bad'; capT = tr('pfx_home.identity_changed', null, 'Identity changed: pair again'); } + else if (connected) { st = 'on'; capT = G.peerName(s) ? tr('pfx_home.linked_with', { name: G.peerName(s) }, 'Linked with {name}') : tr('pfx_home.linked_with_device', null, 'Linked with a device'); } + else if (pairing) { st = pairing.phase === 'failed' ? 'bad' : 'busy'; capT = pairing.phase === 'code' ? tr('pfx_home.same_code', null, 'Same code on both?') : pairing.phase === 'failed' ? tr('pfx_home.pairing_failed', null, 'Pairing didn’t finish') : tr('overview.pairing', null, 'Pairing…'); } + else if (found.length) { capT = found.length === 1 ? tr('pfx_home.devices_nearby_one', { n: found.length }, '{n} device nearby') : tr('pfx_home.devices_nearby_other', { n: found.length }, '{n} devices nearby'); } + else { st = 'busy'; capT = tr('overview.looking', null, 'Looking…'); } ctx.attr(R.dot, 'data-st', st); ctx.text(R.cap, capT); // the pairing code, large and mono, read-only ("Codes match" stays in the row) @@ -404,7 +413,7 @@ const dy = Math.round(r * RY * Math.sin(a)); ctx.css(b.node, { '--dx': dx + 'px', '--dy': dy + 'px' }); ctx.cls(b.node, 'above', dy < 0); - ctx.text(b.nm, dev.name || 'Device'); + ctx.text(b.nm, dev.name || tr('pfx_home.device', null, 'Device')); ctx.attr(b.node, 'title', dev.name || null); const live = dev.live || (liveId && dev.id === liveId); const target = !!pairing && (pairing.id ? pairing.id === dev.id : !!(pairing.address && pairing.address === dev.address)); @@ -453,7 +462,7 @@ const big = el('span'); const capT = el('span', 'pg-cs-cap'); const sub = el('div', 'pg-cs-sub'); - const kick = el('div', 'pg-kick', 'Mesh preview'); + const kick = el('div', 'pg-kick'); const info = col(ctx, 'pg-cs-info pg-stagger', [kick, el('div', 'pg-row pg-cs-line', [el('div', 'pg-fig', [big]), capT]), sub]); const links = svg('g', { class: 'pg-cs-links' }); const pulse = svg('line', { class: 'pg-cs-pulse' }); @@ -491,8 +500,8 @@ for (const p of arr(s.paired)) if (p) add(p.id, p.name || p.macName, p.os || (isClient(p) && cl.os), isClient(p)); for (const g of arr(s.guests)) if (g) add(g.id, g.name || g.macName, g.os, g.id && g.id === peerId); for (const p of arr(s.peers)) if (p) add(p.id, p.name, p.os, p.connected || p.state === 'connected'); - for (const d of arr(G.get(s, 'phone.nearby'))) if (d) add(d.id, d.name || 'Phone', 'android', d.id && d.id === phoneId); - if (G.get(s, 'phone.connected')) add(phoneId, G.get(s, 'phone.connected.name', 'Phone'), 'android', true); + for (const d of arr(G.get(s, 'phone.nearby'))) if (d) add(d.id, d.name || tr('nav.phone', null, 'Phone'), 'android', d.id && d.id === phoneId); + if (G.get(s, 'phone.connected')) add(phoneId, G.get(s, 'phone.connected.name', tr('nav.phone', null, 'Phone')), 'android', true); for (const d of arr(s.found)) if (d) add(d.id, d.name, d.os, d.id && d.id === peerId); if (cl && !out.some((d) => d.live && d.os !== 'android')) add(cl.id, cl.name, cl.os, true); if (peerId && s.peer && !out.some((d) => d.live && d.os !== 'android')) add(peerId, s.peer.name, s.peer.os, true); @@ -596,11 +605,11 @@ const mesh = Array.isArray(s.peers); const live = devs.filter((d) => d.live).length; ctx.count(M.big, n, { ms: 600 }); - ctx.text(M.kick, mesh ? 'Mesh' : 'Mesh preview'); - ctx.text(M.capT, mesh ? (n === 1 ? 'device in the mesh' : 'devices in the mesh') : n === 1 ? 'device could join' : 'devices could join'); - ctx.text(M.sub, M.restarting ? (mesh ? 'Restarting…' : 'Restarting into mesh mode…') - : mesh ? (n ? live + ' connected now' : 'Pair devices first; they show up here') - : n ? 'One clipboard and one set of notifications for all of them' : 'Pair devices first; they show up here'); + ctx.text(M.kick, mesh ? tr('pfx_home.mesh', null, 'Mesh') : tr('pfx_home.mesh_preview', null, 'Mesh preview')); + ctx.text(M.capT, mesh ? (n === 1 ? tr('pfx_home.device_in_mesh', null, 'device in the mesh') : tr('pfx_home.devices_in_mesh', null, 'devices in the mesh')) : n === 1 ? tr('pfx_home.device_could_join', null, 'device could join') : tr('pfx_home.devices_could_join', null, 'devices could join')); + ctx.text(M.sub, M.restarting ? (mesh ? tr('multi.restarting', null, 'Restarting…') : tr('pfx_home.restarting_mesh', null, 'Restarting into mesh mode…')) + : mesh ? (n ? (live === 1 ? tr('pfx_home.connected_now_one', { n: live }, '{n} connected now') : tr('pfx_home.connected_now_other', { n: live }, '{n} connected now')) : tr('pfx_home.pair_first', null, 'Pair devices first; they show up here')) + : n ? tr('pfx_home.one_clipboard_all', null, 'One clipboard and one set of notifications for all of them') : tr('pfx_home.pair_first', null, 'Pair devices first; they show up here')); ctx.cls(M.h, 'empty', !n); }, leave() { if (!M) return; if (M.walking) M.walking(); M.walking = null; FX.css(M.pulse, 'opacity', 0); }, @@ -613,42 +622,46 @@ (function general() { let Gx = null; const LAMPS = [ - ['fw', 'Firewall', (s) => { const f = s.firewall; if (!f) return null; return f.checking ? ['busy', 'Checking…'] : f.ok ? ['good', 'OK'] : f.ok === false ? ['bad', 'Needs a fix'] : ['busy', 'Unknown']; }], - ['helper', 'Helper', (s) => { const k = s.kvmState; if (!k || !('helper' in k)) return null; const h = k.helper; return !h ? ['good', 'Running'] : h === 'starting' ? ['busy', 'Starting…'] : ['bad', 'Not running']; }], - ['bt', 'Bluetooth', (s) => { const n = s.net; if (!n || !('radio' in n)) return null; const r = n.radio; return r === 'off' ? ['bad', 'Off'] : r === 'unsupported' ? ['bad', 'No LE'] : r ? ['good', 'On'] : ['off', 'Unknown']; }], - ['vdd', 'Display driver', (s) => { const v = s.pcScreen && s.pcScreen.vdd; if (!v) return null; return !v.checked ? ['busy', 'Checking…'] : v.busy ? ['busy', v.busy === 'remove' ? 'Removing…' : 'Installing…'] : v.installed ? ['good', 'Installed'] : ['bad', 'Not installed']; }], - ['start', 'Startup', (s) => (typeof s.startup !== 'boolean' ? null : s.startup ? ['good', 'On'] : ['off', 'Off'])], + ['fw', () => tr('general.firewall', null, 'Firewall'), (s) => { const f = s.firewall; if (!f) return null; return f.checking ? ['busy', tr('general.checking', null, 'Checking…')] : f.ok ? ['good', tr('general.ok', null, 'OK')] : f.ok === false ? ['bad', tr('general.needs_a_fix', null, 'Needs a fix')] : ['busy', tr('general.unknown', null, 'Unknown')]; }], + ['helper', () => tr('pfx_home.lamp_helper', null, 'Helper'), (s) => { const k = s.kvmState; if (!k || !('helper' in k)) return null; const h = k.helper; return !h ? ['good', tr('general.running', null, 'Running')] : h === 'starting' ? ['busy', tr('general.starting', null, 'Starting…')] : ['bad', tr('general.not_running', null, 'Not running')]; }], + ['bt', () => tr('connections.bt', null, 'Bluetooth'), (s) => { const n = s.net; if (!n || !('radio' in n)) return null; const r = n.radio; return r === 'off' ? ['bad', tr('general.off', null, 'Off')] : r === 'unsupported' ? ['bad', tr('pfx_home.no_le', null, 'No LE')] : r ? ['good', tr('general.on', null, 'On')] : ['off', tr('general.unknown', null, 'Unknown')]; }], + ['vdd', () => tr('pfx_home.lamp_display_driver', null, 'Display driver'), (s) => { const v = s.pcScreen && s.pcScreen.vdd; if (!v) return null; return !v.checked ? ['busy', tr('general.checking', null, 'Checking…')] : v.busy ? ['busy', v.busy === 'remove' ? tr('pfx_home.removing', null, 'Removing…') : tr('general.installing', null, 'Installing…')] : v.installed ? ['good', tr('general.installed', null, 'Installed')] : ['bad', tr('general.not_installed', null, 'Not installed')]; }], + ['start', () => tr('general.startup', null, 'Startup'), (s) => (typeof s.startup !== 'boolean' ? null : s.startup ? ['good', tr('general.on', null, 'On')] : ['off', tr('general.off', null, 'Off')])], ]; function rowFor(page, k) { const body = page.querySelector(':scope > .page-body'); if (!body) return null; const near = (sel) => { const e = body.querySelector(sel); return e ? e.closest('.row') : null; }; switch (k) { - case 'fw': return rowByLabel(body, /^firewall$/i) || [...body.querySelectorAll('.row .btn')].map((b) => /check again/i.test(b.textContent) && b.closest('.row')).find(Boolean) || null; - case 'helper': return rowByLabel(body, /helper/i); - case 'bt': return near('input.switch[aria-label="Bluetooth with phones"]') || rowByLabel(body, /^bluetooth/i); - case 'vdd': return rowByLabel(body, /display driver/i); - case 'start': return near('input.switch[aria-label^="Start with"]') || near('input.switch[aria-label*="login" i]') || rowByLabel(body, /^start (with|at)/i); + case 'fw': return rowByLabel(body, /^firewall$/i, 'general.firewall', 'Firewall') || [...body.querySelectorAll('.row .btn')].map((b) => (/check again/i.test(b.textContent) || sameT(b.textContent, 'general.check_again', 'Check again')) && b.closest('.row')).find(Boolean) || null; + case 'helper': return rowByLabel(body, /helper/i, 'general.mouse_and_keyboard_helper', 'Mouse and keyboard helper'); + case 'bt': { const sw = byAria(body, 'input.switch', 'overview.ble_phones', 'Bluetooth with phones'); return (sw && sw.closest('.row')) || rowByLabel(body, /^bluetooth/i, 'overview.ble_phones', 'Bluetooth with phones'); } + case 'vdd': return rowByLabel(body, /display driver/i, 'general.virtual_display_driver', 'Virtual display driver'); + case 'start': { + const sw = [...body.querySelectorAll('input.switch')].find((i) => { const a = i.getAttribute('aria-label') || ''; return /^Start with|login/i.test(a) || sameT(a, 'general.start_with_windows', 'Start with Windows') || sameT(a, 'general.open_at_login', 'Open at login'); }); + return (sw && sw.closest('.row')) || rowByLabel(body, /^start (with|at)/i, 'general.start_with_windows', 'Start with Windows') || rowByLabel(body, /^start (with|at)/i, 'general.open_at_login', 'Open at login'); + } default: return null; } } function build(ctx) { const { el } = ctx; - const h = ctx.hdr({ cls: 'pg-gauges', interactive: true, label: 'Status of this computer' }); + const h = ctx.hdr({ cls: 'pg-gauges', interactive: true, label: tr('pfx_home.status_of_computer', null, 'Status of this computer') }); if (!h) return null; if (Gx && Gx.h === h) return Gx; h.replaceChildren(); const lamps = LAMPS.map(([k, label], i) => { + const lbl = el('span', null, label()); const dot = el('span', 'pg-dot'); const val = el('span', 'pg-g-val pg-mono'); - const btn = el('button', 'pg-lamp pg-stagger', [el('span', 'pg-g-lbl', [dot, el('span', null, label)]), val], { data: { k }, css: { '--i': i + 1 } }); + const btn = el('button', 'pg-lamp pg-stagger', [el('span', 'pg-g-lbl', [dot, lbl]), val], { data: { k }, css: { '--i': i + 1 } }); btn.addEventListener('click', () => { const row = rowFor(ctx.page, k); if (!row) return; try { row.scrollIntoView({ block: 'center', behavior: FX.reduced() ? 'auto' : 'smooth' }); } catch (e) { row.scrollIntoView(); } ctx.pop(row, 'pg-flash', 1400); }); - return { k, label, btn, dot, val }; + return { k, label, btn, dot, val, lbl }; }); const sumT = el('div', 'pg-fig pg-g-sumt'); const sumSub = el('div', 'pg-kick pg-g-sumsub'); @@ -658,14 +671,14 @@ return Gx; } function ensureMap(page) { - const sw = page.querySelector('input.switch[aria-label="Quick actions"]'); - const wrap = (sw && sw.closest('.card-wrap')) || wrapByTitle(page, /^overview$/i); + const sw = byAria(page, 'input.switch', 'general.quick_actions', 'Quick actions'); + const wrap = (sw && sw.closest('.card-wrap')) || wrapByTitle(page, /^overview$/i, 'nav.overview', 'Overview'); if (!wrap) return null; let map = wrap.querySelector(':scope > .pg-ovmap'); if (!map) { const blk = (k) => FX.el('i', null, null, { data: { k } }); const frame = FX.el('div', 'pg-ovmap-frame', ['hero', 'media', 'qs', 'notifs', 'clipboard', 'apps', 'files'].map(blk)); - const txt = FX.el('div', 'pg-ovmap-txt', [FX.el('span', 'pg-ovmap-n pg-mono'), FX.el('span', 'pg-ovmap-sub', 'What the Overview shows. Each part is drawn while it’s on.')]); + const txt = FX.el('div', 'pg-ovmap-txt', [FX.el('span', 'pg-ovmap-n pg-mono'), FX.el('span', 'pg-ovmap-sub')]); map = FX.el('div', 'pg-ovmap', [frame, txt], { 'aria-hidden': 'true' }); const card = wrap.querySelector(':scope > .card'); wrap.insertBefore(map, card || null); @@ -682,6 +695,7 @@ }, update(s, page, ctx) { if (!build(ctx)) return; + ctx.attr(Gx.h, 'aria-label', tr('pfx_home.status_of_computer', null, 'Status of this computer')); let bad = 0; let shown = 0; let busy = 0; @@ -696,11 +710,13 @@ ctx.attr(l.btn, 'data-st', st); ctx.attr(l.dot, 'data-st', st === 'good' ? 'good' : st === 'busy' ? 'busy' : st === 'bad' ? 'bad' : 'off'); ctx.text(l.val, txt); - ctx.attr(l.btn, 'aria-label', l.label + ': ' + txt + (l.btn.disabled ? '' : '. Go to the setting')); + const name = l.label(); + ctx.text(l.lbl, name); + ctx.attr(l.btn, 'aria-label', l.btn.disabled ? tr('pfx_home.lamp_aria', { label: name, value: txt }, '{label}: {value}') : tr('pfx_home.lamp_aria_go', { label: name, value: txt }, '{label}: {value}. Go to the setting')); }); ctx.attr(Gx.sum, 'data-st', bad ? 'bad' : busy ? 'busy' : 'good'); - ctx.text(Gx.sumT, bad ? bad + (bad === 1 ? ' needs a fix' : ' need a fix') : busy ? 'Checking…' : 'All good'); - ctx.text(Gx.sumSub, shown + ' checks · ' + G.myName(s)); + ctx.text(Gx.sumT, bad ? (bad === 1 ? tr('pfx_home.needs_fix_one', { n: bad }, '{n} needs a fix') : tr('pfx_home.needs_fix_other', { n: bad }, '{n} need a fix')) : busy ? tr('general.checking', null, 'Checking…') : tr('pfx_home.all_good', null, 'All good')); + ctx.text(Gx.sumSub, tr('pfx_home.checks_line', { n: shown, name: G.myName(s) }, '{n} checks · {name}')); // the Overview mini-map const map = ensureMap(page); if (map) { @@ -714,7 +730,8 @@ ctx.cls(b, 'on', on); if (ctx.changed('ov:' + k, on) && was !== on) ctx.pop(b, 'pg-ov-flip', 600); } - ctx.text(map.querySelector('.pg-ovmap-n'), onN + ' of 6 on'); + ctx.text(map.querySelector('.pg-ovmap-n'), tr('pfx_home.n_of_6_on', { n: onN }, '{n} of 6 on')); + ctx.text(map.querySelector('.pg-ovmap-sub'), tr('pfx_home.ovmap_sub', null, 'What the Overview shows. Each part is drawn while it’s on.')); } }, }); @@ -777,8 +794,8 @@ } function cores(page, ctx, s) { const n = clamp(num(G.get(s, 'about.pc.cores')) || 0, 0, 32); - const wrap = wrapByTitle(page.querySelector(':scope > .page-body'), /this computer/i); - const row = (wrap && (rowByLabel(wrap, /processor|cpu|chip/i) || wrap.querySelectorAll('.card > .row')[3])) || null; + const wrap = wrapByTitle(page.querySelector(':scope > .page-body'), /this computer/i, 'general.this_computer', 'This computer'); + const row = (wrap && (rowByLabel(wrap, /processor|cpu|chip/i, 'about.processor', 'Processor') || wrap.querySelectorAll('.card > .row')[3])) || null; if (!row || row.hidden) return; const controls = row.querySelector(':scope > .controls'); if (!controls) return; @@ -811,10 +828,15 @@ const skipped = avail && !!(u.skipped || (u.skippedVersion && u.skippedVersion === u.latest)); let st = ''; let msg = ''; - if (u && u.checking) { st = 'busy'; msg = 'Checking for updates…'; } - else if (avail) { st = skipped ? 'off' : 'on'; msg = (u.latest || 'A new version') + (skipped ? ' skipped' : ' available'); } - else if (u && u.error) { st = 'off'; msg = 'Couldn’t check for updates'; } - else if (u && u.checkedAt) { st = ''; msg = 'Up to date'; } + if (u && u.checking) { st = 'busy'; msg = tr('pfx_home.checking_updates', null, 'Checking for updates…'); } + else if (avail) { + st = skipped ? 'off' : 'on'; + const v = { version: u.latest }; + msg = u.latest ? (skipped ? tr('pfx_home.version_skipped', v, '{version} skipped') : tr('pfx_home.version_available', v, '{version} available')) + : skipped ? tr('pfx_home.new_version_skipped', null, 'A new version skipped') : tr('pfx_home.new_version_available', null, 'A new version available'); + } + else if (u && u.error) { st = 'off'; msg = tr('pfx_home.couldnt_check_updates', null, 'Couldn’t check for updates'); } + else if (u && u.checkedAt) { st = ''; msg = tr('about.up_to_date', null, 'Up to date'); } ctx.text(A.chipT, [archShort, msg].filter(Boolean).join(' · ')); ctx.attr(A.chip, 'data-st', st || null); ctx.cls(A.chip, 'pg-gone', !archShort && !msg); diff --git a/shared/pagefx/input.js b/shared/pagefx/input.js index 8625a736..cbcdb208 100644 --- a/shared/pagefx/input.js +++ b/shared/pagefx/input.js @@ -23,6 +23,7 @@ const UI = window.UI || {}; const G = FX.get; const KG = window.KvmGeom || null; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const safe = (fn, d) => { try { const v = fn(); return v === undefined || v === null ? d : v; } catch (e) { return d; } }; const num = (v) => (typeof v === 'number' && isFinite(v) ? v : null); @@ -32,8 +33,8 @@ // Names as the pages say them (UI.peer), with the core's getters as the fallback (Mac, mesh). function names(s) { const p = safe(() => UI.peer(s), null) || {}; - const me = p.me || G.myName(s) || 'This computer'; - const name = p.name || G.peerName(s) || 'the other computer'; + const me = p.me || G.myName(s) || tr('general.this_computer', null, 'This computer'); + const name = p.name || G.peerName(s) || tr('kit.the_other_computer', null, 'the other computer'); return { me, name, Name: p.Name || capFirst(name), os: p.os || G.peerOs(s) || 'win' }; } const noPeer = (s) => document.body.classList.contains('no-peer') || !G.linked(s); @@ -247,12 +248,12 @@ c.css(v.h, '--pd-membrane', f1(1.5 + (res / 400) * 4) + 'px'); c.cls(v.h, 'has-res', res > 0); // Status line, the big numeral (pointer speed), the mono caption. - const where = { home: 'On ' + nm.me, driving: 'On ' + nm.name, driven: nm.Name + ' is using ' + nm.me }; - c.text(v.status, nop ? 'Not connected' : st === 'paused' ? 'Paused · over Bluetooth' : st === 'off' ? 'Sharing off' : (ks.locked ? 'Edges locked · ' : '') + where[mode]); + const where = { home: tr('pfx_input.on_name', { name: nm.me }, 'On {name}'), driving: tr('pfx_input.on_name', { name: nm.name }, 'On {name}'), driven: tr('pfx_input.is_using', { Name: nm.Name, me: nm.me }, '{Name} is using {me}') }; + c.text(v.status, nop ? tr('overview.not_connected', null, 'Not connected') : st === 'paused' ? tr('pfx_input.paused_bluetooth', null, 'Paused · over Bluetooth') : st === 'off' ? tr('pfx_input.sharing_off', null, 'Sharing off') : ks.locked ? tr('pfx_input.edges_locked', { where: where[mode] }, 'Edges locked · {where}') : where[mode]); c.attr(v.statusDot, 'data-on', !nop && (st === 'home' || st === 'driving' || st === 'driven' || st === 'locked') ? '1' : null); c.text(v.big, (num(k.speed) || 1).toFixed(2) + '×'); const rt = pcRtt(s); - c.text(v.cap, ['speed', res ? 'edge ' + res + ' px' : 'no edge', rt != null ? Math.round(rt) + ' ms' : null].filter(Boolean).join(' · ')); + c.text(v.cap, [tr('pfx_input.speed', null, 'speed'), res ? tr('pfx_input.edge_px', { n: res }, 'edge {n} px') : tr('pfx_input.no_edge', null, 'no edge'), rt != null ? Math.round(rt) + ' ms' : null].filter(Boolean).join(' · ')); // In the page: the crossing map's contact line takes the page accent (class only; it re-renders). const mapEl = page.querySelector('.kvm-map'); @@ -316,10 +317,10 @@ const mode = modeOf(ks); const toPeer = mode === 'driving'; c.attr(v.h, 'data-dest', toPeer ? 'peer' : 'me'); - c.text(v.big, nop ? 'Not connected' : toPeer ? nm.name : nm.me); - c.text(v.cap, nop ? 'keyboard stays here' : st === 'off' ? 'keyboard off' : st === 'cut' ? 'sharing paused' - : mode === 'driven' ? 'typing from ' + nm.name : toPeer ? 'keys go to' : 'typing here'); - c.text(v.hint, k.mouse ? 'follows the pointer' : 'double-tap ' + hk + (k.hotkeySwitch ? ' to switch' : '')); + c.text(v.big, nop ? tr('overview.not_connected', null, 'Not connected') : toPeer ? nm.name : nm.me); + c.text(v.cap, nop ? tr('pfx_input.keyboard_stays_here', null, 'keyboard stays here') : st === 'off' ? tr('pfx_input.keyboard_off', null, 'keyboard off') : st === 'cut' ? tr('pfx_input.sharing_paused', null, 'sharing paused') + : mode === 'driven' ? tr('pfx_input.typing_from', { name: nm.name }, 'typing from {name}') : toPeer ? tr('pfx_input.keys_go_to', null, 'keys go to') : tr('pfx_input.typing_here', null, 'typing here')); + c.text(v.hint, k.mouse ? tr('pfx_input.follows_pointer', null, 'follows the pointer') : k.hotkeySwitch ? tr('pfx_input.double_tap_switch', { key: hk }, 'double-tap {key} to switch') : tr('pfx_input.double_tap', { key: hk }, 'double-tap {key}')); // In the page: the hotkey select reads as a keycap (font and bevel only). const sel = page.querySelector('.card.keep-on select'); @@ -389,15 +390,15 @@ if (lastSt === 'using' && st !== 'using') { c.attr(v.h, 'data-fade', '1'); c.after(600, () => c.attr(v.h, 'data-fade', null)); } else if (st === 'using') c.attr(v.h, 'data-fade', null); lastSt = st; - const big = { off: 'Off', blocked: 'Unavailable', using: 'In use', open: 'Open', ready: 'Ready' }[st]; - c.text(v.big, pad.busy ? 'Setting up…' : live ? 'Gamepad' : big); - c.text(v.cap, !s.remote ? 'not available here' : live ? nm.name + ' as a controller' - : st === 'ready' ? 'open remote on ' + nm.name : nm.name + ' as a remote'); + const big = { off: tr('general.off', null, 'Off'), blocked: tr('pfx_input.unavailable', null, 'Unavailable'), using: tr('meshm_overview.in_use', null, 'In use'), open: tr('files.open', null, 'Open'), ready: tr('terminal.ready', null, 'Ready') }[st]; + c.text(v.big, pad.busy ? tr('files.setting_up', null, 'Setting up…') : live ? tr('remote.gamepad_card', null, 'Gamepad') : big); + c.text(v.cap, !s.remote ? tr('pfx_input.not_available_here', null, 'not available here') : live ? tr('pfx_input.as_controller', { name: nm.name }, '{name} as a controller') + : st === 'ready' ? tr('pfx_input.open_remote_on', { name: nm.name }, 'open remote on {name}') : tr('pfx_input.as_remote', { name: nm.name }, '{name} as a remote')); c.text(v.warn, r.allow && r.why ? clip(r.why, 60) : ''); v.warn.hidden = !(r.allow && r.why); - c.text(v.pad, pad.busy ? clip(pad.busy, 28) : pad.supported === false ? 'gamepad · not here' : !pad.on ? 'gamepad · off' : live ? 'gamepad · live' : 'gamepad · ready'); + c.text(v.pad, pad.busy ? clip(pad.busy, 28) : pad.supported === false ? tr('pfx_input.gamepad_not_here', null, 'gamepad · not here') : !pad.on ? tr('pfx_input.gamepad_off', null, 'gamepad · off') : live ? tr('pfx_input.gamepad_live', null, 'gamepad · live') : tr('pfx_input.gamepad_ready', null, 'gamepad · ready')); c.attr(v.pad, 'data-on', live ? '1' : null); - c.text(v.padName, clip(pad.name || 'Controller', 15)); + c.text(v.padName, clip(pad.name || tr('pfx_input.controller', null, 'Controller'), 15)); // In the page: the Now row gets one live dot; the gamepad card dims where there's no gamepad. const wraps = page.querySelectorAll(':scope > .page-body > .card-wrap'); @@ -475,22 +476,22 @@ c.text(v.title, clip(nm.me, 24) + ' — ' + clip(nm.name, 24)); const rt = pcRtt(s); c.text(v.rtt, rt != null ? Math.round(rt) + ' ms' : ''); - c.text(v.outHead, 'to ' + clip(nm.name, 24)); - c.text(v.inHead, 'from ' + clip(nm.name, 24)); + c.text(v.outHead, tr('pfx_input.to_name', { name: clip(nm.name, 24) }, 'to {name}')); + c.text(v.inHead, tr('pfx_input.from_name', { name: clip(nm.name, 24) }, 'from {name}')); const comment = (txt, cls) => [c.el('div', 'pd-line pd-comment ' + (cls || ''), [span(c, null, txt), span(c, 'pd-caret')])]; // Here → there: typed again only when what it says changes (not on every push). if (c.changed('out', [st, t.status, t.user, nm.name, t.command, t.message])) { let lines; - if (st === 'nopeer') lines = comment('# no connection'); - else if (st === 'ble') lines = comment('# needs Wi-Fi', 'warn'); - else if (t.status === 'off' || !t.enabled) lines = comment('# off'); + if (st === 'nopeer') lines = comment(tr('pfx_input.hash_no_connection', null, '# no connection')); + else if (st === 'ble') lines = comment(tr('pfx_input.hash_needs_wifi', null, '# needs Wi-Fi'), 'warn'); + else if (t.status === 'off' || !t.enabled) lines = comment(tr('pfx_input.hash_off', null, '# off')); else { const R = { - ready: [span(c, null, 'connected as '), span(c, 'pd-strong', (t.user || 'you') + '@' + clip(nm.name, 20))], - waiting: [span(c, null, 'asking ' + clip(nm.name, 22)), span(c, 'pd-ell', [c.el('i', null, '.'), c.el('i', null, '.'), c.el('i', null, '.')])], - no_mac: [span(c, 'pd-dim', 'waiting for ' + clip(nm.name, 22))], + ready: [span(c, null, tr('pfx_input.connected_as', null, 'connected as') + ' '), span(c, 'pd-strong', (t.user || tr('pfx_input.you', null, 'you')) + '@' + clip(nm.name, 20))], + waiting: [span(c, null, tr('pfx_input.asking_name', { name: clip(nm.name, 22) }, 'asking {name}')), span(c, 'pd-ell', [c.el('i', null, '.'), c.el('i', null, '.'), c.el('i', null, '.')])], + no_mac: [span(c, 'pd-dim', tr('pfx_input.waiting_for_name', { name: clip(nm.name, 22) }, 'waiting for {name}'))], }; - const reply = R[t.status] || [span(c, 'pd-bad', '✗ ' + msgShort(t.message || (t.status === 'unavailable' ? 'not available on ' + nm.name : 'problem')))]; + const reply = R[t.status] || [span(c, 'pd-bad', '✗ ' + msgShort(t.message || (t.status === 'unavailable' ? tr('pfx_input.not_available_on', { name: nm.name }, 'not available on {name}') : tr('pfx_input.problem', null, 'problem'))))]; lines = typed(c, t.command, reply, true); } v.out.replaceChildren(...lines); @@ -498,16 +499,16 @@ // There → here: the SSH server. if (c.changed('in', [st, t.allowIn, t.service, t.busy, t.peerCan, nm.name, t.srvMsg])) { let lines; - if (st === 'nopeer') lines = comment('# no connection'); - else if (st === 'ble') lines = comment('# needs Wi-Fi', 'warn'); - else if (!t.allowIn) lines = comment('# off'); + if (st === 'nopeer') lines = comment(tr('pfx_input.hash_no_connection', null, '# no connection')); + else if (st === 'ble') lines = comment(tr('pfx_input.hash_needs_wifi', null, '# needs Wi-Fi'), 'warn'); + else if (!t.allowIn) lines = comment(tr('pfx_input.hash_off', null, '# off')); else { - const reply = t.busy ? [span(c, 'pd-dim', 'setting up…')] - : t.service === 'running' ? [span(c, 'pd-strong', 'listening :22')] - : t.service === 'missing' ? [span(c, 'pd-bad', '✗ not installed')] - : t.service === 'stopped' ? [span(c, 'pd-bad', '✗ stopped')] : [span(c, 'pd-dim', msgShort(t.srvMsg, 30) || 'checking…')]; + const reply = t.busy ? [span(c, 'pd-dim', tr('pfx_input.setting_up', null, 'setting up…'))] + : t.service === 'running' ? [span(c, 'pd-strong', tr('pfx_input.listening', null, 'listening :22'))] + : t.service === 'missing' ? [span(c, 'pd-bad', tr('pfx_input.x_not_installed', null, '✗ not installed'))] + : t.service === 'stopped' ? [span(c, 'pd-bad', tr('pfx_input.x_stopped', null, '✗ stopped'))] : [span(c, 'pd-dim', msgShort(t.srvMsg, 30) || tr('pfx_input.checking', null, 'checking…'))]; lines = typed(c, 'sshd', reply, false); - if (t.peerCan) lines.push(c.el('div', 'pd-line pd-reply pd-late', [span(c, 'pd-dim', '↳ '), span(c, null, clip(nm.name, 22) + ' can connect')], { css: { '--n': 4 } })); + if (t.peerCan) lines.push(c.el('div', 'pd-line pd-reply pd-late', [span(c, 'pd-dim', '↳ '), span(c, null, tr('pfx_input.can_connect', { name: clip(nm.name, 22) }, '{name} can connect'))], { css: { '--n': 4 } })); } v.in.replaceChildren(...lines); } @@ -554,7 +555,7 @@ v.spark = c.el('i', 'pd-rz-spark'); v.meLab = c.el('span', 'pd-rz-lab me'); v.peerLab = c.el('span', 'pd-rz-lab peer'); - v.badge = c.el('span', 'pd-rz-badge', 'update'); + v.badge = c.el('span', 'pd-rz-badge'); const L = lead(c, 'center'); v.big = L.big; v.cap = L.cap; const stage = c.el('div', 'pd-rz-stage', [svg, v.spark, v.chip, v.meLab, v.peerLab, v.badge, L.box]); @@ -580,10 +581,11 @@ c.text(v.meLab, clip(nm.me, 16)); c.text(v.peerLab, clip(nm.name, 16)); v.badge.hidden = st !== 'missing'; + c.text(v.badge, tr('pfx_input.badge_update', null, 'update')); // The chip: incoming (rides in and rests near here), going out (rides away), waiting, or the // last thing here (resting on this side, dim). const lastItem = !inc && !out && !z.waiting && (st === 'ready') ? z.last : null; - const item = inc || out || (z.waiting ? { title: 'Getting ' + z.waiting + '…' } : null) || lastItem; + const item = inc || out || (z.waiting ? { title: tr('pfx_input.getting_what', { what: z.waiting }, 'Getting {what}…') } : null) || lastItem; v.chip.hidden = !item; const pos = inc ? 'in' : out ? 'out' : z.waiting ? 'wait' : 'last'; c.attr(v.chip, 'data-pos', item ? pos : null); @@ -593,19 +595,19 @@ const kind = kindOf(item); c.attr(v.chip, 'data-kind', kind); if (c.changed('glyph', kind)) c.attr(v.glyph, 'd', GLYPH[kind]); - c.text(v.ttl, clip(item.title || item.name || item.appName || 'Untitled', 26)); + c.text(v.ttl, clip(item.title || item.name || item.appName || tr('pfx_input.untitled', null, 'Untitled'), 26)); if (c.changed('chip', [pos, item.id || item.title]) && (pos === 'in' || pos === 'out')) c.pop(v.chip, 'pd-arrive', 1400); } - const sub = inc ? (kindOf(inc) === 'web' ? hostOf(inc.url) || inc.appName || 'page' : kindOf(inc) === 'doc' ? inc.appName || 'document' : inc.appName || inc.app || 'app') : ''; + const sub = inc ? (kindOf(inc) === 'web' ? hostOf(inc.url) || inc.appName || tr('pfx_input.page', null, 'page') : kindOf(inc) === 'doc' ? inc.appName || tr('pfx_input.document', null, 'document') : inc.appName || inc.app || tr('pfx_input.app', null, 'app')) : ''; const words = { - nopeer: ['Not connected', 'connect a computer or phone'], - off: ['ReZume is off', 'turn it on to carry on elsewhere'], - missing: ['Update ' + clip(nm.name, 20), 'no rezume there yet'], - peeroff: ['Off on ' + clip(nm.name, 20), 'turn it on there too'], - offer: ['From ' + clip(nm.name, 22), sub], - sending: ['Offered', 'to ' + clip(nm.name, 30)], - waiting: ['Getting it…', 'from ' + clip(nm.name, 22)], - ready: ['Ready', z.last ? 'ready to send' : 'nothing handed over yet'], + nopeer: [tr('overview.not_connected', null, 'Not connected'), tr('pfx_input.connect_pc_or_phone', null, 'connect a computer or phone')], + off: [tr('pfx_input.rezume_off', null, 'ReZume is off'), tr('pfx_input.turn_on_carry_on', null, 'turn it on to carry on elsewhere')], + missing: [tr('pfx_input.update_name', { name: clip(nm.name, 20) }, 'Update {name}'), tr('pfx_input.no_rezume_there', null, 'no rezume there yet')], + peeroff: [tr('pfx_input.off_on_name', { name: clip(nm.name, 20) }, 'Off on {name}'), tr('pfx_input.turn_on_there_too', null, 'turn it on there too')], + offer: [tr('pfx_input.from_name_cap', { name: clip(nm.name, 22) }, 'From {name}'), sub], + sending: [tr('pfx_input.offered', null, 'Offered'), tr('pfx_input.to_name', { name: clip(nm.name, 30) }, 'to {name}')], + waiting: [tr('pfx_input.getting_it', null, 'Getting it…'), tr('pfx_input.from_name', { name: clip(nm.name, 22) }, 'from {name}')], + ready: [tr('terminal.ready', null, 'Ready'), z.last ? tr('pfx_input.ready_to_send', null, 'ready to send') : tr('pfx_input.nothing_handed_over', null, 'nothing handed over yet')], }[st]; c.text(v.big, words[0]); c.text(v.cap, words[1]); diff --git a/shared/pagefx/phone-media.js b/shared/pagefx/phone-media.js index c499676e..bcc8fdbc 100644 --- a/shared/pagefx/phone-media.js +++ b/shared/pagefx/phone-media.js @@ -18,6 +18,9 @@ if (!P) return; const UI = window.UI || {}; const G = P.get; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + // Does `text` start the way the message `key` reads in the current language ({placeholders} match anything)? + const reads = (text, key, en) => new RegExp('^' + String(tr(key, null, en)).split(/\{\w+\}/).map((x) => x.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('.*')).test(String(text || '')); const safe = (fn, d) => { try { const v = fn(); return v === undefined ? d : v; } catch (e) { return d; } }; const hubOn = (t, fn) => { @@ -26,12 +29,12 @@ }; const ready = (s, w) => safe(() => !!UI.hubReady(s, w), false); const onBle = (s) => safe(() => !!UI.onBle(s), false); - const phoneName = (s) => safe(() => (s && s.hub && s.hub.name) || (G.phone(s) || {}).name || UI.phoneName(s), '') || 'your phone'; + const phoneName = (s) => safe(() => (s && s.hub && s.hub.name) || (G.phone(s) || {}).name || UI.phoneName(s), '') || tr('hub.your_phone', null, 'your phone'); const clock = (ts) => (ts ? safe(() => UI.clock(ts), '') : ''); const duration = (sec) => safe(() => UI.duration(sec), '0:00'); const names = (s) => { const p = safe(() => UI.peer(s), null) || {}; - return { name: p.name || G.peerName(s) || 'the other device', me: p.me || G.myName(s) || 'this computer' }; + return { name: p.name || G.peerName(s) || tr('start.the_other_device', null, 'the other device'), me: p.me || G.myName(s) || tr('pfx_phone_media.this_computer', null, 'this computer') }; }; const initial = (n) => { const t = String(n || '').trim(); return /^[+\d]/.test(t) || !t ? '#' : t.charAt(0).toUpperCase(); }; const glyph = (d, cls) => P.svgRoot('0 0 24 24', 'pg-ico' + (cls ? ' ' + cls : ''), [P.svg('path', { d })]); @@ -56,10 +59,10 @@ return 'wait'; } const STATE_CAP = { - off: () => 'Off', - nopeer: (ph) => 'Connect ' + ph, - perm: (ph) => 'Waiting for permission on ' + ph, - wait: (ph) => 'Waiting for ' + ph + '…', + off: () => tr('general.off', null, 'Off'), + nopeer: (ph) => tr('pfx_phone_media.connect_phone', { phone: ph }, 'Connect {phone}'), + perm: (ph) => tr('pfx_phone_media.waiting_permission', { phone: ph }, 'Waiting for permission on {phone}'), + wait: (ph) => tr('pfx_phone_media.waiting_for', { phone: ph }, 'Waiting for {phone}…'), }; // The strip every page here starts from: .pg-hdr.pm-hdr.pm-[data-st] inside .page-body (hides with it). const hero = (ctx, id) => ctx.hdr({ cls: 'pm-hdr pm-' + id + ' pg-hero--' + id }); @@ -115,10 +118,10 @@ function snippet(t, typing) { if (!H) return; - const name = t ? t.name || (t.addrs || []).join(', ') || 'Unknown' : ''; + const name = t ? t.name || (t.addrs || []).join(', ') || tr('general.unknown', null, 'Unknown') : ''; const body = t ? t.snippet || '' : ''; const set = () => { - C.text(H.snName, name || 'No conversations yet'); + C.text(H.snName, name || tr('pfx_phone_media.no_conversations', null, 'No conversations yet')); C.text(H.snText, t ? body || '…' : ''); C.cls(H.snip, 'typing', false); }; @@ -137,7 +140,7 @@ if (st === 'ready') C.count(H.num, unread, { ms: 420 }); else { H.num._pgVal = null; C.text(H.num, '–'); } C.cls(H.hdr, 'has-unread', st === 'ready' && unread > 0); - C.text(H.cap, 'Unread · ' + phoneName(s)); + C.text(H.cap, tr('pfx_phone_media.unread_phone', { phone: phoneName(s) }, 'Unread · {phone}')); C.text(H.when, newest && newest.at ? clock(newest.at) : ''); } @@ -151,9 +154,9 @@ for (const c of Array.isArray(s.chats) ? s.chats : []) { const a = appOf(c && c.app); if (a) n[a] = (n[a] || 0) + 1; } for (const h of safe(() => s.notifs.history, []) || []) { const a = appOf(h && h.app); if (a) n[a] = (n[a] || 0) + 1; } const list = Object.entries(n).sort((a, b) => b[1] - a[1]).slice(0, 3); - parts = list.length ? list.map(([a, k]) => (APP_NAME[a] || a) + ' ' + k) : ['Chat apps on']; + parts = list.length ? list.map(([a, k]) => (APP_NAME[a] || a) + ' ' + k) : [tr('pfx_phone_media.chat_apps_on', null, 'Chat apps on')]; } - if (ro) parts.unshift('Read-only'); + if (ro) parts.unshift(tr('pfx_phone_media.read_only', null, 'Read-only')); C.text(H.meta, join(parts)); } @@ -162,7 +165,7 @@ C = ctx; const hdr = hero(ctx, 'messages'); const num = ctx.el('span', 'pm-big pg-num', '–'); - const cap = ctx.el('span', 'pm-k', 'Unread'); + const cap = ctx.el('span', 'pm-k'); const track = ctx.el('div', 'pm-track', [ctx.el('span', 'pm-line')]); const lane = ctx.el('div', 'pm-motif pm-lane', [ ctx.el('span', 'pm-node ph', [P.icon('phone')]), @@ -220,7 +223,8 @@ if (!C || !C.active() || !H) return; fly(msg.out ? 'out' : 'in', false); const t = (threads || []).find((x) => x.id === m.thread); - snippet({ name: (t && t.name) || msg.fromName || msg.from || (t && (t.addrs || []).join(', ')) || '', snippet: (msg.out ? 'You: ' : '') + (msg.body || (msg.parts ? 'Picture' : '')) }, true); + const said = msg.body || (msg.parts ? tr('clipboard.picture', null, 'Picture') : ''); + snippet({ name: (t && t.name) || msg.fromName || msg.from || (t && (t.addrs || []).join(', ')) || '', snippet: msg.out ? tr('pfx_phone_media.you_said', { text: said }, 'You: {text}') : said }, true); C.text(H.when, clock(msg.at || Date.now())); C.forget('snip'); // the open thread got it: its last bubble rises in (the page rendered it before this runs) @@ -277,7 +281,7 @@ } const week = (log || []).filter((c) => by.has(new Date(c && c.at).toDateString())); const missedToday = (by.get(today.toDateString()) || []).filter((c) => c.type === 'missed').length; - C.text(H.weekCap, log ? join([week.length + ' this week', missedToday ? missedToday + ' missed today' : '']) : 'This week'); + C.text(H.weekCap, log ? join([tr('pfx_phone_media.n_this_week', { n: week.length }, '{n} this week'), missedToday ? tr('pfx_phone_media.n_missed_today', { n: missedToday }, '{n} missed today') : '']) : tr('pfx_phone_media.this_week', null, 'This week')); C.cls(H.week, 'empty', !log || !log.length); } @@ -339,7 +343,7 @@ if (H.now) { ctx.cls(H.now, 'pg-ringing', st === 'ringing'); ctx.cls(H.now, 'pg-live', st === 'offhook'); } // the centre of the ring: the caller while ringing / talking, the handset otherwise - const who = c ? c.name || c.number || 'Unknown number' : ''; + const who = c ? c.name || c.number || tr('calls.unknown_number', null, 'Unknown number') : ''; if (ctx.changed('av', c ? [who, c.photo || ''] : null)) { let a = null; if (c) { a = safe(() => UI.avatar(who, c.photo), null) || ctx.el('span', 'hub-avatar', initial(who)); a.classList.add('pm-face'); } @@ -348,35 +352,35 @@ ctx.cls(H.sonar, 'face', !!c); const last = (log || [])[0]; - const lastLine = last ? 'Last · ' + (last.name || last.number || 'Unknown') + ' · ' + clock(last.at) : ''; + const lastLine = last ? tr('pfx_phone_media.last_call', { name: last.name || last.number || tr('general.unknown', null, 'Unknown'), time: clock(last.at) }, 'Last · {name} · {time}') : ''; const a = h.audio; const bt = !!(h.connected && a && a.state === 'ready'); if (st === 'ringing') { stopTick(); ctx.text(H.big, who); - ctx.text(H.cap, 'Calling · ' + ph); - ctx.text(H.line, c.name && c.number ? c.number : 'Answer or decline below'); + ctx.text(H.cap, tr('pfx_phone_media.calling_phone', { phone: ph }, 'Calling · {phone}')); + ctx.text(H.line, c.name && c.number ? c.number : tr('pfx_phone_media.answer_or_decline', null, 'Answer or decline below')); } else if (st === 'offhook') { - ctx.text(H.cap, join([c.dir === 'out' ? 'Outgoing' : 'On call', who])); - ctx.text(H.line, h.muted ? 'Muted' : bt ? (a.here ? 'Sound on this computer' : 'Sound on ' + ph) : ''); + ctx.text(H.cap, join([c.dir === 'out' ? tr('pfx_phone_media.outgoing', null, 'Outgoing') : tr('pfx_phone_media.on_call', null, 'On call'), who])); + ctx.text(H.line, h.muted ? tr('pfx_phone_media.muted', null, 'Muted') : bt ? (a.here ? tr('pfx_phone_media.sound_here', null, 'Sound on this computer') : tr('pfx_phone_media.sound_on_phone', { phone: ph }, 'Sound on {phone}')) : ''); startTick(); } else { stopTick(); if (st === 'ended' || st === 'missed') { const dsec = e.since ? (e.at - e.since) / 1000 : null; - ctx.text(H.big, st === 'missed' ? 'Missed' : dsec != null ? duration(dsec) : 'Ended'); - ctx.text(H.cap, st === 'missed' ? join([e.name || e.number || 'Unknown', clock(e.at)]) : 'Call ended'); + ctx.text(H.big, st === 'missed' ? tr('calls.type_missed', null, 'Missed') : dsec != null ? duration(dsec) : tr('pfx_phone_media.ended', null, 'Ended')); + ctx.text(H.cap, st === 'missed' ? join([e.name || e.number || tr('general.unknown', null, 'Unknown'), clock(e.at)]) : tr('pfx_phone_media.call_ended', null, 'Call ended')); ctx.text(H.line, lastLine); if (endT) endT(); endT = ctx.after(Math.max(200, 6000 - (Date.now() - e.at)), () => { endT = null; ctx.refresh(); }); } else if (st === 'idle') { - ctx.text(H.big, 'Ready'); - ctx.text(H.cap, 'Calls ring here · ' + ph); - ctx.text(H.line, lastLine || 'No recent calls'); + ctx.text(H.big, tr('terminal.ready', null, 'Ready')); + ctx.text(H.cap, tr('pfx_phone_media.calls_ring_here', { phone: ph }, 'Calls ring here · {phone}')); + ctx.text(H.line, lastLine || tr('pfx_phone_media.no_recent_calls', null, 'No recent calls')); } else { - ctx.text(H.big, st === 'off' ? 'Off' : st === 'nopeer' ? 'No phone' : 'Waiting'); + ctx.text(H.big, st === 'off' ? tr('general.off', null, 'Off') : st === 'nopeer' ? tr('pfx_phone_media.no_phone', null, 'No phone') : tr('pfx_phone_media.waiting', null, 'Waiting')); ctx.text(H.cap, STATE_CAP[st](ph)); - ctx.text(H.line, st === 'off' ? 'Turn on Calls at the top' : lastLine); + ctx.text(H.line, st === 'off' ? tr('pfx_phone_media.turn_on_calls_top', null, 'Turn on Calls at the top') : lastLine); } } paintWeek(); @@ -458,7 +462,7 @@ const status = page.querySelector('.hub-media-status'); let was = false; ctx.observe(status, { characterData: true, childList: true, subtree: true }, () => { - const now = /^Saving/.test((status.textContent || '').trim()); + const now = reads((status.textContent || '').trim(), 'media.saving_to', 'Saving {count} to {me}’s {folder}…'); if (now && !was && ctx.active()) { const pics = [...H.track.querySelectorAll('.pm-frame img[src]')].slice(0, 3); [...H.drops.children].forEach((d, i) => { ctx.css(d, 'background-image', pics[i] ? 'url("' + pics[i].getAttribute('src') + '")' : null); }); @@ -474,18 +478,19 @@ const st = (base === 'ready' || base === 'wait') && onBle(s) ? 'ble' : base; ctx.attr(H.hdr, 'data-st', st); const ph = phoneName(s); - const label = kind === 'videos' ? 'Videos' : kind === 'all' ? 'Items' : kind.charAt(0).toUpperCase() + kind.slice(1); + const kindName = { videos: tr('media.kind_videos', null, 'videos'), photos: tr('media.kind_photos', null, 'photos'), screenshots: tr('media.kind_screenshots', null, 'screenshots') }[kind] || kind; + const label = kind === 'videos' ? tr('media.filter_videos', null, 'Videos') : kind === 'all' ? tr('pfx_phone_media.items', null, 'Items') : kind === 'photos' ? tr('media.filter_photos', null, 'Photos') : kind === 'screenshots' ? tr('media.filter_screenshots', null, 'Screenshots') : kind.charAt(0).toUpperCase() + kind.slice(1); const has = st === 'ready' && listed; if (has) ctx.text(H.big, items.length + (more ? '+' : '')); - else ctx.text(H.big, st === 'ble' ? 'Wi-Fi only' : st === 'ready' ? '–' : { off: 'Off', nopeer: 'No phone', perm: 'Allow', wait: 'Waiting' }[st] || '–'); + else ctx.text(H.big, st === 'ble' ? tr('hub.wifi_only', null, 'Wi-Fi only') : st === 'ready' ? '–' : { off: tr('general.off', null, 'Off'), nopeer: tr('pfx_phone_media.no_phone', null, 'No phone'), perm: tr('pair.allow', null, 'Allow'), wait: tr('pfx_phone_media.waiting', null, 'Waiting') }[st] || '–'); ctx.cls(H.big, 'word', !has); const v = items.filter((x) => x.video).length; const partial = safe(() => s.hub.perm.media.perm, '') === 'partial'; if (has) { - ctx.text(H.cap, join([label, kind === 'all' && v ? v + (more ? '+' : '') + ' videos' : ''])); - ctx.text(H.meta, join([items[0] ? 'Newest ' + clock(items[0].at) : (kind === 'all' ? 'No photos or videos' : 'No ' + kind), partial ? 'Only chosen photos' : ''])); + ctx.text(H.cap, join([label, kind === 'all' && v ? tr('pfx_phone_media.n_videos', { n: v + (more ? '+' : '') }, '{n} videos') : ''])); + ctx.text(H.meta, join([items[0] ? tr('pfx_phone_media.newest_time', { time: clock(items[0].at) }, 'Newest {time}') : (kind === 'all' ? tr('media.no_photos_videos', null, 'No photos or videos') : tr('media.no_items_kind', { kind: kindName }, 'No {kind}')), partial ? tr('pfx_phone_media.only_chosen_photos', null, 'Only chosen photos') : ''])); } else { - ctx.text(H.cap, st === 'ble' ? 'Photos need Wi-Fi or USB' : st === 'ready' ? 'Loading ' + ph + '…' : STATE_CAP[st] ? STATE_CAP[st](ph) : ''); + ctx.text(H.cap, st === 'ble' ? tr('pfx_phone_media.photos_need_wifi_usb', null, 'Photos need Wi-Fi or USB') : st === 'ready' ? tr('pfx_phone_media.loading_phone', { phone: ph }, 'Loading {phone}…') : STATE_CAP[st] ? STATE_CAP[st](ph) : ''); ctx.text(H.meta, ''); } paintStrip(); @@ -532,9 +537,9 @@ const from = ctx.el('span', 'pm-end peer'); const mute = ctx.el('span', 'pm-mute', [glyph(SPK_OFF)]); const label = ctx.el('span', 'pm-lst'); - const dir = ctx.el('span', 'pm-k pm-ldir', cls === 'rx' ? 'In' : 'Out'); + const dir = ctx.el('span', 'pm-k pm-ldir'); const el = ctx.el('div', 'pm-alane pg-lane ' + cls, [dir, from, ctx.el('div', 'pm-lt', [bars, ctx.el('span', 'pm-flatline')]), mute, label]); - return { el, from, label, bars, mute }; + return { el, from, label, bars, mute, dir }; } P.register('audio', { @@ -576,18 +581,20 @@ ctx.cls(H.tx.el, 'acc', tx === 'live' && rx !== 'live'); ctx.attr(H.hdr, 'data-st', nopeer && !btPlay ? 'nopeer' : rx === 'live' || tx === 'live' ? 'live' : 'idle'); const rxText = { - off: nopeer ? 'Connect a device' : 'Off', - ble: 'Wi-Fi only', - live: btPlay && !a.receiving ? 'Playing over Bluetooth' : 'From ' + n.name, - wait: phoneTxt && G.isPhone(s) ? (/^Tap|^Asking/.test(phoneTxt) ? phoneTxt.replace(/ \(.*$/, '') : 'Waiting for ' + n.name) : linkOk ? 'Turned off on ' + n.name : 'Waiting for ' + n.name, + off: nopeer ? tr('pfx_phone_media.connect_a_device', null, 'Connect a device') : tr('general.off', null, 'Off'), + ble: tr('hub.wifi_only', null, 'Wi-Fi only'), + live: btPlay && !a.receiving ? tr('pfx_phone_media.playing_bluetooth', null, 'Playing over Bluetooth') : tr('pfx_phone_media.from_name', { name: n.name }, 'From {name}'), + wait: phoneTxt && G.isPhone(s) ? (reads(phoneTxt, 'hub.sound_tap_start', 'Tap Start on {phone} (its notification, or Sound in DuoDesk there)') || reads(phoneTxt, 'hub.sound_asking', 'Asking {phone}…') ? phoneTxt.replace(/ \(.*$/, '') : tr('pfx_phone_media.waiting_for_name', { name: n.name }, 'Waiting for {name}')) : linkOk ? tr('pfx_phone_media.turned_off_on', { name: n.name }, 'Turned off on {name}') : tr('pfx_phone_media.waiting_for_name', { name: n.name }, 'Waiting for {name}'), }[rx]; const txText = { - off: nopeer ? '' : 'Off', - ble: 'Wi-Fi only', - err: a.error || 'Error', - live: 'To ' + n.name, - wait: !linkOk ? 'Waiting for ' + n.name : a.macAccepts === false ? 'Turned off on ' + n.name : 'Connecting…', + off: nopeer ? '' : tr('general.off', null, 'Off'), + ble: tr('hub.wifi_only', null, 'Wi-Fi only'), + err: a.error || tr('pfx_phone_media.error', null, 'Error'), + live: tr('pfx_phone_media.to_name', { name: n.name }, 'To {name}'), + wait: !linkOk ? tr('pfx_phone_media.waiting_for_name', { name: n.name }, 'Waiting for {name}') : a.macAccepts === false ? tr('pfx_phone_media.turned_off_on', { name: n.name }, 'Turned off on {name}') : tr('hub.connecting_dots', null, 'Connecting…'), }[tx]; + ctx.text(H.rx.dir, tr('pfx_phone_media.lane_in', null, 'In')); + ctx.text(H.tx.dir, tr('pfx_phone_media.lane_out', null, 'Out')); ctx.text(H.rx.label, rxText); ctx.text(H.tx.label, txText); const os = G.peerOs(s) || 'mac'; @@ -722,7 +729,7 @@ safe(() => UI.api && typeof UI.api.onCamPreview === 'function' && UI.api.onCamPreview(() => { frames++; })); ctx.every(1000, () => { fps = frames; frames = 0; - if (H.hdr.dataset.st === 'live') ctx.text(H.live.lastElementChild, fps ? 'Live · ' + fps + ' fps' : 'Live'); + if (H.hdr.dataset.st === 'live') ctx.text(H.live.lastElementChild, fps ? tr('pfx_phone_media.live_fps', { n: fps }, 'Live · {n} fps') : tr('display.live', null, 'Live')); }, { paused: true }); }, enter(page, ctx) { @@ -747,22 +754,22 @@ goRot(num(v.rotate) || 0); // the page's own words about the picture (its overlay), else ours const overlay = H.said && !H.said.hidden ? (H.said.textContent || '').trim() : ''; - ctx.text(H.big, { off: 'Off', nopeer: 'No device', idle: overlay ? 'Waiting' : 'Ready', starting: 'Starting', live: 'Live', err: 'Stopped' }[st]); - ctx.text(H.cap, st === 'nopeer' ? 'Connect a device to use its camera' : who + '’s camera'); + ctx.text(H.big, { off: tr('general.off', null, 'Off'), nopeer: tr('pfx_phone_media.no_device', null, 'No device'), idle: overlay ? tr('pfx_phone_media.waiting', null, 'Waiting') : tr('terminal.ready', null, 'Ready'), starting: tr('pfx_phone_media.starting', null, 'Starting'), live: tr('display.live', null, 'Live'), err: tr('terminal.stopped', null, 'Stopped') }[st]); + ctx.text(H.cap, st === 'nopeer' ? tr('pfx_phone_media.connect_to_use_camera', null, 'Connect a device to use its camera') : tr('camera.our_camera', { me: who }, '{me}’s camera')); const isLive = on && !!v.picture && st === 'live'; ctx.cls(H.live, 'on', isLive); - if (isLive && ctx.changed('livefps', fps == null)) ctx.text(H.live.lastElementChild, fps ? 'Live · ' + fps + ' fps' : 'Live'); - const vs = v.on ? (v.live ? 'Virtual camera live' : v.ready ? 'Virtual camera ready' : '') : ''; - const rotTxt = isLive && num(v.rotate) ? 'Turned ' + num(v.rotate) + '°' : ''; - const face = phone && w ? ((w.facing || 'back') === 'front' ? 'Front' : 'Back') : ''; - const win = on && (phone ? w && w.shown : c.viewShown) ? 'Window open' : ''; + if (isLive && ctx.changed('livefps', fps == null)) ctx.text(H.live.lastElementChild, fps ? tr('pfx_phone_media.live_fps', { n: fps }, 'Live · {n} fps') : tr('display.live', null, 'Live')); + const vs = v.on ? (v.live ? tr('pfx_phone_media.vcam_live', null, 'Virtual camera live') : v.ready ? tr('pfx_phone_media.vcam_ready', null, 'Virtual camera ready') : '') : ''; + const rotTxt = isLive && num(v.rotate) ? tr('pfx_phone_media.turned_deg', { n: num(v.rotate) }, 'Turned {n}°') : ''; + const face = phone && w ? ((w.facing || 'back') === 'front' ? tr('camera.front', null, 'Front') : tr('camera.back', null, 'Back')) : ''; + const win = on && (phone ? w && w.shown : c.viewShown) ? tr('pfx_phone_media.window_open', null, 'Window open') : ''; ctx.text(H.line, st !== 'live' ? overlay : ''); ctx.text(H.meta, join([face, rotTxt, vs, win])); // privacy first: this computer's camera running on the other one const sending = !!c.sending; ctx.cls(H.rec, 'on', sending); ctx.cls(H.hdr, 'pg-rec-on', sending); - if (sending) ctx.text(H.rec.lastElementChild, (c.mesh && c.sendingTo ? c.sendingTo + (c.sendingTo.includes(',') ? ' are' : ' is') : n.name + ' is') + ' viewing ' + n.me + '’s camera'); + if (sending) ctx.text(H.rec.lastElementChild, c.mesh && c.sendingTo && c.sendingTo.includes(',') ? tr('pfx_phone_media.names_viewing_camera', { names: c.sendingTo, me: n.me }, '{names} are viewing {me}’s camera') : tr('pfx_phone_media.name_viewing_camera', { name: c.mesh && c.sendingTo ? c.sendingTo : n.name, me: n.me }, '{name} is viewing {me}’s camera')); // the page's cards if (H.box) { ctx.cls(H.box, 'pg-live', isLive); diff --git a/shared/pagefx/screens.js b/shared/pagefx/screens.js index 7c5313c7..0258851c 100644 --- a/shared/pagefx/screens.js +++ b/shared/pagefx/screens.js @@ -21,6 +21,7 @@ const UI = window.UI || {}; const G = FX.get; const S = FX.svg; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const safe = (fn, d) => { try { const v = fn(); return v === undefined ? d : v; } catch (e) { return d; } }; const num = (v) => (typeof v === 'number' && isFinite(v) ? v : null); const clamp = (v, a, b) => Math.max(a, Math.min(b, v)); @@ -28,14 +29,15 @@ const notPhone = (p) => p && p.os !== 'android' ? p : null; const pcPeer = (s) => notPhone(s && s.peer) || notPhone(s && s.client) || notPhone(safe(() => G.meshPeer(s), null)) || (s && Array.isArray(s.paired) ? s.paired[0] : s && s.paired) || null; - const whoOf = (s) => (s && s.link && s.link.macName) || (pcPeer(s) && (pcPeer(s).name || pcPeer(s).macName)) || 'the other computer'; + const whoOf = (s) => (s && s.link && s.link.macName) || (pcPeer(s) && (pcPeer(s).name || pcPeer(s).macName)) || tr('kit.the_other_computer', null, 'the other computer'); const pcOs = (s) => { const p = pcPeer(s); return (p && p.os) || null; }; // a computer is connected (Windows / Linux s.link, Mac s.client, mesh s.peers) const pcLive = (s) => !!(s && ((s.link && s.link.state === 'connected' && !(s.peer && s.peer.os === 'android')) || notPhone(s.client) || (Array.isArray(s.peers) && s.peers.some((p) => p && p.os !== 'android' && (p.connected || p.state === 'connected'))))); const fmt1 = (v) => (v == null ? '–' : v >= 100 ? String(Math.round(v)) : String(Math.round(v * 10) / 10)); const r1 = (v) => Math.round(v * 10) / 10; - const plural = (n, one, many) => n + ' ' + (n === 1 ? one : many); + const nWindows = (n) => (n === 1 ? tr('pfx_screens.n_window_one', { n }, '{n} window') : tr('pfx_screens.n_window_other', { n }, '{n} windows')); + const nApps = (n) => (n === 1 ? tr('pfx_screens.n_app_one', { n }, '{n} app') : tr('pfx_screens.n_app_other', { n }, '{n} apps')); // fit an aspect (w:h) into maxW × maxH const fit = (w, h, maxW, maxH) => { const a = clamp((w || 16) / (h || 10), 0.4, 3.5); let y = maxH, x = y * a; if (x > maxW) { x = maxW; y = x / a; } return [r1(x), r1(y)]; }; @@ -45,16 +47,17 @@ return t ? String(t.dataset.peer || t.textContent || '').trim() : ''; }; const wrapsOf = (body) => (body ? [...body.querySelectorAll(':scope > .card-wrap')] : []); - const cardBy = (body, title) => wrapsOf(body).find((w) => titleOf(w) === title) || null; - const cardStarts = (body, prefix) => wrapsOf(body).find((w) => titleOf(w).startsWith(prefix)) || null; + // The card titles are in the user's language: the English one or the page's own translated key. + const cardBy = (body, key, en) => wrapsOf(body).find((w) => { const t = titleOf(w); return t === en || t === tr(key, null, en); }) || null; + const cardStarts = (body, key, en) => wrapsOf(body).find((w) => { const t = titleOf(w); return t.startsWith(en.split('{')[0]) || t.startsWith(String(tr(key, null, en)).split('{')[0]); }) || null; const role = (e, name) => { if (e && !e.hasAttribute('data-pg-role')) e.setAttribute('data-pg-role', name); return e; }; - // The Details card's Status row gets a quiet dot (data-pg-st on the row; never its text). + // The Details card's Status row gets a quiet dot (data-pg-st on the row; never its text). good / warn come + // from the header's own state, not from the row's words (they are in the user's language). function statusDot(ctx, wrap, good, warn) { const row = wrap && wrap.querySelector(':scope > .card > .row'); const v = row && row.querySelector('.value'); if (!v) return; - const t = v.textContent || ''; - ctx.attr(row, 'data-pg-st', good.test(t) ? 'good' : warn.test(t) ? 'warn' : 'off'); + ctx.attr(row, 'data-pg-st', good ? 'good' : warn ? 'warn' : 'off'); ctx.attr(row, 'data-pg-status', ''); } @@ -149,7 +152,7 @@ const body = ctx.body; if (!body) return; role(wrapsOf(body).find((w) => w.querySelector(':scope > .card.keep-on')), 'main'); - role(cardBy(body, 'Details'), 'details'); + role(cardBy(body, 'kit.details', 'Details'), 'details'); const E = ctx.el; const h = ctx.hdr({ cls: 'sx rx' }); const r = { h, buf: [] }; @@ -200,16 +203,16 @@ // text const mp = safe(() => G.meshPeer(s), null); const rtt = num(G.get(s, 'link.rtt')) ?? num(G.get(s, 'client.rttMs')) ?? num(mp && mp.rtt); - ctx.text(t.kick, st === 'nopeer' ? 'Receive screen' : 'From ' + who); - if (st === 'live') setFig(ctx, t, num(x && x.fps) != null ? x.fps : 'Live', num(x && x.fps) != null ? 'fps' : ''); - else setFig(ctx, t, st === 'nopeer' ? 'Waiting' : st === 'paused' ? 'Paused' : st === 'ready' ? 'Ready' : 'Off', ''); + ctx.text(t.kick, st === 'nopeer' ? tr('nav.receive', null, 'Receive screen') : tr('pfx_screens.from_who', { name: who }, 'From {name}')); + if (st === 'live') setFig(ctx, t, num(x && x.fps) != null ? x.fps : tr('display.live', null, 'Live'), num(x && x.fps) != null ? 'fps' : ''); + else setFig(ctx, t, st === 'nopeer' ? tr('pfx_screens.waiting', null, 'Waiting') : st === 'paused' ? tr('pfx_home.paused', null, 'Paused') : st === 'ready' ? tr('terminal.ready', null, 'Ready') : tr('general.off', null, 'Off'), ''); const res = x && num(x.width) ? x.width + ' × ' + x.height : m.w && m.h ? m.w + ' × ' + m.h : ''; - ctx.text(t.cap, st === 'nopeer' ? 'Waiting for ' + who - : st === 'live' ? [m.mode === 'extend' ? 'Extra screen' : 'Main screen', res, m.watching ? '' : 'window closed'].filter(Boolean).join(' · ') - : st === 'paused' ? 'Nobody is watching it' : st === 'ready' ? 'Open starts sharing on ' + who : 'Turn on sharing on ' + who); + ctx.text(t.cap, st === 'nopeer' ? tr('share.waiting_for_name', { name: who }, 'Waiting for {name}') + : st === 'live' ? [m.mode === 'extend' ? tr('pfx_screens.extra_screen', null, 'Extra screen') : tr('pfx_screens.main_screen', null, 'Main screen'), res, m.watching ? '' : tr('pfx_screens.window_closed', null, 'window closed')].filter(Boolean).join(' · ') + : st === 'paused' ? tr('pfx_screens.nobody_watching', null, 'Nobody is watching it') : st === 'ready' ? tr('pfx_screens.open_starts_sharing', { name: who }, 'Open starts sharing on {name}') : tr('pfx_screens.turn_on_sharing', { name: who }, 'Turn on sharing on {name}')); ctx.text(t.meta, st === 'live' && x - ? [x.codec ? String(x.codec).toUpperCase() : '', num(x.mbps) != null ? fmt1(x.mbps) + ' Mbps' : '', num(x.delayMs) != null ? x.delayMs + ' ms delay' : '', - !m.input ? 'view only' : '', m.mute ? 'muted' : '', m.framegen ? '+FG' : ''].filter(Boolean).join(' · ') + ? [x.codec ? String(x.codec).toUpperCase() : '', num(x.mbps) != null ? fmt1(x.mbps) + ' Mbps' : '', num(x.delayMs) != null ? tr('pfx_screens.ms_delay', { n: x.delayMs }, '{n} ms delay') : '', + !m.input ? tr('pfx_screens.view_only', null, 'view only') : '', m.mute ? tr('pfx_screens.muted', null, 'muted') : '', m.framegen ? '+FG' : ''].filter(Boolean).join(' · ') : st === 'nopeer' ? '' : [G.via(s), rtt != null ? rtt + ' ms' : ''].filter(Boolean).join(' · ')); // delay sparkline: one sample per new stats tuple; cleared when the stream stops if (!x) { if (r.buf.length) { r.buf = []; ctx.forget('rxs'); } } @@ -224,7 +227,7 @@ ctx.attr(r.spDot, 'cx', p.last[0].toFixed(1)); ctx.attr(r.spDot, 'cy', p.last[1].toFixed(1)); } - statusDot(ctx, page.querySelector('[data-pg-role=details]'), /^Live/, /^Paused/); + statusDot(ctx, page.querySelector('[data-pg-role=details]'), st === 'live', st === 'paused'); }, }); @@ -276,11 +279,11 @@ if (!body) return; const E = ctx.el; role(body.querySelector(':scope > .note.warn'), 'missing'); - role(cardBy(body, 'Screen'), 'screen'); - const pic = role(cardBy(body, 'Picture'), 'picture'); - role(cardBy(body, 'Sound and control'), 'sound'); - role(cardBy(body, 'Remote'), 'remote'); - role(cardBy(body, 'Details'), 'details'); + role(cardBy(body, 'share.screen', 'Screen'), 'screen'); + const pic = role(cardBy(body, 'clipboard.picture', 'Picture'), 'picture'); + role(cardBy(body, 'share.sound_and_control', 'Sound and control'), 'sound'); + role(cardBy(body, 'nav.remote', 'Remote'), 'remote'); + role(cardBy(body, 'kit.details', 'Details'), 'details'); const untitled = wrapsOf(body).filter((w) => !w.querySelector(':scope > .card-title')); if (untitled.length) role(untitled[untitled.length - 1], 'driver'); const h = ctx.hdr({ cls: 'sx tx' }); @@ -355,15 +358,15 @@ const cyc = mbps != null ? clamp(8 - 4 * (mbps / cap), 4, 8) : 6; if (ctx.changed('cyc', Math.round(cyc * 2))) ctx.css(h, '--sx-cycle', cyc.toFixed(1) + 's'); // text - ctx.text(t.kick, ext ? 'Extra screen · Extend' : m.mode === 'mirror' ? (m.monName || 'This screen') + ' · Mirror' : 'Share screen'); - if (st === 'live' && mbps != null) setFig(ctx, t, mbps, m.cap ? 'of ' + m.cap + ' Mbps' : 'Mbps'); - else setFig(ctx, t, { off: 'Off', busy: 'Starting', live: 'Live', nopeer: 'Waiting', armed: 'Ready', connecting: 'Connecting' }[st], ''); - ctx.text(t.cap, m.error && st !== 'live' ? m.error : st === 'live' ? 'On ' + who : st === 'busy' ? 'Adding the virtual display…' - : st === 'nopeer' ? 'Waiting for ' + who : st === 'armed' ? 'Starts when ' + who + ' opens it' : st === 'connecting' ? 'Connecting to ' + who : ''); + ctx.text(t.kick, ext ? tr('pfx_screens.extra_screen_extend', null, 'Extra screen · Extend') : m.mode === 'mirror' ? tr('pfx_screens.screen_mirror', { name: m.monName || tr('pfx_screens.this_screen', null, 'This screen') }, '{name} · Mirror') : tr('nav.share', null, 'Share screen')); + if (st === 'live' && mbps != null) setFig(ctx, t, mbps, m.cap ? tr('pfx_screens.of_cap_mbps', { n: m.cap }, 'of {n} Mbps') : 'Mbps'); + else setFig(ctx, t, { off: tr('general.off', null, 'Off'), busy: tr('pfx_screens.starting', null, 'Starting'), live: tr('display.live', null, 'Live'), nopeer: tr('pfx_screens.waiting', null, 'Waiting'), armed: tr('terminal.ready', null, 'Ready'), connecting: tr('pfx_screens.connecting', null, 'Connecting') }[st], ''); + ctx.text(t.cap, m.error && st !== 'live' ? m.error : st === 'live' ? tr('share.on_name', { name: who }, 'On {name}') : st === 'busy' ? tr('pfx_screens.adding_virtual_display', null, 'Adding the virtual display…') + : st === 'nopeer' ? tr('share.waiting_for_name', { name: who }, 'Waiting for {name}') : st === 'armed' ? tr('pfx_screens.starts_when_opens', { name: who }, 'Starts when {name} opens it') : st === 'connecting' ? tr('pfx_screens.connecting_to', { name: who }, 'Connecting to {name}') : ''); const impl = x ? ((x.encoder != null && typeof x.hw === 'boolean' ? (x.hw ? 'HW ' : 'SW ') : '') + String(x.codec || '').toUpperCase()).trim() : ''; ctx.text(t.meta, st === 'live' && x - ? [num(x.fps) != null ? x.fps + ' fps' : '', impl, (num(x.rttMs) ?? num(G.get(s, 'client.rttMs'))) != null ? (num(x.rttMs) ?? num(G.get(s, 'client.rttMs'))) + ' ms' : '', m.sound ? 'sound' : ''].filter(Boolean).join(' · ') - : st === 'off' || st === 'nopeer' ? '' : [m.input ? 'input from ' + who : 'view only', m.sound ? 'sound' : '', m.remote ? 'remote start' : ''].filter(Boolean).join(' · ')); + ? [num(x.fps) != null ? x.fps + ' fps' : '', impl, (num(x.rttMs) ?? num(G.get(s, 'client.rttMs'))) != null ? (num(x.rttMs) ?? num(G.get(s, 'client.rttMs'))) + ' ms' : '', m.sound ? tr('pfx_screens.sound', null, 'sound') : ''].filter(Boolean).join(' · ') + : st === 'off' || st === 'nopeer' ? '' : [m.input ? tr('pfx_screens.input_from', { name: who }, 'input from {name}') : tr('pfx_screens.view_only', null, 'view only'), m.sound ? tr('pfx_screens.sound', null, 'sound') : '', m.remote ? tr('pfx_screens.remote_start', null, 'remote start') : ''].filter(Boolean).join(' · ')); // the gauge in the Picture card if (r.gauge) { const tgt = x && num(x.targetMbps) ? clamp(x.targetMbps / cap, 0, 1) : null; @@ -371,12 +374,12 @@ if (x && mbps != null) { ctx.css(r.gauge, { '--fill': clamp(mbps / cap, 0, 1).toFixed(3), '--target': tgt != null ? tgt.toFixed(3) : null }); ctx.attr(r.gauge, 'data-tick', tgt != null ? '' : null); - ctx.text(r.gLbl, fmt1(mbps) + ' of ' + cap + ' Mbps' + (num(x.targetMbps) ? ' · network ' + x.targetMbps : '')); + ctx.text(r.gLbl, num(x.targetMbps) ? tr('pfx_screens.gauge_network', { n: fmt1(mbps), cap, net: x.targetMbps }, '{n} of {cap} Mbps · network {net}') : tr('pfx_screens.gauge', { n: fmt1(mbps), cap }, '{n} of {cap} Mbps')); } } const drv = page.querySelector('[data-pg-role=driver]'); ctx.attr(drv, 'data-quiet', m.vdd && m.vdd.installed && !m.vdd.busy ? '' : null); - statusDot(ctx, page.querySelector('[data-pg-role=details]'), /^(On |Live)/, /^(Ready|Connecting|Starting|Waiting)/); + statusDot(ctx, page.querySelector('[data-pg-role=details]'), st === 'live', st === 'armed' || st === 'connecting' || st === 'busy' || st === 'nopeer'); }, }); @@ -449,15 +452,15 @@ ctx.attr(h, 'data-open', m.open > 0 ? '' : null); const who = whoOf(s); // left: the apps over there - ctx.text(r.L.kick, 'On ' + who); - if (st === 'ready') setFig(ctx, r.L, m.list.length, m.list.length === 1 ? 'app' : 'apps'); - else setFig(ctx, r.L, st === 'nopeer' ? 'Waiting' : st === 'loading' ? 'Loading' : 'No apps', ''); - ctx.text(r.L.cap, st === 'nopeer' ? 'Waiting for ' + who : !m.inOn ? 'Opening them here is off' : 'Each opens in its own window here'); + ctx.text(r.L.kick, tr('share.on_name', { name: who }, 'On {name}')); + if (st === 'ready') setFig(ctx, r.L, m.list.length, m.list.length === 1 ? tr('pfx_screens.unit_app', null, 'app') : tr('pfx_screens.unit_apps', null, 'apps')); + else setFig(ctx, r.L, st === 'nopeer' ? tr('pfx_screens.waiting', null, 'Waiting') : st === 'loading' ? tr('pfx_screens.loading', null, 'Loading') : tr('pfx_screens.no_apps', null, 'No apps'), ''); + ctx.text(r.L.cap, st === 'nopeer' ? tr('share.waiting_for_name', { name: who }, 'Waiting for {name}') : !m.inOn ? tr('pfx_screens.opening_here_off', null, 'Opening them here is off') : tr('pfx_screens.each_opens_here', null, 'Each opens in its own window here')); ctx.text(r.L.meta, ''); // right: windows open here, and what goes the other way - ctx.text(r.R.kick, 'Open here'); + ctx.text(r.R.kick, tr('pfx_screens.open_here', null, 'Open here')); setFig(ctx, r.R, st === 'nopeer' ? '–' : m.open, ''); - ctx.text(r.R.cap, st === 'nopeer' ? '' : !m.outOn ? 'Sharing yours is off' : m.ret ? 'Off on ' + who : m.streaming ? plural(m.streaming, 'window', 'windows') + ' on ' + who : 'Yours can open there'); + ctx.text(r.R.cap, st === 'nopeer' ? '' : !m.outOn ? tr('pfx_screens.sharing_yours_off', null, 'Sharing yours is off') : m.ret ? tr('pfx_input.off_on_name', { name: who }, 'Off on {name}') : m.streaming ? tr('pfx_screens.windows_on_name', { windows: nWindows(m.streaming), name: who }, '{windows} on {name}') : tr('pfx_screens.yours_can_open', null, 'Yours can open there')); ctx.text(r.R.meta, ''); // the direction cards count what's open const cards = page.querySelectorAll(':scope > .page-body > .dir-pair > .dir-card'); @@ -466,7 +469,7 @@ // the search count if (r.count && r.grid) { const q = r.filter && r.filter.value.trim(); - ctx.text(r.count, !m.list.length ? '' : q ? r.grid.children.length + ' of ' + m.list.length : m.list.length + ' apps'); + ctx.text(r.count, !m.list.length ? '' : q ? tr('pfx_screens.shown_of_total', { shown: r.grid.children.length, total: m.list.length }, '{shown} of {total}') : nApps(m.list.length)); } }, }); @@ -484,8 +487,8 @@ if (!body) return; const E = ctx.el; role(wrapsOf(body).find((w) => w.querySelector('.btn.primary:not(.small)')), 'show'); - role(cardStarts(body, 'Open on '), 'wins'); - const opts = role(cardBy(body, 'Phone windows'), 'opts'); + role(cardStarts(body, 'mirror.open_on_here', 'Open on {here}'), 'wins'); + const opts = role(cardBy(body, 'mirror.phone_windows', 'Phone windows'), 'opts'); const q = opts && [...opts.querySelectorAll('select')].find((x) => x.querySelector('option[value="24"]')); const r = { h: ctx.hdr({ cls: 'sx mi' }), quality: q && q.closest('.row') }; if (r.quality) r.quality.setAttribute('data-pg-quality', ''); @@ -566,17 +569,17 @@ } // text const p = G.phone(s) || {}; - const name = (ph.connected && ph.connected.name) || p.name || 'Phone'; + const name = (ph.connected && ph.connected.name) || p.name || tr('nav.phone', null, 'Phone'); const rtt = num(ph.connected && ph.connected.rttMs) ?? p.rtt; const via = br.via || (p.usb ? 'usb' : 'wifi'); ctx.text(t.kick, [name, /usb/i.test(via) ? 'USB' : 'Wi-Fi', rtt != null ? rtt + ' ms' : ''].filter(Boolean).join(' · ')); - if (st === 'casting') setFig(ctx, t, wins.length, wins.length === 1 ? 'window' : 'windows'); - else setFig(ctx, t, st === 'idle' ? 'Ready' : st === 'connecting' ? 'Connecting' : 'Not set up', ''); - ctx.text(t.cap, st === 'nobridge' ? 'Wireless debugging, once, on Connection' : st === 'connecting' ? br.message || 'Connecting to the phone…' - : st === 'idle' ? 'Show Phone Screen opens it here' - : wins.length === 1 ? (wins[0].kind === 'screen' ? 'The phone’s screen, open here' : wins[0].kind === 'camera' ? 'The phone’s camera, open here' : (wins[0].title || 'An app') + ', open here') - : 'Open on ' + G.myName(s)); - ctx.text(t.meta, [lvl != null ? lvl + '%' + (info.charging ? ' charging' : '') : '', (num(set.bitrateMbps) || 8) + ' Mb/s', set.sound ? (br.sound && br.sound.on ? 'sound on' : 'sound') : ''].filter(Boolean).join(' · ')); + if (st === 'casting') setFig(ctx, t, wins.length, wins.length === 1 ? tr('pfx_screens.unit_window', null, 'window') : tr('pfx_screens.unit_windows', null, 'windows')); + else setFig(ctx, t, st === 'idle' ? tr('terminal.ready', null, 'Ready') : st === 'connecting' ? tr('pfx_screens.connecting', null, 'Connecting') : tr('device.not_set_up', null, 'Not set up'), ''); + ctx.text(t.cap, st === 'nobridge' ? tr('pfx_screens.wireless_debugging_once', null, 'Wireless debugging, once, on Connection') : st === 'connecting' ? br.message || tr('pfx_screens.connecting_to_phone', null, 'Connecting to the phone…') + : st === 'idle' ? tr('pfx_screens.show_phone_screen_opens', null, 'Show Phone Screen opens it here') + : wins.length === 1 ? (wins[0].kind === 'screen' ? tr('pfx_screens.phone_screen_open_here', null, 'The phone’s screen, open here') : wins[0].kind === 'camera' ? tr('pfx_screens.phone_camera_open_here', null, 'The phone’s camera, open here') : tr('pfx_screens.app_open_here', { app: wins[0].title || tr('pfx_screens.an_app', null, 'An app') }, '{app}, open here')) + : tr('mirror.open_on_here', { here: G.myName(s) }, 'Open on {here}')); + ctx.text(t.meta, [lvl != null ? (info.charging ? tr('pfx_screens.pct_charging', { n: lvl }, '{n}% charging') : lvl + '%') : '', (num(set.bitrateMbps) || 8) + ' Mb/s', set.sound ? (br.sound && br.sound.on ? tr('pfx_screens.sound_on', null, 'sound on') : tr('pfx_screens.sound', null, 'sound')) : ''].filter(Boolean).join(' · ')); // page inserts if (r.quality) ctx.attr(r.quality, 'data-q', String(num(set.bitrateMbps) || 8)); const list = page.querySelector('[data-pg-role=wins] > .card > div'); @@ -634,9 +637,9 @@ // centre: the count (or "shown of total" while searching) if (term && apps.length) { const shown = apps.filter((a) => String(a.name || '').toLowerCase().includes(term)).length; - setFig(ctx, r.t, shown, 'of ' + apps.length); - } else if (apps.length) setFig(ctx, r.t, apps.length, 'apps'); - else setFig(ctx, r.t, st === 'loading' ? 'Loading' : '–', ''); + setFig(ctx, r.t, shown, tr('pfx_screens.unit_of_n', { n: apps.length }, 'of {n}')); + } else if (apps.length) setFig(ctx, r.t, apps.length, tr('pfx_screens.unit_apps', null, 'apps')); + else setFig(ctx, r.t, st === 'loading' ? tr('pfx_screens.loading', null, 'Loading') : '–', ''); // apps open in windows here, matched to the drawer by package const wins = (Array.isArray(br.windows) ? br.windows : []).filter((w) => w && w.kind === 'app'); const openApps = []; @@ -645,12 +648,12 @@ if (r.grid) for (const tile of r.grid.children) { const sp = tile.querySelector('span'); ctx.cls(tile, 'pg-open', !!sp && names.has(sp.textContent)); } // sides const p = G.phone(s) || {}; - const name = p.name || (ph.connected && ph.connected.name) || 'Phone'; - ctx.text(r.L.kick, 'App drawer'); - ctx.text(r.L.cap, ready ? 'Each opens in its own window' : br.state === 'connecting' ? 'Connecting…' : 'Needs wireless debugging'); + const name = p.name || (ph.connected && ph.connected.name) || tr('nav.phone', null, 'Phone'); + ctx.text(r.L.kick, tr('pfx_screens.app_drawer', null, 'App drawer')); + ctx.text(r.L.cap, ready ? tr('pfx_screens.each_opens_own_window', null, 'Each opens in its own window') : br.state === 'connecting' ? tr('hub.connecting_dots', null, 'Connecting…') : tr('pfx_screens.needs_wireless_debugging', null, 'Needs wireless debugging')); ctx.text(r.L.meta, name); - ctx.text(r.Rt.kick, 'In windows'); - ctx.text(r.Rt.cap, wins.length ? openApps.slice(0, 2).map((a) => a.name).join(', ') + (wins.length > 2 ? ' +' + (wins.length - 2) : '') || plural(wins.length, 'app', 'apps') : 'None open'); + ctx.text(r.Rt.kick, tr('pfx_screens.in_windows', null, 'In windows')); + ctx.text(r.Rt.cap, wins.length ? openApps.slice(0, 2).map((a) => a.name).join(', ') + (wins.length > 2 ? ' +' + (wins.length - 2) : '') || nApps(wins.length) : tr('apps.none_open', null, 'None open')); ctx.text(r.Rt.meta, ready ? (/usb/i.test(br.via || '') ? 'USB' : 'Wi-Fi') : ''); ctx.attr(r.Rt.el, 'data-n', String(wins.length)); }, diff --git a/shared/pagefx/sharing.js b/shared/pagefx/sharing.js index 42900687..e25b074a 100644 --- a/shared/pagefx/sharing.js +++ b/shared/pagefx/sharing.js @@ -21,6 +21,7 @@ FX._sharing = true; const UI = window.UI || {}; const api = () => UI.api || window.macshare || {}; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const safe = (fn, dflt) => { try { const v = fn(); return v === undefined ? dflt : v; } catch (e) { return dflt; } }; const num = (v) => (typeof v === 'number' && isFinite(v) ? v : null); const arr = (v) => (Array.isArray(v) ? v : []); @@ -48,21 +49,22 @@ } const osGlyph = (os) => ({ mac: 'mac', win: 'win', windows: 'win', linux: 'linux', android: 'phone' })[os] || 'desktop'; const myGlyph = (ctx) => (ctx.platform === 'mac' ? 'mac' : ctx.platform === 'linux' ? 'linux' : 'win'); - // The card-wrap whose title reads `re` (a page's cards have no stable class). - function cardByTitle(body, re) { + // The card-wrap whose title reads `re`, or is the page's own translated title `key` (a page's cards have no stable class). + function cardByTitle(body, re, key, en) { if (!body) return null; for (const w of body.querySelectorAll(':scope > .card-wrap')) { const t = w.querySelector(':scope > .card-title > span'); - if (t && re.test(t.textContent || '')) return w; + const text = t ? t.textContent || '' : ''; + if (t && (re.test(text) || (key && text.trim().toLowerCase() === String(tr(key, null, en)).toLowerCase()))) return w; } return null; } // Linked to the other computer (Windows / Linux s.link, Mac s.client, mesh s.peers). const connected = (s, ctx) => ctx.linkState(s) === 'connected' && !!(s && (s.link ? s.link.state === 'connected' : true)); - const peerLabel = (s, ctx) => ctx.peerName(s) || safe(() => UI.peer(s).name, '') || 'the other computer'; + const peerLabel = (s, ctx) => ctx.peerName(s) || safe(() => UI.peer(s).name, '') || tr('kit.the_other_computer', null, 'the other computer'); const myLabel = (s, ctx) => ctx.myName(s); // The phone's own name: the hub's, else the connected phone's (UI.phoneName falls back to "your phone"). - const phoneLabel = (s, ctx) => (s && s.hub && s.hub.name) || (ctx.phone(s) || {}).name || 'your phone'; + const phoneLabel = (s, ctx) => (s && s.hub && s.hub.name) || (ctx.phone(s) || {}).name || tr('hub.your_phone', null, 'your phone'); const ext = (name) => { const m = /\.([a-z0-9]{1,5})$/i.exec(String(name || '')); return m ? m[1].toUpperCase() : ''; }; // A mono tag: [icon] text; returns { e, t }. const mkTag = (ctx, cls, iconName) => { @@ -84,7 +86,7 @@ const FROM = { in: [X0, YI], out: [X1, YO] }; // where it leaves from function build(page, ctx) { const { el, svg } = ctx; - const h = ctx.hdr(page, { cls: 'shr shr-clip', interactive: true, label: 'Clipboard between your computers' }); + const h = ctx.hdr(page, { cls: 'shr shr-clip', interactive: true, label: tr('pfx_sharing.clipboard_between', null, 'Clipboard between your computers') }); const kick = el('div', 'pg-kick shr-clip-kick'); const thumb = el('img', 'shr-clip-thumb', null, { alt: '' }); thumb.hidden = true; @@ -138,7 +140,7 @@ flyEnd = ctx.after(1100, () => { r.dot.classList.remove('shr-fly'); flyEnd = null; }); } function tagCards(page, ctx, c) { - const priv = cardByTitle(ctx.body, /privacy/i); + const priv = cardByTitle(ctx.body, /privacy/i, 'clipboard.privacy', 'Privacy'); if (priv) { ctx.cls(priv, 'pg-privacy', true); ctx.cls(priv, 'pg-shield-on', !!c.skipConcealed); } } return { @@ -166,29 +168,29 @@ const thumbSrc = img && img.thumb ? img.thumb : ''; r.thumb.hidden = !thumbSrc; if (thumbSrc && r.thumb.getAttribute('src') !== thumbSrc) r.thumb.src = thumbSrc; - ctx.text(r.figText, !h0 ? (histOff ? 'Recent items are off' : 'Nothing copied yet') - : img ? (img.shot ? 'Screenshot' : 'Picture') + (img.w ? ' ' + img.w + ' × ' + img.h : '') + ctx.text(r.figText, !h0 ? (histOff ? tr('clipboard.recent_off', null, 'Recent items are off') : tr('pfx_sharing.nothing_copied', null, 'Nothing copied yet')) + : img ? (img.shot ? tr('clipboard.screenshot', null, 'Screenshot') : tr('clipboard.picture', null, 'Picture')) + (img.w ? ' ' + img.w + ' × ' + img.h : '') : '“' + (clip(h0.text, 44) || ' ') + '”'); const can = !!h0 && (!img || !!img.copy); r.fig.disabled = !can; - r.fig.title = can ? 'Copy it again' : ''; - r.fig.setAttribute('aria-label', can ? 'Copy the latest item again' : (r.figText.textContent || 'Clipboard')); - ctx.text(r.kick, !h0 ? 'Clipboard' : h0.dir === 'out' ? 'Latest · to ' + pn : 'Latest · from ' + pn); + r.fig.title = can ? tr('pfx_sharing.copy_it_again', null, 'Copy it again') : ''; + r.fig.setAttribute('aria-label', can ? tr('pfx_sharing.copy_latest_again', null, 'Copy the latest item again') : (r.figText.textContent || tr('clipboard.title', null, 'Clipboard'))); + ctx.text(r.kick, !h0 ? tr('clipboard.title', null, 'Clipboard') : h0.dir === 'out' ? tr('pfx_sharing.latest_to', { name: pn }, 'Latest · to {name}') : tr('pfx_sharing.latest_from', { name: pn }, 'Latest · from {name}')); // the caption const copied = Date.now() < copiedUntil; ctx.cls(r.h, 'copied', copied); - ctx.text(r.cap, copied ? 'Copied' - : !on ? 'Waiting for ' + pn - : refused ? 'Clipboard is off on ' + pn + ctx.text(r.cap, copied ? tr('pfx_sharing.copied', null, 'Copied') + : !on ? tr('kit.waiting_for_name', { name: pn }, 'Waiting for {name}') + : refused ? tr('pfx_sharing.clipboard_off_on', { name: pn }, 'Clipboard is off on {name}') : h0 ? [ctx.ago(h0.at), h0.size != null ? ctx.bytes(h0.size) : ''].filter(Boolean).join(' · ') - : histOff ? 'Copies still go across' - : c.receive && c.send ? 'Copy on either one, paste on the other' - : c.receive ? 'Copies on ' + pn + ' paste here' - : c.send ? 'Copies here paste on ' + pn : 'Both directions are off'); - showTag(ctx, r.mode, true, c.mode === 'switch' ? 'On switch' : 'Instant'); - showTag(ctx, r.pics, !!(c.imageSupport && c.images), 'Pictures'); - showTag(ctx, r.skip, !!(c.enabled && c.lastSkip), 'Not sent: ' + clip(c.lastSkip, 28)); + : histOff ? tr('pfx_sharing.copies_still_go', null, 'Copies still go across') + : c.receive && c.send ? tr('pfx_sharing.copy_either_paste_other', null, 'Copy on either one, paste on the other') + : c.receive ? tr('pfx_sharing.copies_there_paste_here', { name: pn }, 'Copies on {name} paste here') + : c.send ? tr('pfx_sharing.copies_here_paste_there', { name: pn }, 'Copies here paste on {name}') : tr('pfx_sharing.both_directions_off', null, 'Both directions are off')); + showTag(ctx, r.mode, true, c.mode === 'switch' ? tr('pfx_sharing.on_switch', null, 'On switch') : tr('pfx_sharing.instant', null, 'Instant')); + showTag(ctx, r.pics, !!(c.imageSupport && c.images), tr('clipboard.pictures', null, 'Pictures')); + showTag(ctx, r.skip, !!(c.enabled && c.lastSkip), tr('pfx_sharing.not_sent_reason', { reason: clip(c.lastSkip, 28) }, 'Not sent: {reason}')); // the rails const inOn = on && !!c.receive; @@ -200,7 +202,7 @@ ctx.cls(r.sweepOut, 'on', outOn); ctx.text(r.lPeer, pn); ctx.text(r.lMe, myLabel(s, ctx)); - ctx.text(r.lOff, refused ? 'off' : ''); + ctx.text(r.lOff, refused ? tr('pfx_sharing.off_lc', null, 'off') : ''); // the dot: the item, at its destination (parked on me while unlinked); flies once per new item, // keyed on history[0].at — the page's list rebuilds every 15 s, so never key on the DOM @@ -236,13 +238,14 @@ svg('circle', { class: 'shr-bell-dot', cx: '23', cy: '9', r: '2.6' }), ]); const bellWrap = el('div', 'shr-bell-wrap', [bell]); - const counter = (label) => { + const counter = () => { const n = el('span', 'pg-fig shr-n'); - const e = el('div', 'shr-count', [n, el('span', 'pg-kick', label)]); - return { e, n }; + const k = el('span', 'pg-kick'); + const e = el('div', 'shr-count', [n, k]); + return { e, n, k }; }; - const shown = counter('shown here'); - const sent = counter('sent'); + const shown = counter(); + const sent = counter(); const counts = el('div', 'shr-counts', [shown.e, el('i', 'pg-vr'), sent.e]); const cap = el('div', 'shr-cap'); const hide = mkTag(ctx, 'shr-notif-hide', 'eyeoff'); @@ -260,10 +263,10 @@ if (key !== toastKey) { toastKey = key; if (!top.length) { - r.stack.replaceChildren(ctx.el('div', 'shr-toast empty', [ctx.el('span', 'shr-toast-text', 'Quiet. New ones land here.')])); + r.stack.replaceChildren(ctx.el('div', 'shr-toast empty', [ctx.el('span', 'shr-toast-text', tr('pfx_sharing.quiet_new_land', null, 'Quiet. New ones land here.'))])); } else { r.stack.replaceChildren(...top.map((it, i) => { - const app = String(it.appName || it.app || 'App'); + const app = String(it.appName || it.app || tr('rezume.app', null, 'App')); const av = icons[it.app] ? ctx.el('img', 'shr-toast-av', null, { src: icons[it.app], alt: '' }) : ctx.el('span', 'shr-toast-av letter', app.trim().charAt(0).toUpperCase() || '·'); @@ -280,8 +283,8 @@ function tagCards(page, ctx, n, hist, fresh) { const body = ctx.body; if (!body) return; - let feed = cardByTitle(body, /recent notif|notifications/i); - let apps = cardByTitle(body, /^\s*apps\s*$/i); + let feed = cardByTitle(body, /recent notif|notifications/i, 'notifs.recent_notifications', 'Recent Notifications'); + let apps = cardByTitle(body, /^\s*apps\s*$/i, 'nav.apps', 'Apps'); const wraps = body.querySelectorAll(':scope > .card-wrap'); if (!feed && wraps[0]) feed = wraps[0]; if (!apps && wraps[1]) apps = wraps[1]; @@ -316,14 +319,16 @@ ctx.cls(r.h, 'quiet', !hist.length); ctx.count(r.shown.n, num(n.shown) || 0); ctx.count(r.sent.n, num(n.sent) || 0); + ctx.text(r.shown.k, tr('pfx_sharing.shown_here', null, 'shown here')); + ctx.text(r.sent.k, tr('pfx_sharing.sent_lc', null, 'sent')); ctx.cls(r.shown.e, 'dim', !n.receive); const unreadable = n.readable === false || n.access === 'noAccess'; // Mac: Full Disk Access ctx.cls(r.sent.e, 'dim', !n.send || unreadable); - showTag(ctx, r.hide, !!n.hideText && !!n.send && !unreadable, 'Text hidden'); - showTag(ctx, r.warn, unreadable, n.access === 'noAccess' ? 'Needs Full Disk Access' : ctx.platform === 'win' ? 'Can’t read Windows’ list' : 'Can’t read the list'); - ctx.text(r.cap, !on ? 'Nothing comes in until ' + pn + ' connects' - : !hist.length ? (n.receive ? 'Waiting for the first one' : 'Receiving is off') - : 'Latest ' + [hist[0].appName || hist[0].app, ctx.ago(hist[0].at)].filter(Boolean).join(' · ')); + showTag(ctx, r.hide, !!n.hideText && !!n.send && !unreadable, tr('pfx_sharing.text_hidden', null, 'Text hidden')); + showTag(ctx, r.warn, unreadable, n.access === 'noAccess' ? tr('notifs.needs_full_disk_access', null, 'Needs Full Disk Access') : ctx.platform === 'win' ? tr('pfx_sharing.cant_read_windows_list', null, 'Can’t read Windows’ list') : tr('pfx_sharing.cant_read_list', null, 'Can’t read the list')); + ctx.text(r.cap, !on ? tr('pfx_sharing.nothing_comes_in', { name: pn }, 'Nothing comes in until {name} connects') + : !hist.length ? (n.receive ? tr('pfx_sharing.waiting_first_one', null, 'Waiting for the first one') : tr('pfx_sharing.receiving_off', null, 'Receiving is off')) + : tr('pfx_sharing.latest_what', { what: [hist[0].appName || hist[0].app, ctx.ago(hist[0].at)].filter(Boolean).join(' · ') }, 'Latest {what}')); toasts(ctx, n, hist); const id = hist[0] ? (hist[0].id != null ? hist[0].id : hist[0].at) : null; const fresh = lastId !== undefined && id != null && id !== lastId; @@ -373,7 +378,7 @@ return { h, kick, status, fig, peer, me, line, tok, tokExt, tokMark, queue, cap, drive, share }; } function tagPage(page, ctx, live) { - const log = cardByTitle(ctx.body, /^\s*recent\s*$/i); + const log = cardByTitle(ctx.body, /^\s*recent\s*$/i, 'files.recent', 'Recent'); if (!log) return; ctx.cls(log, 'pg-files-log', true); const rows = log.querySelectorAll(':scope > .card > .row'); @@ -406,15 +411,15 @@ const take = !!(f.acceptFromMac != null ? f.acceptFromMac : f.acceptDrops); const send = f.dropToMac != null ? !!f.dropToMac : Array.isArray(f.sending); ctx.cls(r.peer.lamp, 'on', on && send); - ctx.text(r.peer.lamp.lastElementChild, send ? 'Gets your files' : 'Sending off'); + ctx.text(r.peer.lamp.lastElementChild, send ? tr('pfx_sharing.gets_your_files', null, 'Gets your files') : tr('pfx_sharing.sending_off', null, 'Sending off')); ctx.cls(r.me.lamp, 'on', on && take); - ctx.text(r.me.lamp.lastElementChild, take ? 'Takes files' : 'Taking off'); + ctx.text(r.me.lamp.lastElementChild, take ? tr('pfx_sharing.takes_files', null, 'Takes files') : tr('pfx_sharing.taking_off', null, 'Taking off')); ctx.cls(r.h, 'no-peer', !on); ctx.cls(r.h, 'idle-dirs', !take && !send); // what moves: a batch (Send / paste) or the current file out; files coming in; a drag const b = f.batch || (macSending.length ? { - kind: 'send', name: macSending.length > 1 ? macSending.length + ' files' : macSending[0].name, + kind: 'send', name: macSending.length > 1 ? tr('pfx_sharing.n_files_other', { n: macSending.length }, '{n} files') : macSending[0].name, bytes: macSending.reduce((a, x) => a + (num(x.size) || 0), 0), sent: macSending.reduce((a, x) => a + (num(x.sent) || 0), 0), files: 1, index: 0, } : null); const c = f.current; @@ -432,7 +437,7 @@ dr.last ? Object.assign({}, dr.last, { dir: 'in', name: dr.last.name || '' }) : null, arr(f.recent)[0] ? Object.assign({}, f.recent[0], { dir: 'in' }) : null, arr(f.sent)[0] ? Object.assign({}, f.sent[0], { dir: 'out' }) : null, - ].filter((x) => x && x.at).map((x) => (x.text != null ? x : Object.assign(x, { text: x.ok ? '' : x.error ? 'Failed: ' + x.error : '' }))) + ].filter((x) => x && x.at).map((x) => (x.text != null ? x : Object.assign(x, { text: x.ok ? '' : x.error ? tr('pfx_sharing.failed_error', { error: x.error }, 'Failed: {error}') : '' }))) .sort((x, y) => y.at - x.at); const lastR = lasts[0] || null; const st = sending ? 'out' : dragging ? 'drag' : receiving ? 'in' : lastR ? 'done' : 'idle'; @@ -444,7 +449,7 @@ r.tok.hidden = st === 'idle' || st === 'in'; const tokName = st === 'out' ? outName : st === 'drag' ? dr.name : lastR ? lastR.name : ''; const e = ext(tokName); - ctx.text(r.tokExt, (e || 'FILE').slice(0, 4)); + ctx.text(r.tokExt, (e || tr('pfx_sharing.file_token', null, 'FILE')).slice(0, 4)); ctx.attr(r.tok, 'data-ok', st === 'done' ? (lastR.ok ? '1' : '0') : null); ctx.text(r.tokMark, st === 'done' ? (lastR.ok ? '✓' : '×') : ''); if (st === 'done' && ctx.changed('doneAt', lastR.at)) ctx.pop(r.tok, 'shr-dock', 800); @@ -460,32 +465,31 @@ // the status line and the figure let kick, status, fig = '', cap; if (st === 'out') { - const kind = b && b.kind === 'paste' ? 'Pasting' : 'Sending'; - const idx = b ? (b.files > 1 ? (b.index + 1) + ' of ' + b.files : '') : c && c.count > 1 ? (c.index + 1) + ' of ' + c.count : ''; - kick = kind + ' to ' + pn; + const idx = b ? (b.files > 1 ? tr('pfx_sharing.i_of_n', { i: b.index + 1, n: b.files }, '{i} of {n}') : '') : c && c.count > 1 ? tr('pfx_sharing.i_of_n', { i: c.index + 1, n: c.count }, '{i} of {n}') : ''; + kick = b && b.kind === 'paste' ? tr('pfx_sharing.pasting_to', { name: pn }, 'Pasting to {name}') : tr('pfx_sharing.sending_to', { name: pn }, 'Sending to {name}'); status = clip(outName, 48); fig = pct(p) + '%'; - cap = [idx, mb(sentB) + ' of ' + mb(total), q ? q + ' more waiting' : ''].filter(Boolean).join(' · '); + cap = [idx, tr('pfx_sharing.mb_of_mb', { sent: mb(sentB), total: mb(total) }, '{sent} of {total}'), q ? tr('pfx_sharing.n_more_waiting', { n: q }, '{n} more waiting') : ''].filter(Boolean).join(' · '); } else if (st === 'drag') { - kick = dr.state === 'copying' ? 'Copying across the edge' : 'Dragging across the edge'; - status = clip(dr.name, 48) || 'Files'; - cap = dr.state === 'copying' ? 'Into ' + safe(() => UI.receivedName(s), 'Downloads') : 'Esc cancels'; + kick = dr.state === 'copying' ? tr('pfx_sharing.copying_across_edge', null, 'Copying across the edge') : tr('pfx_sharing.dragging_across_edge', null, 'Dragging across the edge'); + status = clip(dr.name, 48) || tr('hub.files', null, 'Files'); + cap = dr.state === 'copying' ? tr('pfx_sharing.into_folder', { folder: safe(() => UI.receivedName(s), tr('general.downloads', null, 'Downloads')) }, 'Into {folder}') : tr('files.esc_cancels', null, 'Esc cancels'); } else if (st === 'in') { - kick = 'Receiving from ' + pn; - status = macReceiving.length === 1 && !inc.receiving ? clip(macReceiving[0].name, 48) : recvN + ' file' + (recvN > 1 ? 's' : ''); - cap = 'Into ' + safe(() => UI.receivedName(s), 'Downloads'); + kick = tr('pfx_sharing.receiving_from', { name: pn }, 'Receiving from {name}'); + status = macReceiving.length === 1 && !inc.receiving ? clip(macReceiving[0].name, 48) : recvN > 1 ? tr('pfx_sharing.n_files_other', { n: recvN }, '{n} files') : tr('pfx_sharing.n_files_one', { n: recvN }, '{n} file'); + cap = tr('pfx_sharing.into_folder', { folder: safe(() => UI.receivedName(s), tr('general.downloads', null, 'Downloads')) }, 'Into {folder}'); } else if (!on) { - kick = 'File sharing'; - status = 'Connect to send files'; - cap = lastR ? 'Last: ' + clip(lastR.name, 32) + ' · ' + ctx.ago(lastR.at) : 'Waiting for ' + pn; + kick = tr('feature_art.files_title', null, 'File sharing'); + status = tr('pfx_sharing.connect_to_send', null, 'Connect to send files'); + cap = lastR ? tr('pfx_sharing.last_file', { name: clip(lastR.name, 32), ago: ctx.ago(lastR.at) }, 'Last: {name} · {ago}') : tr('kit.waiting_for_name', { name: pn }, 'Waiting for {name}'); } else if (lastR) { - kick = lastR.ok ? (lastR.dir === 'out' ? 'Sent to ' + pn : 'Received from ' + pn) : (lastR.dir === 'out' ? 'Not sent' : 'Not received'); - status = clip(lastR.name, 48) || (lastR.ok ? 'Done' : 'Didn’t go through'); + kick = lastR.ok ? (lastR.dir === 'out' ? tr('pfx_sharing.sent_to', { name: pn }, 'Sent to {name}') : tr('pfx_sharing.received_from', { name: pn }, 'Received from {name}')) : (lastR.dir === 'out' ? tr('messages.status_not_sent', null, 'Not sent') : tr('files.not_received', null, 'Not received')); + status = clip(lastR.name, 48) || (lastR.ok ? tr('setup.done', null, 'Done') : tr('pfx_sharing.didnt_go_through', null, 'Didn’t go through')); cap = [lastR.text, ctx.ago(lastR.at)].filter(Boolean).join(' · '); } else { - kick = 'File sharing'; - status = 'Ready when you are'; - cap = !take && !send ? 'Both directions are off' : 'Drop files below, or drag them across the screen edge'; + kick = tr('feature_art.files_title', null, 'File sharing'); + status = tr('pfx_sharing.ready_when_you_are', null, 'Ready when you are'); + cap = !take && !send ? tr('pfx_sharing.both_directions_off', null, 'Both directions are off') : tr('pfx_sharing.drop_files_below', null, 'Drop files below, or drag them across the screen edge'); } ctx.text(r.kick, kick); ctx.text(r.status, status); @@ -494,9 +498,9 @@ ctx.text(r.cap, cap); // folder tags - showTag(ctx, r.drive, !!smb.drive, 'Their folder · ' + smb.drive); + showTag(ctx, r.drive, !!smb.drive, tr('pfx_sharing.their_folder', { drive: smb.drive }, 'Their folder · {drive}')); const pe = smb.peer || {}; - showTag(ctx, r.share, !!f.shareOn, pe.mounted ? 'Folder shared · open there' : pe.error ? 'Sharing: problem' : 'Folder shared'); + showTag(ctx, r.share, !!f.shareOn, pe.mounted ? tr('pfx_sharing.folder_shared_open', null, 'Folder shared · open there') : pe.error ? tr('pfx_sharing.sharing_problem', null, 'Sharing: problem') : tr('pfx_sharing.folder_shared', null, 'Folder shared')); ctx.cls(r.share.e, 'warn', !!(f.shareOn && pe.error)); tagPage(page, ctx, { out: sending, in: receiving || dragging }); }, @@ -542,10 +546,10 @@ const fig = el('div', 'pg-fig', [n, unit]); const cap = el('div', 'shr-cap'); const mid = el('div', 'shr-text', [kick, fig, cap]); - const stat = (label) => { const v = el('b'); const e = el('div', 'shr-stat', [v, el('span', null, label)]); return { e, v }; }; - const sFolders = stat('folders'); - const sFiles = stat('files'); - const sSize = stat('in this folder'); + const stat = () => { const v = el('b'); const k = el('span'); const e = el('div', 'shr-stat', [v, k]); return { e, v, k }; }; + const sFolders = stat(); + const sFiles = stat(); + const sSize = stat(); const stats = el('div', 'shr-stats', [sFolders.e, sFiles.e, sSize.e]); const chosen = mkTag(ctx, 'shr-pf-chosen', 'check'); const imp = mkTag(ctx, 'shr-pf-import'); @@ -577,7 +581,7 @@ if (wrap) { const crumbs = page.querySelectorAll('.hub-crumbs > .hub-crumb'); const last = crumbs[crumbs.length - 1]; - const target = (last && last.textContent) || 'Storage'; + const target = (last && last.textContent) || tr('pfiles.storage', null, 'Storage'); ctx.attr(wrap, 'data-target', target); // the drop label is the card's ::after, and attr() reads the pseudo's own element for (const card of wrap.querySelectorAll('.card')) ctx.attr(card, 'data-target', target); @@ -604,7 +608,7 @@ }); } function chosenTag(ctx, n) { - showTag(ctx, r.chosen, n > 0, n + ' chosen'); + showTag(ctx, r.chosen, n > 0, tr('pfx_sharing.n_chosen', { n }, '{n} chosen')); if (ctx.changed('chosen', n) && n) ctx.pop(r.chosen.e, 'pg-pop', 700); } return { @@ -650,7 +654,8 @@ const ready = safe(() => UI.hubReady(s, 'files'), !!hub.files && !!hub.connected); const ble = safe(() => UI.onBle(s), false); const listNode = listEl(page); - const loading = !!(listNode && /loading/i.test((listNode.querySelector('.hub-empty') || {}).textContent || '')); + const emptyText = ((listNode && listNode.querySelector('.hub-empty')) || {}).textContent || ''; + const loading = !!(listNode && (/loading/i.test(emptyText) || emptyText === tr('general.loading', null, 'Loading…'))); const err = ready && !ble && fs && fs.error ? (page.querySelector('.hub-fs-status') || {}).textContent || fs.error : ''; const st = !ready ? 'off' : ble ? 'ble' : err ? 'error' : !(fs && fs.total) ? 'loading' : 'ok'; ctx.attr(r.h, 'data-state', st); @@ -662,9 +667,9 @@ ctx.text(r.kick, ph); if (hasSpace) { ctx.text(r.n, gb(fs.free || 0)); - ctx.text(r.unit, 'GB free'); + ctx.text(r.unit, tr('pfx_sharing.gb_free', null, 'GB free')); } else { - ctx.text(r.n, st === 'ble' ? 'Needs Wi-Fi' : st === 'off' ? 'Not ready' : st === 'error' ? 'Can’t open that' : 'Reading…'); + ctx.text(r.n, st === 'ble' ? tr('pfx_sharing.needs_wifi', null, 'Needs Wi-Fi') : st === 'off' ? tr('pfx_sharing.not_ready', null, 'Not ready') : st === 'error' ? tr('pfx_sharing.cant_open_that', null, 'Can’t open that') : tr('pfx_sharing.reading', null, 'Reading…')); ctx.text(r.unit, ''); } // the level follows (a short tween; jumps under reduced motion / while paused) @@ -681,24 +686,27 @@ const files = items.filter((x) => x && !x.dir); const size = files.reduce((a, x) => a + (num(x.size) || 0), 0); r.stats.hidden = !hasSpace; + ctx.text(r.sFolders.k, tr('pfx_sharing.folders', null, 'folders')); + ctx.text(r.sFiles.k, tr('pfx_sharing.files', null, 'files')); + ctx.text(r.sSize.k, tr('pfx_sharing.in_this_folder', null, 'in this folder')); ctx.text(r.sFolders.v, String(dirs)); ctx.text(r.sFiles.v, String(files.length)); ctx.text(r.sSize.v, files.length ? ctx.bytes(size) : '–'); const perm = ctx.get(s, 'hub.perm.files.perm', ''); const imp = (s && s.files && s.files.importTo) || null; - ctx.text(r.cap, st === 'off' ? (!hub.connected ? 'Connect ' + ph : perm === 'ask' ? 'Waiting for All files access' : 'Getting ' + ph + ' ready') - : st === 'ble' ? 'Over Bluetooth · connect with Wi-Fi Direct to browse' + ctx.text(r.cap, st === 'off' ? (!hub.connected ? tr('pfx_phone_media.connect_phone', { phone: ph }, 'Connect {phone}') : perm === 'ask' ? tr('pfx_sharing.waiting_all_files_access', null, 'Waiting for All files access') : tr('pfx_sharing.getting_ready', { phone: ph }, 'Getting {phone} ready')) + : st === 'ble' ? tr('pfx_sharing.over_bluetooth_browse', null, 'Over Bluetooth · connect with Wi-Fi Direct to browse') : st === 'error' ? clip(err, 80) - : st === 'loading' ? 'Opening Storage' - : 'of ' + gb(fs.total) + ' GB · ' + pct(used) + '% used · in ' + ((fs.path && fs.path.split('/').pop()) || 'Storage')); + : st === 'loading' ? tr('pfx_sharing.opening_storage', null, 'Opening Storage') + : tr('pfx_sharing.of_gb_used_in', { total: gb(fs.total), pct: pct(used), folder: (fs.path && fs.path.split('/').pop()) || tr('pfiles.storage', null, 'Storage') }, 'of {total} GB · {pct}% used · in {folder}')); // import mode - showTag(ctx, r.imp, !!imp, imp ? (imp.why === 'capture' ? 'Capturing into ' : 'Importing into ') + clip(imp.name, 20) : ''); + showTag(ctx, r.imp, !!imp, imp ? (imp.why === 'capture' ? tr('pfx_sharing.capturing_into', { name: clip(imp.name, 20) }, 'Capturing into {name}') : tr('pfx_sharing.importing_into', { name: clip(imp.name, 20) }, 'Importing into {name}')) : ''); // shared folders const sh = hub.share || {}; const pm = !!(sh.phone && sh.phone.mounted); const mo = !!(sh.mine && sh.mine.on); - showTag(ctx, r.lampPhone, !!sh.phone, 'Phone’s folder open'); - showTag(ctx, r.lampMine, !!sh.mine, 'Sharing a folder'); + showTag(ctx, r.lampPhone, !!sh.phone, tr('pfx_sharing.phone_folder_open', null, 'Phone’s folder open')); + showTag(ctx, r.lampMine, !!sh.mine, tr('pfx_sharing.sharing_a_folder', null, 'Sharing a folder')); ctx.cls(r.lampPhone.e, 'on', pm); ctx.cls(r.lampMine.e, 'on', mo); chosenTag(ctx, tagRows(page, ctx)); @@ -731,9 +739,9 @@ const bayLbl = el('span', 'shr-mt-baylbl'); const bay = el('div', 'shr-mt-bay', [el('div', 'shr-mt-slot', [letter, led]), bayLbl]); const stage = el('div', 'shr-mt-stage', [phone, conn, bay], { 'aria-hidden': 'true' }); - const spec = (k) => { const v = el('b'); return { e: el('span', 'shr-spec', [el('span', null, k), v]), v }; }; - const cVia = spec('Via'); - const cDrive = spec('Drive'); + const spec = () => { const v = el('b'); const k = el('span'); return { e: el('span', 'shr-spec', [k, v]), v, k }; }; + const cVia = spec(); + const cDrive = spec(); const cap = el('div', 'shr-cap'); const foot = el('div', 'shr-capline', [cap, el('div', 'shr-specs', [cVia.e, cDrive.e])]); h.replaceChildren(stage, foot); @@ -760,22 +768,25 @@ const via = ble ? '' : d.via === 'usb' ? 'usb' : d.via === 'wifi' ? 'wifi' : (ph.connected && ph.connected.usb ? 'usb' : ''); ctx.attr(r.h, 'data-state', st); ctx.attr(r.h, 'data-via', via || 'none'); - const name = d.name && d.name !== 'Phone' ? d.name : (s && s.hub && s.hub.name) || (ctx.phone(s) || {}).name || 'Phone'; + const name = d.name && d.name !== 'Phone' ? d.name : (s && s.hub && s.hub.name) || (ctx.phone(s) || {}).name || tr('nav.phone', null, 'Phone'); ctx.text(r.pname, clip(name, 22)); const lvl = num(info.battery); - ctx.text(r.batt, lvl == null ? '' : Math.round(lvl) + '%' + (info.charging ? ' · charging' : '')); + ctx.text(r.batt, lvl == null ? '' : info.charging ? tr('pfx_sharing.pct_charging', { n: Math.round(lvl) }, '{n}% · charging') : Math.round(lvl) + '%'); // Windows: a drive letter; Mac / Linux: a mount path, shown by its last part const vol = !letter && typeof d.mounted === 'string' ? clip(d.mounted.split(/[\\/]/).filter(Boolean).pop() || '', 12) : ''; ctx.text(r.letter, letter || vol || (d.mounted ? '●' : st === 'mounting' || st === 'unmounting' ? '…' : '—')); ctx.cls(r.letter, 'long', !letter && !!vol); - ctx.text(r.bayLbl, ctx.platform === 'mac' ? 'This Mac' : ctx.platform === 'linux' ? 'This computer' : 'This PC'); - ctx.text(r.cVia.v, ble ? '—' : via === 'usb' ? 'USB' : via === 'wifi' ? 'Wireless' : '—'); - ctx.text(r.cDrive.v, letter || (d.mounted ? 'Mounted' : '—')); - ctx.text(r.cap, st === 'ble' ? 'Needs Wi-Fi · Bluetooth can’t carry a drive' : st === 'error' ? clip(d.message, 90) - : st === 'adb' ? 'Wireless debugging is off on the phone' - : st === 'mounting' ? 'Mounting…' : st === 'unmounting' ? 'Unmounting…' - : st === 'mounted' ? (letter ? 'In ' + (ctx.platform === 'win' ? 'File Explorer' : 'the file manager') + ' as ' + letter : 'In your file manager') + (via === 'usb' ? ', through the cable' : via === 'wifi' ? ', over wireless debugging' : '') - : 'Ready · Mount puts it in ' + (ctx.platform === 'win' ? 'This PC' : 'the file manager')); + ctx.text(r.bayLbl, ctx.platform === 'mac' ? tr('control.this_mac', null, 'This Mac') : ctx.platform === 'linux' ? tr('general.this_computer', null, 'This computer') : tr('pfx_sharing.this_pc', null, 'This PC')); + ctx.text(r.cVia.k, tr('pfx_sharing.via', null, 'Via')); + ctx.text(r.cDrive.k, tr('mount.drive', null, 'Drive')); + ctx.text(r.cVia.v, ble ? '—' : via === 'usb' ? 'USB' : via === 'wifi' ? tr('pfx_sharing.wireless', null, 'Wireless') : '—'); + ctx.text(r.cDrive.v, letter || (d.mounted ? tr('pfx_sharing.mounted', null, 'Mounted') : '—')); + const where = letter ? (ctx.platform === 'win' ? tr('pfx_sharing.in_explorer_as', { letter }, 'In File Explorer as {letter}') : tr('pfx_sharing.in_manager_as', { letter }, 'In the file manager as {letter}')) : tr('pfx_sharing.in_your_manager', null, 'In your file manager'); + ctx.text(r.cap, st === 'ble' ? tr('pfx_sharing.needs_wifi_bt_no_drive', null, 'Needs Wi-Fi · Bluetooth can’t carry a drive') : st === 'error' ? clip(d.message, 90) + : st === 'adb' ? tr('pfx_sharing.wd_off_on_phone', null, 'Wireless debugging is off on the phone') + : st === 'mounting' ? tr('mount.mounting', null, 'Mounting…') : st === 'unmounting' ? tr('pfx_sharing.unmounting', null, 'Unmounting…') + : st === 'mounted' ? (via === 'usb' ? tr('pfx_sharing.where_cable', { where }, '{where}, through the cable') : via === 'wifi' ? tr('pfx_sharing.where_wireless', { where }, '{where}, over wireless debugging') : where) + : ctx.platform === 'win' ? tr('pfx_sharing.ready_mount_this_pc', null, 'Ready · Mount puts it in This PC') : tr('pfx_sharing.ready_mount_manager', null, 'Ready · Mount puts it in the file manager')); if (st !== lastState) { if (st === 'mounted' && lastState !== 'unmounting') ctx.pop(r.bay, 'shr-lockin', 900); lastState = st; diff --git a/shared/pagefx/support.js b/shared/pagefx/support.js index f06709f0..4832ebf1 100644 --- a/shared/pagefx/support.js +++ b/shared/pagefx/support.js @@ -17,6 +17,7 @@ if (!FX || FX._support) return; FX._support = true; const UI = window.UI || {}; + const tr = (k, p, d) => (typeof window !== 'undefined' && typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const snap = (id) => (UI.support && UI.support[id]) || {}; // --------------------------------------------------------------------------------------------------- @@ -40,7 +41,7 @@ const cap = el('span', 'pg-cap spx-cap'); const left = el('div', 'pg-col spx-text', [el('div', 'spx-figline', [fig, per]), kick, cap]); const n = el('span', 'pg-fig spx-n'); - const nk = el('span', 'pg-kick', 'supporters'); + const nk = el('span', 'pg-kick', tr('tip.supporters_label', null, 'supporters')); const right = el('div', 'pg-col spx-side', [n, nk]); h.replaceChildren(art, left, el('div', 'pg-spacer'), right); ctx.stagger([art, left, right]); @@ -49,12 +50,12 @@ function paint(ctx, d) { if (!r) return; const st = d.state || 'loading'; - ctx.text(r.fig, st === 'offline' ? 'Offline' : d.label || (st === 'loading' ? '…' : '–')); - ctx.text(r.per, d.label && d.monthly ? '/ month' : ''); - ctx.text(r.kick, st === 'offline' ? 'can’t reach the tip jar' : st === 'opened' ? 'checkout opened in your browser' : d.monthly ? 'monthly tip' : 'one-time tip'); - ctx.text(r.cap, d.name ? 'to ' + d.name + ' · through Stripe' : 'through Stripe'); + ctx.text(r.fig, st === 'offline' ? tr('pfx_support.offline', null, 'Offline') : d.label || (st === 'loading' ? '…' : '–')); + ctx.text(r.per, d.label && d.monthly ? tr('pfx_support.per_month', null, '/ month') : ''); + ctx.text(r.kick, st === 'offline' ? tr('pfx_support.cant_reach_tip_jar', null, 'can’t reach the tip jar') : st === 'opened' ? tr('pfx_support.checkout_opened', null, 'checkout opened in your browser') : d.monthly ? tr('pfx_support.monthly_tip', null, 'monthly tip') : tr('pfx_support.one_time_tip', null, 'one-time tip')); + ctx.text(r.cap, d.name ? tr('pfx_support.to_name_stripe', { name: d.name }, 'to {name} · through Stripe') : tr('pfx_support.through_stripe', null, 'through Stripe')); ctx.text(r.n, d.count != null ? String(d.count) : '–'); - ctx.text(r.nk, d.count === 1 ? 'supporter' : 'supporters'); + ctx.text(r.nk, d.count === 1 ? tr('tip.supporter', null, 'supporter') : tr('tip.supporters_label', null, 'supporters')); ctx.cls(r.h, 'off', st === 'offline'); ctx.cls(r.h, 'monthly', !!d.monthly); if (st === 'opened' && ctx.changed('opened', d.at || 0)) ctx.pop(r.h, 'spx-thanks', 2400); @@ -93,14 +94,14 @@ const art = el('div', 'spx-art', [bubble]); const fig = el('span', 'pg-fig spx-fig'); const kick = el('span', 'pg-kick spx-kick'); - const cap = el('span', 'pg-cap spx-cap', 'contact@beyond-media.ai · or a GitHub issue'); + const cap = el('span', 'pg-cap spx-cap'); const left = el('div', 'pg-col spx-text', [fig, kick, cap]); const n = el('span', 'pg-fig spx-n'); - const nk = el('span', 'pg-kick', 'characters'); + const nk = el('span', 'pg-kick'); const right = el('div', 'pg-col spx-side', [n, nk]); h.replaceChildren(art, left, el('div', 'pg-spacer'), right); ctx.stagger([art, left, right]); - return { h, l1, l2, caret, fig, kick, n }; + return { h, l1, l2, caret, fig, kick, cap, n, nk }; } function paint(ctx, d) { if (!r) return; @@ -120,9 +121,11 @@ ctx.attr(r.caret, 'x2', cx.toFixed(1)); ctx.attr(r.caret, 'y1', onTwo ? '18.2' : '12.2'); ctx.attr(r.caret, 'y2', onTwo ? '23.8' : '17.8'); - ctx.text(r.fig, d.label || 'Bug'); + ctx.text(r.fig, d.label || tr('feedback.bug', null, 'Bug')); const sent = d.state === 'sent' || d.state === 'copied'; - ctx.text(r.kick, d.state === 'copied' ? 'copied to the clipboard' : d.state === 'sent' ? 'opened in your mail app' : d.info === false ? 'just your words' : 'with version and system info'); + ctx.text(r.kick, d.state === 'copied' ? tr('pfx_support.copied_clipboard', null, 'copied to the clipboard') : d.state === 'sent' ? tr('pfx_support.opened_mail_app', null, 'opened in your mail app') : d.info === false ? tr('pfx_support.just_your_words', null, 'just your words') : tr('pfx_support.with_version_info', null, 'with version and system info')); + ctx.text(r.cap, tr('pfx_support.contact_or_issue', null, 'contact@beyond-media.ai · or a GitHub issue')); + ctx.text(r.nk, tr('pfx_support.characters', null, 'characters')); ctx.text(r.n, String(len)); ctx.cls(r.h, 'sent', sent); ctx.cls(r.h, 'love', d.kind === 'love'); diff --git a/shared/pairpop.js b/shared/pairpop.js index a95a29a9..a6c4266b 100644 --- a/shared/pairpop.js +++ b/shared/pairpop.js @@ -10,7 +10,7 @@ ok.className = 'btn primary'; const later = document.createElement('button'); later.className = 'btn'; - later.textContent = 'Later'; + later.textContent = typeof t === 'function' ? t('general.later', null, 'Later') : 'Later'; const actions = document.createElement('div'); actions.className = 'banner-actions'; actions.append(later, ok); diff --git a/shared/rezume-shelf.js b/shared/rezume-shelf.js index a9db2774..1cc585cf 100644 --- a/shared/rezume-shelf.js +++ b/shared/rezume-shelf.js @@ -9,6 +9,8 @@ 'use strict'; const { BrowserWindow, Notification, nativeImage } = require('electron'); +const i18n = require('./i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const esc = (s) => String(s || '').replace(/[&<>"']/g, (c) => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c]); const what = (o) => (o.kind === 'web' ? hostOf(o.url) : o.kind === 'doc' ? o.name : o.appName || 'App'); @@ -42,7 +44,7 @@ class ReZumeShelf { const title = o.title || what(o); if (c.notify && Notification.isSupported()) { if (this.note) this.note.close(); // the last one only: every tab there would leave one here - this.note = new Notification({ title: 'Continue from ' + from, body: title + (what(o) && what(o) !== title ? '\n' + what(o) : ''), icon: this._icon(o), silent: true }); + this.note = new Notification({ title: tr('rezume.continue_from', { name: from }, 'Continue from ' + from), body: title + (what(o) && what(o) !== title ? '\n' + what(o) : ''), icon: this._icon(o), silent: true }); this.note.on('click', () => this.rezume.incoming && this.rezume.incoming.id === o.id && this.rezume.take()); this.note.show(); } @@ -54,7 +56,7 @@ class ReZumeShelf { const take = () => { if (this.rezume.incoming && this.rezume.incoming.id === o.id) this.rezume.take(); this._hide(); }; const dismiss = () => { this.rezume.dismiss(o.id); this._hide(); }; if (this.dock) return void this.dock.show(o, take, dismiss); - const label = 'Continue ' + title + ' from ' + from; + const label = tr('rezume.continue_title_from', { title, from }, 'Continue ' + title + ' from ' + from); if (this.win && !this.win.isDestroyed()) this.win.destroy(); const icon = this._icon(o); const win = new BrowserWindow({ @@ -65,10 +67,11 @@ class ReZumeShelf { this.win = win; if (process.platform === 'win32' && this.appId) win.setAppDetails({ appId: this.appId, relaunchDisplayName: 'ReZume' }); // its own button, not in TwinDesk's group const img = o.icon ? `` : ''; + const fromLine = tr('rezume.from_name_what', { from: esc(from), what: esc(what(o)) }, 'From ' + esc(from) + ' · ' + esc(what(o))); win.loadURL('data:text/html;charset=utf-8,' + encodeURIComponent(`${esc(label)} -${img}
${esc(title)}From ${esc(from)} · ${esc(what(o))}
`)); +${img}
${esc(title)}${fromLine}
`)); win.once('ready-to-show', () => !win.isDestroyed() && win.minimize()); // on the taskbar, not in front win.on('restore', () => { win.hide(); setImmediate(take); }); // its button clicked (not destroyed inside its own event) win.on('close', (e) => { // closed from the taskbar: dismissed diff --git a/shared/rezume.js b/shared/rezume.js index 5d368971..a1b14d55 100644 --- a/shared/rezume.js +++ b/shared/rezume.js @@ -25,6 +25,7 @@ const crypto = require('crypto'); const fs = require('fs'); const path = require('path'); const P = require('./protocol.js'); +const { t: tr } = require('./i18n.js'); const T = P.T; const POLL_MS = 1500; @@ -85,7 +86,7 @@ class ReZume extends EventEmitter { link.on(T.RZ_OFFER, (m) => this._offer(m || {})); link.on(T.RZ_CLEAR, (m) => m && this.incoming && m.id === this.incoming.id && this._drop()); link.on(T.RZ_TAKE, (m) => m && this._taken(String(m.id || ''))); - link.on(T.RZ_DONE, (m) => m && this.waiting && m.id === this.waiting.id && !m.ok && this._failed(str(m.why, 200) || 'It couldn’t be sent')); + link.on(T.RZ_DONE, (m) => m && this.waiting && m.id === this.waiting.id && !m.ok && this._failed(str(m.why, 200) || tr('sh_rezume.couldnt_be_sent', null, 'It couldn’t be sent'))); } get enabled() { @@ -234,7 +235,7 @@ class ReZume extends EventEmitter { } catch (_) { /* through the session below */ } } if (!pp || !pp.on || !(a.kind === 'web' ? pp.web : pp.docs)) { - this.message = !pp ? '{name} has no ReZume yet: update DuoDesk there' : 'ReZume is off on {name}'; + this.message = !pp ? tr('sh_rezume.peer_no_rezume', null, '{name} has no ReZume yet: update DuoDesk there') : tr('sh_rezume.rezume_off_on_peer', null, 'ReZume is off on {name}'); this.emit('change'); return false; } @@ -297,7 +298,7 @@ class ReZume extends EventEmitter { const o = { id, kind, title: str(m.title, 300), app: str(m.app, 300), appName: str(m.appName, 100), icon: imgUrl(m.icon), at: Date.now() }; if (kind === 'web' && !(o.url = httpUrl(m.url))) return; if (kind === 'doc') { - o.name = path.basename(str(m.name, 255)) || 'Document'; + o.name = path.basename(str(m.name, 255)) || tr('rezume.document', null, 'Document'); o.size = Number(m.size) >= 0 ? Number(m.size) : 0; } if (kind === 'app' && !/^[\w.]{1,200}$/.test(o.app)) return; @@ -353,7 +354,7 @@ class ReZume extends EventEmitter { this.emit('opened', { title: o.title, how: 'web' }); } else if (o.kind === 'app') { if (!this._canMirror()) { - this.message = 'Phone apps open here once wireless debugging is on (Phone page)'; + this.message = tr('sh_rezume.apps_need_adb', null, 'Phone apps open here once wireless debugging is on (Phone page)'); this.emit('change'); return false; } @@ -363,8 +364,8 @@ class ReZume extends EventEmitter { this.waiting = { id: o.id, title: o.name, until: Date.now() + DOC_WAIT_MS }; this.expectFile('rz-' + o.id); this.link.send({ t: T.RZ_TAKE, id: o.id }); - this.message = 'Getting ' + o.name + '…'; - setTimeout(() => this.waiting && this.waiting.id === o.id && this._failed('It didn’t come'), DOC_WAIT_MS); + this.message = tr('rezume.getting_waiting', { item: o.name }, 'Getting ' + o.name + '…'); + setTimeout(() => this.waiting && this.waiting.id === o.id && this._failed(tr('sh_rezume.didnt_come', null, 'It didn’t come')), DOC_WAIT_MS); } this.emit('change'); return true; @@ -377,7 +378,7 @@ class ReZume extends EventEmitter { this.waiting = null; const p = b.placed && b.placed[0]; if (!b.ok || !p) { - this._failed(w.title + ' didn’t arrive'); + this._failed(tr('sh_rezume.didnt_arrive', { title: w.title }, w.title + ' didn’t arrive')); return true; } this.message = ''; diff --git a/shared/sidebar-model.js b/shared/sidebar-model.js index a61c4a3d..972df6f1 100644 --- a/shared/sidebar-model.js +++ b/shared/sidebar-model.js @@ -66,12 +66,13 @@ const selId = sel ? sel.id : null; const phoneT = (d) => { const connected = !!d.connected; + const tFn = (k, p, def) => (typeof t === 'function' ? t(k, p, def) : (typeof root !== 'undefined' && root.t ? root.t(k, p, def) : (def !== undefined ? def : k))); return { id: d.id, kind: 'phone', os: 'android', name: d.name || 'Phone', connected, via: [], forget: [], state: connected ? 'connected' : d.connecting ? 'connecting' : 'nearby', selected: connected && (!selId || selId === d.id), action: connected ? 'select' : 'connect', - sub: d.sub || (connected ? 'Connected' : d.connecting ? 'Connecting…' : 'Nearby · Click to connect'), + sub: d.sub || (connected ? tFn('sidebar.connected', null, 'Connected') : d.connecting ? tFn('sidebar.connecting', null, 'Connecting…') : tFn('sidebar.nearby_click_to_connect', null, 'Nearby · Click to connect')), }; }; const peerT = (p) => { @@ -79,13 +80,14 @@ const connected = !via && !!p.connected; const connecting = !via && !connected && (p.state === 'connecting' || p.state === 'reconnecting'); const selected = connected && !!p.selected; + const tFn = (k, p, def) => (typeof t === 'function' ? t(k, p, def) : (typeof root !== 'undefined' && root.t ? root.t(k, p, def) : (def !== undefined ? def : k))); let sub; - if (via) sub = 'via ' + ((p.via || []).join(', ') || 'another device'); - else if (connected) sub = (p.rtt != null ? p.rtt + ' ms' : 'Connected') + (selected && transport && transport !== 'Wi-Fi' ? ' · ' + transport : ''); - else if (connecting) sub = 'Connecting…'; - else if (p.state === 'waiting') sub = 'Waiting for it to connect'; - else if (p.state === 'identity_changed') sub = 'Identity changed'; - else sub = 'Not connected'; + if (via) sub = tFn('sidebar.via', { name: ((p.via || []).join(', ') || 'another device') }, 'via ' + ((p.via || []).join(', ') || 'another device')); + else if (connected) sub = (p.rtt != null ? p.rtt + ' ms' : tFn('sidebar.connected', null, 'Connected')) + (selected && transport && transport !== 'Wi-Fi' ? ' · ' + transport : ''); + else if (connecting) sub = tFn('sidebar.connecting', null, 'Connecting…'); + else if (p.state === 'waiting') sub = tFn('sidebar.waiting', null, 'Waiting for it to connect'); + else if (p.state === 'identity_changed') sub = tFn('sidebar.identity_changed', null, 'Identity changed'); + else sub = tFn('sidebar.not_connected', null, 'Not connected'); const state = via ? 'via' : connected ? 'connected' : connecting ? 'connecting' : 'offline'; return { id: p.id, kind: kindOf(p.os), os: p.os || 'win', name: p.name || 'Device', connected, selected, via: via ? (p.via || []) : [], @@ -129,7 +131,18 @@ return [{ id: peer.id, name: peer.name, os: peer.os, state: connected ? 'connected' : linkState || 'offline', rtt: connected && rtt != null ? rtt : null, selected: true, connected, via: [] }]; } - const api = { PHONE_ONLY, COMPUTER_ONLY, GLOBAL, kindOf, sectionVisible, isScoped, firstSection, targetSection, selectedOf, selectedKind, buildTiles, singlePeer }; + // Returns the localized title of a section/page if available, falling back to default or id. + function sectionTitle(pageId, fallback) { + const tFn = typeof t === 'function' ? t : (typeof root !== 'undefined' && root.t ? root.t : null); + if (tFn) { + const def = fallback !== undefined ? fallback : pageId; + const navKey = pageId === 'general' ? 'nav.settings' : 'nav.' + pageId; + return tFn('nav.' + pageId, null, tFn(navKey, null, def)); + } + return fallback !== undefined ? fallback : pageId; + } + + const api = { PHONE_ONLY, COMPUTER_ONLY, GLOBAL, kindOf, sectionVisible, isScoped, firstSection, targetSection, selectedOf, selectedKind, buildTiles, singlePeer, sectionTitle }; if (typeof module !== 'undefined' && module.exports) module.exports = api; else root.SidebarModel = api; })(typeof self !== 'undefined' ? self : this); diff --git a/shared/support.js b/shared/support.js index 9935beb7..6bf281a7 100644 --- a/shared/support.js +++ b/shared/support.js @@ -23,6 +23,7 @@ 'use strict'; const os = require('os'); +const { t: tr } = require('./i18n.js'); // t() is a local name in places here const API = 'https://beyond-media.ai/api/tips'; const ORIGIN = 'https://beyond-media.ai'; @@ -119,7 +120,7 @@ function shape(j, avatar) { const max = num(c.max) != null && c.max >= min ? c.max : 1000; const presets = (Array.isArray(c.presets) ? c.presets : []).filter((p) => num(p) != null && p >= min && p <= max).slice(0, 6); const supporters = (Array.isArray(j && j.supporters) ? j.supporters : []).slice(0, 12).map((s) => ({ - name: str(s && s.name, 60) || 'Someone', + name: str(s && s.name, 60) || tr('sh_support.someone', null, 'Someone'), amount: num(s && s.amount) != null ? s.amount / minor((s && s.currency) || currency) : null, currency: /^[a-z]{3}$/i.test((s && s.currency) || '') ? s.currency.toLowerCase() : currency, monthly: !!(s && s.monthly), @@ -153,16 +154,16 @@ async function profile(opts) { inflight = (async () => { try { const j = await doFetch(API + '?creator=' + encodeURIComponent(CREATOR), { headers: { Accept: 'application/json' } }, async (r) => { - if (!r.ok) throw new Error(r.status === 404 ? 'This tip jar isn’t available' : 'The tip service answered ' + r.status); + if (!r.ok) throw new Error(r.status === 404 ? tr('sh_support.tip_unavailable', null, 'This tip jar isn’t available') : tr('sh_support.service_answered', { status: r.status }, 'The tip service answered ' + r.status)); try { return await r.json(); } catch { return null; } // a captive portal's HTML page, say }); - if (!j || typeof j !== 'object' || !j.creator || typeof j.creator !== 'object') throw new Error('The tip service sent something unexpected'); + if (!j || typeof j !== 'object' || !j.creator || typeof j.creator !== 'object') throw new Error(tr('sh_support.service_unexpected', null, 'The tip service sent something unexpected')); const value = shape(j, await avatarData(j.creator.avatar)); cache = { at: Date.now(), value }; return Object.assign({ ok: true }, value); } catch (e) { const offline = e && (e.name === 'AbortError' || /fetch failed|ENOTFOUND|ECONN|ETIMEDOUT|ERR_INTERNET|ERR_NAME|network/i.test(String(e.message || e))); - const error = offline ? 'Can’t reach beyond-media.ai. Check your connection.' : String((e && e.message) || e); + const error = offline ? tr('sh_support.cant_reach', null, 'Can’t reach beyond-media.ai. Check your connection.') : String((e && e.message) || e); return cache ? Object.assign({ ok: false, error, offline, stale: true }, cache.value) : { ok: false, error, offline }; } finally { inflight = null; } })(); @@ -173,9 +174,9 @@ async function profile(opts) { function checkTip(o) { const p = (cache && cache.value.profile) || { min: 1, max: 1000 }; const amount = num(o && o.amount); - if (amount == null) return { error: 'Enter an amount' }; + if (amount == null) return { error: tr('sh_support.enter_amount', null, 'Enter an amount') }; const a = Math.round(amount * 100) / 100; - if (a < p.min || a > p.max) return { error: 'Enter an amount between ' + p.min + ' and ' + p.max }; + if (a < p.min || a > p.max) return { error: tr('sh_support.amount_between', { min: p.min, max: p.max }, 'Enter an amount between ' + p.min + ' and ' + p.max) }; return { amount: a, monthly: !!(o && o.monthly), name: str(o && o.name, 60), message: str(o && o.message, 280) }; } @@ -183,7 +184,7 @@ let lastTip = 0; async function createTip(o) { const t = checkTip(o); if (t.error) return { ok: false, error: t.error }; - if (Date.now() - lastTip < 2500) return { ok: false, error: 'One moment…' }; + if (Date.now() - lastTip < 2500) return { ok: false, error: tr('sh_support.one_moment', null, 'One moment…') }; lastTip = Date.now(); try { const { r, j } = await doFetch(API, { @@ -191,20 +192,20 @@ async function createTip(o) { headers: { 'Content-Type': 'application/json', Accept: 'application/json' }, body: JSON.stringify({ creator: CREATOR, amount: t.amount, name: t.name, message: t.message, monthly: t.monthly, returnUrl: RETURN_URL }), }, async (res) => { let body = null; try { body = await res.json(); } catch {} return { r: res, j: body }; }); - if (!r.ok) return { ok: false, error: str(j && j.error, 200) || 'The tip service answered ' + r.status }; + if (!r.ok) return { ok: false, error: str(j && j.error, 200) || tr('sh_support.service_answered', { status: r.status }, 'The tip service answered ' + r.status) }; const url = safeUrl(j && j.url, 'checkout'); - if (!url) return { ok: false, error: 'The tip service sent a link DuoDesk won’t open' }; + if (!url) return { ok: false, error: tr('sh_support.link_wont_open', null, 'The tip service sent a link DuoDesk won’t open') }; return { ok: true, url }; } catch (e) { lastTip = 0; - return { ok: false, error: e && e.name === 'AbortError' ? 'The tip service took too long. Try again.' : 'Can’t reach beyond-media.ai. Check your connection.' }; + return { ok: false, error: e && e.name === 'AbortError' ? tr('sh_support.took_too_long', null, 'The tip service took too long. Try again.') : tr('sh_support.cant_reach', null, 'Can’t reach beyond-media.ai. Check your connection.') }; } } async function startTip(o) { const r = await createTip(o); if (!r.ok) return r; - try { await openExternal(r.url); } catch { return { ok: false, error: 'Couldn’t open the browser' }; } + try { await openExternal(r.url); } catch { return { ok: false, error: tr('sh_support.cant_open_browser', null, 'Couldn’t open the browser') }; } return { ok: true, opened: new URL(r.url).hostname }; // the page only learns where it went, not the link } @@ -232,8 +233,8 @@ function checkFeedback(o) { const kind = Object.hasOwn(KINDS, o && o.kind) ? o.kind : 'idea'; const message = str(o && o.message, MAX_MESSAGE); const email = str(o && o.email, 200); - if (email && !/^[^\s@<>()",;:]+@[^\s@<>()",;:]+\.[^\s@<>()",;:]{2,}$/.test(email)) return { error: 'That reply email doesn’t look right' }; - if (!message && kind !== 'love') return { error: 'Write a few words first' }; + if (email && !/^[^\s@<>()",;:]+@[^\s@<>()",;:]+\.[^\s@<>()",;:]{2,}$/.test(email)) return { error: tr('sh_support.bad_email', null, 'That reply email doesn’t look right') }; + if (!message && kind !== 'love') return { error: tr('sh_support.write_first', null, 'Write a few words first') }; return { kind, message, email, includeInfo: !!(o && o.includeInfo) }; } @@ -277,15 +278,15 @@ async function feedback(o) { const q = new URLSearchParams({ title, body: gb.slice(0, ISSUE_MAX) }); if (f.kind === 'bug') q.set('labels', 'bug'); else if (f.kind === 'idea') q.set('labels', 'enhancement'); const url = safeUrl(ISSUES + '?' + q.toString(), 'github'); - if (!url) return { ok: false, error: 'Couldn’t make the GitHub link' }; - try { await openExternal(url); } catch { return { ok: false, error: 'Couldn’t open the browser' }; } + if (!url) return { ok: false, error: tr('sh_support.github_link_failed', null, 'Couldn’t make the GitHub link') }; + try { await openExternal(url); } catch { return { ok: false, error: tr('sh_support.cant_open_browser', null, 'Couldn’t open the browser') }; } return { ok: true, via }; } const m = mailto(subject, body); const url = safeUrl(m.href, 'mail'); - if (!url) return { ok: false, error: 'Couldn’t make the email' }; + if (!url) return { ok: false, error: tr('sh_support.email_failed', null, 'Couldn’t make the email') }; if (m.truncated) copy(`To: ${CONTACT}\nSubject: ${subject}\n\n${body}`); // the whole message, to paste over the cut one - try { await openExternal(url); } catch { return { ok: false, error: 'No mail app answered. Use Copy and send it to ' + CONTACT + '.', noMail: true }; } + try { await openExternal(url); } catch { return { ok: false, error: tr('sh_support.no_mail_app', { contact: CONTACT }, 'No mail app answered. Use Copy and send it to ' + CONTACT + '.'), noMail: true }; } return { ok: true, via, truncated: m.truncated, copied: m.truncated }; } @@ -295,7 +296,7 @@ function ipc(ipcMain) { if (registered || !ipcMain) return; registered = true; const handle = (name, fn) => ipcMain.handle(name, async (_e, arg) => { - try { return await fn(arg && typeof arg === 'object' ? arg : {}); } catch (e) { console.error('support ' + name + ':', e); return { ok: false, error: 'Something went wrong' }; } + try { return await fn(arg && typeof arg === 'object' ? arg : {}); } catch (e) { console.error('support ' + name + ':', e); return { ok: false, error: tr('sh_support.went_wrong', null, 'Something went wrong') }; } }); handle('support:info', () => Object.assign({ contact: CONTACT, issues: 'github.com/0xCodez/DuoDesk/issues' }, info())); handle('support:profile', (o) => profile({ force: !!o.force })); diff --git a/shared/test/i18n-allow.json b/shared/test/i18n-allow.json new file mode 100644 index 00000000..8f9de97e --- /dev/null +++ b/shared/test/i18n-allow.json @@ -0,0 +1,29 @@ +{ + "phrases": [ + "DuoDesk", + "Bluetooth", + "Wi-Fi", + "GitHub", + "Windows", + "Linux", + "macOS", + "Android", + "Electron", + "Chromium", + "Node.js", + "Português (Brasil)", + "English", + "Phase ", + "ADB", + "Finder", + "Explorer", + "Mbps", + "Kernel", + "Codec", + "ReZume", + "Camera is off on this computer", + "Monitor ", + "Virtual remote monitor", + "Reply to: " + ] +} diff --git a/shared/test/i18n-baseline.json b/shared/test/i18n-baseline.json new file mode 100644 index 00000000..3d842d70 --- /dev/null +++ b/shared/test/i18n-baseline.json @@ -0,0 +1,8 @@ +{ + "Páginas do desktop": 0, + "Mesh": 0, + "Módulos shared/ui": 0, + "Processo principal": 0, + "Efeitos e módulos shared": 0, + "Janelas pequenas": 0 +} diff --git a/shared/test/i18n-coverage.js b/shared/test/i18n-coverage.js new file mode 100644 index 00000000..868fa194 --- /dev/null +++ b/shared/test/i18n-coverage.js @@ -0,0 +1,86 @@ +'use strict'; +// Counts user-visible English literals that are not behind t(), per surface, and compares them with the +// ceiling in i18n-baseline.json (it only goes down). `node shared/test/i18n-coverage.js --write` rewrites +// docs/i18n-coverage.md; `--baseline` lowers the ceilings to the current counts. +// Not counted: tab definition fields (title/heading/desc/blurb: the shell translates them by id), +// lines that already carry data-i18n*, logs, comments, and the phrases in i18n-allow.json. +const assert = require('assert'); +const fs = require('fs'); +const path = require('path'); + +const root = path.join(__dirname, '..', '..'); +const read = (f) => fs.readFileSync(path.join(root, f), 'utf8'); +const list = (dir, re) => (fs.existsSync(path.join(root, dir)) ? fs.readdirSync(path.join(root, dir)).filter((f) => re.test(f)).map((f) => dir + '/' + f) : []); +const PLAT = ['windows', 'linux', 'mac']; + +const surfaces = { + 'Páginas do desktop': PLAT.flatMap((d) => list(d, /^(ui-.*|app|control)\.js$/)), + 'Mesh': PLAT.flatMap((d) => list(d + '/mesh', /^(ui-.*|app)\.js$/)), + 'Módulos shared/ui': list('shared', /^(ui-.*|pairpop|aurora-shell|feature-art)\.js$/), + 'Processo principal': PLAT.flatMap((d) => list(d, /\.js$/).filter((f) => !/\/(ui-|app\.js|control\.js|.*renderer|preload)/.test(f))).concat(list('shared', /^(support|vcam|rezume|screen-mesh|phonedrive|updates|about|received|camshare)\.js$/)), + 'Efeitos e módulos shared': list('shared/pagefx', /\.js$/).concat(list('shared', /^(mesh-intro|callpop|kvm-map-ui|camera-view|camshare-mesh|adbqr|callwin|intro|phone-remote|netlink|btaudio)\.js$/)), + 'Janelas pequenas': PLAT.flatMap((d) => list(d, /(renderer\.js|\.html)$/).filter((f) => !/\/(app|control)\.html$/.test(f))), +}; + +const allow = JSON.parse(read('shared/test/i18n-allow.json')).phrases; +const attr = /(?:\b(?:text|label|hint|title|placeholder|message|error|tooltip|textContent|setHint|aria-label)\b\s*[:=(]\s*|\bUI\.(?:button|row|card|note|switch)\(\s*)(['"])([A-Z][^'"]*)\1/g; +const htmlText = />\s*([A-Z][A-Za-z’'.,:;!?…()\- ]{5,}?)\s* { + if (/data-i18n/.test(line) || /^\s*(\/\/|\*| - - + + + + + + diff --git a/windows/phoneview.js b/windows/phoneview.js index dd667757..2b6dfc9b 100644 --- a/windows/phoneview.js +++ b/windows/phoneview.js @@ -14,6 +14,8 @@ const fs = require('fs'); const path = require('path'); +const i18n = require('../shared/i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const crypto = require('crypto'); const { app, BrowserWindow, ipcMain, screen, shell, nativeImage, clipboard } = require('electron'); const { EventEmitter } = require('events'); @@ -79,7 +81,7 @@ class PhoneViews extends EventEmitter { ipcMain.on('phoneview:drop', (e, paths) => { if (!Array.isArray(paths) || !paths.length || !this.server.current) return; const b = this.fileSend.sendBatch(paths.filter((p) => typeof p === 'string' && path.win32.isAbsolute(p)).slice(0, 1000), 'send'); - if (b) this.bridge.emit('popup', 'away', `Sending ${b.name} to ${this.server.current.name}`); + if (b) this.bridge.emit('popup', 'away', tr('files.sending_to', { name: b.name, the: this.server.current.name }, `Sending ${b.name} to ${this.server.current.name}`)); }); } @@ -87,7 +89,7 @@ class PhoneViews extends EventEmitter { sound(on) { const open = [...this.views.values()].find((v) => v.kind === 'sound'); if (on && !open && this.bridge.serial) { - this._open({ kind: 'sound', title: 'Phone sound', width: 200, height: 100, hidden: true, opts: { video: false, audio: true, control: false, audioSource: 'output' } }); + this._open({ kind: 'sound', title: tr('phone.phone_sound', null, 'Phone sound'), width: 200, height: 100, hidden: true, opts: { video: false, audio: true, control: false, audioSource: 'output' } }); } else if (!on && open) this.close(open.id); } @@ -95,7 +97,7 @@ class PhoneViews extends EventEmitter { // hidden window with no adb session, fed what comes through the session. netSound(on) { const open = [...this.views.values()].find((v) => v.kind === 'netsound'); - if (on && !open) this._open({ kind: 'netsound', title: 'Phone sound', width: 200, height: 100, hidden: true }); + if (on && !open) this._open({ kind: 'netsound', title: tr('phone.phone_sound', null, 'Phone sound'), width: 200, height: 100, hidden: true }); else if (!on && open) this.close(open.id); } @@ -229,8 +231,9 @@ class PhoneViews extends EventEmitter { if (!n) return; n.answered = true; if (!m.unlocked) { - const phone = (this.server.current && this.server.current.name) || 'the phone'; - return void (m.waiting && this.bridge.emit('popup', 'away', `Unlock ${phone} to open ${n.name || 'the app'}`)); + const phone = (this.server.current && this.server.current.name) || tr('win_phoneview.the_phone', null, 'the phone'); + const what = n.name || tr('apps.the_app', null, 'the app'); + return void (m.waiting && this.bridge.emit('popup', 'away', tr('win_phoneview.unlock_to_open', { phone, app: what }, `Unlock ${phone} to open ${what}`))); } n.unlocked = true; this._openNotified(); @@ -266,7 +269,7 @@ class PhoneViews extends EventEmitter { if (!this.bridge.serial && kind !== 'netsound') { // Wireless debugging not up yet (just on Wi-Fi after Bluetooth): main.js opens it once it is. if (this.onNoAdb && this.onNoAdb({ kind, app, title, width, height, opts, hidden })) return; - return this.bridge.emit('popup', 'home', 'Set up wireless debugging on the Phone page first'); + return this.bridge.emit('popup', 'home', tr('win_phoneview.setup_adb_first', null, 'Set up wireless debugging on the Phone page first')); } const id = nextId++; const win = new BrowserWindow({ @@ -425,7 +428,7 @@ class PhoneViews extends EventEmitter { const img = nativeImage.createFromBuffer(buf); if (img.isEmpty()) return; clipboard.writeImage(img); - this.bridge.emit('popup', 'away', 'Screenshot copied: paste it with Ctrl+V'); + this.bridge.emit('popup', 'away', tr('win_phoneview.screenshot_copied', null, 'Screenshot copied: paste it with Ctrl+V')); } _send(v, ch, m) { @@ -713,10 +716,10 @@ class PhoneViews extends EventEmitter { target: r.target, args: r.args, description: a.name + ' on ' + ((this.server.current && this.server.current.name) || 'the phone') + ' (DuoDesk)', appUserModelId: PhoneViews.aumid(pkg), ...(ico ? { icon: ico, iconIndex: 0 } : {}), }); - if (!ok) throw new Error('Windows refused the shortcut'); - this.bridge.emit('popup', 'home', a.name + ' is in Start › DuoDesk Apps'); + if (!ok) throw new Error(tr('win_phoneview.shortcut_refused', null, 'Windows refused the shortcut')); + this.bridge.emit('popup', 'home', tr('win_phoneview.in_start_folder', { name: a.name, folder: 'DuoDesk Apps' }, a.name + ' is in Start › DuoDesk Apps')); } catch (e) { - this.bridge.emit('popup', 'driven', 'Couldn’t add ' + a.name + ' to Start: ' + e.message); + this.bridge.emit('popup', 'driven', tr('win_phoneview.couldnt_add_start', { name: a.name, error: e.message }, 'Couldn’t add ' + a.name + ' to Start: ' + e.message)); } } } diff --git a/windows/sender-renderer.js b/windows/sender-renderer.js index f966578c..0f6f7096 100644 --- a/windows/sender-renderer.js +++ b/windows/sender-renderer.js @@ -9,6 +9,7 @@ const api = window.sender; const sessions = new Map(); // session → {session, pc, stream, pending, mbps, statsTimer, last} const alive = (me) => sessions.get(me.session) === me; +var tx = typeof t === 'function' ? t : function (k, p, d) { return d; }; // t: shared/i18n.js, when the page loads it function report(me, status, error) { api.state({ session: me.session, status, error: error || '' }); @@ -63,7 +64,7 @@ async function start(m) { me.stream = stream; const track = stream.getVideoTracks()[0]; track.contentHint = 'motion'; - track.onended = () => alive(me) && report(me, 'ended', 'The captured ' + (m.offer.kind === 'window' ? 'window' : 'monitor') + ' went away'); + track.onended = () => alive(me) && report(me, 'ended', m.offer.kind === 'window' ? tx('win_sender.window_went_away', null, 'The captured window went away') : tx('win_sender.monitor_went_away', null, 'The captured monitor went away')); const pc = (me.pc = new RTCPeerConnection(m.ice || { iceServers: [] })); const tr = pc.addTransceiver(track, { direction: 'sendonly', streams: [stream] }); const audio = stream.getAudioTracks()[0]; @@ -94,7 +95,7 @@ async function start(m) { report(me, 'connecting'); me.statsTimer = setInterval(() => stats(me), 1000); } catch (e) { - if (alive(me)) report(me, 'failed', 'Capturing: ' + e.message); + if (alive(me)) report(me, 'failed', tx('win_sender.capturing_error', { error: e.message }, 'Capturing: ' + e.message)); } } @@ -149,7 +150,7 @@ async function onAnswer(m) { for (const c of me.pending.splice(0)) await me.pc.addIceCandidate(c).catch(() => {}); me.pending = null; } catch (e) { - report(me, 'failed', '{Name}’s answer: ' + e.message); + report(me, 'failed', tx('win_sender.answer_error', { error: e.message }, '{Name}’s answer: ' + e.message)); } } diff --git a/windows/sender.html b/windows/sender.html index a5796220..64425609 100644 --- a/windows/sender.html +++ b/windows/sender.html @@ -7,6 +7,10 @@ DuoDesk sender + + + + diff --git a/windows/sendto.js b/windows/sendto.js index 6cfa0f5f..c41ee6e6 100644 --- a/windows/sendto.js +++ b/windows/sendto.js @@ -9,6 +9,8 @@ const { app, shell } = require('electron'); const fs = require('fs'); const path = require('path'); +const i18n = require('../shared/i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const ARG = '--send-files'; const SUFFIX = ' (DuoDesk).lnk'; @@ -68,9 +70,10 @@ class SendTo { const paths = list.slice(at + 1).filter((a) => typeof a === 'string' && !a.startsWith('--') && path.win32.isAbsolute(a) && !skip.has(path.resolve(a).toLowerCase()) && fs.existsSync(a)).slice(0, 1000); if (!paths.length) return true; + const who = this.peerName() || tr('main.the_other_computer', null, 'the other computer'); if (this.link.status.state !== 'connected') { this.pending = { paths, until: Date.now() + 30000 }; // sent once the link is up - this.popup('away', 'Not connected yet', 'Sending once ' + (this.peerName() || 'the other computer') + ' is connected'); + this.popup('away', tr('sendto.not_connected_yet', null, 'Not connected yet'), tr('sendto.sending_once_connected', { name: who }, 'Sending once ' + who + ' is connected')); return true; } this._send(paths); @@ -79,10 +82,14 @@ class SendTo { _send(paths) { const r = this.fileDrop.sendBatch(paths, 'send'); - const who = this.peerName() || 'the other computer'; - if (!r) return this.popup('away', 'Nothing to send', 'Couldn’t read ' + (paths.length === 1 ? path.basename(paths[0]) : 'those items')); + const who = this.peerName() || tr('main.the_other_computer', null, 'the other computer'); + if (!r) { + const itemDesc = paths.length === 1 ? path.basename(paths[0]) : tr('sendto.those_items', null, 'those items'); + return this.popup('away', tr('sendto.nothing_to_send', null, 'Nothing to send'), tr('sendto.couldnt_read_item', { name: itemDesc }, 'Couldn’t read ' + itemDesc)); + } const n = r.items.length; - this.popup('away', 'Sending ' + (n === 1 ? r.name : n + ' items') + ' to ' + who); + const itemsDesc = n === 1 ? r.name : tr('sendto.n_items_other', { count: n }, n + ' items'); + this.popup('away', tr('sendto.sending_n_items_to', { items: itemsDesc, who }, 'Sending ' + itemsDesc + ' to ' + who)); } } diff --git a/windows/settings.js b/windows/settings.js index e34c0083..2751ea25 100644 --- a/windows/settings.js +++ b/windows/settings.js @@ -74,7 +74,7 @@ function normalize(s) { }, // hotkey: double-tap = mouse and keyboard home. lockKeys: cursor lock on/off (shared/cursorlock.js) keys: { swapCtrlCmd: bool(keys.swapCtrlCmd, true), hotkey: P.HOTKEYS.includes(keys.hotkey) ? keys.hotkey : P.HOTKEY_WIN, lockKeys: CL.validKeys(keys.lockKeys, CL.DEFAULT_KEYS.win) }, - app: { hud: bool(appS.hud, true) }, // popup when switching computers + app: { hud: bool(appS.hud, true), lang: ['auto', 'en', 'pt-BR'].includes(appS.lang) ? appS.lang : 'auto' }, // popup when switching computers // New releases on GitHub (shared/updates.js); notified = the last version announced, skipped = version ignored updates: { auto: bool(up.auto, true), notified: typeof up.notified === 'string' ? up.notified.slice(0, 40) : '', skipped: typeof up.skipped === 'string' ? up.skipped.slice(0, 40) : '' }, clipboard: { diff --git a/windows/smb.js b/windows/smb.js index 6a4ea5e2..85406669 100644 --- a/windows/smb.js +++ b/windows/smb.js @@ -9,6 +9,7 @@ const { execFile } = require('child_process'); const crypto = require('crypto'); const fs = require('fs'); const path = require('path'); +const { t: tr } = require('../shared/i18n.js'); const P = require('../shared/protocol.js'); const { script, scriptElevated } = require('./ps'); @@ -66,7 +67,7 @@ class Smb { return this.onChange(); } const folder = this.cfg.shareFolder || path.join(os.homedir(), 'MacShare'); - try { fs.mkdirSync(folder, { recursive: true }); } catch (e) { return this._msg('Can’t create ' + folder + ': ' + e.message); } + try { fs.mkdirSync(folder, { recursive: true }); } catch (e) { return this._msg(tr('win_smb.cant_create', { folder, error: e.message }, 'Can’t create ' + folder + ': ' + e.message)); } await this.checkShare(); if (this._creds() && this.sharePath && this.sharePath.toLowerCase() === folder.toLowerCase()) { this.cfg.shareOn = true; @@ -91,8 +92,8 @@ class Smb { // One elevated script: account, folder permission, share, firewall (File and Printer Sharing, Private). async share(folder) { if (this.busy) return; - if (!folder || !fs.existsSync(folder) || !fs.statSync(folder).isDirectory()) return this._msg('Pick a folder first'); - if (!safeStorage.isEncryptionAvailable()) return this._msg('Windows can’t protect the password here (DPAPI unavailable)'); + if (!folder || !fs.existsSync(folder) || !fs.statSync(folder).isDirectory()) return this._msg(tr('win_smb.pick_folder', null, 'Pick a folder first')); + if (!safeStorage.isEncryptionAvailable()) return this._msg(tr('win_smb.no_dpapi', null, 'Windows can’t protect the password here (DPAPI unavailable)')); const password = 'Ms-' + crypto.randomBytes(18).toString('base64').replace(/[+/=]/g, 'x') + '!7a'; const dir = app.getPath('userData'); const pwFile = path.join(dir, 'smb-pw.tmp'); @@ -102,7 +103,7 @@ class Smb { this._busy('setup'); try { await scriptElevated('smb-share', { PwFile: pwFile, User: USER, Share: SHARE, Folder: folder, Group: FPS_GROUP, Result: result }); - const r = fs.existsSync(result) ? fs.readFileSync(result, 'utf8').trim() : 'error: the setup didn’t finish'; + const r = fs.existsSync(result) ? fs.readFileSync(result, 'utf8').trim() : 'error: ' + tr('win_vcam.setup_unfinished', null, 'the setup didn’t finish'); if (r !== 'ok') throw new Error(r.replace(/^error: /, '')); fs.writeFileSync(this.credFile, safeStorage.encryptString(JSON.stringify({ user: USER, password }))); this.cfg.shareOn = true; @@ -111,7 +112,7 @@ class Smb { this.message = ''; this._offer(); } catch (e) { - this.message = /cancel/i.test(e.message) ? 'The administrator prompt was declined' : 'Sharing failed: ' + e.message; + this.message = /cancel/i.test(e.message) ? tr('vdd.admin_declined', null, 'The administrator prompt was declined') : tr('win_smb.sharing_failed', { error: e.message }, 'Sharing failed: ' + e.message); } finally { try { fs.unlinkSync(pwFile); } catch (_) { /* removed by the script */ } try { fs.unlinkSync(result); } catch (_) { /* none */ } @@ -128,7 +129,7 @@ class Smb { await scriptElevated('smb-unshare', { Share: SHARE, User: USER }); this.message = ''; } catch (e) { - this.message = /cancel/i.test(e.message) ? 'Cancelled. The folder is still shared.' : e.message; + this.message = /cancel/i.test(e.message) ? tr('win_smb.cancelled_still_shared', null, 'Cancelled. The folder is still shared.') : e.message; } try { fs.unlinkSync(this.credFile); } catch (_) { /* none */ } this.cfg.shareOn = false; @@ -177,7 +178,7 @@ class Smb { this._state(m.share, true); } catch (e) { this.drive = ''; - this.mountMessage = 'Couldn’t connect {name}’s folder: ' + e.message; + this.mountMessage = tr('win_smb.couldnt_connect_folder', { error: e.message }, 'Couldn’t connect {name}’s folder: ' + e.message); this._state(m.share, false, e.message); } this._busy(''); diff --git a/windows/sound-renderer.js b/windows/sound-renderer.js index 521faddd..bb628652 100644 --- a/windows/sound-renderer.js +++ b/windows/sound-renderer.js @@ -6,6 +6,7 @@ const T = window.MacShareProtocol.T; const api = window.sound; const player = document.getElementById('play'); +const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d); let recv = null; // {pc, session, pending} let send = null; // {pc, session, stream, pending} @@ -53,7 +54,7 @@ async function onOffer(m) { await pc.setLocalDescription(await pc.createAnswer()); if (recv === me) api.send({ t: T.AUDIO_ANSWER, dir: 'm2w', session: m.session, sdp: pc.localDescription.sdp }); } catch (e) { - error = 'Mac sound: ' + e.message; + error = t('win_sound_renderer.mac_sound', { error: e.message }, 'Mac sound: ' + e.message); report(); } } @@ -79,7 +80,7 @@ async function startSend(session, ice) { stream.getVideoTracks().forEach((t) => t.stop()); const track = stream.getAudioTracks()[0]; if (send !== me) return stream.getTracks().forEach((t) => t.stop()); - if (!track) throw new Error('Windows gave no system sound'); + if (!track) throw new Error(t('win_sound_renderer.no_system_sound', null, 'Windows gave no system sound')); me.stream = stream; const pc = (me.pc = new RTCPeerConnection(ice || { iceServers: [] })); pc.addTransceiver(track, { direction: 'sendonly' }); @@ -89,7 +90,7 @@ async function startSend(session, ice) { api.send({ t: T.AUDIO_OFFER, dir: 'w2m', session, sdp: pc.localDescription.sdp }); error = ''; } catch (e) { - error = 'Sending this PC’s sound: ' + e.message; + error = t('win_sound_renderer.sending_pc_sound', { error: e.message }, 'Sending this PC’s sound: ' + e.message); } report(); } @@ -102,7 +103,7 @@ async function onAnswer(m) { for (const c of me.pending.splice(0)) await me.pc.addIceCandidate(c).catch(() => {}); me.pending = null; } catch (e) { - error = 'Sending this PC’s sound: ' + e.message; + error = t('win_sound_renderer.sending_pc_sound', { error: e.message }, 'Sending this PC’s sound: ' + e.message); report(); } } diff --git a/windows/sound.html b/windows/sound.html index 33bda1d3..800e2b41 100644 --- a/windows/sound.html +++ b/windows/sound.html @@ -8,6 +8,10 @@ + + + + diff --git a/windows/sshd.js b/windows/sshd.js index 3bc6481d..835b304b 100644 --- a/windows/sshd.js +++ b/windows/sshd.js @@ -8,6 +8,7 @@ const crypto = require('crypto'); const fs = require('fs'); const os = require('os'); const path = require('path'); +const { t: tr } = require('../shared/i18n.js'); const P = require('../shared/protocol.js'); const { script, scriptElevated } = require('./ps'); @@ -72,7 +73,7 @@ class Sshd { this.save(); this.message = ''; } catch (e) { - this.message = /cancel/i.test(e.message) ? 'The administrator prompt was declined' : 'Couldn’t add {name}’s key: ' + e.message; + this.message = /cancel/i.test(e.message) ? tr('vdd.admin_declined', null, 'The administrator prompt was declined') : tr('lin_sshd.couldnt_add_key', { error: e.message }, 'Couldn’t add {name}’s key: ' + e.message); return this._info(false, 'not_allowed'); } } @@ -111,7 +112,7 @@ class Sshd { this.cfg.installedKey = ''; this.save(); } catch (e) { - this.message = '{Name}’s key is still installed: ' + e.message; + this.message = tr('lin_sshd.key_still_installed', { error: e.message }, '{Name}’s key is still installed: ' + e.message); } this.onChange(); } @@ -125,7 +126,7 @@ class Sshd { await scriptElevated('sshd-setup', {}, 600000); this.message = ''; } catch (e) { - this.message = /cancel/i.test(e.message) ? 'The administrator prompt was declined' : 'Setup failed: ' + e.message; + this.message = /cancel/i.test(e.message) ? tr('vdd.admin_declined', null, 'The administrator prompt was declined') : tr('lin_sshd.setup_failed', { error: e.message }, 'Setup failed: ' + e.message); } this.busy = false; await this.refresh(); diff --git a/windows/terminal.js b/windows/terminal.js index ae4737c3..58aeb109 100644 --- a/windows/terminal.js +++ b/windows/terminal.js @@ -11,15 +11,17 @@ const os = require('os'); const path = require('path'); const P = require('../shared/protocol.js'); const SshConfig = require('../shared/sshconfig.js'); +const i18n = require('../shared/i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const T = P.T; const SSH_DIR = path.join(process.env.SystemRoot || 'C:\\Windows', 'System32', 'OpenSSH'); const SSH = path.join(SSH_DIR, 'ssh.exe'); const KEYGEN = path.join(SSH_DIR, 'ssh-keygen.exe'); const WHY = { - remote_login_off: 'Remote Login is off on {name} (System Settings → General → Sharing).', - sshd_off: 'The SSH server isn’t running on {name} (its Terminal tab → Set up).', - not_allowed: '{Name} doesn’t allow shells from {me} (its Terminal tab).', + remote_login_off: tr('terminal.remote_login_off', null, 'Remote Login is off on {name} (System Settings → General → Sharing).'), + sshd_off: tr('terminal.sshd_off', null, 'The SSH server isn’t running on {name} (its Terminal tab → Set up).'), + not_allowed: tr('terminal.not_allowed', null, '{Name} doesn’t allow shells from {me} (its Terminal tab).'), }; class Terminal { @@ -127,7 +129,7 @@ class Terminal { view() { if (this.status === 'ready' && this.onBle) { - return { status: 'unavailable', message: 'The terminal doesn’t work over Bluetooth. Connect with Wi-Fi Direct, or join {name}’s network.', user: this.info && this.info.user, command: 'ssh ' + SshConfig.ALIAS }; + return { status: 'unavailable', message: tr('terminal.unavailable_bluetooth', null, 'The terminal doesn’t work over Bluetooth. Connect with Wi-Fi Direct, or join {name}’s network.'), user: this.info && this.info.user, command: 'ssh ' + SshConfig.ALIAS }; } return { status: this.status, message: this.message, user: this.info && this.info.user, command: 'ssh ' + SshConfig.ALIAS }; } diff --git a/windows/ui-about.js b/windows/ui-about.js index 1ffb1944..7d99d127 100644 --- a/windows/ui-about.js +++ b/windows/ui-about.js @@ -14,63 +14,69 @@ UI.tab({ badge: (s) => (s.updates && s.updates.available ? '1' : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const link = (label, key) => UI.button(label, () => api.openLink(key), 'small'); // A card of label → value rows; set({label: text}) fills them and hides the empty ones. - const facts = (title, labels) => { + const facts = (title, defs) => { // defs: [id, shown label]; set() takes the ids const vals = {}; - const rows = labels.map((label) => { - vals[label] = el('span', { class: 'value selectable' }); - return UI.row(label, '', [vals[label]]); + const rows = defs.map(([id, label]) => { + vals[id] = el('span', { class: 'value selectable' }); + return UI.row(label, '', [vals[id]]); }); const card = UI.card(title, rows, { cls: 'keep-on' }); - card.set = (map) => labels.forEach((label, i) => { - const t = map[label]; - vals[label].textContent = t == null ? '' : String(t); - rows[i].hidden = t == null || t === ''; + card.set = (map) => defs.forEach(([id], i) => { + const v = map[id]; + vals[id].textContent = v == null ? '' : String(v); + rows[i].hidden = v == null || v === ''; }); return card; }; const nameEl = el('div', { class: 'about-name', text: 'DuoDesk' }); const verEl = el('div', { class: 'about-ver' }); const hero = el('div', { class: 'card about-hero keep-on' }, [ - el('div', { class: 'about-icon', attrs: { role: 'img', 'aria-label': 'DuoDesk icon' } }), + el('div', { class: 'about-icon', attrs: { role: 'img', 'aria-label': t('about.duodesk_icon', null, 'DuoDesk icon') } }), nameEl, verEl, - el('div', { class: 'about-tag', text: 'Use two computers as one desk' }), + el('div', { class: 'about-tag', text: t('about.use_two_computers_as_one', null, 'Use two computers as one desk') }), ]); // Updates: new releases of DuoDesk on GitHub. const updStatus = el('span', { class: 'value' }); - const updCheck = UI.button('Check now', () => api.checkUpdates(), 'small'); - const updNotes = UI.button('What’s New', () => window.UpdaterModal && window.UpdaterModal.show(), 'small'); - const updUnskip = UI.button('Don’t skip', () => api.unskipUpdate && api.unskipUpdate(), 'small'); - const updGet = UI.button('Download', () => api.openUpdate(), 'small primary'); + const updCheck = UI.button(t('about.check_now', null, 'Check now'), () => api.checkUpdates(), 'small'); + const updNotes = UI.button(t('about.what_s_new', null, 'What’s New'), () => window.UpdaterModal && window.UpdaterModal.show(), 'small'); + const updUnskip = UI.button(t('about.don_t_skip', null, 'Don’t skip'), () => api.unskipUpdate && api.unskipUpdate(), 'small'); + const updGet = UI.button(t('about.download', null, 'Download'), () => api.openUpdate(), 'small primary'); const updRow = UI.row('DuoDesk', '', [updStatus, updNotes, updUnskip, updGet, updCheck]); - const updAuto = UI.switch((v) => api.setUpdates({ auto: v }), { label: 'Check for updates automatically' }); + const updAuto = UI.switch((v) => api.setUpdates({ auto: v }), { label: t('about.check_for_updates_automatically', null, 'Check for updates automatically') }); - const pc = facts('This computer', ['Computer name', 'System', 'Kernel', 'Processor', 'Memory', 'Architecture']); - const build = facts('This app', ['Version', 'Built for', 'Electron', 'Chromium', 'Node.js']); - const thanksRow = UI.row('Thanks', ''); + const pc = facts(t('about.this_computer', null, 'This computer'), [ + ['Computer name', t('about.computer_name', null, 'Computer name')], ['System', t('about.system', null, 'System')], ['Kernel', 'Kernel'], + ['Processor', t('about.processor', null, 'Processor')], ['Memory', t('about.memory', null, 'Memory')], ['Architecture', t('about.architecture', null, 'Architecture')], + ]); + const build = facts(t('about.this_app', null, 'This app'), [ + ['Version', t('about.version', null, 'Version')], ['Built for', t('about.built_for', null, 'Built for')], ['Electron', 'Electron'], ['Chromium', 'Chromium'], ['Node.js', 'Node.js'], + ]); + const thanksRow = UI.row(t('about.thanks', null, 'Thanks'), ''); body.append( hero, - UI.card('Updates', [ + UI.card(t('about.updates', null, 'Updates'), [ updRow, - UI.row('Check automatically', 'Looks for new releases on GitHub every few hours', [updAuto]), + UI.row(t('about.check_automatically', null, 'Check automatically'), t('about.looks_for_new_releases_on', null, 'Looks for new releases on GitHub every few hours'), [updAuto]), ], { cls: 'keep-on' }), - UI.card('Made by', [ - UI.row('0xCodez', 'github.com/0xCodez', [link('Profile', 'author')]), - UI.row('Website', 'getduodesk.vercel.app', [link('Open', 'website')]), - UI.row('Source code', 'github.com/0xCodez/DuoDesk', [link('GitHub', 'github')]), - UI.row('All releases', 'Downloads for macOS, Windows, Linux and Android', [link('Releases', 'releases')]), - UI.row('Report a problem', 'Open an issue on GitHub', [link('Issues', 'issues')]), - UI.row('Log files', 'What DuoDesk did and any crash, to attach to a bug report', [link('Open log folder', 'logs')]), + UI.card(t('about.made_by', null, 'Made by'), [ + UI.row('0xCodez', 'github.com/0xCodez', [link(t('about.profile', null, 'Profile'), 'author')]), + UI.row(t('about.website', null, 'Website'), 'getduodesk.vercel.app', [link(t('files.open', null, 'Open'), 'website')]), + UI.row(t('about.source_code', null, 'Source code'), 'github.com/0xCodez/DuoDesk', [link('GitHub', 'github')]), + UI.row(t('about.all_releases', null, 'All releases'), t('about.downloads_for_macos_windows_linux', null, 'Downloads for macOS, Windows, Linux and Android'), [link(t('about.releases', null, 'Releases'), 'releases')]), + UI.row(t('about.report_a_problem', null, 'Report a problem'), t('about.open_an_issue_on_github', null, 'Open an issue on GitHub'), [link(t('about.issues', null, 'Issues'), 'issues')]), + UI.row(t('about.log_files', null, 'Log files'), t('about.what_duodesk_did_and_any', null, 'What DuoDesk did and any crash, to attach to a bug report'), [link(t('about.open_log_folder', null, 'Open log folder'), 'logs')]), ], { cls: 'keep-on' }), pc, build, - UI.card('Licence', [ - UI.row('GNU General Public License v3', 'Free and open source. © 2026 0xCodez. Includes code © 2026 Inuka Asith.', [link('Read', 'licence')]), - UI.row('Original source', 'The GPL-3.0 code DuoDesk is built on, by Inuka Asith', [link('Open', 'upstream')]), + UI.card(t('about.licence', null, 'Licence'), [ + UI.row(t('about.gnu_general_public_license_v3', null, 'GNU General Public License v3'), t('about.free_and_open_source', null, 'Free and open source. © 2026 0xCodez. Includes code © 2026 Inuka Asith.'), [link(t('about.read', null, 'Read'), 'licence')]), + UI.row(t('about.original_source', null, 'Original source'), t('about.the_gpl_3_0_code', null, 'The GPL-3.0 code DuoDesk is built on, by Inuka Asith'), [link(t('files.open', null, 'Open'), 'upstream')]), thanksRow, ], { cls: 'keep-on' }), ); @@ -78,14 +84,14 @@ UI.tab({ return (s) => { const a = s.about || { app: {}, pc: {} }; nameEl.textContent = a.app.name || 'DuoDesk'; - verEl.textContent = 'Version ' + (a.app.version || s.version || ''); + verEl.textContent = t('about.version_value', { version: a.app.version || s.version || '' }, 'Version {version}'); thanksRow.setHint(a.app.thanks || ''); thanksRow.hidden = !a.app.thanks; pc.set({ 'Computer name': a.pc.host, System: a.pc.os, Kernel: a.pc.kernel, - Processor: a.pc.cpu ? a.pc.cpu + (a.pc.cores ? ' · ' + a.pc.cores + ' cores' : '') : '', + Processor: a.pc.cpu ? (a.pc.cores ? t('about.cpu_cores', { cpu: a.pc.cpu, cores: a.pc.cores }, '{cpu} · {cores} cores') : a.pc.cpu) : '', Memory: a.pc.memory, Architecture: a.pc.arch, }); @@ -97,14 +103,15 @@ UI.tab({ updGet.hidden = !u.available; updNotes.hidden = !u.available; updUnskip.hidden = !u.available || !u.skipped; - updStatus.textContent = u.checking ? 'Checking…' + updStatus.textContent = u.checking ? t('about.checking', null, 'Checking…') : u.available - ? (u.skipped ? u.latest + ' is available (skipped)' : u.latest + ' is available') - : u.checkedAt ? 'Up to date' : ''; - updRow.setHint(u.error ? 'Couldn’t check: ' + u.error - : u.available ? 'You have ' + u.current + '. ' + (u.download ? 'Download ' + u.download.name : 'Opens the release page') - : u.noReleases ? 'Version ' + u.current + '. No releases published yet' - : 'Version ' + u.current + (u.checkedAt ? ' · checked ' + new Date(u.checkedAt).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }) : '')); + ? (u.skipped ? t('about.latest_is_available_skipped', { latest: u.latest }, '{latest} is available (skipped)') : t('about.latest_is_available', { latest: u.latest }, '{latest} is available')) + : u.checkedAt ? t('about.up_to_date', null, 'Up to date') : ''; + updRow.setHint(u.error ? t('about.couldn_t_check_error', { error: u.error }, 'Couldn’t check: {error}') + : u.available ? (u.download ? t('about.you_have_download', { current: u.current, name: u.download.name }, 'You have {current}. Download {name}') : t('about.you_have_opens_release', { current: u.current }, 'You have {current}. Opens the release page')) + : u.noReleases ? t('about.version_no_releases', { current: u.current }, 'Version {current}. No releases published yet') + : u.checkedAt ? t('about.version_checked', { version: u.current, time: new Date(u.checkedAt).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' }) }, 'Version {version} · checked {time}') + : t('about.version_value', { version: u.current }, 'Version {version}')); } }; }, diff --git a/windows/ui-apps.js b/windows/ui-apps.js index ba5d29f8..80363985 100644 --- a/windows/ui-apps.js +++ b/windows/ui-apps.js @@ -16,18 +16,19 @@ UI.tab({ badge: (s) => (s.apps.open + s.pcApps.streaming ? String(s.apps.open + s.pcApps.streaming) : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const note = UI.note('warn', ''); - const refresh = UI.button('Refresh', () => api.listApps(), 'small'); - const filter = el('input', { type: 'text', placeholder: 'Search apps', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Search apps' } }); + const refresh = UI.button(t('overview.refresh', null, 'Refresh'), () => api.listApps(), 'small'); + const filter = el('input', { type: 'text', placeholder: t('phone.search_apps', null, 'Search apps'), autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('phone.search_apps', null, 'Search apps') } }); const grid = el('div', { class: 'app-grid' }); const status = UI.row('', ''); const openCount = UI.row('', ''); const pcState = UI.row('', ''); const pair = UI.dirCards( - { on: { get: (s) => s.macApps.on, set: (v) => api.setMacApps({ on: v }) }, label: 'Open {name}’s apps on {me}', hint: 'Pick one below', rows: [openCount] }, - { on: { get: (s) => s.pcApps.allow, set: (v) => api.setPcApps({ allow: v }) }, label: 'Open {me}’s apps on {name}', hint: 'Pick them over there', rows: [pcState] }, + { on: { get: (s) => s.macApps.on, set: (v) => api.setMacApps({ on: v }) }, label: t('apps.open_name_s_apps_on', null, 'Open {name}’s apps on {me}'), hint: t('apps.pick_one_below', null, 'Pick one below'), rows: [openCount] }, + { on: { get: (s) => s.pcApps.allow, set: (v) => api.setPcApps({ allow: v }) }, label: t('apps.open_me_s_apps_on', null, 'Open {me}’s apps on {name}'), hint: t('apps.pick_them_over_there', null, 'Pick them over there'), rows: [pcState] }, ); - const listCard = UI.card('Mac apps', [UI.row('Search', '', [filter]), grid, status], { actions: [refresh] }); + const listCard = UI.card(t('apps.mac_apps', null, 'Mac apps'), [UI.row(t('apps.search', null, 'Search'), '', [filter]), grid, status], { actions: [refresh] }); const rezume = UI.rezumeCard ? UI.rezumeCard() : { el: UI.el('div', { hidden: true }), update() {} }; // the other computer's ReZume (shared/ui-rezume.js; not in Multi-device) body.append(pair.el, rezume.el, note, listCard); filter.oninput = () => { key = ''; if (UI.state) render(UI.state); }; @@ -40,14 +41,14 @@ UI.tab({ const connected = s.link.state === 'connected'; pair.update(s); // the two direction switches follow the settings listCard.hidden = !s.macApps.on; - listCard.querySelector('.card-title > span').textContent = UI.peer(s).name + '’s apps'; + listCard.querySelector('.card-title > span').textContent = t('apps.peer_apps', { name: UI.peer(s).name }, '{name}’s apps'); if (connected && s.macApps.on && !asked && !a.list.length) { asked = true; api.listApps(); } openCount.hidden = !a.open; - openCount.label.textContent = a.open + ' open here'; + openCount.label.textContent = a.open === 1 ? t('apps.open_here_one', { count: a.open }, '{count} open here') : t('apps.open_here_other', { count: a.open }, '{count} open here'); const pa = s.pcApps; pcState.hidden = !pa.allow; - pcState.label.textContent = pa.streaming ? pa.streaming + ' open on {name}' - : !connected ? 'Waiting for {name}' : !pa.macAccepts ? 'Turned off on {name}' : pa.open ? 'Connecting…' : 'None open'; + pcState.label.textContent = pa.streaming ? (pa.streaming === 1 ? t('apps.open_on_name_one', { count: pa.streaming }, '{count} open on {name}') : t('apps.open_on_name_other', { count: pa.streaming }, '{count} open on {name}')) + : !connected ? t('apps.waiting_for_name', null, 'Waiting for {name}') : !pa.macAccepts ? t('clipboard.turned_off_on', null, 'Turned off on {name}') : pa.open ? t('sidebar.connecting', null, 'Connecting…') : t('apps.none_open', null, 'None open'); pcState.setHint(pa.message || ''); if (!connected) asked = false; note.set(a.message || ''); @@ -59,14 +60,14 @@ UI.tab({ key = k; const items = a.list.filter((x) => !q || x.name.toLowerCase().includes(q)); grid.replaceChildren(...items.map((x) => { - const b = el('button', { class: 'app-tile', title: 'Open ' + x.name + ' on {name}' }, [ + const b = el('button', { class: 'app-tile', title: t('apps.open_app_on_name', { app: x.name }, 'Open {app} on {name}') }, [ UI.appIcon(x.icon), el('span', { class: 'app-name', text: x.name }), ]); b.onclick = () => api.launchApp(x.id); if (a.peerPc) return b; // apps of another PC: no Start shortcut yet // Pin to Start (a shortcut in Start › DuoDesk Apps), on hover or right-click. - const pin = el('span', { class: 'app-pin', title: 'Pin to Start', attrs: { role: 'button', tabindex: '0', 'aria-label': 'Pin ' + x.name + ' to Start' } }, [UI.icon('pin')]); + const pin = el('span', { class: 'app-pin', title: t('apps.pin_to_start', null, 'Pin to Start'), attrs: { role: 'button', tabindex: '0', 'aria-label': t('apps.pin_app_to_start', { app: x.name }, 'Pin {app} to Start') } }, [UI.icon('pin')]); pin.onclick = (e) => { e.stopPropagation(); api.pinApp(x.id); }; pin.onkeydown = (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); e.stopPropagation(); api.pinApp(x.id); } }; b.oncontextmenu = (e) => { e.preventDefault(); api.pinApp(x.id); }; @@ -74,8 +75,8 @@ UI.tab({ return b; })); status.hidden = items.length > 0; - status.label.textContent = !connected ? 'Waiting for {name}' : a.loading ? 'Loading…' : q ? 'No app matches' : 'No apps yet'; - status.setHint(!connected || a.loading || q ? '' : 'Click Refresh to ask {name} for its apps.'); + status.label.textContent = !connected ? t('apps.waiting_for_name', null, 'Waiting for {name}') : a.loading ? t('apps.loading', null, 'Loading…') : q ? t('apps.no_app_matches', null, 'No app matches') : t('apps.no_apps_yet', null, 'No apps yet'); + status.setHint(!connected || a.loading || q ? '' : t('apps.click_refresh_to_ask_name', null, 'Click Refresh to ask {name} for its apps.')); } return render; }, diff --git a/windows/ui-audio.js b/windows/ui-audio.js index 0fd26f00..48da501d 100644 --- a/windows/ui-audio.js +++ b/windows/ui-audio.js @@ -14,18 +14,19 @@ UI.tab({ badge: (s) => (s.audio.receiving || s.audio.sending ? 'on' : ''), build(body) { const { api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const set = (partial) => api.setAudio(partial); const volume = UI.slider({ min: 0, max: 1, step: 0.05, format: (v) => Math.round(v * 100) + '%' }, (v) => set({ volume: v })); - const mute = UI.switch((v) => set({ muteLocal: v }), { label: 'Mute {me} while sending' }); + const mute = UI.switch((v) => set({ muteLocal: v }), { label: t('audio.mute_me_while_sending', null, 'Mute {me} while sending') }); const recvState = UI.row('', ''); const sendState = UI.row('', ''); const pair = UI.dirCards( - { on: { get: (s) => s.audio.receive, set: (v) => set({ receive: v }) }, label: 'Play {name}’s sound on {me}', rows: [ - UI.row('Volume', '', [volume]), + { on: { get: (s) => s.audio.receive, set: (v) => set({ receive: v }) }, label: t('audio.play_name_s_sound_on', null, 'Play {name}’s sound on {me}'), rows: [ + UI.row(t('audio.volume', null, 'Volume'), '', [volume]), recvState, ] }, - { on: { get: (s) => s.audio.send, set: (v) => set({ send: v }) }, label: 'Play {me}’s sound on {name}', rows: [ - UI.row('Mute {me} while sending', '', [mute]), + { on: { get: (s) => s.audio.send, set: (v) => set({ send: v }) }, label: t('audio.play_me_s_sound_on', null, 'Play {me}’s sound on {name}'), rows: [ + UI.row(t('audio.mute_me_while_sending', null, 'Mute {me} while sending'), '', [mute]), sendState, ] }, ); @@ -44,9 +45,9 @@ UI.tab({ recvState.hidden = !a.receive; const nm = UI.peer(s).name; const phone = UI.phoneSound && UI.phoneSound(s); - recvState.label.textContent = phone != null ? phone : a.receiving ? 'Playing ' + nm : connected ? 'Turned off on ' + nm : 'Waiting for ' + nm; + recvState.label.textContent = phone != null ? phone : a.receiving ? t('audio.playing_name', { name: nm }, 'Playing {name}') : connected ? t('clipboard.turned_off_on', { name: nm }, 'Turned off on {name}') : t('audio.waiting_for_name', { name: nm }, 'Waiting for {name}'); sendState.hidden = !a.send && !a.error; - sendState.label.textContent = a.sending ? 'Playing on ' + nm : !connected ? 'Waiting for ' + nm : !a.macAccepts ? 'Turned off on ' + nm : 'Connecting…'; + sendState.label.textContent = a.sending ? t('audio.playing_on_name', { name: nm }, 'Playing on {name}') : !connected ? t('audio.waiting_for_name', { name: nm }, 'Waiting for {name}') : !a.macAccepts ? t('clipboard.turned_off_on', { name: nm }, 'Turned off on {name}') : t('sidebar.connecting', null, 'Connecting…'); sendState.setHint(a.error || ''); }; }, diff --git a/windows/ui-clipboard.js b/windows/ui-clipboard.js index b4a5ac10..139b64a9 100644 --- a/windows/ui-clipboard.js +++ b/windows/ui-clipboard.js @@ -13,46 +13,47 @@ UI.tab({ badge: (s) => (!s.clipboard.enabled ? '' : s.link.state === 'connected' && !s.clipboard.peerAccepts ? 'warn' : 'on'), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const set = (partial) => api.setClipboard(partial); const peerRow = UI.row('', ''); const skipNote = UI.note('info', ''); const mode = UI.segmented([ - { value: 'instant', label: 'Instantly' }, // the default - { value: 'switch', label: 'When you switch' }, + { value: 'instant', label: t('clipboard.instantly', null, 'Instantly') }, // the default + { value: 'switch', label: t('clipboard.when_switch', null, 'When you switch') }, ], (v) => set({ mode: v })); - const modeRow = UI.row('Sync', '', [mode]); - const concealed = UI.switch((v) => set({ skipConcealed: v }), { label: 'Skip passwords' }); + const modeRow = UI.row(t('clipboard.sync', null, 'Sync'), '', [mode]); + const concealed = UI.switch((v) => set({ skipConcealed: v }), { label: t('clipboard.skip_passwords', null, 'Skip passwords') }); const maxKB = UI.select([ { value: 16, label: '16 KB' }, { value: 64, label: '64 KB' }, { value: 256, label: '256 KB' }, ], (v) => set({ maxKB: Number(v) })); // Pictures (clipimage.js): screenshots put on the clipboard among them. Not in Multi-device yet. - const pictures = UI.switch((v) => set({ images: v }), { label: 'Pictures' }); - const picturesRow = UI.row('Pictures', '', [pictures]); + const pictures = UI.switch((v) => set({ images: v }), { label: t('clipboard.pictures', null, 'Pictures') }); + const picturesRow = UI.row(t('clipboard.pictures', null, 'Pictures'), '', [pictures]); // Text only: pictures have their own limit (10 MB). - const maxKBRow = UI.row('Largest text', '', [maxKB]); + const maxKBRow = UI.row(t('clipboard.largest_text', null, 'Largest text'), '', [maxKB]); const historySize = UI.select([ - { value: 0, label: 'Off' }, { value: 10, label: '10 items' }, { value: 20, label: '20 items' }, - { value: 50, label: '50 items' }, { value: 100, label: '100 items' }, + { value: 0, label: t('clipboard.off', null, 'Off') }, { value: 10, label: t('clipboard.items_10', null, '10 items') }, { value: 20, label: t('clipboard.items_20', null, '20 items') }, + { value: 50, label: t('clipboard.items_50', null, '50 items') }, { value: 100, label: t('clipboard.items_100', null, '100 items') }, ], (v) => set({ historySize: Number(v) })); const pair = UI.dirCards( - { on: { get: (s) => s.clipboard.receive, set: (v) => set({ receive: v }) }, label: 'Copy on {name}, paste on {me}', rows: [] }, - { on: { get: (s) => s.clipboard.send, set: (v) => set({ send: v }) }, label: 'Copy on {me}, paste on {name}', rows: [peerRow] }, + { on: { get: (s) => s.clipboard.receive, set: (v) => set({ receive: v }) }, label: t('clipboard.copy_there_paste_me', null, 'Copy on {name}, paste on {me}'), rows: [] }, + { on: { get: (s) => s.clipboard.send, set: (v) => set({ send: v }) }, label: t('clipboard.copy_me_paste_there', null, 'Copy on {me}, paste on {name}'), rows: [peerRow] }, ); const list = el('div', { class: 'history' }); - const clearBtn = UI.button('Clear', () => api.clearHistory(), 'small'); + const clearBtn = UI.button(t('clipboard.clear', null, 'Clear'), () => api.clearHistory(), 'small'); body.append( pair.el, UI.card('', [modeRow, picturesRow]), - UI.card('Privacy', [ - UI.row('Skip passwords', 'From password managers', [concealed]), + UI.card(t('clipboard.privacy', null, 'Privacy'), [ + UI.row(t('clipboard.skip_passwords', null, 'Skip passwords'), t('clipboard.from_pw_managers', null, 'From password managers'), [concealed]), maxKBRow, - UI.row('Recent items', 'Never saved to disk', [historySize]), + UI.row(t('clipboard.recent_items', null, 'Recent items'), t('clipboard.never_saved_disk', null, 'Never saved to disk'), [historySize]), ]), skipNote, - UI.card('Recent', [list], { actions: [clearBtn] }), + UI.card(t('clipboard.recent', null, 'Recent'), [list], { actions: [clearBtn] }), ); let lastKey = ''; @@ -60,21 +61,21 @@ UI.tab({ const c = s.clipboard; pair.update(s); mode.set(c.mode); - modeRow.setHint(c.mode === 'instant' ? 'As soon as you copy' : 'When you move to the other computer'); + modeRow.setHint(c.mode === 'instant' ? t('clipboard.as_soon_as_copy', null, 'As soon as you copy') : t('clipboard.when_move_to_other', null, 'When you move to the other computer')); picturesRow.hidden = !c.imageSupport; pictures.set(!!c.images); - picturesRow.setHint(!c.images ? 'Pictures and screenshots you copy, up to 10 MB, both ways' - : s.link.state === 'connected' && !c.peerImages ? 'Turn on Pictures on ' + UI.peer(s).name + ' too (an older version there can’t: update DuoDesk)' - : 'Pictures and screenshots you copy, up to 10 MB, both ways. Not over Bluetooth'); + picturesRow.setHint(!c.images ? t('clipboard.pics_both_ways', null, 'Pictures and screenshots you copy, up to 10 MB, both ways') + : s.link.state === 'connected' && !c.peerImages ? t('clipboard.pics_turn_on_peer', { name: UI.peer(s).name }, 'Turn on Pictures on ' + UI.peer(s).name + ' too (an older version there can’t: update DuoDesk)') + : t('clipboard.pics_no_ble', null, 'Pictures and screenshots you copy, up to 10 MB, both ways. Not over Bluetooth')); concealed.set(c.skipConcealed); maxKB.set(c.maxKB); - maxKBRow.setHint(c.imageSupport ? 'Longer text isn’t sent. Pictures: up to 10 MB' : 'Longer text isn’t sent'); + maxKBRow.setHint(c.imageSupport ? t('clipboard.longer_text_pics', null, 'Longer text isn’t sent. Pictures: up to 10 MB') : t('clipboard.longer_text', null, 'Longer text isn’t sent')); historySize.set(c.historySize); const refused = s.link.state === 'connected' && !c.peerAccepts; peerRow.hidden = !refused; - peerRow.label.textContent = 'Turned off on ' + UI.peer(s).name; + peerRow.label.textContent = t('clipboard.turned_off_on', { name: UI.peer(s).name }, 'Turned off on ' + UI.peer(s).name); peerRow.setHint(''); - skipNote.set(c.enabled && c.lastSkip ? 'Last item not sent: ' + c.lastSkip + '.' : ''); + skipNote.set(c.enabled && c.lastSkip ? t('clipboard.last_skip', { last: c.lastSkip }, 'Last item not sent: ' + c.lastSkip + '.') : ''); clearBtn.disabled = !c.history.length; const key = JSON.stringify(c.history.map((h) => [h.at, h.dir, !!(h.image && h.image.copy)])) + c.historySize + Math.floor(Date.now() / 15000); @@ -82,17 +83,17 @@ UI.tab({ lastKey = key; list.replaceChildren(...(c.history.length ? c.history.map((h, i) => el('div', { class: 'hist-item' }, [ - el('span', { class: 'hist-dir ' + h.dir, title: h.dir === 'out' ? 'Sent to {name}' : 'From {name}' }, [UI.icon(h.dir === 'out' ? 'up' : 'down')]), + el('span', { class: 'hist-dir ' + h.dir, title: h.dir === 'out' ? t('clipboard.sent_to', null, 'Sent to {name}') : t('clipboard.from_peer', null, 'From {name}') }, [UI.icon(h.dir === 'out' ? 'up' : 'down')]), h.image && h.image.thumb ? el('img', { class: 'hist-thumb', src: h.image.thumb, alt: '' }) : null, el('div', { class: 'hist-text' }, [ h.image - ? el('div', { class: 'hist-preview', text: (h.image.shot ? 'Screenshot' : 'Picture') + ' · ' + h.image.w + ' × ' + h.image.h }) - : el('div', { class: 'hist-preview selectable', text: h.text.replace(/\s+/g, ' ').trim() || '(whitespace)' }), - el('div', { class: 'hint', text: (h.dir === 'out' ? 'To {name}' : 'From {name}') + ' · ' + UI.ago(h.at) + ' · ' + UI.bytes(h.size) }), + ? el('div', { class: 'hist-preview', text: (h.image.shot ? t('clipboard.screenshot', null, 'Screenshot') : t('clipboard.picture', null, 'Picture')) + ' · ' + h.image.w + ' × ' + h.image.h }) + : el('div', { class: 'hist-preview selectable', text: h.text.replace(/\s+/g, ' ').trim() || t('clipboard.whitespace', null, '(whitespace)') }), + el('div', { class: 'hint', text: (h.dir === 'out' ? t('clipboard.to_peer', null, 'To {name}') : t('clipboard.from_peer', null, 'From {name}')) + ' · ' + UI.ago(h.at) + ' · ' + UI.bytes(h.size) }), ]), - !h.image || h.image.copy ? UI.button('Copy', () => api.copyHistory(i), 'small') : null, + !h.image || h.image.copy ? UI.button(t('clipboard.copy_btn', null, 'Copy'), () => api.copyHistory(i), 'small') : null, ])) - : [UI.row(c.historySize ? 'Nothing yet' : 'Recent items are off', '')])); + : [UI.row(c.historySize ? t('clipboard.nothing_yet', null, 'Nothing yet') : t('clipboard.recent_off', null, 'Recent items are off'), '')])); }; }, }); diff --git a/windows/ui-cursor.js b/windows/ui-cursor.js index 1dd5ff63..af9b23b6 100644 --- a/windows/ui-cursor.js +++ b/windows/ui-cursor.js @@ -17,30 +17,31 @@ UI.tab({ badge: (s) => (s.kvm.mouse && s.kvm.linked && !s.kvmState.paused ? 'on' : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const set = (partial) => api.setKvm(partial); // kvm.layout says where the PC is seen from the Mac; the Mac is on the opposite side of the PC. const MAC_SIDE = { left: 'right', right: 'left', top: 'bottom', bottom: 'top' }; const speed = UI.slider({ min: 0.25, max: 3, step: 0.05, format: (v) => v.toFixed(2) + '×' }, (v) => set({ speed: v })); - const reverse = UI.switch((v) => set({ reverseScroll: v }), { label: 'Reverse scrolling' }); - const gestures = UI.switch((v) => set({ gestures: v }), { label: 'Trackpad gestures' }); - const gestureRow = UI.row('Trackpad gestures', 'Pinch to zoom, swipe between desktops, Task View / Mission Control, back and forward — done the native way on {name}. The same on both', [gestures]); - const ble = UI.switch((v) => set({ ble: v }), { label: 'Over Bluetooth' }); - const bleRow = UI.row('Over Bluetooth', 'When {name} isn’t on this network and you’re connected through Bluetooth (slower). Off: nothing crosses until you’re on Wi-Fi again. The same on both', [ble]); - const resistance = UI.slider({ min: 0, max: 400, step: 10, format: (v) => (v ? v + ' px' : 'None') }, (v) => set({ resistancePx: v })); + const reverse = UI.switch((v) => set({ reverseScroll: v }), { label: t('cursor.reverse_scrolling', null, 'Reverse scrolling') }); + const gestures = UI.switch((v) => set({ gestures: v }), { label: t('cursor.trackpad_gestures', null, 'Trackpad gestures') }); + const gestureRow = UI.row(t('cursor.trackpad_gestures', null, 'Trackpad gestures'), t('cursor.gestures_hint', null, 'Pinch to zoom, swipe between desktops, Task View / Mission Control, back and forward — done the native way on {name}. The same on both'), [gestures]); + const ble = UI.switch((v) => set({ ble: v }), { label: t('cursor.over_bluetooth', null, 'Over Bluetooth') }); + const bleRow = UI.row(t('cursor.over_bluetooth', null, 'Over Bluetooth'), t('cursor.bluetooth_hint', null, 'When {name} isn’t on this network and you’re connected through Bluetooth (slower). Off: nothing crosses until you’re on Wi-Fi again. The same on both'), [ble]); + const resistance = UI.slider({ min: 0, max: 400, step: 10, format: (v) => (v ? v + ' px' : t('cursor.none', null, 'None')) }, (v) => set({ resistancePx: v })); // A phone as the peer: how the pointer and keys reach it (settings.phone.input, the phone's own toggle too). - const via = UI.segmented([{ value: 'adb', label: 'ADB' }, { value: 'phone', label: 'Accessibility' }], (v) => api.setPhone({ input: v, inputPicked: true })); + const via = UI.segmented([{ value: 'adb', label: 'ADB' }, { value: 'phone', label: t('cursor.accessibility', null, 'Accessibility') }], (v) => api.setPhone({ input: v, inputPicked: true })); // With a phone: its own card on top, with the way to its wireless debugging (Connection). - const adbBtn = UI.button('Wireless Debugging', () => UI.go('connection'), 'small'); - const viaRow = UI.row('Control the phone with', '', [via.el, adbBtn]); - const viaCard = UI.card('Phone', [viaRow]); + const adbBtn = UI.button(t('cursor.wireless_debugging', null, 'Wireless Debugging'), () => UI.go('connection'), 'small'); + const viaRow = UI.row(t('cursor.control_phone_with', null, 'Control the phone with'), '', [via.el, adbBtn]); + const viaCard = UI.card(t('cursor.phone_card', null, 'Phone'), [viaRow]); const pair = UI.dirCards( - { on: { get: (s) => s.kvm.beDriven, set: (v) => set({ beDriven: v }) }, label: 'Use {name}’s mouse and keyboard on {me}', hint: 'Push the pointer past the edge there', rows: [ - UI.row('Pointer speed here', '', [speed]), - UI.row('Reverse scrolling', '', [reverse]), + { on: { get: (s) => s.kvm.beDriven, set: (v) => set({ beDriven: v }) }, label: t('cursor.use_peer_on_me', null, 'Use {name}’s mouse and keyboard on {me}'), hint: t('cursor.push_edge_there', null, 'Push the pointer past the edge there'), rows: [ + UI.row(t('cursor.pointer_speed', null, 'Pointer speed here'), '', [speed]), + UI.row(t('cursor.reverse_scrolling', null, 'Reverse scrolling'), '', [reverse]), ] }, - { on: { get: (s) => s.kvm.driveOther, set: (v) => set({ driveOther: v }) }, label: 'Use {me}’s mouse and keyboard on {name}', hint: 'Push the pointer past the edge', rows: [ - UI.row('Edge resistance', 'Push a little further to cross', [resistance]), + { on: { get: (s) => s.kvm.driveOther, set: (v) => set({ driveOther: v }) }, label: t('cursor.use_me_on_peer', null, 'Use {me}’s mouse and keyboard on {name}'), hint: t('cursor.push_edge', null, 'Push the pointer past the edge'), rows: [ + UI.row(t('cursor.edge_resistance', null, 'Edge resistance'), t('cursor.resistance_hint', null, 'Push a little further to cross'), [resistance]), ] }, ); @@ -53,10 +54,10 @@ UI.tab({ viaCard, pair.el, lock.el, - UI.card('Feel', [gestureRow]), - UI.card('Not on the same network', [bleRow]), - UI.card('Right now', [status], { cls: 'keep-on' }), - el('div', { class: 'card-title', text: 'Where the other computer is' }), + UI.card(t('cursor.feel', null, 'Feel'), [gestureRow]), + UI.card(t('cursor.not_same_network', null, 'Not on the same network'), [bleRow]), + UI.card(t('cursor.right_now', null, 'Right now'), [status], { cls: 'keep-on' }), + el('div', { class: 'card-title', text: t('cursor.where_other_pc', null, 'Where the other computer is') }), el('div', { class: 'card layout' }, [map.el]), ); @@ -68,9 +69,9 @@ UI.tab({ const pset = (s.phone || {}).settings || {}; via.set(br.input || (pset.input === 'phone' ? 'phone' : 'adb')); adbBtn.hidden = br.state === 'ready'; - viaRow.setHint(br.inputMode === 'auto' ? (br.state === 'ready' ? 'Automatic: ADB, wireless debugging is ready' : 'Automatic: Accessibility until wireless debugging is set up') - : br.input === 'phone' ? 'Accessibility: DuoDesk on the phone taps and types. Works over Wi-Fi, Wi-Fi Direct and Bluetooth, no developer options' - : 'ADB: full control through wireless debugging' + (br.state === 'ready' ? '' : ' (not set up yet)')); + viaRow.setHint(br.inputMode === 'auto' ? (br.state === 'ready' ? t('cursor.auto_adb_ready', null, 'Automatic: ADB, wireless debugging is ready') : t('cursor.auto_acc_fallback', null, 'Automatic: Accessibility until wireless debugging is set up')) + : br.input === 'phone' ? t('cursor.acc_hint', null, 'Accessibility: DuoDesk on the phone taps and types. Works over Wi-Fi, Wi-Fi Direct and Bluetooth, no developer options') + : (br.state === 'ready' ? t('cursor.adb_full_control', null, 'ADB: full control through wireless debugging') : t('cursor.adb_not_setup_yet', null, 'ADB: full control through wireless debugging (not set up yet)'))); status.update(s); lock.update(s); speed.set(k.speed); diff --git a/windows/ui-files.js b/windows/ui-files.js index a3a20442..96589ab0 100644 --- a/windows/ui-files.js +++ b/windows/ui-files.js @@ -16,28 +16,29 @@ UI.tab({ badge: (s) => (s.files.dropToMac || s.files.acceptFromMac ? 'on' : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const sw = (label, set) => UI.switch(set, { label }); - const mount = sw('{Name}’s folder here', (v) => api.setFiles({ mountMac: v })); - const openBtn = UI.button('Open', () => api.openMacDrive(), 'small'); - const macDrive = UI.row('Open {name}’s shared folder', '', [openBtn, mount]); - const share = sw('{me}’s folder on {name}', (v) => api.setShareOn(v)); - const chooseBtn = UI.button('Choose…', () => api.chooseShareFolder(), 'small'); + const mount = sw(t('files.peer_folder_here', null, '{Name}’s folder here'), (v) => api.setFiles({ mountMac: v })); + const openBtn = UI.button(t('files.open', null, 'Open'), () => api.openMacDrive(), 'small'); + const macDrive = UI.row(t('files.open_peer_shared', null, 'Open {name}’s shared folder'), '', [openBtn, mount]); + const share = sw(t('files.my_folder_on_peer', null, '{me}’s folder on {name}'), (v) => api.setShareOn(v)); + const chooseBtn = UI.button(t('files.choose', null, 'Choose…'), () => api.chooseShareFolder(), 'small'); const sharePill = el('span', { class: 'pill' }); - const pcShare = UI.row('Share a folder with {name}', '', [sharePill, chooseBtn, share]); + const pcShare = UI.row(t('files.share_folder_with', null, 'Share a folder with {name}'), '', [sharePill, chooseBtn, share]); const pair = UI.dirCards( - { on: { get: (s) => s.files.acceptFromMac, set: (v) => api.setFiles({ acceptFromMac: v }) }, label: 'Take files from {name} on {me}', rows: [ + { on: { get: (s) => s.files.acceptFromMac, set: (v) => api.setFiles({ acceptFromMac: v }) }, label: t('files.take_files_from', null, 'Take files from {name} on {me}'), rows: [ macDrive, ] }, - { on: { get: (s) => s.files.dropToMac, set: (v) => api.setFiles({ dropToMac: v }) }, label: 'Send files from {me} to {name}', rows: [ + { on: { get: (s) => s.files.dropToMac, set: (v) => api.setFiles({ dropToMac: v }) }, label: t('files.send_files_to', null, 'Send files from {me} to {name}'), rows: [ pcShare, ] }, ); // Send files: drop zone + Choose… - const zoneText = el('div', { class: 'big', text: 'Drop files or folders here' }); + const zoneText = el('div', { class: 'big', text: t('files.drop_here', null, 'Drop files or folders here') }); const zoneHint = el('div', { class: 'hint', text: '' }); const zone = el('div', { class: 'dropzone' }, [el('div', {}, [zoneText, zoneHint])]); - const sendBtn = UI.button('Choose…', () => api.chooseSendFiles(), 'small'); - const sendRow = UI.row('Send files', '', [sendBtn]); + const sendBtn = UI.button(t('files.choose', null, 'Choose…'), () => api.chooseSendFiles(), 'small'); + const sendRow = UI.row(t('files.send_files', null, 'Send files'), '', [sendBtn]); const sendBar = el('div', { class: 'bar' }, [el('span')]); sendBar.hidden = true; sendRow.querySelector('.text').append(sendBar); @@ -55,16 +56,16 @@ UI.tab({ window.addEventListener('drop', (e) => e.preventDefault()); // Copy and paste files with shortcuts - const keysSw = sw('Copy and paste files with shortcuts', (v) => api.setFiles({ shortcuts: v })); + const keysSw = sw(t('files.shortcuts_sw', null, 'Copy and paste files with shortcuts'), (v) => api.setFiles({ shortcuts: v })); const copyRec = UI.keyRecorder((v) => api.setFiles({ copyKeys: v })); const pasteRec = UI.keyRecorder((v) => api.setFiles({ pasteKeys: v })); - const keysRow = UI.row('Copy and paste files', '', [keysSw]); - const copyRow = UI.row('Copy', 'Select files in File Explorer first', [copyRec]); - const pasteRow = UI.row('Paste', '', [pasteRec]); + const keysRow = UI.row(t('files.shortcuts_title', null, 'Copy and paste files'), '', [keysSw]); + const copyRow = UI.row(t('files.copy', null, 'Copy'), t('files.select_explorer_first', null, 'Select files in File Explorer first'), [copyRec]); + const pasteRow = UI.row(t('files.paste', null, 'Paste'), '', [pasteRec]); - const edgeDrag = sw('Drag files across the screen edge', (v) => api.setFiles({ edgeDrag: v })); - const edgeRow = UI.row('Drag files between computers', '', [edgeDrag]); - const cancelBtn = UI.button('Cancel', () => api.cancelDrop(), 'small'); + const edgeDrag = sw(t('files.edge_drag_sw', null, 'Drag files across the screen edge'), (v) => api.setFiles({ edgeDrag: v })); + const edgeRow = UI.row(t('files.drag_between_computers', null, 'Drag files between computers'), '', [edgeDrag]); + const cancelBtn = UI.button(t('files.cancel', null, 'Cancel'), () => api.cancelDrop(), 'small'); const outRow = UI.row('', '', [cancelBtn]); const inRow = UI.row('', ''); body.append( @@ -72,7 +73,7 @@ UI.tab({ UI.card('', [keysRow, copyRow, pasteRow], { cls: 'keep-on' }), pair.el, UI.card('', [edgeRow]), - UI.card('Recent', [outRow, inRow]), + UI.card(t('files.recent', null, 'Recent'), [outRow, inRow]), ); const mb = (n) => (n / 1048576).toFixed(1) + ' MB'; return (s) => { @@ -83,35 +84,35 @@ UI.tab({ // Send files canSend = s.link.state === 'connected'; zone.classList.toggle('off', !canSend); - zoneText.textContent = canSend ? 'Drop files or folders here' : 'Connect to send files'; - zoneHint.textContent = !canSend ? '' : p.phone ? 'They go to ' + p.the + '’s Downloads' - : 'They go to ' + p.the + '’s Downloads, or the folder chosen there for received files'; + zoneText.textContent = canSend ? t('files.drop_here', null, 'Drop files or folders here') : t('files.connect_to_send', null, 'Connect to send files'); + zoneHint.textContent = !canSend ? '' : p.phone ? t('files.hint_downloads_phone', { the: p.the }, 'They go to ' + p.the + '’s Downloads') + : t('files.hint_downloads_pc', { the: p.the }, 'They go to ' + p.the + '’s Downloads, or the folder chosen there for received files'); sendBtn.disabled = !canSend; const b = f.batch; sendBar.hidden = !b; if (b) sendBar.firstChild.style.width = Math.floor((100 * b.sent) / Math.max(1, b.bytes)) + '%'; - sendRow.setHint(b ? (b.kind === 'paste' ? 'Pasting ' : 'Sending ') + b.name + ' to ' + p.the + (b.files > 1 ? ' · ' + (b.index + 1) + ' of ' + b.files : '') : canSend ? 'To ' + p.the : ''); + sendRow.setHint(b ? (b.kind === 'paste' ? t('files.pasting_to', { name: b.name, the: p.the }, 'Pasting ' + b.name + ' to ' + p.the) : t('files.sending_to', { name: b.name, the: p.the }, 'Sending ' + b.name + ' to ' + p.the)) + (b.files > 1 ? t('files.idx_of_total', { idx: b.index + 1, total: b.files }, ' · ' + (b.index + 1) + ' of ' + b.files) : '') : canSend ? t('files.to_peer', { the: p.the }, 'To ' + p.the) : ''); // Shortcuts const ck = f.clip; keysSw.set(f.shortcuts); copyRec.set(f.copyKeys); pasteRec.set(f.pasteKeys); - keysRow.setHint(ck.error || 'Select files, press ' + UI.keysLabel(f.copyKeys) + ', then ' + UI.keysLabel(f.pasteKeys) + ' on ' + p.the); + keysRow.setHint(ck.error || t('files.select_files_press', { copy: UI.keysLabel(f.copyKeys), paste: UI.keysLabel(f.pasteKeys), the: p.the }, 'Select files, press ' + UI.keysLabel(f.copyKeys) + ', then ' + UI.keysLabel(f.pasteKeys) + ' on ' + p.the)); keysRow.hint.classList.toggle('bad', !!ck.error); copyRow.hidden = pasteRow.hidden = !f.shortcuts; - pasteRow.setHint(ck.pasting ? 'Pasting…' - : ck.incoming ? p.them + ' copied ' + (ck.incoming.name || ck.incoming.items + ' items') + ' · press ' + UI.keysLabel(f.pasteKeys) - : 'Into the app in front (a chat, a mail…), or the File Explorer folder in front, else the Desktop'); + pasteRow.setHint(ck.pasting ? t('files.pasting', null, 'Pasting…') + : ck.incoming ? t('files.peer_copied_press', { them: p.them, what: ck.incoming.name || t('files.n_items', { count: ck.incoming.items }, ck.incoming.items + ' items'), keys: UI.keysLabel(f.pasteKeys) }, p.them + ' copied ' + (ck.incoming.name || ck.incoming.items + ' items') + ' · press ' + UI.keysLabel(f.pasteKeys)) + : t('files.paste_hint_dest', null, 'Into the app in front (a chat, a mail…), or the File Explorer folder in front, else the Desktop')); edgeDrag.set(f.edgeDrag); - edgeRow.setHint(f.edgeDrag && f.macDrags === false ? 'Turned off on {name}' : f.edgeDrag ? 'Drag through the screen edge and drop anywhere' : ''); + edgeRow.setHint(f.edgeDrag && f.macDrags === false ? t('files.turned_off_on', null, 'Turned off on {name}') : f.edgeDrag ? t('files.drag_hint', null, 'Drag through the screen edge and drop anywhere') : ''); mount.set(f.mountMac); openBtn.hidden = !m.drive && !m.wifi; - macDrive.setHint(m.mountMessage || (!f.mountMac ? '' : m.drive ? 'Drive ' + m.drive : m.busy === 'mount' ? 'Connecting…' - : m.wifi ? 'Over Bluetooth: Open connects it with Wi-Fi Direct' : 'Waiting for {name} to share one')); + macDrive.setHint(m.mountMessage || (!f.mountMac ? '' : m.drive ? t('files.drive_num', { drive: m.drive }, 'Drive ' + m.drive) : m.busy === 'mount' ? t('files.connecting', null, 'Connecting…') + : m.wifi ? t('files.over_ble_open_wifi', null, 'Over Bluetooth: Open connects it with Wi-Fi Direct') : t('files.waiting_peer_share', null, 'Waiting for {name} to share one'))); share.set(f.shareOn); - const busy = m.busy === 'setup' ? 'Setting up…' : m.busy === 'remove' ? 'Removing…' : ''; + const busy = m.busy === 'setup' ? t('files.setting_up', null, 'Setting up…') : m.busy === 'remove' ? t('files.removing', null, 'Removing…') : ''; sharePill.hidden = !f.shareOn && !busy; - sharePill.textContent = busy || (m.peer && m.peer.mounted ? 'On {name}' : m.peer && m.peer.error ? 'Problem' : 'Shared'); + sharePill.textContent = busy || (m.peer && m.peer.mounted ? t('files.on_peer', null, 'On {name}') : m.peer && m.peer.error ? t('files.problem', null, 'Problem') : t('files.shared', null, 'Shared')); sharePill.className = 'pill ' + (busy ? 'muted' : m.peer && m.peer.mounted ? 'good' : m.peer && m.peer.error ? 'bad' : 'muted'); chooseBtn.disabled = !!m.busy; pcShare.setHint(m.message || (m.peer && m.peer.error) || m.folder); @@ -119,26 +120,26 @@ UI.tab({ cancelBtn.hidden = !f.current; if (f.current) { const c = f.current; - outRow.label.textContent = 'Sending ' + c.name + (c.count > 1 ? ' (' + (c.index + 1) + ' of ' + c.count + ')' : ''); - outRow.setHint(mb(c.sent) + ' of ' + mb(c.size) + (f.queued ? ' · ' + f.queued + ' more waiting' : '')); + outRow.label.textContent = c.count > 1 ? t('files.sending_name_idx', { name: c.name, idx: c.index + 1, count: c.count }, 'Sending ' + c.name + ' (' + (c.index + 1) + ' of ' + c.count + ')') : t('files.sending_name', { name: c.name }, 'Sending ' + c.name); + outRow.setHint(f.queued ? t('files.sent_of_size_queued', { sent: mb(c.sent), size: mb(c.size), queued: f.queued }, mb(c.sent) + ' of ' + mb(c.size) + ' · ' + f.queued + ' more waiting') : t('files.sent_of_size', { sent: mb(c.sent), size: mb(c.size) }, mb(c.sent) + ' of ' + mb(c.size))); } else { - outRow.label.textContent = f.last ? (f.last.ok ? 'Sent ' : 'Not sent: ') + (f.last.name || '') : 'Nothing sent'; + outRow.label.textContent = f.last ? t(f.last.ok ? 'files.sent_file' : 'files.not_sent_file', { file: f.last.name || '' }, (f.last.ok ? 'Sent ' : 'Not sent: ') + (f.last.name || '')) : t('files.nothing_sent', null, 'Nothing sent'); outRow.setHint(f.last ? f.last.text + ' · ' + UI.ago(f.last.at) : ''); } const inc = f.incoming; const dr = f.drag; if (dr.state) { - inRow.label.textContent = (dr.state === 'copying' ? 'Copying ' : 'Dragging ') + dr.name; - inRow.setHint(dr.state === 'copying' ? '' : 'Esc cancels'); + inRow.label.textContent = (dr.state === 'copying' ? t('files.copying_name', { name: dr.name }, 'Copying ' + dr.name) : t('files.dragging_name', { name: dr.name }, 'Dragging ' + dr.name)); + inRow.setHint(dr.state === 'copying' ? '' : t('files.esc_cancels', null, 'Esc cancels')); return; } if (dr.last && (!inc.last || dr.last.at > inc.last.at)) { - inRow.label.textContent = dr.last.ok ? 'Received from {name}' : 'Not received'; + inRow.label.textContent = dr.last.ok ? t('files.received_from_peer', null, 'Received from {name}') : t('files.not_received', null, 'Not received'); inRow.setHint(dr.last.text + ' · ' + UI.ago(dr.last.at)); return; } - inRow.label.textContent = inc.receiving ? 'Receiving ' + inc.receiving + ' file' + (inc.receiving > 1 ? 's' : '') + ' from {name}' - : inc.last ? (inc.last.ok ? 'Received ' : 'Not received: ') + inc.last.name : 'Nothing received'; + inRow.label.textContent = inc.receiving ? t(inc.receiving === 1 ? 'files.receiving_files_from_one' : 'files.receiving_files_from_other', { count: inc.receiving }, 'Receiving ' + inc.receiving + ' file' + (inc.receiving > 1 ? 's' : '') + ' from {name}') + : inc.last ? t(inc.last.ok ? 'files.received_file' : 'files.not_received_file', { file: inc.last.name }, (inc.last.ok ? 'Received ' : 'Not received: ') + inc.last.name) : t('files.nothing_received', null, 'Nothing received'); inRow.setHint(inc.receiving ? '' : inc.last ? inc.last.text + ' · ' + UI.ago(inc.last.at) : ''); }; }, diff --git a/windows/ui-general.js b/windows/ui-general.js index fe3045f9..ab27fd42 100644 --- a/windows/ui-general.js +++ b/windows/ui-general.js @@ -15,49 +15,93 @@ UI.tab({ badge: (s) => (s.firewall && s.firewall.ok === false && !s.firewall.checking ? 'warn' : ''), build(body) { const { el, api } = UI; - const startup = UI.switch((v) => api.setStartup(v), { label: 'Start with Windows' }); + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + + const store = { + get: (k) => { + try { return localStorage.getItem('duodesk.' + k) || localStorage.getItem(k); } catch (_) { return null; } + }, + set: (k, v) => { + try { + localStorage.setItem('duodesk.' + k, v); + localStorage.setItem(k, v); + } catch (_) {} + } + }; + + const savedLang = store.get('general.language') || store.get('lang') || 'auto'; + const initialTarget = savedLang === 'auto' ? (navigator.language || 'en') : savedLang; + if (typeof DuoDeskI18n !== 'undefined' && DuoDeskI18n.setLanguage) { + DuoDeskI18n.setLanguage(initialTarget); + } + + const langSelect = UI.select([ + { value: 'auto', label: typeof t === 'function' ? t('general.lang_auto', null, 'Automatic (System)') : 'Automatic (System)' }, + // one option per registered locale (shared/locales), so a new language shows up here by itself + ...(typeof DuoDeskI18n !== 'undefined' ? DuoDeskI18n.getAvailableLanguages().map((l) => ({ value: l.code, label: l.label })) : [{ value: 'en', label: 'English' }]) + ], (val) => { + store.set('general.language', val); + store.set('lang', val); + api.setApp({ lang: val }); // the main process follows it (tray menu) + const target = val === 'auto' ? (navigator.language || 'en') : val; + if (typeof DuoDeskI18n !== 'undefined' && DuoDeskI18n.setLanguage) { + DuoDeskI18n.setLanguage(target); + } + if (typeof location !== 'undefined' && location.reload) { + location.reload(); + } + }); + langSelect.set(savedLang); + + const langRow = UI.row( + typeof t === 'function' ? t('general.language', null, 'Language') : 'Language', + '', + [langSelect.el] + ); + + const startup = UI.switch((v) => api.setStartup(v), { label: t('general.start_with_windows', null, 'Start with Windows') }); // Received files (shared/received.js): where files sent here and saved from a phone go. - const recvChange = UI.button('Change…', () => api.chooseReceivedFolder(), 'small'); - const recvReset = UI.button('Downloads', () => api.resetReceivedFolder(), 'small'); - const recvOpen = UI.button('Open', () => api.openReceivedFolder(), 'small'); - const recvRow = UI.row('Received files', '', [recvOpen, recvReset, recvChange]); - const hudSw = UI.switch((v) => api.setApp({ hud: v }), { label: 'Show a popup when switching' }); + const recvChange = UI.button(t('general.change', null, 'Change…'), () => api.chooseReceivedFolder(), 'small'); + const recvReset = UI.button(t('general.downloads', null, 'Downloads'), () => api.resetReceivedFolder(), 'small'); + const recvOpen = UI.button(t('files.open', null, 'Open'), () => api.openReceivedFolder(), 'small'); + const recvRow = UI.row(t('general.received_files', null, 'Received files'), '', [recvOpen, recvReset, recvChange]); + const hudSw = UI.switch((v) => api.setApp({ hud: v }), { label: t('general.show_a_popup_when_switching', null, 'Show a popup when switching') }); const fwPill = el('span', { class: 'pill' }); - const fwCheck = UI.button('Check again', () => api.checkFirewall(), 'small'); - const fwFix = UI.button('Fix', () => api.fixFirewall(), 'small primary'); - const fwRow = UI.row('Firewall', '', [fwPill, fwCheck, fwFix]); + const fwCheck = UI.button(t('general.check_again', null, 'Check again'), () => api.checkFirewall(), 'small'); + const fwFix = UI.button(t('general.fix', null, 'Fix'), () => api.fixFirewall(), 'small primary'); + const fwRow = UI.row(t('general.firewall', null, 'Firewall'), '', [fwPill, fwCheck, fwFix]); // (as the Mac): wake is a switch; Send to sends files from Explorer. - const wakeSw = UI.switch((v) => api.setWake(v), { label: 'Wake from the network' }); - const wakeRow = UI.row('Let the other computer wake {me}', '', [wakeSw]); - const sendToRow = UI.row('DuoDesk in Send to', ''); + const wakeSw = UI.switch((v) => api.setWake(v), { label: t('general.wake_from_the_network', null, 'Wake from the network') }); + const wakeRow = UI.row(t('general.let_the_other_computer_wake', null, 'Let the other computer wake {me}'), '', [wakeSw]); + const sendToRow = UI.row(t('general.duodesk_in_send_to', null, 'DuoDesk in Send to'), ''); const helperPill = el('span', { class: 'pill' }); - const helperRow = UI.row('Mouse and keyboard helper', '', [helperPill]); + const helperRow = UI.row(t('general.mouse_and_keyboard_helper', null, 'Mouse and keyboard helper'), '', [helperPill]); const vddPill = el('span', { class: 'pill' }); - const vddInstall = UI.button('Install', () => api.installVdd(), 'small primary'); - const vddRow = UI.row('Virtual display driver', '', [vddPill, vddInstall]); // Share screen › Extend (vdd.js) + const vddInstall = UI.button(t('general.install', null, 'Install'), () => api.installVdd(), 'small primary'); + const vddRow = UI.row(t('general.virtual_display_driver', null, 'Virtual display driver'), '', [vddPill, vddInstall]); // Share screen › Extend (vdd.js) // Bluetooth when not on the same network: with phones (on unless switched off), with computers (off unless switched on). - const bleSw = UI.switch((v) => api.setNet({ ble: v }), { label: 'Bluetooth with phones' }); - const bleRow = UI.row('Bluetooth with phones', '', [bleSw]); - const blePcSw = UI.switch((v) => api.setNet({ blePc: v }), { label: 'Bluetooth with computers' }); - const blePcRow = UI.row('Bluetooth with computers', '', [blePcSw]); + const bleSw = UI.switch((v) => api.setNet({ ble: v }), { label: t('overview.ble_phones', null, 'Bluetooth with phones') }); + const bleRow = UI.row(t('overview.ble_phones', null, 'Bluetooth with phones'), '', [bleSw]); + const blePcSw = UI.switch((v) => api.setNet({ blePc: v }), { label: t('overview.ble_computers', null, 'Bluetooth with computers') }); + const blePcRow = UI.row(t('overview.ble_computers', null, 'Bluetooth with computers'), '', [blePcSw]); // Bluetooth off altogether while the session is on the same Wi-Fi (blepolicy.js wifiQuiet). - const bleWifiSw = UI.switch((v) => api.setNet({ bleWifiOff: v }), { label: 'Turn off Bluetooth on Wi-Fi connections' }); - const bleWifiRow = UI.row('Turn off Bluetooth on Wi-Fi connections', '', [bleWifiSw]); + const bleWifiSw = UI.switch((v) => api.setNet({ bleWifiOff: v }), { label: t('general.turn_off_bluetooth_on_wi', null, 'Turn off Bluetooth on Wi-Fi connections') }); + const bleWifiRow = UI.row(t('general.turn_off_bluetooth_on_wi', null, 'Turn off Bluetooth on Wi-Fi connections'), '', [bleWifiSw]); // What Windows has to allow, in one place (each is also asked for where a feature needs it). const btPill = el('span', { class: 'pill' }); - const btRow = UI.row('Bluetooth', 'For a phone or computer that isn’t on this network', [btPill, UI.button('Open', () => api.openBluetoothSettings(), 'small')]); - const locRow = UI.row('Location', 'To join a phone’s or computer’s Wi-Fi Direct (Windows shows Wi-Fi networks only with it)', [UI.button('Open', () => api.netLocation(), 'small')]); + const btRow = UI.row('Bluetooth', t('general.for_a_phone_or_computer', null, 'For a phone or computer that isn’t on this network'), [btPill, UI.button(t('files.open', null, 'Open'), () => api.openBluetoothSettings(), 'small')]); + const locRow = UI.row(t('general.location', null, 'Location'), t('general.to_join_a_phone_s', null, 'To join a phone’s or computer’s Wi-Fi Direct (Windows shows Wi-Fi networks only with it)'), [UI.button(t('files.open', null, 'Open'), () => api.netLocation(), 'small')]); const media = UI.mediaControlsRow(); // a phone's media controls on the Phone page (shared/ui-nowplaying.js) const deviceName = el('span', { class: 'value' }); - const deviceRow = UI.row('Computer name', 'How other computers see this one', [deviceName]); + const deviceRow = UI.row(t('general.computer_name', null, 'Computer name'), t('general.how_other_computers_see_this', null, 'How other computers see this one'), [deviceName]); // Appearance: the phone's wallpaper behind it here (settings.phone.wallpaper, was on the Phone page). - const wallSw = UI.switch((v) => api.setPhone({ wallpaper: v }), { label: 'Show the phone’s wallpaper' }); - const wallRow = UI.row('Show the phone’s wallpaper', 'On its tile and Overview. DuoDesk on the phone reads it once wireless debugging is set up', [wallSw]); + const wallSw = UI.switch((v) => api.setPhone({ wallpaper: v }), { label: t('general.show_the_phone_s_wallpaper', null, 'Show the phone’s wallpaper') }); + const wallRow = UI.row(t('general.show_the_phone_s_wallpaper', null, 'Show the phone’s wallpaper'), t('general.on_its_tile_and_overview', null, 'On its tile and Overview. DuoDesk on the phone reads it once wireless debugging is set up'), [wallSw]); // Overview: what it shows (settings.ui.overview). - const parts = [['media', 'Now playing', 'What plays on the phone, with its controls'], ['qs', 'Quick actions', 'Wi-Fi, Bluetooth, torch, Do not disturb and more, with volume and ringer'], - ['notifs', 'Latest notifications', 'The newest few, with Copy for one-time codes'], ['apps', 'Most used apps', 'The phone’s most used apps this week'], - ['clipboard', 'Clipboard', 'Its recent items, while Clipboard is on'], ['files', 'Send files', 'A drop zone that sends files to the device']]; + const parts = [['media', t('general.now_playing', null, 'Now playing'), t('general.what_plays_on_the_phone', null, 'What plays on the phone, with its controls')], ['qs', t('general.quick_actions', null, 'Quick actions'), t('general.wi_fi_bluetooth_torch_do', null, 'Wi-Fi, Bluetooth, torch, Do not disturb and more, with volume and ringer')], + ['notifs', t('general.latest_notifications', null, 'Latest notifications'), t('general.the_newest_few_with_copy', null, 'The newest few, with Copy for one-time codes')], ['apps', t('general.most_used_apps', null, 'Most used apps'), t('general.the_phone_s_most_used', null, 'The phone’s most used apps this week')], + ['clipboard', t('nav.clipboard', null, 'Clipboard'), t('general.its_recent_items_while_clipboard', null, 'Its recent items, while Clipboard is on')], ['files', t('files.send_files', null, 'Send files'), t('general.a_drop_zone_that_sends', null, 'A drop zone that sends files to the device')]]; const partSw = {}; const partRows = parts.map(([k, label, hint]) => { partSw[k] = UI.switch((v) => api.setOverview && api.setOverview({ [k]: v }), { label }); @@ -65,22 +109,26 @@ UI.tab({ }); body.append( - UI.card('Startup', [ - UI.row('Start with Windows', 'DuoDesk waits in the tray', [startup]), + UI.card(typeof t === 'function' ? t('general.language', null, 'Language') : 'Language', [langRow]), + UI.card(t('general.startup', null, 'Startup'), [ + UI.row(t('general.start_with_windows', null, 'Start with Windows'), t('general.duodesk_waits_in_the_tray', null, 'DuoDesk waits in the tray'), [startup]), recvRow, ]), - UI.card('Appearance', [ - UI.row('Show a popup when switching', 'When the mouse and keyboard move between devices', [hudSw]), + UI.card(t('general.appearance', null, 'Appearance'), [ + UI.row(t('general.show_a_popup_when_switching', null, 'Show a popup when switching'), t('general.when_the_mouse_and_keyboard', null, 'When the mouse and keyboard move between devices'), [hudSw]), wallRow, media.el, ]), - UI.card('Overview', partRows), - UI.card('Network and Bluetooth', [bleRow, blePcRow, bleWifiRow, wakeRow, sendToRow]), - UI.card('Permissions', [fwRow, btRow, locRow]), - UI.card('This computer', [deviceRow, helperRow, vddRow]), + UI.card(t('nav.overview', null, 'Overview'), partRows), + UI.card(t('general.network_and_bluetooth', null, 'Network and Bluetooth'), [bleRow, blePcRow, bleWifiRow, wakeRow, sendToRow]), + UI.card(t('general.permissions', null, 'Permissions'), [fwRow, btRow, locRow]), + UI.card(t('general.this_computer', null, 'This computer'), [deviceRow, helperRow, vddRow]), ); + // A choice made before the main process kept the language (settings.app.lang) is handed over once. + let handedOver = false; return (s) => { + if (!handedOver && s.app && s.app.lang === 'auto' && savedLang !== 'auto') { handedOver = true; api.setApp({ lang: savedLang }); } media.update(s); wallSw.set(!s.phone || !s.phone.settings || s.phone.settings.wallpaper !== false); const ov = (s.ui && s.ui.overview) || {}; @@ -89,10 +137,11 @@ UI.tab({ hudSw.set(s.app.hud); const f = s.files || {}; recvReset.hidden = !f.receivedFolder; - recvRow.setHint((f.receivedFolder && f.received !== f.receivedFolder ? f.receivedFolder + ' isn’t there now: Downloads meanwhile. ' : (f.received || 'Downloads') + ' · ') - + 'Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos'); + recvRow.setHint(f.receivedFolder && f.received !== f.receivedFolder + ? t('general.folder_missing_downloads_meanwhile', { folder: f.receivedFolder }, '{folder} isn’t there now: Downloads meanwhile. Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos') + : t('general.folder_files_sent_to', { folder: f.received || t('general.downloads', null, 'Downloads') }, '{folder} · Files sent to {me} from another computer or a phone, and what’s saved from a phone’s Files and Photos')); const fw = s.firewall || {}; - fwPill.textContent = fw.checking ? 'Checking…' : fw.ok ? 'OK' : fw.ok === false ? 'Needs a fix' : ''; + fwPill.textContent = fw.checking ? t('general.checking', null, 'Checking…') : fw.ok ? t('general.ok', null, 'OK') : fw.ok === false ? t('general.needs_a_fix', null, 'Needs a fix') : ''; fwPill.className = 'pill ' + (fw.checking ? 'muted' : fw.ok ? 'good' : 'bad'); fwRow.setHint(fw.ok === false ? fw.message || '' : ''); fwCheck.disabled = !!fw.checking; @@ -100,35 +149,35 @@ UI.tab({ const w = s.wake || {}; wakeSw.set(w.on === true); wakeSw.disable(!w.checked || w.on == null || !!w.busy); - wakeRow.setHint(w.error ? w.error : w.busy ? 'Changing…' : !w.checked ? 'Checking…' - : w.on == null ? 'No network adapter here can wake {me}' - : 'Its network adapter wakes {me} on a magic packet. Asks for administrator rights to change it'); - sendToRow.setHint(s.peer ? 'Right-click files › Send to › ' + s.peer.name + ' (DuoDesk)' : 'Shows up once a computer is paired'); + wakeRow.setHint(w.error ? w.error : w.busy ? t('general.changing', null, 'Changing…') : !w.checked ? t('general.checking', null, 'Checking…') + : w.on == null ? t('general.no_network_adapter_here_can', null, 'No network adapter here can wake {me}') + : t('general.its_network_adapter_wakes_me', null, 'Its network adapter wakes {me} on a magic packet. Asks for administrator rights to change it')); + sendToRow.setHint(s.peer ? t('general.right_click_files_send_to', { name: s.peer.name }, 'Right-click files › Send to › {name} (DuoDesk)') : t('general.shows_up_once_a_computer', null, 'Shows up once a computer is paired')); const h = s.kvmState.helper; - helperPill.textContent = h ? (h === 'starting' ? 'Starting…' : 'Not running') : 'Running'; + helperPill.textContent = h ? (h === 'starting' ? t('general.starting', null, 'Starting…') : t('general.not_running', null, 'Not running')) : t('general.running', null, 'Running'); helperPill.className = 'pill ' + (h ? (h === 'starting' ? 'muted' : 'bad') : 'good'); helperRow.setHint(h && h !== 'starting' ? h : ''); const v = s.pcScreen.vdd; - vddPill.textContent = !v.checked ? 'Checking…' : v.busy === 'install' ? 'Installing…' : v.busy === 'remove' ? 'Removing…' : v.installed ? 'Installed' : 'Not installed'; + vddPill.textContent = !v.checked ? t('general.checking', null, 'Checking…') : v.busy === 'install' ? t('general.installing', null, 'Installing…') : v.busy === 'remove' ? t('files.removing', null, 'Removing…') : v.installed ? t('general.installed', null, 'Installed') : t('general.not_installed', null, 'Not installed'); vddPill.className = 'pill ' + (!v.checked || v.busy ? 'muted' : v.installed ? 'good' : 'bad'); vddInstall.hidden = !v.checked || v.installed; vddInstall.disabled = !!v.busy; - vddRow.setHint(v.message ? v.message : v.installed ? 'Adds the extra screen for Share screen › Extend' - : 'Needed for Share screen › Extend. Asks for administrator rights once'); + vddRow.setHint(v.message ? v.message : v.installed ? t('general.adds_the_extra_screen_for', null, 'Adds the extra screen for Share screen › Extend') + : t('general.needed_for_share_screen_extend', null, 'Needed for Share screen › Extend. Asks for administrator rights once')); const n = s.net || {}; - const radio = n.radio === 'off' ? 'Bluetooth is off in Windows settings' - : n.radio === 'unsupported' ? 'This PC’s Bluetooth can’t do it (needs Bluetooth LE)' : ''; + const radio = n.radio === 'off' ? t('general.bluetooth_is_off_in_windows', null, 'Bluetooth is off in Windows settings') + : n.radio === 'unsupported' ? t('general.this_pc_s_bluetooth_can', null, 'This PC’s Bluetooth can’t do it (needs Bluetooth LE)') : ''; bleSw.set(n.ble !== false); - bleRow.setHint(n.ble === false ? 'Only phones on this network or a USB cable connect' - : radio || 'A phone nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment'); + bleRow.setHint(n.ble === false ? t('general.only_phones_on_this_network', null, 'Only phones on this network or a USB cable connect') + : radio || t('general.a_phone_nearby_connects_through', null, 'A phone nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment')); blePcSw.set(n.blePc === true); bleWifiSw.set(n.bleWifiOff !== false); - bleWifiRow.setHint(n.bleWifiOff === false ? 'Bluetooth stays on beside the Wi-Fi, the way back if it drops' - : n.bleOff ? 'Off now: the session is on the same Wi-Fi. Bluetooth comes back when it ends' - : 'On the same Wi-Fi network (not Wi-Fi Direct), Bluetooth goes off until the session ends. With a computer, phones can’t find this one meanwhile'); - blePcRow.setHint(n.blePc !== true ? 'Only computers on this network connect' - : radio || 'A computer nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment'); - btPill.textContent = n.radio === 'off' ? 'Off' : n.radio === 'unsupported' ? 'Not supported' : n.radio ? 'On' : 'Unknown'; + bleWifiRow.setHint(n.bleWifiOff === false ? t('general.bluetooth_stays_on_beside_the', null, 'Bluetooth stays on beside the Wi-Fi, the way back if it drops') + : n.bleOff ? t('general.off_now_the_session_is', null, 'Off now: the session is on the same Wi-Fi. Bluetooth comes back when it ends') + : t('general.on_the_same_wi_fi', null, 'On the same Wi-Fi network (not Wi-Fi Direct), Bluetooth goes off until the session ends. With a computer, phones can’t find this one meanwhile')); + blePcRow.setHint(n.blePc !== true ? t('general.only_computers_on_this_network', null, 'Only computers on this network connect') + : radio || t('general.a_computer_nearby_connects_through', null, 'A computer nearby connects through Bluetooth; files and screens switch to Wi-Fi Direct for a moment')); + btPill.textContent = n.radio === 'off' ? t('clipboard.off', null, 'Off') : n.radio === 'unsupported' ? t('general.not_supported', null, 'Not supported') : n.radio ? t('general.on', null, 'On') : t('general.unknown', null, 'Unknown'); btPill.className = 'pill ' + (n.radio === 'off' || n.radio === 'unsupported' ? 'bad' : n.radio ? 'good' : 'muted'); deviceName.textContent = s.device.name; }; diff --git a/windows/ui-keyboard.js b/windows/ui-keyboard.js index 5c4386ec..59ca0c90 100644 --- a/windows/ui-keyboard.js +++ b/windows/ui-keyboard.js @@ -14,24 +14,25 @@ UI.tab({ badge: (s) => (s.kvm.keyboard ? 'on' : ''), build(body) { const { api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const hotkey = UI.select(Object.entries(UI.HOTKEYS).map(([value, label]) => ({ value, label })), (v) => api.setKeys({ hotkey: v })); - const hotkeyRow = UI.row('Hotkey', 'Double-tap to turn cursor sharing on or off', [hotkey]); - const switchSw = UI.switch((v) => api.setKvm({ hotkeySwitch: v }), { label: 'Switch the keyboard with the hotkey' }); - const switchRow = UI.row('Switch the keyboard with the hotkey', '', [switchSw]); - const swap = UI.switch((v) => api.setKeys({ swapCtrlCmd: v }), { label: 'Swap Ctrl and Command' }); - const otherHotkey = UI.row('Hotkey on {name}', ''); - const swapRow = UI.row('⌘ works as Ctrl', 'So ⌘C copies here', [swap]); - const shortcutsRow = UI.row('Shortcuts on {name}', 'Ctrl works as ⌘, so Ctrl+C copies there'); + const hotkeyRow = UI.row(t('keyboard.hotkey', null, 'Hotkey'), t('keyboard.double_tap_to_turn_cursor', null, 'Double-tap to turn cursor sharing on or off'), [hotkey]); + const switchSw = UI.switch((v) => api.setKvm({ hotkeySwitch: v }), { label: t('keyboard.switch_the_keyboard_with_the', null, 'Switch the keyboard with the hotkey') }); + const switchRow = UI.row(t('keyboard.switch_the_keyboard_with_the', null, 'Switch the keyboard with the hotkey'), '', [switchSw]); + const swap = UI.switch((v) => api.setKeys({ swapCtrlCmd: v }), { label: t('keyboard.swap_ctrl_and_command', null, 'Swap Ctrl and Command') }); + const otherHotkey = UI.row(t('keyboard.hotkey_on_name', null, 'Hotkey on {name}'), ''); + const swapRow = UI.row(t('keyboard.works_as_ctrl', null, '⌘ works as Ctrl'), t('keyboard.so_c_copies_here', null, 'So ⌘C copies here'), [swap]); + const shortcutsRow = UI.row(t('keyboard.shortcuts_on_name', null, 'Shortcuts on {name}'), t('keyboard.ctrl_works_as_so_ctrl', null, 'Ctrl works as ⌘, so Ctrl+C copies there')); const status = UI.inputStatus(); const pair = UI.dirCards( - { on: { get: (s) => s.kvm.beDriven, set: (v) => api.setKvm({ beDriven: v }) }, label: 'Type on {me} with {name}’s keyboard', rows: [otherHotkey, swapRow] }, - { on: { get: (s) => s.kvm.driveOther, set: (v) => api.setKvm({ driveOther: v }) }, label: 'Type on {name} with {me}’s keyboard', rows: [shortcutsRow] }, + { on: { get: (s) => s.kvm.beDriven, set: (v) => api.setKvm({ beDriven: v }) }, label: t('keyboard.type_on_me_with_name', null, 'Type on {me} with {name}’s keyboard'), rows: [otherHotkey, swapRow] }, + { on: { get: (s) => s.kvm.driveOther, set: (v) => api.setKvm({ driveOther: v }) }, label: t('keyboard.type_on_name_with_me', null, 'Type on {name} with {me}’s keyboard'), rows: [shortcutsRow] }, ); body.append( - UI.card('Hotkey', [hotkeyRow, switchRow], { cls: 'keep-on' }), + UI.card(t('keyboard.hotkey', null, 'Hotkey'), [hotkeyRow, switchRow], { cls: 'keep-on' }), pair.el, - UI.card('Right now', [status], { cls: 'keep-on' }), + UI.card(t('cursor.right_now', null, 'Right now'), [status], { cls: 'keep-on' }), ); return (s) => { @@ -42,9 +43,9 @@ UI.tab({ // Keyboard-only switching exists only while the pointer isn't shared (Cursor off). switchSw.set(s.kvm.hotkeySwitch); switchSw.disable(!!s.kvm.mouse); - switchRow.setHint(s.kvm.mouse ? 'Only when Cursor is off' : 'Double-tap to type on ' + p.the + ' and back'); - otherHotkey.label.textContent = 'Hotkey on ' + p.the; - otherHotkey.setHint('Set in DuoDesk on ' + p.the); + switchRow.setHint(s.kvm.mouse ? t('keyboard.only_when_cursor_is_off', null, 'Only when Cursor is off') : t('keyboard.double_tap_to_type_on', { name: p.the }, 'Double-tap to type on {name} and back')); + otherHotkey.label.textContent = t('keyboard.hotkey_on_name', { name: p.the }, 'Hotkey on {name}'); + otherHotkey.setHint(t('keyboard.set_in_duodesk_on_name', { name: p.the }, 'Set in DuoDesk on {name}')); // Ctrl/Cmd swapping only between a Mac and a PC. swapRow.hidden = p.os !== 'mac'; shortcutsRow.hidden = p.os !== 'mac'; diff --git a/windows/ui-kit.js b/windows/ui-kit.js index b24cc8b3..fb58d2c1 100644 --- a/windows/ui-kit.js +++ b/windows/ui-kit.js @@ -39,11 +39,28 @@ const ICONS = { feedback: 'M3.5 4.5h13v9h-7l-3.5 3v-3H3.5z M7 8h6 M7 10.5h3.5', // a speech bubble with two lines: Feedback }; +// The Details rows are asked for by these English ids; the card shows them translated. +const DETAIL_LABELS = { + Status: () => UI.t('kit.status', null, 'Status'), + Display: () => UI.t('kit.display', null, 'Display'), + Picture: () => UI.t('kit.picture', null, 'Picture'), + Speed: () => UI.t('kit.speed', null, 'Speed'), + 'Round trip': () => UI.t('kit.round_trip', null, 'Round trip'), + Codec: () => UI.t('kit.codec', null, 'Codec'), + Decoder: () => UI.t('kit.decoder', null, 'Decoder'), + Encoder: () => UI.t('kit.encoder', null, 'Encoder'), + Delay: () => UI.t('kit.delay', null, 'Delay'), + 'Frames dropped': () => UI.t('kit.frames_dropped', null, 'Frames dropped'), + Freezes: () => UI.t('kit.freezes', null, 'Freezes'), +}; + const UI = { api: window.macshare, P: window.MacShareProtocol, tabs: [], state: null, + // Translate: the same lookup the tab scripts use (shared/i18n.js), English when it isn't loaded. + t: (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k), el(tag, props = {}, children = []) { const e = document.createElement(tag); @@ -187,12 +204,12 @@ const UI = { }, ago(ts) { - if (!ts) return 'never'; + if (!ts) return UI.t('kit.never', null, 'never'); const s = Math.round((Date.now() - ts) / 1000); - if (s < 10) return 'just now'; - if (s < 60) return `${s} s ago`; - if (s < 3600) return `${Math.round(s / 60)} min ago`; - if (s < 86400) return `${Math.round(s / 3600)} h ago`; + if (s < 10) return UI.t('kit.just_now', null, 'just now'); + if (s < 60) return UI.t('kit.seconds_ago', { seconds: s }, '{seconds} s ago'); + if (s < 3600) return UI.t('kit.minutes_ago', { minutes: Math.round(s / 60) }, '{minutes} min ago'); + if (s < 86400) return UI.t('kit.hours_ago', { hours: Math.round(s / 3600) }, '{hours} h ago'); return new Date(ts).toLocaleDateString(); }, @@ -226,11 +243,11 @@ const UI = { const { el } = UI; body.append( el('div', { class: 'card soon keep-on' }, [ - el('div', { class: 'soon-head' }, [el('span', { class: 'pill', text: 'Coming in phase ' + r.phase })]), + el('div', { class: 'soon-head' }, [el('span', { class: 'pill', text: UI.t('kit.coming_in_phase', { phase: r.phase }, 'Coming in phase {phase}') })]), ...r.what.map(([t, d]) => el('div', { class: 'soon-item' }, [el('strong', { text: t }), el('div', { class: 'hint', text: d })])), ]), - UI.card('How it will work', [UI.row(r.how, '')], { cls: 'keep-on' }), - UI.card('Settings it will have', r.settings.map((label) => UI.row(label, '', [UI.switch(() => {}, { disabled: true, label })]))), + UI.card(UI.t('kit.how_it_will_work', null, 'How it will work'), [UI.row(r.how, '')], { cls: 'keep-on' }), + UI.card(UI.t('kit.settings_it_will_have', null, 'Settings it will have'), r.settings.map((label) => UI.row(label, '', [UI.switch(() => {}, { disabled: true, label })]))), ); }, }); @@ -241,12 +258,12 @@ const UI = { details(labels) { const vals = {}; const rows = labels.map((label) => { - const r = UI.row(label, ''); + const r = UI.row(DETAIL_LABELS[label] ? DETAIL_LABELS[label]() : label, ''); vals[label] = UI.el('span', { class: 'value' }); r.querySelector('.controls').append(vals[label]); return r; }); - const card = UI.card('Details', rows); + const card = UI.card(UI.t('kit.details', null, 'Details'), rows); card.set = (map) => labels.forEach((label, i) => { const t = map[label]; vals[label].textContent = t == null ? '' : String(t); @@ -257,7 +274,8 @@ const UI = { // "Hardware" / "Software" from getStats' powerEfficient flag, with the implementation name. codecImpl(name, hw) { - return (hw ? 'Hardware' : 'Software') + (name ? ' (' + name + ')' : ''); + if (!name) return hw ? UI.t('kit.hardware', null, 'Hardware') : UI.t('kit.software', null, 'Software'); + return hw ? UI.t('kit.hardware_name', { name }, 'Hardware ({name})') : UI.t('kit.software_name', { name }, 'Software ({name})'); }, // Who the other computer is: titles name what is connected. With a @@ -267,12 +285,12 @@ const UI = { peer(s) { const p = s && s.peer; const os = p ? p.os : 'win'; - const KIND = { mac: 'Mac', win: 'PC', linux: 'Linux', android: 'Phone' }; + const KIND = { mac: 'Mac', win: 'PC', linux: 'Linux', android: UI.t('sidebar.phone', null, 'Phone') }; const same = os === 'win'; // Device names everywhere: this PC by its own name, // the other computer by its name (or "the other computer" before anything was paired). - const me = (s && s.device && s.device.name) || 'This PC'; - const name = (p && p.name) || 'the other computer'; + const me = (s && s.device && s.device.name) || UI.t('kit.this_pc', null, 'This PC'); + const name = (p && p.name) || UI.t('kit.the_other_computer', null, 'the other computer'); const Name = name.charAt(0).toUpperCase() + name.slice(1); return { os, same, me, name, Name, phone: os === 'android', @@ -306,15 +324,15 @@ const UI = { // pair.sync): one row used by Share and Receive. Returns the row with .render(state). paceRow() { const seg = UI.segmented([ - { value: 'fast', label: 'Fastest' }, - { value: 'smooth', label: 'Smooth' }, + { value: 'fast', label: UI.t('kit.fastest', null, 'Fastest') }, + { value: 'smooth', label: UI.t('kit.smooth', null, 'Smooth') }, ], (v) => UI.api.setMonitor({ pacing: v })); - const row = UI.row('Playback', '', [seg]); + const row = UI.row(UI.t('kit.playback', null, 'Playback'), '', [seg]); row.render = (s) => { const pace = (s.monitor && s.monitor.pacing) || 'fast'; seg.set(pace); - row.setHint(pace === 'smooth' ? 'Even motion, about one frame later. The same on {name}' - : 'Each frame the moment it arrives. The same on {name}'); + row.setHint(pace === 'smooth' ? UI.t('kit.even_motion_about_one_frame', null, 'Even motion, about one frame later. The same on {name}') + : UI.t('kit.each_frame_the_moment_it', null, 'Each frame the moment it arrives. The same on {name}')); }; return row; }, @@ -338,7 +356,7 @@ const UI = { return img; }, osIcon(os) { - return UI.el('span', { class: `os-ico ${UI.osClass(os)}`, attrs: { 'aria-label': os === 'mac' ? 'Mac' : os === 'linux' ? 'Linux' : os === 'android' ? 'Phone' : 'PC' } }); + return UI.el('span', { class: `os-ico ${UI.osClass(os)}`, attrs: { 'aria-label': os === 'mac' ? 'Mac' : os === 'linux' ? 'Linux' : os === 'android' ? UI.t('sidebar.phone', null, 'Phone') : 'PC' } }); }, // Two equal direction cards, always Mac → PC then PC → Mac. @@ -358,7 +376,7 @@ const UI = { const make = (dir, def) => { const toMe = dir === 'm2p'; const route = UI.el('span', { class: 'route', attrs: { role: 'img' } }, [node(!toMe), UI.el('span', { class: 'flow' }), node(toMe)]); - const head = UI.el('div', { class: 'dir-head' }, [route, def.soon ? UI.el('span', { class: 'pill muted', text: 'Coming in phase ' + def.soon }) : null]); + const head = UI.el('div', { class: 'dir-head' }, [route, def.soon ? UI.el('span', { class: 'pill muted', text: UI.t('kit.coming_in_phase', { phase: def.soon }, 'Coming in phase {phase}') }) : null]); let sw = null, main = null; if (def.on) { const label = def.label || (toMe ? '{name} on {me}' : '{me} on {name}'); @@ -390,7 +408,7 @@ const UI = { keyRecorder(onChange, opts = {}) { const b = UI.el('button', { class: 'btn small keyrec' }); let value = '', recording = false; - const show = () => { b.textContent = recording ? 'Press keys…' : UI.keysLabel(value) || 'None'; b.classList.toggle('on', recording); }; + const show = () => { b.textContent = recording ? UI.t('kit.press_keys', null, 'Press keys…') : UI.keysLabel(value) || UI.t('cursor.none', null, 'None'); b.classList.toggle('on', recording); }; const keyOf = (e) => { if (/^Key[A-Z]$/.test(e.code)) return e.code.slice(3); if (/^Digit\d$/.test(e.code)) return e.code.slice(5); @@ -431,12 +449,12 @@ const UI = { // Cursor tab › Cursor lock (shared/cursorlock.js): the switch is not a setting, it lasts until the // pointer is moved some other way; the lock key is (settings.keys.lockKeys). cursorLock() { - const lock = UI.switch((v) => UI.api.setKvm({ locked: v }), { label: 'Lock the cursor' }); - const lockRow = UI.row('Lock the cursor', '', [lock]); + const lock = UI.switch((v) => UI.api.setKvm({ locked: v }), { label: UI.t('kit.lock_the_cursor', null, 'Lock the cursor') }); + const lockRow = UI.row(UI.t('kit.lock_the_cursor', null, 'Lock the cursor'), '', [lock]); const key = UI.keyRecorder((v) => UI.api.setKeys({ lockKeys: v }), { bare: true }); - const keyRow = UI.row('Lock key', 'Scroll Lock or F13–F24 on its own, or a combination with Ctrl, Alt or Win', [key.el]); + const keyRow = UI.row(UI.t('kit.lock_key', null, 'Lock key'), UI.t('kit.scroll_lock_or_f13_f24', null, 'Scroll Lock or F13–F24 on its own, or a combination with Ctrl, Alt or Win'), [key.el]); return { - el: UI.card('Cursor lock', [lockRow, keyRow]), + el: UI.card(UI.t('kit.cursor_lock', null, 'Cursor lock'), [lockRow, keyRow]), update(s) { const k = s.kvmState; const connected = s.link.state === 'connected'; @@ -445,10 +463,16 @@ const UI = { lock.disable(!connected); key.set(s.keys.lockKeys); const where = k.mode === 'driving' ? p.name : p.me; - const press = s.keys.lockKeys ? ' While the pointer is on ' + p.me + ', ' + UI.keysLabel(s.keys.lockKeys) + ' on either keyboard locks or unlocks it (each computer has its own key).' : ''; - lockRow.setHint(k.lockError ? k.lockError : !connected ? 'Keeps the pointer on one computer, even when the mouse is plugged into another.' + press - : k.locked ? 'The pointer stays on ' + where + ': the screen edges don’t cross.' + press - : 'Keeps the pointer on ' + where + ', where it is now, even when the mouse is plugged into another computer.' + press); + const keys = s.keys.lockKeys ? UI.keysLabel(s.keys.lockKeys) : ''; + const q = { me: p.me, keys, where }; + lockRow.setHint(k.lockError ? k.lockError : !connected + ? (keys ? UI.t('kit.keeps_pointer_one_computer_keys', q, 'Keeps the pointer on one computer, even when the mouse is plugged into another. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).') + : UI.t('kit.keeps_pointer_one_computer', null, 'Keeps the pointer on one computer, even when the mouse is plugged into another.')) + : k.locked + ? (keys ? UI.t('kit.pointer_stays_on_where_keys', q, 'The pointer stays on {where}: the screen edges don’t cross. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).') + : UI.t('kit.pointer_stays_on_where', q, 'The pointer stays on {where}: the screen edges don’t cross.')) + : (keys ? UI.t('kit.keeps_pointer_on_where_keys', q, 'Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer. While the pointer is on {me}, {keys} on either keyboard locks or unlocks it (each computer has its own key).') + : UI.t('kit.keeps_pointer_on_where', q, 'Keeps the pointer on {where}, where it is now, even when the mouse is plugged into another computer.'))); }, }; }, @@ -456,20 +480,24 @@ const UI = { // "Right now" row for the Cursor/Keyboard tabs: where input is + the last KVM event. inputStatus() { const pill = UI.el('span', { class: 'pill' }); - const row = UI.row('Keyboard and mouse', '', [pill]); + const row = UI.row(UI.t('kit.keyboard_and_mouse', null, 'Keyboard and mouse'), '', [pill]); row.update = (s) => { const k = s.kvmState; const p = UI.peer(s); - const WHERE = { home: 'On ' + p.me, driving: 'On ' + p.name, driven: p.Name + ' is using ' + p.me }; + const WHERE = { home: UI.t('kit.on_me', { me: p.me }, 'On {me}'), driving: UI.t('kit.on_name', { name: p.name }, 'On {name}'), driven: UI.t('kit.name_is_using_me', { Name: p.Name, me: p.me }, '{Name} is using {me}') }; const off = k.linked === false || k.paused; - pill.textContent = off ? 'Sharing off' : (k.locked ? 'Locked · ' : '') + (WHERE[k.mode] || WHERE.home); + pill.textContent = off ? UI.t('kit.sharing_off', null, 'Sharing off') : k.locked ? UI.t('kit.locked_where', { where: WHERE[k.mode] || WHERE.home }, 'Locked · {where}') : (WHERE[k.mode] || WHERE.home); pill.className = 'pill ' + (off ? 'bad' : k.mode === 'home' ? 'muted' : 'good'); + const hk = { hotkey: UI.hotkeyName(s) }; row.setHint(k.helper && k.helper !== 'starting' ? k.helper - : k.linked === false ? 'Cursor sharing is off. Double-tap ' + UI.hotkeyName(s) + ' to turn it on.' - : k.paused ? 'Cursor sharing is off over Bluetooth. It comes back on Wi-Fi, or double-tap ' + UI.hotkeyName(s) + ' to turn it on.' - : s.link.state !== 'connected' ? 'Waiting for ' + p.the - : k.mode === 'home' && !k.message ? 'Connected to ' + p.name + '. Double-tap ' + UI.hotkeyName(s) + ' to turn cursor sharing off.' - : k.message || 'Double-tap ' + UI.hotkeyName(s) + ({ home: ' to turn cursor sharing off', driving: ' to come back and turn cursor sharing off', driven: ' to take it back' }[k.mode] || '')); + : k.linked === false ? UI.t('kit.cursor_sharing_is_off_double_tap', hk, 'Cursor sharing is off. Double-tap {hotkey} to turn it on.') + : k.paused ? UI.t('kit.cursor_sharing_is_off_over_bluetooth', hk, 'Cursor sharing is off over Bluetooth. It comes back on Wi-Fi, or double-tap {hotkey} to turn it on.') + : s.link.state !== 'connected' ? UI.t('kit.waiting_for_name', { name: p.the }, 'Waiting for {name}') + : k.mode === 'home' && !k.message ? UI.t('kit.connected_to_name_double_tap', { name: p.name, hotkey: hk.hotkey }, 'Connected to {name}. Double-tap {hotkey} to turn cursor sharing off.') + : k.message || (k.mode === 'home' ? UI.t('kit.double_tap_to_turn_cursor_off', hk, 'Double-tap {hotkey} to turn cursor sharing off') + : k.mode === 'driving' ? UI.t('kit.double_tap_to_come_back', hk, 'Double-tap {hotkey} to come back and turn cursor sharing off') + : k.mode === 'driven' ? UI.t('kit.double_tap_to_take_it_back', hk, 'Double-tap {hotkey} to take it back') + : UI.t('kit.double_tap_hotkey', hk, 'Double-tap {hotkey}'))); }; return row; }, diff --git a/windows/ui-mount.js b/windows/ui-mount.js index 9493d108..9d6b5efd 100644 --- a/windows/ui-mount.js +++ b/windows/ui-mount.js @@ -17,17 +17,18 @@ UI.tab({ badge: (s) => (s.mount && s.mount.mounted ? 'on' : ''), build(body) { const { api } = UI; - const mountBtn = UI.button('Mount', () => api.phoneMount(), 'small primary'); - const showBtn = UI.button('Show', () => api.phoneMount(), 'small'); - const unmountBtn = UI.button('Unmount', () => api.phoneUnmount(), 'small'); - const driveRow = UI.row('Show the phone in Explorer', '', [mountBtn, showBtn, unmountBtn]); - const offRow = UI.row('Off', 'Switch it on to mount the phone'); + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + const mountBtn = UI.button(t('nav.mount', null, 'Mount'), () => api.phoneMount(), 'small primary'); + const showBtn = UI.button(t('mount.show', null, 'Show'), () => api.phoneMount(), 'small'); + const unmountBtn = UI.button(t('mount.unmount', null, 'Unmount'), () => api.phoneUnmount(), 'small'); + const driveRow = UI.row(t('mount.show_the_phone_in_explorer', null, 'Show the phone in Explorer'), '', [mountBtn, showBtn, unmountBtn]); + const offRow = UI.row(t('clipboard.off', null, 'Off'), t('mount.switch_it_on_to_mount', null, 'Switch it on to mount the phone')); // Mount is ADB: with the phone's debugging off it can't, and says so (Phone Files needs none). const adbText = UI.el('div', { class: 'hub-top-text' }); const adbNote = UI.el('div', { class: 'note warn hub-top', hidden: true }, [UI.el('div', { class: 'hub-top-body' }, [adbText]), - UI.el('div', { class: 'hub-top-actions' }, [UI.button('Wireless Debugging', () => UI.go('connection'), 'small'), UI.button('Phone Files', () => UI.go('pfiles'), 'small primary')])]); + UI.el('div', { class: 'hub-top-actions' }, [UI.button(t('cursor.wireless_debugging', null, 'Wireless Debugging'), () => UI.go('connection'), 'small'), UI.button(t('mount.phone_files', null, 'Phone Files'), () => UI.go('pfiles'), 'small primary')])]); body.append(adbNote); - body.append(UI.card('Drive', [offRow, driveRow])); + body.append(UI.card(t('mount.drive', null, 'Drive'), [offRow, driveRow])); return (s) => { const d = s.mount || {}; @@ -36,17 +37,18 @@ UI.tab({ const adbOff = !!ph.connected && !ph.connected.usb && !d.mounted && (adb.wifi === false || (ph.bridge && ph.bridge.state === 'waitingWifi')); adbNote.hidden = !d.on || !adbOff; adbText.textContent = adb.devOptions === false - ? 'Mount works through ADB, and Developer options are off on the phone. Switch on Developer options and Wireless debugging (Connection), or plug the phone in with USB debugging on. Phone Files works without it.' - : 'Mount works through ADB, and wireless debugging is off on the phone. Switch it on (Connection), or plug the phone in with USB debugging on. Phone Files works without it.'; + ? t('mount.mount_works_adb_dev_options', null, 'Mount works through ADB, and Developer options are off on the phone. Switch on Developer options and Wireless debugging (Connection), or plug the phone in with USB debugging on. Phone Files works without it.') + : t('mount.mount_works_adb_wireless', null, 'Mount works through ADB, and wireless debugging is off on the phone. Switch it on (Connection), or plug the phone in with USB debugging on. Phone Files works without it.'); offRow.hidden = !!d.on; driveRow.hidden = !d.on; mountBtn.hidden = !!d.mounted; - mountBtn.textContent = d.busy === 'mounting' ? 'Mounting…' : 'Mount'; + mountBtn.textContent = d.busy === 'mounting' ? t('mount.mounting', null, 'Mounting…') : t('nav.mount', null, 'Mount'); mountBtn.disabled = !!d.busy; showBtn.hidden = unmountBtn.hidden = !d.mounted; unmountBtn.disabled = !!d.busy; - driveRow.setHint(d.message || (d.mounted ? `As a drive in This PC${/^[A-Z]:$/.test(d.mounted) ? ' (' + d.mounted + ')' : ''}, ${d.via === 'usb' ? 'through the cable' : 'over wireless debugging'}.` - : 'Plug the phone in with USB debugging on, or connect it with wireless debugging, then Mount.')); + const letter = /^[A-Z]:$/.test(d.mounted) ? ' (' + d.mounted + ')' : ''; + driveRow.setHint(d.message || (d.mounted ? (d.via === 'usb' ? t('mount.drive_via_cable', { drive: letter }, 'As a drive in This PC{drive}, through the cable.') : t('mount.drive_via_wireless', { drive: letter }, 'As a drive in This PC{drive}, over wireless debugging.')) + : t('mount.plug_the_phone_in_with', null, 'Plug the phone in with USB debugging on, or connect it with wireless debugging, then Mount.'))); }; }, }); diff --git a/windows/ui-multi.js b/windows/ui-multi.js index 915f5dec..c9259919 100644 --- a/windows/ui-multi.js +++ b/windows/ui-multi.js @@ -12,20 +12,21 @@ UI.tab({ bottom: true, build(body) { const { api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); // The popup says what it is (shared/mesh-intro.js) before it restarts. - const turnOn = UI.button('Turn on', () => MeshIntro.confirm(() => { + const turnOn = UI.button(t('multi.turn_on', null, 'Turn on'), () => MeshIntro.confirm(() => { turnOn.disabled = true; - turnOn.textContent = 'Restarting…'; + turnOn.textContent = t('multi.restarting', null, 'Restarting…'); api.setMulti(true); }), 'small primary'); body.append( - UI.card('Mesh mode', [ - UI.row('Use several devices at once', - 'Computers and phones connected at the same time: one clipboard and one set of notifications for all, each screen edge leading to another device, a phone and a computer together', + UI.card(t('multi.mesh_mode', null, 'Mesh mode'), [ + UI.row(t('multi.use_several_devices_at_once', null, 'Use several devices at once'), + t('multi.computers_and_phones_connected_at', null, 'Computers and phones connected at the same time: one clipboard and one set of notifications for all, each screen edge leading to another device, a phone and a computer together'), [turnOn]), ]), - UI.note('info', 'DuoDesk restarts when you turn it on or off.'), + UI.note('info', t('multi.duodesk_restarts_when_you_turn', null, 'DuoDesk restarts when you turn it on or off.')), MeshIntro.art(), ); diff --git a/windows/ui-notifs.js b/windows/ui-notifs.js index 8c4dcfde..ccf6875e 100644 --- a/windows/ui-notifs.js +++ b/windows/ui-notifs.js @@ -17,20 +17,21 @@ UI.tab({ badge: (s) => (s.notifs.send || s.notifs.receive ? 'on' : ''), build(body) { const { el, api } = UI; - const hideSw = UI.switch((v) => api.setNotifs({ hideText: v }), { label: 'Hide message text' }); - const hideRow = UI.row('Hide message text', 'Only the app and the title', [hideSw]); + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + const hideSw = UI.switch((v) => api.setNotifs({ hideText: v }), { label: t('notifs.hide_message_text', null, 'Hide message text') }); + const hideRow = UI.row(t('notifs.hide_message_text', null, 'Hide message text'), t('notifs.only_the_app_and_the', null, 'Only the app and the title'), [hideSw]); const note = UI.note('info', ''); const pair = UI.dirCards( - { on: { get: (s) => s.notifs.receive, set: (v) => api.setNotifs({ receive: v }) }, label: 'Show {name}’s notifications on {me}', rows: [] }, - { on: { get: (s) => s.notifs.send, set: (v) => api.setNotifs({ send: v }) }, label: 'Show {me}’s notifications on {name}', rows: [hideRow] }, + { on: { get: (s) => s.notifs.receive, set: (v) => api.setNotifs({ receive: v }) }, label: t('notifs.show_name_s_notifications_on', null, 'Show {name}’s notifications on {me}'), rows: [] }, + { on: { get: (s) => s.notifs.send, set: (v) => api.setNotifs({ send: v }) }, label: t('notifs.show_me_s_notifications_on', null, 'Show {me}’s notifications on {name}'), rows: [hideRow] }, ); const recvRow = pair.a.main, sendRow = pair.b.main; const histList = el('div'); - const clearBtn = UI.button('Clear', () => api.clearNotifHistory(), 'small'); - const histCard = UI.card('Recent Notifications', [histList], clearBtn); + const clearBtn = UI.button(t('clipboard.clear', null, 'Clear'), () => api.clearNotifHistory(), 'small'); + const histCard = UI.card(t('notifs.recent_notifications', null, 'Recent Notifications'), [histList], clearBtn); const apps = el('div'); - body.append(note, pair.el, histCard, UI.card('Apps', [apps])); + body.append(note, pair.el, histCard, UI.card(t('nav.apps', null, 'Apps'), [apps])); let key = ''; let histKey = ''; @@ -41,9 +42,9 @@ UI.tab({ pair.update(s); note.set(''); hideSw.set(n.hideText); - recvRow.setHint(n.receive && n.shown ? n.shown + ' shown' : 'As Windows notifications, from DuoDesk'); - sendRow.setHint(n.readable === false ? 'Windows’ notification list can’t be read' - : !n.send ? '' : !connected ? 'Also switches it on the other computer' : n.sent ? n.sent + ' sent' : 'As native notifications there'); + recvRow.setHint(n.receive && n.shown ? (n.shown === 1 ? t('notifs.shown_one', { count: n.shown }, '{count} shown') : t('notifs.shown_other', { count: n.shown }, '{count} shown')) : t('notifs.as_windows_notifications_from_duodesk', null, 'As Windows notifications, from DuoDesk')); + sendRow.setHint(n.readable === false ? t('notifs.windows_notification_list_can_t', null, 'Windows’ notification list can’t be read') + : !n.send ? '' : !connected ? t('notifs.also_switches_it_on_the', null, 'Also switches it on the other computer') : n.sent ? (n.sent === 1 ? t('notifs.sent_one', { count: n.sent }, '{count} sent') : t('notifs.sent_other', { count: n.sent }, '{count} sent')) : t('notifs.as_native_notifications_there', null, 'As native notifications there')); // Recent notifications const history = n.history || []; @@ -55,10 +56,10 @@ UI.tab({ histList.replaceChildren(...history.map((item) => { const appName = item.appName || item.app; const isPhone = UI.isPhone(s); - const openBtn = isPhone && item.app ? UI.button('Open', () => api.openNotifiedApp({ app: item.app, appName }), 'small') : null; + const openBtn = isPhone && item.app ? UI.button(t('files.open', null, 'Open'), () => api.openNotifiedApp({ app: item.app, appName }), 'small') : null; const time = UI.ago(item.at); const topText = [appName, item.title].filter(Boolean).join(' · '); - const subText = [item.subtitle, item.body].filter(Boolean).join(' — ') || 'Notification'; + const subText = [item.subtitle, item.body].filter(Boolean).join(' — ') || t('notifs.notification', null, 'Notification'); const r = UI.row(topText, `${subText} · ${time}`, [openBtn]); if (icons[item.app]) { const img = el('img', { src: icons[item.app], style: 'width: 20px; height: 20px; border-radius: 4px; margin-right: 8px; vertical-align: middle; flex-shrink: 0;' }); @@ -68,7 +69,7 @@ UI.tab({ return r; })); } else { - histList.replaceChildren(UI.row('No notifications yet', 'Incoming notifications from WhatsApp, Instagram, and other apps will appear here in real-time.')); + histList.replaceChildren(UI.row(t('notifs.no_notifications_yet', null, 'No notifications yet'), t('notifs.incoming_notifications_from_whatsapp_instagram', null, 'Incoming notifications from WhatsApp, Instagram, and other apps will appear here in real-time.'))); } } @@ -77,11 +78,11 @@ UI.tab({ key = k; apps.replaceChildren(...(n.apps.length ? n.apps.map((a) => { - const sw = UI.switch((v) => api.muteNotifApp({ app: a.app, muted: !v }), { label: 'Send ' + a.appName }); + const sw = UI.switch((v) => api.muteNotifApp({ app: a.app, muted: !v }), { label: t('notifs.send_app', { app: a.appName }, 'Send {app}') }); sw.set(!n.muted.includes(a.app)); return UI.row(a.appName, '', [sw]); }) - : [UI.row('No notifications yet', 'Apps show up here after their first notification while sending is on')])); + : [UI.row(t('notifs.no_notifications_yet', null, 'No notifications yet'), t('notifs.apps_show_up_here_after', null, 'Apps show up here after their first notification while sending is on'))])); }; }, }); diff --git a/windows/ui-overview.js b/windows/ui-overview.js index f4b3daae..eb3dce62 100644 --- a/windows/ui-overview.js +++ b/windows/ui-overview.js @@ -16,7 +16,8 @@ UI.tab({ badge: (s) => (s.link.state === 'identity_changed' || (s.discovery && !s.discovery.on) || s.found.some((d) => d.invited) ? 'warn' : ''), build(body) { const { el, api } = UI; - const WHERE = { driving: 'You’re using {there}', driven: '{There} is using {me}' }; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + const WHERE = { driving: t('overview.youre_using', null, 'You’re using {there}'), driven: t('overview.peer_using_me', null, '{There} is using {me}') }; const linkLine = el('div', { class: 'hero-link' }, [el('span', { class: 'hero-pulse' })]); const linkText = el('div', { class: 'hero-link-text' }); @@ -24,23 +25,23 @@ UI.tab({ const macName = el('div', { class: 'hero-name' }); const status = el('div', { class: 'hero-status' }); // The session: Disconnect it; Connect again after one (or Take over while another device has it). - const discBtn = UI.button('Disconnect', () => api.disconnect(), 'small'); - const againBtn = UI.button('Connect', () => api.connectAgain(), 'small primary'); + const discBtn = UI.button(t('overview.disconnect', null, 'Disconnect'), () => api.disconnect(), 'small'); + const againBtn = UI.button(t('overview.connect', null, 'Connect'), () => api.connectAgain(), 'small primary'); const sessionBtns = el('div', { class: 'hero-actions' }, [againBtn, discBtn]); - const netCancel = UI.button('Cancel', () => api.netCancel(), 'small'); + const netCancel = UI.button(t('overview.cancel', null, 'Cancel'), () => api.netCancel(), 'small'); netCancel.hidden = true; - const netLocation = UI.button('Location settings', () => api.netLocation(), 'small'); // joining needed Windows' Location + const netLocation = UI.button(t('overview.location_settings', null, 'Location settings'), () => api.netLocation(), 'small'); // joining needed Windows' Location netLocation.hidden = true; // A session on Bluetooth: onto a direct Wi-Fi link on request, until Back to Bluetooth. let wifiOn = false; - const wifiBtn = UI.button('Connect with Wi-Fi Direct', () => api.netWifi(!wifiOn), 'small'); + const wifiBtn = UI.button(t('overview.connect_wifi_direct', null, 'Connect with Wi-Fi Direct'), () => api.netWifi(!wifiOn), 'small'); wifiBtn.hidden = true; // A phone: its hotspot instead. It switches it on; its name and password here once (saved for it). - const hotspotBtn = UI.button('Connect with hotspot', () => api.netWifi('hotspot'), 'small'); + const hotspotBtn = UI.button(t('overview.connect_hotspot', null, 'Connect with hotspot'), () => api.netWifi('hotspot'), 'small'); hotspotBtn.hidden = true; - const hsSsid = el('input', { type: 'text', placeholder: 'Hotspot name', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Hotspot name' } }); - const hsPass = el('input', { type: 'password', placeholder: 'Password', autocomplete: 'off', attrs: { 'aria-label': 'Hotspot password' } }); - const hsJoin = UI.button('Join', () => api.netJoinHotspot({ ssid: hsSsid.value, pass: hsPass.value }), 'small primary'); + const hsSsid = el('input', { type: 'text', placeholder: t('overview.hotspot_name', null, 'Hotspot name'), autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('overview.hotspot_name', null, 'Hotspot name') } }); + const hsPass = el('input', { type: 'password', placeholder: t('overview.password', null, 'Password'), autocomplete: 'off', attrs: { 'aria-label': t('overview.password', null, 'Password') } }); + const hsJoin = UI.button(t('overview.join', null, 'Join'), () => api.netJoinHotspot({ ssid: hsSsid.value, pass: hsPass.value }), 'small primary'); hsSsid.onkeydown = hsPass.onkeydown = (e) => { if (e.key === 'Enter') hsJoin.click(); }; const hsForm = el('div', { class: 'hero-actions' }, [hsSsid, hsPass, hsJoin]); hsForm.hidden = true; @@ -62,11 +63,11 @@ UI.tab({ // ---- this PC + connect by address (always visible) ---- const addrVal = el('span', { class: 'value addr' }); - const copyBtn = UI.button('Copy', () => UI.state && api.copyText(UI.state.addresses[0] || ''), 'small'); + const copyBtn = UI.button(t('overview.copy', null, 'Copy'), () => UI.state && api.copyText(UI.state.addresses[0] || ''), 'small'); const addrRow = UI.row('{me}', '', [addrVal, copyBtn]); - const ipInput = el('input', { type: 'text', placeholder: '192.168.1.20', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Address' } }); + const ipInput = el('input', { type: 'text', placeholder: '192.168.1.20', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('overview.address_aria', null, 'Address') } }); let asking = ''; - const ipBtn = UI.button('Connect', async () => { + const ipBtn = UI.button(t('overview.connect', null, 'Connect'), async () => { const v = ipInput.value.trim(); if (!v || asking) return; asking = v; @@ -74,20 +75,20 @@ UI.tab({ try { await api.connectAddress(v); } finally { asking = ''; render(); } }, 'small primary'); ipInput.onkeydown = (e) => { if (e.key === 'Enter') ipBtn.click(); }; - const ipRow = UI.row('Connect by address', '', [ipInput, ipBtn]); + const ipRow = UI.row(t('overview.connect_by_address', null, 'Connect by address'), '', [ipInput, ipBtn]); // ---- found nearby (always visible) ---- - const discRow = UI.row('Can’t look for computers on this network.', '', [UI.button('Fix firewall', () => api.fixFirewall(), 'small')]); + const discRow = UI.row(t('overview.cant_look_network', null, 'Can’t look for computers on this network.'), '', [UI.button(t('overview.fix_firewall', null, 'Fix firewall'), () => api.fixFirewall(), 'small')]); const foundList = el('div'); // General's two Bluetooth switches, here too: who can turn up through Bluetooth. - const bleSw = UI.switch((v) => api.setNet({ ble: v }), { label: 'Bluetooth with phones' }); - const blePcSw = UI.switch((v) => api.setNet({ blePc: v }), { label: 'Bluetooth with computers' }); - const bleRows = [UI.row('Bluetooth with phones', '', [bleSw]), UI.row('Bluetooth with computers', '', [blePcSw])]; - const refresh = UI.button('Refresh', () => { // the list empties and fills again with whoever answers + const bleSw = UI.switch((v) => api.setNet({ ble: v }), { label: t('overview.ble_phones', null, 'Bluetooth with phones') }); + const blePcSw = UI.switch((v) => api.setNet({ blePc: v }), { label: t('overview.ble_computers', null, 'Bluetooth with computers') }); + const bleRows = [UI.row(t('overview.ble_phones', null, 'Bluetooth with phones'), '', [bleSw]), UI.row(t('overview.ble_computers', null, 'Bluetooth with computers'), '', [blePcSw])]; + const refresh = UI.button(t('overview.refresh', null, 'Refresh'), () => { // the list empties and fills again with whoever answers api.refreshFound(); refresh.disabled = true; - refresh.textContent = 'Looking…'; - setTimeout(() => { refresh.disabled = false; refresh.textContent = 'Refresh'; }, 1500); + refresh.textContent = t('overview.looking', null, 'Looking…'); + setTimeout(() => { refresh.disabled = false; refresh.textContent = t('overview.refresh', null, 'Refresh'); }, 1500); }, 'small'); // ---- a connected phone's wireless debugging (shared/ui-adb.js) and pairing by QR code (shared/ui-qrpair.js) ---- @@ -97,11 +98,11 @@ UI.tab({ const pairedList = el('div'); body.append( UI.card('', [addrRow, ipRow]), - UI.card('Found nearby', [discRow, foundList, ...bleRows], { actions: [refresh] }), + UI.card(t('overview.found_nearby', null, 'Found nearby'), [discRow, foundList, ...bleRows], { actions: [refresh] }), ...(qrPair ? [qrPair.el] : []), hero, adb.el, - UI.card('Paired', [pairedList]), + UI.card(t('overview.paired', null, 'Paired'), [pairedList]), ); let last = null; @@ -135,17 +136,17 @@ UI.tab({ setTimeout(redraw, 1550); } const d = done[dev.id]; - return d && Date.now() - d.at < 1500 ? { ok: true, text: d.kind === 'pair' ? 'Paired ✓' : 'Connected' } : null; + return d && Date.now() - d.at < 1500 ? { ok: true, text: d.kind === 'pair' ? t('overview.paired_check', null, 'Paired ✓') : t('overview.connected', null, 'Connected') } : null; } if (p) { if (mine) mine.seen = true; if (p.phase === 'failed') { - const fw = s.firewall && s.firewall.ok === false ? ' The firewall blocks DuoDesk here: Fix firewall above.' : ''; + const fw = s.firewall && s.firewall.ok === false ? ' ' + t('overview.fix_firewall', null, 'Fix firewall') : ''; return { fail: true, text: named(p.error, dev) + fw }; } if (p.phase === 'code') return { code: p.code }; - if (p.phase === 'waiting') return { wait: true, text: 'Waiting for ' + dev.name + ' to allow…' }; - return { busy: true, text: 'Connecting…' }; + if (p.phase === 'waiting') return { wait: true, text: t('overview.waiting_allow', { name: dev.name }, 'Waiting for ' + dev.name + ' to allow…') }; + return { busy: true, text: t('overview.connecting', null, 'Connecting…') }; } if (!mine) return null; if (mine.seen) { // its pairing ended without connecting (Cancel) @@ -153,9 +154,9 @@ UI.tab({ return null; } if (Date.now() - mine.since > LIMIT_MS) { - return { fail: true, text: 'Can’t reach ' + dev.name + ' at ' + dev.address + '. Is DuoDesk open there, on the same Wi-Fi?' }; + return { fail: true, text: t('overview.cant_reach', { name: dev.name, address: dev.address }, 'Can’t reach ' + dev.name + ' at ' + dev.address + '. Is DuoDesk open there, on the same Wi-Fi?') }; } - return { busy: true, text: mine.kind === 'take' ? 'Taking over…' : 'Connecting…' }; + return { busy: true, text: mine.kind === 'take' ? t('overview.taking_over', null, 'Taking over…') : t('overview.connecting', null, 'Connecting…') }; } const update = (s) => { last = s; @@ -165,35 +166,41 @@ UI.tab({ const connected = l.state === 'connected'; pcName.textContent = s.device.name; const p = UI.peer(s); - macName.textContent = s.peer ? s.peer.name : 'The other computer'; + macName.textContent = s.peer ? s.peer.name : t('overview.other_computer', null, 'The other computer'); peerDev.className = 'device ' + UI.osClass(p.os); if (UI.phoneWall && p.phone) peerDev.style.setProperty('--phone-wall', UI.phoneWall); else peerDev.style.removeProperty('--phone-wall'); linkLine.className = 'hero-link' + (connected ? ' up' : ''); const ble = s.net && s.net.transport === 'ble'; linkText.textContent = connected ? (l.rtt != null ? l.rtt + ' ms · ' : '') + UI.via(s) - : s.pairing ? 'Pairing…' : s.paired ? 'Connecting…' : 'Not connected'; + : s.pairing ? t('overview.pairing', null, 'Pairing…') : s.paired ? t('overview.connecting', null, 'Connecting…') : t('overview.not_connected', null, 'Not connected'); const bad = l.state === 'identity_changed'; - status.textContent = bad ? 'This ' + p.kind + ' looks different now. Forget it and pair again.' - : connected ? s.kvmState.message || (WHERE[s.input] || 'Connected').replace('{there}', p.the).replace('{There}', p.the.charAt(0).toUpperCase() + p.the.slice(1)) - : s.peer ? 'Open DuoDesk on ' + s.peer.name + '.' - : 'Pick a computer below, or connect by address.'; + status.textContent = bad ? t('overview.identity_changed', { kind: p.kind }, 'This ' + p.kind + ' looks different now. Forget it and pair again.') + : connected ? s.kvmState.message || (WHERE[s.input] || t('overview.connected', null, 'Connected')).replace('{there}', p.the).replace('{There}', p.the.charAt(0).toUpperCase() + p.the.slice(1)) + : s.peer ? t('overview.open_on_peer', { name: s.peer.name }, 'Open DuoDesk on ' + s.peer.name + '.') + : t('overview.pick_below', null, 'Pick a computer below, or connect by address.'); status.classList.toggle('bad', bad); // Disconnected here or by the other side, taken over, or in use by another device. const stopped = l.state === 'stopped'; const busyBy = !connected && !stopped && l.busy; if (s.paired && !connected && (stopped || busyBy)) { - status.textContent = stopped ? (l.message || 'Disconnected').replace(/\{Name\}/g, s.paired.macName) + '.' : busyBy + '.'; + status.textContent = stopped ? (l.message || t('overview.disconnected', null, 'Disconnected')).replace(/\{Name\}/g, s.paired.macName) + '.' : busyBy + '.'; } discBtn.hidden = !connected; againBtn.hidden = connected || !s.paired || !(stopped || busyBy); - againBtn.textContent = busyBy || (stopped && l.message) ? 'Take over' : 'Connect'; + againBtn.textContent = busyBy || (stopped && l.message) ? t('overview.take_over', null, 'Take over') : t('overview.connect', null, 'Connect'); sessionBtns.hidden = discBtn.hidden && againBtn.hidden; // Moving the session to Wi-Fi (files, screens through Bluetooth: netlink.js) const n = s.net || {}; - const moving = { hotspot: 'Switch on {name}’s hotspot, then type its name and password here.', asking: 'Asking {name} for Wi-Fi…', hosting: 'Starting Wi-Fi Direct for {name}…', joining: 'Joining ' + (n.ssid || 'Wi-Fi') + '…', joined: 'On Wi-Fi with {name}' }[n.state]; + const moving = { + hotspot: t('overview.hotspot_hint', { name: n.name }, 'Switch on ' + n.name + '’s hotspot, then type its name and password here.'), + asking: t('overview.asking_wifi', { name: n.name }, 'Asking ' + n.name + ' for Wi-Fi…'), + hosting: t('overview.starting_wifi_direct', { name: n.name }, 'Starting Wi-Fi Direct for ' + n.name + '…'), + joining: t('overview.joining_ssid', { ssid: n.ssid || 'Wi-Fi' }, 'Joining ' + (n.ssid || 'Wi-Fi') + '…'), + joined: t('overview.on_wifi_with', { name: n.name }, 'On Wi-Fi with ' + n.name) + }[n.state]; if (connected && !bad && (moving || n.state === 'failed')) { - status.textContent = n.state === 'failed' ? n.error || 'Wi-Fi didn’t come up' : moving; + status.textContent = n.state === 'failed' ? n.error || t('overview.wifi_failed', null, 'Wi-Fi didn’t come up') : moving; status.classList.toggle('bad', n.state === 'failed'); } netCancel.hidden = !(connected && ['asking', 'hosting', 'joining', 'hotspot'].includes(n.state)); @@ -201,13 +208,13 @@ UI.tab({ if (!hsForm.hidden && !hsShown) { // filled in once, not while typing hsSsid.value = n.hotspotSsid || ''; hsPass.value = ''; - hsPass.placeholder = n.hotspotSaved ? 'Password (saved)' : 'Password'; + hsPass.placeholder = n.hotspotSaved ? t('overview.password_saved', null, 'Password (saved)') : t('overview.password', null, 'Password'); setTimeout(() => (n.hotspotSsid ? hsPass : hsSsid).focus(), 0); } hsShown = !hsForm.hidden; netLocation.hidden = !(connected && n.state === 'failed' && n.location); wifiOn = (n.why || []).includes('user') || !!n.linked; // made for the screen or files too - wifiBtn.textContent = wifiOn ? 'Back to Bluetooth' : 'Connect with Wi-Fi Direct'; + wifiBtn.textContent = wifiOn ? t('overview.back_to_bluetooth', null, 'Back to Bluetooth') : t('overview.connect_wifi_direct', null, 'Connect with Wi-Fi Direct'); wifiBtn.hidden = !connected || !netCancel.hidden || !(wifiOn || ble); hotspotBtn.hidden = !connected || !netCancel.hidden || wifiOn || !ble || !UI.isPhone(s); @@ -216,12 +223,12 @@ UI.tab({ if (qrPair) qrPair.update(s); // this PC - addrVal.textContent = s.addresses.length ? s.addresses[0] : 'No network'; // The one the other computer can reach + addrVal.textContent = s.addresses.length ? s.addresses[0] : t('overview.no_network', null, 'No network'); // The one the other computer can reach copyBtn.hidden = !s.addresses.length; const busy = !!s.pairing && s.pairing.phase !== 'failed'; ipBtn.disabled = busy || !!asking; const failed = s.pairing && s.pairing.phase === 'failed'; - ipRow.setHint(asking ? 'Looking for DuoDesk at ' + asking + '…' : failed ? s.pairing.error : ''); + ipRow.setHint(asking ? t('overview.looking_at_addr', { addr: asking }, 'Looking for DuoDesk at ' + asking + '…') : failed ? s.pairing.error : ''); ipRow.hint.classList.toggle('bad', !asking && !!failed); // found nearby @@ -229,7 +236,7 @@ UI.tab({ const fwBad = s.firewall && s.firewall.ok === false && !s.firewall.checking; const blocked = !d.on || fwBad; discRow.hidden = !blocked; - discRow.setHint(!d.on ? d.error + '. Connect by address still works.' : 'The firewall blocks it. Connect by address may still work.'); + discRow.setHint(!d.on ? d.error + '. ' + t('overview.connect_by_addr_works', null, 'Connect by address still works.') : t('overview.fw_blocked', null, 'The firewall blocks it. Connect by address may still work.')); // Paired both ways: the computer we connect to (s.paired) and the ones that connect to us (s.guests). const known = new Set([...(s.paired ? [s.paired.macId] : []), ...s.guests.map((g) => g.id)]); const live = s.peer && connected ? s.peer.id : ''; @@ -244,21 +251,21 @@ UI.tab({ const pairIt = () => go(dev, 'pair', () => api.pair(dev.id)); // A Mac hosts; with a PC or Linux the one who clicks is the guest. A phone is asked to pair. const btn = online || isKnown || (st && !st.fail) ? null - : UI.button(st ? 'Retry' : dev.os === 'mac' || dev.os === 'android' ? 'Pair' : 'Connect', pairIt, 'small' + (dev.invited || st ? ' primary' : '')); + : UI.button(st ? t('overview.retry', null, 'Retry') : dev.os === 'mac' || dev.os === 'android' ? t('overview.pair_btn', null, 'Pair') : t('overview.connect', null, 'Connect'), pairIt, 'small' + (dev.invited || st ? ' primary' : '')); if (btn) btn.disabled = (busy && !st) || connected; // Paired: Take over (the computer we're a guest of: a takeover hello; one that connects to us: // invited, and its hello takes the session from whoever has it). - const take = !online && isKnown && !(st && !st.fail) ? UI.button(st ? 'Retry' : 'Take over', + const take = !online && isKnown && !(st && !st.fail) ? UI.button(st ? t('overview.retry', null, 'Retry') : t('overview.take_over', null, 'Take over'), () => go(dev, 'take', () => (s.paired && dev.id === s.paired.macId ? api.connectAgain() : api.connectGuest(dev.id))), 'small') : null; if (take) take.disabled = busy; - const match = st && st.code ? UI.button('Codes match', () => api.confirmCode(), 'small primary') : null; + const match = st && st.code ? UI.button(t('overview.codes_match', null, 'Codes match'), () => api.confirmCode(), 'small primary') : null; if (btn && dev.invited && !busy) focus = btn; - const hint = !st || st.ok ? dev.address + (dev.invited ? ' · wants to connect' : '') - : st.code ? 'Check the code: ' + st.code.slice(0, 3) + ' ' + st.code.slice(3) + ' (the same on ' + dev.name + '?)' + const hint = !st || st.ok ? dev.address + (dev.invited ? ' · ' + t('overview.wants_to_connect', null, 'wants to connect') : '') + : st.code ? t('overview.check_code_named', { code: st.code.slice(0, 3) + ' ' + st.code.slice(3), name: dev.name }, 'Check the code: ' + st.code.slice(0, 3) + ' ' + st.code.slice(3) + ' (the same on ' + dev.name + '?)') : st.text; const r = UI.row(dev.name, hint, [ st && (st.busy || st.wait) ? el('span', { class: 'spin', attrs: { 'aria-hidden': 'true' } }) : null, - st && st.ok ? el('span', { class: 'pill good', text: st.text }) : online ? el('span', { class: 'pill good', text: 'Connected' }) : isKnown && !st ? el('span', { class: 'pill muted', text: 'Paired' }) : null, + st && st.ok ? el('span', { class: 'pill good', text: st.text }) : online ? el('span', { class: 'pill good', text: t('overview.connected', null, 'Connected') }) : isKnown && !st ? el('span', { class: 'pill muted', text: t('overview.paired', null, 'Paired') }) : null, match, btn, take]); if (st && st.fail) r.hint.classList.add('bad'); if (st && st.code) r.hint.classList.add('code-hint'); @@ -266,7 +273,7 @@ UI.tab({ r.classList.add('with-ico'); return r; }); - if (!rows.length && !blocked) rows.push(UI.row('Looking for computers…', 'Open DuoDesk on the other computer.')); + if (!rows.length && !blocked) rows.push(UI.row(t('overview.looking_for_computers', null, 'Looking for computers…'), t('overview.open_other_pc', null, 'Open DuoDesk on the other computer.'))); foundList.replaceChildren(...rows); if (focus) focus.focus(); } @@ -279,26 +286,26 @@ UI.tab({ pairedKey = pk; const all = [ ...(s.paired ? [{ id: s.paired.macId, name: s.paired.macName, os: s.paired.os, hint: s.paired.address, forget: () => api.forget(), connect: () => api.connectAgain() }] : []), - ...s.guests.map((g) => ({ id: g.id, name: g.name, os: g.os, hint: g.lastSeen ? 'Last seen ' + UI.ago(g.lastSeen) : '', forget: () => api.forgetGuest(g.id), + ...s.guests.map((g) => ({ id: g.id, name: g.name, os: g.os, hint: g.lastSeen ? t('overview.last_seen', { time: UI.ago(g.lastSeen) }, 'Last seen ' + UI.ago(g.lastSeen)) : '', forget: () => api.forgetGuest(g.id), connect: near.has(g.id) ? () => api.connectGuest(g.id) : null })), ]; pairedList.replaceChildren(...(all.length ? all.map((x) => { const online = x.id === live; const waking = !online && wk.waking === x.id; // An offline computer that told us how to wake it gets Wake. - const wakeBtn = !online && wk.peers[x.id] ? UI.button(waking ? 'Waking…' : 'Wake', () => api.wakePeer(x.id), 'small') : null; + const wakeBtn = !online && wk.peers[x.id] ? UI.button(waking ? t('overview.waking', null, 'Waking…') : t('overview.wake', null, 'Wake'), () => api.wakePeer(x.id), 'small') : null; if (wakeBtn) wakeBtn.disabled = waking; - const r = UI.row(x.name, online ? 'Connected' : waking ? 'Waking ' + x.name + '…' : x.hint, [ - online ? el('span', { class: 'pill good', text: 'Online' }) : null, + const r = UI.row(x.name, online ? t('overview.connected', null, 'Connected') : waking ? t('overview.waking_name', { name: x.name }, 'Waking ' + x.name + '…') : x.hint, [ + online ? el('span', { class: 'pill good', text: t('overview.online', null, 'Online') }) : null, wakeBtn, // Switch to it: whatever the session is now, it ends (paired, and nearby to be reached). - !online && x.connect ? UI.button(live ? 'Switch' : 'Connect', x.connect, 'small') : null, - UI.button('Forget', x.forget, 'small'), + !online && x.connect ? UI.button(live ? t('overview.switch', null, 'Switch') : t('overview.connect', null, 'Connect'), x.connect, 'small') : null, + UI.button(t('overview.forget', null, 'Forget'), x.forget, 'small'), ]); r.querySelector('.text').prepend(UI.osIcon(x.os)); r.classList.add('with-ico'); return r; - }) : [UI.row('Nothing paired yet', 'Pair with a computer in Found nearby.')])); + }) : [UI.row(t('overview.nothing_paired', null, 'Nothing paired yet'), t('overview.pair_in_found_nearby', null, 'Pair with a computer in Found nearby.'))])); }; return update; }, diff --git a/windows/ui-phone.js b/windows/ui-phone.js index 455b6d49..69edae8d 100644 --- a/windows/ui-phone.js +++ b/windows/ui-phone.js @@ -14,6 +14,7 @@ UI.tab({ color: 'linear-gradient(#34c759, #248a3d)', build(body, page) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const h1 = page.querySelector('h1 span'); const desc = page.querySelector('.page-head p'); @@ -21,16 +22,16 @@ UI.tab({ const dev = el('div', { class: 'device phone big' }); const name = el('div', { class: 'hero-name' }); const sub = el('div', { class: 'hero-status' }); - const showBtn = UI.button('Show Phone Screen', () => api.phoneScreen(true), 'primary'); - const discBtn = UI.button('Disconnect', () => api.disconnectPhone()); + const showBtn = UI.button(t('phone.show_screen', null, 'Show Phone Screen'), () => api.phoneScreen(true), 'primary'); + const discBtn = UI.button(t('phone.disconnect', null, 'Disconnect'), () => api.disconnectPhone()); // On Bluetooth: onto a direct Wi-Fi link on request, until Back to Bluetooth (netlink.js 'user'). let wifiOn = false; - const wifiBtn = UI.button('Connect with Wi-Fi Direct', () => api.netWifi(!wifiOn)); - const hotspotBtn = UI.button('Connect with hotspot', () => { api.netWifi('hotspot'); UI.go('overview'); }); // its name and password there + const wifiBtn = UI.button(t('overview.connect_wifi_direct', null, 'Connect with Wi-Fi Direct'), () => api.netWifi(!wifiOn)); + const hotspotBtn = UI.button(t('overview.connect_hotspot', null, 'Connect with hotspot'), () => { api.netWifi('hotspot'); UI.go('overview'); }); // its name and password there // How the mouse and keyboard reach the phone (settings.phone.input; the phone's own toggle too). const via = UI.segmented([ - { value: 'adb', label: 'ADB', title: 'Wireless debugging: full control' }, - { value: 'phone', label: 'Accessibility', title: 'DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth. No developer options' }, + { value: 'adb', label: 'ADB', title: t('phone.wireless_debugging_full_control', null, 'Wireless debugging: full control') }, + { value: 'phone', label: t('phone.accessibility', null, 'Accessibility'), title: t('phone.duodesk_on_the_phone_taps_and_types', null, 'DuoDesk on the phone taps and types itself, over Wi-Fi, Wi-Fi Direct or Bluetooth. No developer options') }, ], (v) => api.setPhone({ input: v, inputPicked: true })); // picked: no longer automatic // What plays on the phone, on the card's right, while it plays (shared/ui-nowplaying.js). const media = UI.nowPlaying(); @@ -44,67 +45,67 @@ UI.tab({ ]); // ---- wireless debugging ---- - const adbRow = UI.row('Wireless debugging', '', []); + const adbRow = UI.row(t('phone.wireless_debugging', null, 'Wireless debugging'), '', []); const adbPill = el('span', { class: 'pill muted' }); - adbRow.querySelector('.controls').append(adbPill, UI.button('Try Again', () => api.phoneRetry(), 'small')); - const code = el('input', { type: 'text', placeholder: '123456', maxLength: 6, inputMode: 'numeric', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Pairing code' } }); - const where = el('input', { type: 'text', placeholder: 'Address:port (optional)', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Pairing address' } }); - const pairBtn = UI.button('Pair', () => api.phonePair({ code: code.value, where: where.value }), 'small primary'); + adbRow.querySelector('.controls').append(adbPill, UI.button(t('phone.try_again', null, 'Try Again'), () => api.phoneRetry(), 'small')); + const code = el('input', { type: 'text', placeholder: '123456', maxLength: 6, inputMode: 'numeric', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('phone.pairing_code', null, 'Pairing code') } }); + const where = el('input', { type: 'text', placeholder: t('phone.address_port_optional', null, 'Address:port (optional)'), autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('phone.pairing_address', null, 'Pairing address') } }); + const pairBtn = UI.button(t('overview.pair_btn', null, 'Pair'), () => api.phonePair({ code: code.value, where: where.value }), 'small primary'); code.onkeydown = where.onkeydown = (e) => { if (e.key === 'Enter') pairBtn.click(); }; - const pairRow = UI.row('Pairing code', 'Or type it on the phone, in DuoDesk’s notification', [code, where, pairBtn]); + const pairRow = UI.row(t('phone.pairing_code', null, 'Pairing code'), t('phone.or_type_it_on_the', null, 'Or type it on the phone, in DuoDesk’s notification'), [code, where, pairBtn]); const steps = UI.note('info', ''); // Wireless debugging off: one line, the steps behind Show me how. let howOpen = false; - const howBtn = UI.button('Show me how', () => { howOpen = !howOpen; render(UI.state); }, 'small'); + const howBtn = UI.button(t('phone.show_me_how', null, 'Show me how'), () => { howOpen = !howOpen; render(UI.state); }, 'small'); adbRow.querySelector('.controls').prepend(howBtn); const how = el('ol', { class: 'how-steps' }, [ - 'On the phone: Settings › About phone › Software information › tap Build number 7 times. Developer options appear.', - 'Settings › Developer options: turn on USB debugging.', - 'On the same page, turn on Wireless debugging. The phone has to be on a Wi-Fi network (a direct Wi-Fi link alone isn’t enough).', - 'Tap Wireless debugging › Pair device with pairing code, and type the code here, or in DuoDesk’s notification on the phone.', - 'That’s all: after pairing once, DuoDesk turns wireless debugging on by itself.', - ].map((t) => el('li', { text: t }))); + t('phone.on_the_phone_settings_about', null, 'On the phone: Settings › About phone › Software information › tap Build number 7 times. Developer options appear.'), + t('phone.settings_developer_options_turn_on', null, 'Settings › Developer options: turn on USB debugging.'), + t('phone.on_the_same_page_turn', null, 'On the same page, turn on Wireless debugging. The phone has to be on a Wi-Fi network (a direct Wi-Fi link alone isn’t enough).'), + t('phone.tap_wireless_debugging_pair_device', null, 'Tap Wireless debugging › Pair device with pairing code, and type the code here, or in DuoDesk’s notification on the phone.'), + t('phone.that_s_all_after_pairing', null, 'That’s all: after pairing once, DuoDesk turns wireless debugging on by itself.'), + ].map((step) => el('li', { text: step }))); // The phone runs the standard build (no notification access): install the full one over it. - const fullBtn = UI.button('Install', () => api.phoneInstallFull(), 'small primary'); - const fullRow = UI.row('Notifications from the phone', '', [fullBtn]); - const adbCard = UI.card('Screen, mouse and keyboard', [adbRow, how, pairRow, steps, fullRow]); + const fullBtn = UI.button(t('phone.install', null, 'Install'), () => api.phoneInstallFull(), 'small primary'); + const fullRow = UI.row(t('phone.notifications_from_the_phone', null, 'Notifications from the phone'), '', [fullBtn]); + const adbCard = UI.card(t('phone.screen_mouse_keyboard', null, 'Screen, mouse and keyboard'), [adbRow, how, pairRow, steps, fullRow]); // ---- apps ---- - const search = el('input', { type: 'search', placeholder: 'Search apps', autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': 'Search apps' } }); + const search = el('input', { type: 'search', placeholder: t('phone.search_apps', null, 'Search apps'), autocomplete: 'off', spellcheck: false, attrs: { 'aria-label': t('phone.search_apps', null, 'Search apps') } }); const grid = el('div', { class: 'app-grid' }); const appsNote = UI.note('info', ''); search.oninput = () => { appsKey = ''; render(UI.state); }; - const appsCard = UI.card('Apps', [el('div', { class: 'row' }, [search]), appsNote, grid]); + const appsCard = UI.card(t('nav.apps', null, 'Apps'), [el('div', { class: 'row' }, [search]), appsNote, grid]); // ---- open windows ---- const winList = el('div'); - const winCard = UI.card('Open on this PC', [winList]); + const winCard = UI.card(t('phone.open_on_pc', null, 'Open on this PC'), [winList]); // ---- settings ---- - const sound = UI.switch((v) => api.setPhone({ sound: v }), { label: 'Phone sound' }); + const sound = UI.switch((v) => api.setPhone({ sound: v }), { label: t('phone.phone_sound', null, 'Phone sound') }); const quality = UI.select([ - { value: '4', label: 'Data saver (4 Mb/s)' }, { value: '8', label: 'Balanced (8 Mb/s)' }, - { value: '16', label: 'Sharp (16 Mb/s)' }, { value: '24', label: 'Sharpest (24 Mb/s)' }, + { value: '4', label: t('phone.data_saver_4_mb_s', null, 'Data saver (4 Mb/s)') }, { value: '8', label: t('phone.balanced_8_mb_s', null, 'Balanced (8 Mb/s)') }, + { value: '16', label: t('phone.sharp_16_mb_s', null, 'Sharp (16 Mb/s)') }, { value: '24', label: t('phone.sharpest_24_mb_s', null, 'Sharpest (24 Mb/s)') }, ], (v) => api.setPhone({ bitrateMbps: Number(v) })); - const wall = UI.switch((v) => api.setPhone({ wallpaper: v }), { label: 'Wallpaper' }); - const enterSends = UI.switch((v) => api.setPhone({ enterSends: v }), { label: 'Enter sends messages' }); - const arrowSwipe = UI.switch((v) => api.setPhone({ arrowSwipe: v }), { label: 'Arrow keys swipe' }); + const wall = UI.switch((v) => api.setPhone({ wallpaper: v }), { label: t('phone.wallpaper', null, 'Wallpaper') }); + const enterSends = UI.switch((v) => api.setPhone({ enterSends: v }), { label: t('phone.enter_sends', null, 'Enter sends messages') }); + const arrowSwipe = UI.switch((v) => api.setPhone({ arrowSwipe: v }), { label: t('phone.arrow_keys_swipe', null, 'Arrow keys swipe') }); const controls = UI.select([ - { value: 'top', label: 'Title bar' }, { value: 'side', label: 'Side panel' }, { value: 'bottom', label: 'Bottom bar' }, + { value: 'top', label: t('phone.title_bar', null, 'Title bar') }, { value: 'side', label: t('phone.side_panel', null, 'Side panel') }, { value: 'bottom', label: t('phone.bottom_bar', null, 'Bottom bar') }, ], (v) => api.setPhone({ controls: v })); - const optsCard = UI.card('Settings', [ - UI.row('Phone sound in the screen window', 'Android 11 or later', [sound]), - UI.row('Picture', 'For the screen window and app windows', [quality]), - UI.row('Window controls', 'Title bar: Back, Home, Recents and the main ones up top. Side panel: those, volume, rotate, screenshot and more down the right of each phone window. Bottom bar: Back, Home and Recents under the picture', [controls]), - UI.row('Enter sends messages', 'In WhatsApp, Instagram and Telegram, in a phone window or with this keyboard on the phone. Shift+Enter: a new line', [enterSends]), - UI.row('Arrow keys swipe', 'In a phone window: up and down through feeds, Reels and Shorts, left and right through pages. Off: they move the cursor', [arrowSwipe]), - UI.row('Show the phone’s wallpaper here', 'Lets DuoDesk on the phone read it (set up over wireless debugging)', [wall]), - UI.row('Mouse and keyboard', 'Push the pointer off the edge of the screen to use the phone. Double-tap the hotkey to come back.', [UI.button('Cursor Settings', () => UI.go('cursor'), 'small')]), + const optsCard = UI.card(t('phone.settings', null, 'Settings'), [ + UI.row(t('phone.phone_sound_in_the_screen', null, 'Phone sound in the screen window'), t('phone.android_11_or_later', null, 'Android 11 or later'), [sound]), + UI.row(t('clipboard.picture', null, 'Picture'), t('phone.for_the_screen_window_and', null, 'For the screen window and app windows'), [quality]), + UI.row(t('phone.window_controls', null, 'Window controls'), t('phone.title_bar_back_home_recents_and', null, 'Title bar: Back, Home, Recents and the main ones up top. Side panel: those, volume, rotate, screenshot and more down the right of each phone window. Bottom bar: Back, Home and Recents under the picture'), [controls]), + UI.row(t('phone.enter_sends', null, 'Enter sends messages'), t('phone.in_whatsapp_instagram_and_telegram', null, 'In WhatsApp, Instagram and Telegram, in a phone window or with this keyboard on the phone. Shift+Enter: a new line'), [enterSends]), + UI.row(t('phone.arrow_keys_swipe', null, 'Arrow keys swipe'), t('phone.in_a_phone_window_up', null, 'In a phone window: up and down through feeds, Reels and Shorts, left and right through pages. Off: they move the cursor'), [arrowSwipe]), + UI.row(t('phone.show_the_phone_s_wallpaper', null, 'Show the phone’s wallpaper here'), t('phone.lets_duodesk_on_the_phone', null, 'Lets DuoDesk on the phone read it (set up over wireless debugging)'), [wall]), + UI.row(t('phone.mouse_and_keyboard', null, 'Mouse and keyboard'), t('phone.push_the_pointer_off_the', null, 'Push the pointer off the edge of the screen to use the phone. Double-tap the hotkey to come back.'), [UI.button(t('phone.cursor_settings', null, 'Cursor Settings'), () => UI.go('cursor'), 'small')]), ]); const notConnected = UI.note('info', ''); // Below the phone's card: how the mouse and keyboard reach it (automatic until one is picked). - const viaRow = UI.row('Mouse and keyboard', '', [via.el]); + const viaRow = UI.row(t('phone.mouse_and_keyboard', null, 'Mouse and keyboard'), '', [via.el]); const viaCard = UI.card('', [viaRow]); const rezume = UI.rezumeCard ? UI.rezumeCard() : { el: UI.el('div', { hidden: true }), update() {} }; // the phone's ReZume (shared/ui-rezume.js; not in Multi-device) body.append(notConnected, hero, rezume.el, viaCard, adbCard, appsCard, winCard, optsCard); @@ -112,8 +113,8 @@ UI.tab({ let appsKey = ''; let winKey = ''; const STATES = { - ready: ['good', 'Ready'], connecting: ['muted', 'Connecting…'], needsPair: ['bad', 'Pair once'], - waitingWifi: ['bad', 'Off'], missing: ['bad', 'Missing'], error: ['bad', 'Problem'], off: ['muted', '—'], + ready: ['good', t('phone.ready', null, 'Ready')], connecting: ['muted', t('sidebar.connecting', null, 'Connecting…')], needsPair: ['bad', t('phone.pair_once', null, 'Pair once')], + waitingWifi: ['bad', t('clipboard.off', null, 'Off')], missing: ['bad', t('phone.missing', null, 'Missing')], error: ['bad', t('files.problem', null, 'Problem')], off: ['muted', '—'], }; function render(s) { @@ -124,13 +125,13 @@ UI.tab({ const info = ph.info || {}; const br = ph.bridge || { state: 'off' }; for (const x of [hero, viaCard, adbCard, appsCard, winCard, optsCard]) x.hidden = !c; - notConnected.set(c ? '' : ph.nearby && ph.nearby.length ? 'Click the phone above Overview to connect it.' : 'No phone connected. Open DuoDesk on the phone and pair it from Overview › Nearby.'); + notConnected.set(c ? '' : ph.nearby && ph.nearby.length ? t('phone.click_the_phone_above_overview', null, 'Click the phone above Overview to connect it.') : t('phone.no_phone_connected_open_duodesk', null, 'No phone connected. Open DuoDesk on the phone and pair it from Overview › Nearby.')); if (!c) return; h1.textContent = c.name; desc.textContent = [info.maker && info.model ? `${info.maker} ${info.model}` : info.model, info.release && `Android ${info.release}`].filter(Boolean).join(' · '); name.textContent = c.name; - sub.textContent = [c.usb ? 'USB cable' : '', c.rttMs != null ? `${c.rttMs} ms` : 'Connected', info.battery != null ? `Battery ${info.battery}%${info.charging ? ', charging' : ''}` : ''].filter(Boolean).join(' · '); + sub.textContent = [c.usb ? t('phone.usb_cable', null, 'USB cable') : '', c.rttMs != null ? `${c.rttMs} ms` : t('sidebar.connected', null, 'Connected'), info.battery != null ? (info.charging ? t('phone.battery_charging', { battery: info.battery }, 'Battery {battery}%, charging') : t('phone.battery', { battery: info.battery }, 'Battery {battery}%')) : ''].filter(Boolean).join(' · '); if (UI.phoneWall) dev.style.setProperty('--phone-wall', UI.phoneWall); else if (info.colors && info.colors.length) dev.style.setProperty('--phone-wall', `linear-gradient(160deg, ${info.colors.join(', ')}${info.colors.length === 1 ? `, ${info.colors[0]}` : ''})`); else dev.style.removeProperty('--phone-wall'); @@ -139,20 +140,20 @@ UI.tab({ showBtn.disabled = !ready; const n = s.net || {}; wifiOn = (n.why || []).includes('user') || !!n.linked; // made for the screen or files too - wifiBtn.textContent = wifiOn ? 'Back to Bluetooth' : 'Connect with Wi-Fi Direct'; + wifiBtn.textContent = wifiOn ? t('overview.back_to_bluetooth', null, 'Back to Bluetooth') : t('overview.connect_wifi_direct', null, 'Connect with Wi-Fi Direct'); wifiBtn.hidden = !(wifiOn || !!(s.net && s.net.transport === 'ble')); hotspotBtn.hidden = wifiOn || n.state === 'hotspot' || !(s.net && s.net.transport === 'ble'); const off = br.state === 'waitingWifi'; howBtn.hidden = !off; - howBtn.textContent = howOpen ? 'Hide' : 'Show me how'; + howBtn.textContent = howOpen ? t('phone.hide', null, 'Hide') : t('phone.show_me_how', null, 'Show me how'); how.hidden = !off || !howOpen; const [cls, label] = STATES[br.state] || STATES.off; adbPill.className = `pill ${ready && br.inputBlocked ? 'bad' : cls}`; - adbPill.textContent = ready && br.inputBlocked ? 'Touch blocked' : label; - adbRow.setHint(off ? (/direct Wi-Fi/.test(br.message) ? br.message : 'Wireless debugging is off on the phone. The screen and ADB control need it; Accessibility doesn’t.') : ready && br.inputBlocked ? 'The screen works, but Xiaomi refuses touch, mouse and keyboard from here. On the phone: Settings › Developer options › USB debugging (Security settings): on (it asks for a Mi account).' - : ready ? 'The phone’s screen, touch, mouse and keyboard, and its clipboard in the background' : br.message); + adbPill.textContent = ready && br.inputBlocked ? t('phone.touch_blocked', null, 'Touch blocked') : label; + adbRow.setHint(off ? (/direct Wi-Fi/.test(br.message) ? br.message : t('phone.wireless_debugging_is_off_on', null, 'Wireless debugging is off on the phone. The screen and ADB control need it; Accessibility doesn’t.')) : ready && br.inputBlocked ? t('phone.the_screen_works_but_xiaomi_refuses', null, 'The screen works, but Xiaomi refuses touch, mouse and keyboard from here. On the phone: Settings › Developer options › USB debugging (Security settings): on (it asks for a Mi account).') + : ready ? t('phone.the_phone_s_screen_touch', null, 'The phone’s screen, touch, mouse and keyboard, and its clipboard in the background') : br.message); pairRow.hidden = br.state !== 'needsPair' && !br.canPair; - steps.set(br.state === 'needsPair' ? 'DuoDesk pairs with the phone’s wireless debugging once. After that the phone’s screen, apps, mouse and keyboard work without this step.' : ''); + steps.set(br.state === 'needsPair' ? t('phone.duodesk_pairs_with_the_phone', null, 'DuoDesk pairs with the phone’s wireless debugging once. After that the phone’s screen, apps, mouse and keyboard work without this step.') : ''); if (UI.adbBle(s, adbCard, adbRow, adbPill)) { pairRow.hidden = how.hidden = howBtn.hidden = true; steps.set(''); } // The standard build can't read notifications (Play Protect blocks downloaded apps that do). @@ -161,9 +162,11 @@ UI.tab({ fullRow.hidden = full && !(inst && inst.state === 'done'); fullBtn.hidden = full; fullBtn.disabled = !ready || !br.fullApk || (inst && inst.state === 'installing'); + const failedPrefix = inst && inst.state === 'failed' ? `${inst.message} ` : ''; fullRow.setHint(inst && inst.state !== 'failed' && inst.message ? inst.message - : !br.fullApk ? 'This build of DuoDesk doesn’t carry the Android app.' - : `${inst && inst.state === 'failed' ? `${inst.message} ` : ''}The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay.${ready ? '' : ' Needs wireless debugging.'}`); + : !br.fullApk ? t('phone.this_build_of_duodesk_doesn', null, 'This build of DuoDesk doesn’t carry the Android app.') + : ready ? t('phone.downloaded_cant_read_notifications', { prefix: failedPrefix }, '{prefix}The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay.') + : t('phone.downloaded_cant_read_notifications_wifi', { prefix: failedPrefix }, '{prefix}The DuoDesk you downloaded can’t read the phone’s notifications (Play Protect blocks downloaded apps that can). Install the full app over it: its settings and pairing stay. Needs wireless debugging.')); const settings = ph.settings || {}; sound.set(!!settings.sound); @@ -173,20 +176,20 @@ UI.tab({ arrowSwipe.set(settings.arrowSwipe === true); controls.set(settings.controls || 'top'); via.set(br.input || (settings.input === 'phone' ? 'phone' : 'adb')); - viaRow.setHint(br.inputMode === 'auto' ? (br.state === 'ready' ? 'Automatic: ADB, wireless debugging is ready' : 'Automatic: Accessibility until wireless debugging is ready') - : br.input === 'phone' ? 'DuoDesk on the phone taps and types itself. The phone asks once to allow it in Accessibility' : 'Wireless debugging: full control'); + viaRow.setHint(br.inputMode === 'auto' ? (br.state === 'ready' ? t('cursor.auto_adb_ready', null, 'Automatic: ADB, wireless debugging is ready') : t('phone.automatic_accessibility_until_wireless_debugging', null, 'Automatic: Accessibility until wireless debugging is ready')) + : br.input === 'phone' ? t('phone.duodesk_on_the_phone_taps', null, 'DuoDesk on the phone taps and types itself. The phone asks once to allow it in Accessibility') : t('phone.wireless_debugging_full_control', null, 'Wireless debugging: full control')); // apps (icons come with UI.phoneAssets) const apps = (UI.phoneAssets && UI.phoneAssets.apps) || []; const term = search.value.trim().toLowerCase(); const shown = term ? apps.filter((a) => a.name.toLowerCase().includes(term)) : apps; - appsNote.set(!ready ? 'Apps open in their own windows once wireless debugging is set up.' : !apps.length ? 'Loading the phone’s apps…' : ''); + appsNote.set(!ready ? t('phone.apps_open_in_their_own', null, 'Apps open in their own windows once wireless debugging is set up.') : !apps.length ? t('phone.loading_the_phone_s_apps', null, 'Loading the phone’s apps…') : ''); const ak = JSON.stringify([shown.length, term, ph.assets, ready]); if (ak !== appsKey) { appsKey = ak; grid.replaceChildren(...shown.slice(0, 400).map((a) => { const img = UI.appIcon(a.icon); - const b = el('button', { class: 'app-tile', title: `Open ${a.name} in a window (right-click to pin it to Start)`, disabled: !ready }, [img, el('span', { text: a.name })]); + const b = el('button', { class: 'app-tile', title: t('phone.open_app_in_a_window', { app: a.name }, 'Open {app} in a window (right-click to pin it to Start)'), disabled: !ready }, [img, el('span', { text: a.name })]); b.onclick = () => api.phoneOpenApp({ id: a.id, name: a.name }); b.oncontextmenu = (e) => { e.preventDefault(); api.phoneAppMenu({ id: a.id, name: a.name }); }; // Pin to Start return b; @@ -198,7 +201,7 @@ UI.tab({ const wk = JSON.stringify(wins); if (wk !== winKey) { winKey = wk; - winList.replaceChildren(...wins.map((w) => UI.row(w.kind === 'screen' ? 'Phone screen' : w.title, w.kind === 'screen' ? 'Mirror' : w.app, [UI.button('Close', () => api.phoneCloseView(w.id), 'small')]))); + winList.replaceChildren(...wins.map((w) => UI.row(w.kind === 'screen' ? t('phone.phone_screen', null, 'Phone screen') : w.title, w.kind === 'screen' ? t('phone.mirror', null, 'Mirror') : w.app, [UI.button(t('phone.close', null, 'Close'), () => api.phoneCloseView(w.id), 'small')]))); } } return render; diff --git a/windows/ui-receive.js b/windows/ui-receive.js index 311a56ff..cd0f6f95 100644 --- a/windows/ui-receive.js +++ b/windows/ui-receive.js @@ -23,20 +23,21 @@ UI.tab({ badge: (s) => (s.stream.state === 'on' || (s.stream.remote && s.stream.remote.on) ? 'on' : ''), build(body) { const { el, api } = UI; - const openBtn = UI.button('Open', () => api.openMonitor(), 'primary'); - const winRow = UI.row('Screen window', '', [openBtn]); + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); + const openBtn = UI.button(t('files.open', null, 'Open'), () => api.openMonitor(), 'primary'); + const winRow = UI.row(t('receive.screen_window', null, 'Screen window'), '', [openBtn]); // (as the Mac): one control, the same three choices as on the other computer itself, // kept in step by its screen.state; choosing sends screen.ctl. const mode = UI.segmented([ - { value: 'off', label: 'Off' }, - { value: 'mirror', label: 'Mirror' }, - { value: 'extend', label: 'Extend' }, + { value: 'off', label: t('clipboard.off', null, 'Off') }, + { value: 'mirror', label: t('receive.mirror', null, 'Mirror') }, + { value: 'extend', label: t('receive.extend', null, 'Extend') }, ], (v) => api.remoteScreen(v === 'off' ? { share: false } : { share: true, mode: v })); - const modeRow = UI.row('{Name} shares', '', [mode]); + const modeRow = UI.row(t('receive.name_shares', null, '{Name} shares'), '', [mode]); const volume = UI.slider({ min: 0, max: 1, step: 0.05, format: (v) => Math.round(v * 100) + '%' }, (v) => api.setMonitor({ volume: v })); - const mute = UI.switch((v) => api.setMonitor({ mute: !v }), { label: 'Play sound' }); + const mute = UI.switch((v) => api.setMonitor({ mute: !v }), { label: t('receive.play_sound', null, 'Play sound') }); const paceRow = UI.paceRow(); // One Playback setting, synced with the other computer - const framegen = UI.switch((v) => api.setMonitor({ framegen: v }), { label: 'Frame generation' }); + const framegen = UI.switch((v) => api.setMonitor({ framegen: v }), { label: t('receive.frame_generation', null, 'Frame generation') }); const details = UI.details(['Status', 'Display', 'Picture', 'Speed', 'Round trip', 'Codec', 'Decoder', 'Delay', 'Frames dropped', 'Freezes']); @@ -45,9 +46,9 @@ UI.tab({ winRow, modeRow, paceRow, - UI.row('Frame generation', 'Fills in late or dropped frames, and adds in-between frames when this screen is faster than the stream', [framegen]), - UI.row('Sound', '', [mute, volume]), - UI.row('Full screen', '', [el('kbd', { text: 'F11' })]), + UI.row(t('receive.frame_generation', null, 'Frame generation'), t('receive.fills_in_late_or_dropped_frames', null, 'Fills in late or dropped frames, and adds in-between frames when this screen is faster than the stream'), [framegen]), + UI.row(t('receive.sound', null, 'Sound'), '', [mute, volume]), + UI.row(t('receive.full_screen', null, 'Full screen'), '', [el('kbd', { text: 'F11' })]), ], { cls: 'keep-on' }), details, ); @@ -57,29 +58,29 @@ UI.tab({ const on = st.state === 'on'; const connected = s.link.state === 'connected'; openBtn.disabled = !connected; - openBtn.textContent = st.watching ? 'Show' : 'Open'; + openBtn.textContent = st.watching ? t('receive.show', null, 'Show') : t('files.open', null, 'Open'); const who = UI.peer(s).the; const sharing = on || !!(st.remote && st.remote.on); // on over there, maybe paused while nobody watches const r = st.remote; - winRow.setHint(!connected ? 'Waiting for ' + who : on ? 'Showing ' + st.name : sharing ? 'Sharing on ' + who + '. Open to watch.' - : r && r.remote ? 'Open starts sharing on ' + who : 'Turn on sharing on ' + who); + winRow.setHint(!connected ? t('receive.waiting_for_name', { name: who }, 'Waiting for {name}') : on ? t('receive.showing_name', { name: st.name }, 'Showing {name}') : sharing ? t('receive.sharing_on_name_open_to', { name: who }, 'Sharing on {name}. Open to watch.') + : r && r.remote ? t('receive.open_starts_sharing_on_name', { name: who }, 'Open starts sharing on {name}') : t('receive.turn_on_sharing_on_name', { name: who }, 'Turn on sharing on {name}')); mode.set(r ? (r.on ? r.mode : 'off') : ''); const MODES = ['off', 'mirror', 'extend']; mode.el.querySelectorAll('button').forEach((b, i) => { b.disabled = !connected || !r || !r.remote || (i > 0 && !(r.modes || []).includes(MODES[i])); }); - modeRow.setHint(!connected ? 'Connect to choose from here' - : !r ? 'Update DuoDesk on the other computer to choose from here' - : !r.remote ? 'The other computer doesn’t allow choosing from here' - : r.on ? (r.mode === 'extend' ? 'An extra screen for it, shown here' : 'Its main screen, shown here') : 'Pick Mirror or Extend, or just press Open'); + modeRow.setHint(!connected ? t('receive.connect_to_choose_from_here', null, 'Connect to choose from here') + : !r ? t('receive.update_duodesk_on_the_other', null, 'Update DuoDesk on the other computer to choose from here') + : !r.remote ? t('receive.the_other_computer_doesn_t', null, 'The other computer doesn’t allow choosing from here') + : r.on ? (r.mode === 'extend' ? t('receive.an_extra_screen_for_it', null, 'An extra screen for it, shown here') : t('receive.its_main_screen_shown_here', null, 'Its main screen, shown here')) : t('receive.pick_mirror_or_extend_or', null, 'Pick Mirror or Extend, or just press Open')); mute.set(!s.monitor.mute); volume.set(s.monitor.volume); paceRow.render(s); framegen.set(s.monitor.framegen); const x = on && st.stats; details.set({ - Status: !connected ? 'Not connected' : !on ? (sharing ? 'Paused, nobody watching' : 'Off') : s.macInput ? 'Live' : 'Live, view only', + Status: !connected ? t('sidebar.not_connected', null, 'Not connected') : !on ? (sharing ? t('receive.paused_nobody_watching', null, 'Paused, nobody watching') : t('clipboard.off', null, 'Off')) : s.macInput ? t('receive.live', null, 'Live') : t('receive.live_view_only', null, 'Live, view only'), Display: on ? st.name + (st.width ? ', ' + st.width + ' × ' + st.height : x ? ', ' + x.width + ' × ' + x.height : '') : '', Picture: x ? x.width + ' × ' + x.height + ', ' + x.fps + ' fps' : '', - Speed: x ? x.mbps + ' Mbps received' : '', + Speed: x ? t('receive.mbps_received', { mbps: x.mbps }, '{mbps} Mbps received') : '', 'Round trip': x && x.rttMs != null ? x.rttMs + ' ms' : '', Codec: x ? x.codec.toUpperCase() : '', Decoder: x && x.decoder ? UI.codecImpl(x.decoder, x.hw) : '', diff --git a/windows/ui-setup.js b/windows/ui-setup.js index b161dfd3..40417bfc 100644 --- a/windows/ui-setup.js +++ b/windows/ui-setup.js @@ -7,60 +7,69 @@ UI.setup = (() => { const { el, api } = UI; - const done = () => el('span', { class: 'pill good', text: 'Done' }); + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); - const fwFix = UI.button('Fix', () => api.fixFirewall(), 'small primary'); - const fwDone = done(); - const fwRow = UI.row('Firewall and network', '', [fwFix, fwDone]); - const helperPill = el('span', { class: 'pill bad', text: 'Not running' }); - const helperDone = done(); - const helperRow = UI.row('Mouse and keyboard helper', '', [helperPill, helperDone]); - const drvBtn = UI.button('Install', () => api.installVdd(), 'small'); - const drvDone = done(); - const drvRow = UI.row('DuoDesk virtual display', '', [drvBtn, drvDone]); + // Built on first use, not at load: this file runs before app.js picks the language. + const make = () => { + const done = () => el('span', { class: 'pill good', text: t('setup.done', null, 'Done') }); - const page = el('section', { class: 'setup-page', hidden: true }, [ - el('div', { class: 'app-mark', attrs: { 'aria-hidden': 'true' } }), - el('h1', { text: 'Set up DuoDesk' }), - el('p', { text: 'A few things before {me} can share with the other computer.' }), - UI.card('', [fwRow, helperRow, drvRow]), - el('div', { class: 'setup-foot' }, [ - el('span', { class: 'hint', text: 'You can change these later in General and Display.' }), - UI.button('Skip for now', () => api.skipSetup(), ''), - ]), - ]); + const fwFix = UI.button(t('setup.fix', null, 'Fix'), () => api.fixFirewall(), 'small primary'); + const fwDone = done(); + const fwRow = UI.row(t('setup.firewall_and_network', null, 'Firewall and network'), '', [fwFix, fwDone]); + const helperPill = el('span', { class: 'pill bad', text: t('setup.not_running', null, 'Not running') }); + const helperDone = done(); + const helperRow = UI.row(t('setup.mouse_and_keyboard_helper', null, 'Mouse and keyboard helper'), '', [helperPill, helperDone]); + const drvBtn = UI.button(t('setup.install', null, 'Install'), () => api.installVdd(), 'small'); + const drvDone = done(); + const drvRow = UI.row(t('setup.duodesk_virtual_display', null, 'DuoDesk virtual display'), '', [drvBtn, drvDone]); - // Rows stay once shown (with Done when fixed), so the page doesn't jump while you work through it. - const shown = new Set(); + const page = el('section', { class: 'setup-page', hidden: true }, [ + el('div', { class: 'app-mark', attrs: { 'aria-hidden': 'true' } }), + el('h1', { text: t('setup.set_up_duodesk', null, 'Set up DuoDesk') }), + el('p', { text: t('setup.a_few_things_before_me', null, 'A few things before {me} can share with the other computer.') }), + UI.card('', [fwRow, helperRow, drvRow]), + el('div', { class: 'setup-foot' }, [ + el('span', { class: 'hint', text: t('setup.you_can_change_these_later', null, 'You can change these later in General and Display.') }), + UI.button(t('setup.skip_for_now', null, 'Skip for now'), () => api.skipSetup(), ''), + ]), + ]); - function render(s) { - page.hidden = !s.setup.show; - document.body.classList.toggle('setup', !page.hidden); - if (page.hidden) return; - for (const m of s.setup.missing) shown.add(m); + // Rows stay once shown (with Done when fixed), so the page doesn't jump while you work through it. + const shown = new Set(); - const fw = s.firewall || {}; - const fwBad = s.setup.missing.includes('firewall'); - fwRow.hidden = !shown.has('firewall'); - fwRow.setHint(fw.checking ? 'Checking…' : fwBad ? (fw.message || '') + ' Fix asks for administrator rights once.' : ''); - fwFix.hidden = !fwBad || fw.checking; - fwDone.hidden = fwBad || fw.checking; + function render(s) { + page.hidden = !s.setup.show; + document.body.classList.toggle('setup', !page.hidden); + if (page.hidden) return; + for (const m of s.setup.missing) shown.add(m); - const h = s.kvmState.helper; - const helperBad = s.setup.missing.includes('helper'); - helperRow.hidden = !shown.has('helper'); - helperRow.setHint(helperBad ? h + '. Restart DuoDesk if it stays like this.' : ''); - helperPill.hidden = !helperBad; - helperDone.hidden = helperBad; + const fw = s.firewall || {}; + const fwBad = s.setup.missing.includes('firewall'); + fwRow.hidden = !shown.has('firewall'); + fwRow.setHint(fw.checking ? t('setup.checking', null, 'Checking…') : fwBad ? t('setup.message_fix_asks_for_administrator', { message: fw.message || '' }, '{message} Fix asks for administrator rights once.') : ''); + fwFix.hidden = !fwBad || fw.checking; + fwDone.hidden = fwBad || fw.checking; - const v = s.pcScreen.vdd; - const drvBad = s.setup.missing.includes('driver'); - drvRow.hidden = !shown.has('driver'); - drvRow.setHint(v.busy === 'install' ? 'Installing…' : drvBad ? 'Optional. Adds an extra screen for the other computer (Extend). Installs a display driver and asks for administrator rights once.' : ''); - drvBtn.hidden = !drvBad; - drvBtn.disabled = !!v.busy; - drvDone.hidden = drvBad; - } + const h = s.kvmState.helper; + const helperBad = s.setup.missing.includes('helper'); + helperRow.hidden = !shown.has('helper'); + helperRow.setHint(helperBad ? t('setup.status_restart_duodesk_if_it', { status: h }, '{status}. Restart DuoDesk if it stays like this.') : ''); + helperPill.hidden = !helperBad; + helperDone.hidden = helperBad; - return { page, render }; + const v = s.pcScreen.vdd; + const drvBad = s.setup.missing.includes('driver'); + drvRow.hidden = !shown.has('driver'); + drvRow.setHint(v.busy === 'install' ? t('setup.installing', null, 'Installing…') : drvBad ? t('setup.optional_adds_an_extra_screen', null, 'Optional. Adds an extra screen for the other computer (Extend). Installs a display driver and asks for administrator rights once.') : ''); + drvBtn.hidden = !drvBad; + drvBtn.disabled = !!v.busy; + drvDone.hidden = drvBad; + } + + return { page, render }; + }; + + let ui = null; + const get = () => ui || (ui = make()); + return { get page() { return get().page; }, render: (s) => get().render(s) }; })(); diff --git a/windows/ui-share.js b/windows/ui-share.js index 73f5376b..65e8a320 100644 --- a/windows/ui-share.js +++ b/windows/ui-share.js @@ -16,57 +16,58 @@ UI.tab({ badge: (s) => (s.pcScreen.status === 'live' ? 'on' : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); const set = (partial) => api.setPcScreen(partial); const mode = UI.segmented([ - { value: 'off', label: 'Off' }, - { value: 'extend', label: 'Extend' }, - { value: 'mirror', label: 'Mirror' }, + { value: 'off', label: t('clipboard.off', null, 'Off') }, + { value: 'extend', label: t('share.extend', null, 'Extend') }, + { value: 'mirror', label: t('share.mirror', null, 'Mirror') }, ], (v) => api.setPcScreenMode(v)); const monitor = UI.select([], (v) => set({ monitor: v })); const extendSize = UI.select([ - { value: 'mac', label: 'Same as the other screen' }, + { value: 'mac', label: t('share.same_as_the_other_screen', null, 'Same as the other screen') }, { value: '1920x1080', label: '1920 × 1080' }, { value: '2560x1440', label: '2560 × 1440' }, { value: '3840x2160', label: '3840 × 2160' }, ], (v) => set({ extendSize: v })); const streamSize = UI.select([ - { value: 1080, label: '1080p (1920 × 1080), fastest' }, - { value: 1440, label: '1440p (2560 × 1440), sharper' }, - { value: 0, label: 'Full size' }, + { value: 1080, label: t('share.1080p_1920_1080_fastest', null, '1080p (1920 × 1080), fastest') }, + { value: 1440, label: t('share.1440p_2560_1440_sharper', null, '1440p (2560 × 1440), sharper') }, + { value: 0, label: t('share.full_size', null, 'Full size') }, ], (v) => set({ maxHeight: Number(v) })); const quality = UI.select([ - { value: 10, label: 'Low, 10 Mbps' }, - { value: 20, label: 'Medium, 20 Mbps' }, - { value: 30, label: 'High, 30 Mbps' }, - { value: 50, label: 'Best, 50 Mbps (wired)' }, + { value: 10, label: t('share.low_10_mbps', null, 'Low, 10 Mbps') }, + { value: 20, label: t('share.medium_20_mbps', null, 'Medium, 20 Mbps') }, + { value: 30, label: t('share.high_30_mbps', null, 'High, 30 Mbps') }, + { value: 50, label: t('share.best_50_mbps_wired', null, 'Best, 50 Mbps (wired)') }, ], (v) => set({ mbps: Number(v) })); const paceRow = UI.paceRow(); // One Playback setting, synced with the other computer - const sound = UI.switch((v) => set({ sound: v }), { label: 'Include sound' }); - const input = UI.switch((v) => set({ input: v }), { label: 'Receive input' }); - const inputRow = UI.row('Receive input', '', [input]); // "Receive input from Mac" / "from PC2" - const remote = UI.switch((v) => set({ remote: v }), { label: 'Remote start' }); - const remoteRow = UI.row('Let the other computer start and switch this screen', '', [remote]); // screen.ctl + const sound = UI.switch((v) => set({ sound: v }), { label: t('share.include_sound', null, 'Include sound') }); + const input = UI.switch((v) => set({ input: v }), { label: t('share.receive_input', null, 'Receive input') }); + const inputRow = UI.row(t('share.receive_input', null, 'Receive input'), '', [input]); // "Receive input from Mac" / "from PC2" + const remote = UI.switch((v) => set({ remote: v }), { label: t('share.remote_start', null, 'Remote start') }); + const remoteRow = UI.row(t('share.let_the_other_computer_start', null, 'Let the other computer start and switch this screen'), '', [remote]); // screen.ctl - const monitorRow = UI.row('Display', '', [monitor]); - const extendRow = UI.row('Size', '', [extendSize]); + const monitorRow = UI.row(t('share.display', null, 'Display'), '', [monitor]); + const extendRow = UI.row(t('share.size', null, 'Size'), '', [extendSize]); const details = UI.details(['Status', 'Display', 'Picture', 'Speed', 'Round trip', 'Codec', 'Encoder', 'Frames dropped']); - const installBtn = UI.button('Install', () => api.installVdd(), 'small primary'); - const removeBtn = UI.button('Remove', () => api.removeVdd(), 'small'); - const driver = UI.row('DuoDesk virtual display', '', [installBtn, removeBtn]); // Extend's screen, from the Virtual Display Driver (vdd.js) + const installBtn = UI.button(t('share.install', null, 'Install'), () => api.installVdd(), 'small primary'); + const removeBtn = UI.button(t('share.remove', null, 'Remove'), () => api.removeVdd(), 'small'); + const driver = UI.row(t('share.duodesk_virtual_display', null, 'DuoDesk virtual display'), '', [installBtn, removeBtn]); // Extend's screen, from the Virtual Display Driver (vdd.js) const note = UI.note('bad', ''); // No driver: Extend is greyed out; say why, with Install right there. - const missingBtn = UI.button('Install', () => api.installVdd(), 'small primary'); - const missing = el('div', { class: 'note warn' }, [el('span', { text: 'Virtual display driver not installed. Install it to use Extend.' }), missingBtn]); + const missingBtn = UI.button(t('share.install', null, 'Install'), () => api.installVdd(), 'small primary'); + const missing = el('div', { class: 'note warn' }, [el('span', { text: t('share.virtual_display_driver_not_installed', null, 'Virtual display driver not installed. Install it to use Extend.') }), missingBtn]); missing.style.alignItems = 'center'; missing.style.justifyContent = 'space-between'; body.append( missing, - UI.card('Screen', [UI.row('Mode', '', [mode]), monitorRow, extendRow]), - UI.card('Picture', [UI.row('Resolution', '', [streamSize]), UI.row('Quality', '', [quality]), paceRow], { cls: 'keep-on' }), - UI.card('Sound and control', [UI.row('Include sound', '', [sound]), inputRow], { cls: 'keep-on' }), - UI.card('Remote', [remoteRow], { cls: 'keep-on' }), + UI.card(t('share.screen', null, 'Screen'), [UI.row(t('share.mode', null, 'Mode'), '', [mode]), monitorRow, extendRow]), + UI.card(t('clipboard.picture', null, 'Picture'), [UI.row(t('share.resolution', null, 'Resolution'), '', [streamSize]), UI.row(t('share.quality', null, 'Quality'), '', [quality]), paceRow], { cls: 'keep-on' }), + UI.card(t('share.sound_and_control', null, 'Sound and control'), [UI.row(t('share.include_sound', null, 'Include sound'), '', [sound]), inputRow], { cls: 'keep-on' }), + UI.card(t('nav.remote', null, 'Remote'), [remoteRow], { cls: 'keep-on' }), details, UI.card('', [driver, note], { cls: 'keep-on' }), ); @@ -94,12 +95,13 @@ UI.tab({ const st = p.status === 'live' && p.stats; const who = UI.peer(s).the; const mon = p.monitors.find((m) => m.id === p.monitor) || p.monitors.find((m) => /\(main\)$/.test(m.label)) || p.monitors[0]; + const state = !on ? t('clipboard.off', null, 'Off') : p.busy ? t('share.starting_the_extra_screen', null, 'Starting the extra screen…') : p.status === 'live' ? t('share.on_name', { name: who }, 'On {name}') + : !connected ? t('share.waiting_for_name', { name: who }, 'Waiting for {name}') : !p.mac.accept ? t('share.ready_starts_when_name_opens', { name: who }, 'Ready, starts when {name} opens it') : t('sidebar.connecting', null, 'Connecting…'); details.set({ - Status: (!on ? 'Off' : p.busy ? 'Starting the extra screen…' : p.status === 'live' ? 'On ' + who - : !connected ? 'Waiting for ' + who : !p.mac.accept ? 'Ready, starts when ' + who + ' opens it' : 'Connecting…') + (p.error ? ': ' + p.error : ''), - Display: !on ? '' : p.mode === 'extend' ? `DuoDesk virtual display, ${p.extendPx[0]} × ${p.extendPx[1]}` : mon ? mon.label : '', + Status: p.error ? t('share.status_error', { status: state, error: p.error }, '{status}: {error}') : state, + Display: !on ? '' : p.mode === 'extend' ? t('share.virtual_display_size', { width: p.extendPx[0], height: p.extendPx[1] }, 'DuoDesk virtual display, {width} × {height}') : mon ? mon.label : '', Picture: st ? `${st.width} × ${st.height}, ${st.fps} fps` : '', - Speed: st ? `${st.mbps} Mbps sent` + (st.targetMbps ? `, network allows ${st.targetMbps}` : '') : '', + Speed: st ? (st.targetMbps ? t('share.mbps_sent_network_allows', { mbps: st.mbps, target: st.targetMbps }, '{mbps} Mbps sent, network allows {target}') : t('share.mbps_sent', { mbps: st.mbps }, '{mbps} Mbps sent')) : '', 'Round trip': st && st.rttMs != null ? st.rttMs + ' ms' : '', Codec: st && st.codec ? st.codec.toUpperCase() : '', Encoder: st && st.encoder ? UI.codecImpl(st.encoder, st.hw) : '', @@ -108,16 +110,16 @@ UI.tab({ missing.hidden = !v.checked || v.installed; missingBtn.disabled = !!v.busy; - missingBtn.textContent = v.busy === 'install' ? 'Installing…' : 'Install'; + missingBtn.textContent = v.busy === 'install' ? t('share.installing', null, 'Installing…') : t('share.install', null, 'Install'); installBtn.hidden = v.installed; installBtn.disabled = !!v.busy || !v.checked; - installBtn.textContent = v.busy === 'install' ? 'Installing…' : 'Install'; + installBtn.textContent = v.busy === 'install' ? t('share.installing', null, 'Installing…') : t('share.install', null, 'Install'); removeBtn.hidden = !v.installed; removeBtn.disabled = !!v.busy || p.mode === 'extend'; - driver.setHint(v.busy === 'remove' ? 'Removing…' : v.busy === 'install' ? 'Installing…' : v.installed ? 'Installed. Adds the extra screen for Extend.' : 'Adds an extra screen for Extend. Installs a display driver and asks for administrator rights once.'); - inputRow.label.textContent = 'Receive input from ' + UI.peer(s).them; - remoteRow.label.textContent = 'Let ' + UI.peer(s).the + ' start and switch this screen'; - remoteRow.setHint(p.remote ? 'Opening the screen window there starts sharing; Extend and Mirror can be switched from there.' : ''); + driver.setHint(v.busy === 'remove' ? t('files.removing', null, 'Removing…') : v.busy === 'install' ? t('share.installing', null, 'Installing…') : v.installed ? t('share.installed_adds_the_extra_screen', null, 'Installed. Adds the extra screen for Extend.') : t('share.adds_an_extra_screen_for', null, 'Adds an extra screen for Extend. Installs a display driver and asks for administrator rights once.')); + inputRow.label.textContent = t('share.receive_input_from_name', { name: UI.peer(s).them }, 'Receive input from {name}'); + remoteRow.label.textContent = t('share.let_name_start_and_switch', { name: UI.peer(s).the }, 'Let {name} start and switch this screen'); + remoteRow.setHint(p.remote ? t('share.opening_the_screen_window_there', null, 'Opening the screen window there starts sharing; Extend and Mirror can be switched from there.') : ''); note.set(v.message); }; }, diff --git a/windows/ui-terminal.js b/windows/ui-terminal.js index 5b6617ca..1a8beaf3 100644 --- a/windows/ui-terminal.js +++ b/windows/ui-terminal.js @@ -15,46 +15,47 @@ UI.tab({ badge: (s) => (s.terminal.status === 'unavailable' || s.terminal.status === 'error' ? 'warn' : s.terminal.status === 'ready' || (s.terminal.server.info && s.terminal.server.info.enabled) ? 'on' : ''), build(body) { const { el, api } = UI; + const t = (k, p, d) => (typeof window.t === 'function' ? window.t(k, p, d) : d !== undefined ? d : k); // Mac → PC (server here) const srvPill = el('span', { class: 'pill' }); - const setupBtn = UI.button('Set up', () => api.setupSshd(), 'small primary'); - const srvRow = UI.row('SSH server', '', [srvPill, setupBtn]); + const setupBtn = UI.button(t('terminal.set_up', null, 'Set up'), () => api.setupSshd(), 'small primary'); + const srvRow = UI.row(t('terminal.ssh_server', null, 'SSH server'), '', [srvPill, setupBtn]); const macRow = UI.row('', ''); // PC → Mac (client here) const pill = el('span', { class: 'pill' }); - const openBtn = UI.button('Open Terminal', () => api.openTerminal(), 'small primary'); - const status = UI.row('Shell on {name}', '', [pill, openBtn]); - const cmdRow = UI.row('In any terminal', '', [el('code', { class: 'mono', text: 'ssh duodesk' })]); + const openBtn = UI.button(t('terminal.open_terminal', null, 'Open Terminal'), () => api.openTerminal(), 'small primary'); + const status = UI.row(t('terminal.shell_on_name', null, 'Shell on {name}'), '', [pill, openBtn]); + const cmdRow = UI.row(t('terminal.in_any_terminal', null, 'In any terminal'), '', [el('code', { class: 'mono', text: 'ssh duodesk' })]); const pair = UI.dirCards( - { on: { get: (s) => s.terminal.allowMac, set: (v) => api.setTerminal({ allowMac: v }) }, label: 'Let {name} open a terminal on {me}', rows: [ + { on: { get: (s) => s.terminal.allowMac, set: (v) => api.setTerminal({ allowMac: v }) }, label: t('terminal.let_name_open_a_terminal', null, 'Let {name} open a terminal on {me}'), rows: [ srvRow, macRow, ] }, - { on: { get: (s) => s.terminal.enabled, set: (v) => api.setTerminal({ enabled: v }) }, label: 'Open a terminal on {name} from {me}', rows: [ + { on: { get: (s) => s.terminal.enabled, set: (v) => api.setTerminal({ enabled: v }) }, label: t('terminal.open_a_terminal_on_name', null, 'Open a terminal on {name} from {me}'), rows: [ status, cmdRow, ] }, ); body.append(pair.el); - const TEXT = { off: 'Off', no_mac: 'Waiting for {name}', waiting: 'Asking {name}…', ready: 'Ready', unavailable: 'Not available', error: 'Problem' }; - const SRV = { running: 'Running', stopped: 'Stopped', missing: 'Not installed', unknown: '' }; + const TEXT = { off: t('clipboard.off', null, 'Off'), no_mac: t('terminal.waiting_for_name', null, 'Waiting for {name}'), waiting: t('terminal.asking_name', null, 'Asking {name}…'), ready: t('terminal.ready', null, 'Ready'), unavailable: t('terminal.not_available', null, 'Not available'), error: t('files.problem', null, 'Problem') }; + const SRV = { running: t('terminal.running', null, 'Running'), stopped: t('terminal.stopped', null, 'Stopped'), missing: t('terminal.not_installed', null, 'Not installed'), unknown: '' }; return (s) => { - const t = s.terminal; - const v = t.server; + const tm = s.terminal; + const v = tm.server; pair.update(s); - srvPill.textContent = v.busy ? 'Setting up…' : SRV[v.service] || v.service; + srvPill.textContent = v.busy ? t('files.setting_up', null, 'Setting up…') : SRV[v.service] || v.service; srvPill.className = 'pill ' + (v.service === 'running' ? 'good' : v.busy ? 'muted' : 'bad'); - setupBtn.hidden = v.service === 'running' || v.busy || !t.allowMac; - srvRow.setHint(v.message || (v.service === 'running' ? '' : 'Asks for administrator rights once')); - macRow.hidden = !t.allowMac; - macRow.label.textContent = v.info && v.info.enabled ? 'Ready' : v.macAsked ? 'Not ready yet' : 'Waiting for {name}'; - macRow.setHint(v.macAsked && !(v.info && v.info.enabled) && v.service !== 'running' ? 'Set up the SSH server first' : ''); + setupBtn.hidden = v.service === 'running' || v.busy || !tm.allowMac; + srvRow.setHint(v.message || (v.service === 'running' ? '' : t('terminal.asks_for_administrator_rights_once', null, 'Asks for administrator rights once'))); + macRow.hidden = !tm.allowMac; + macRow.label.textContent = v.info && v.info.enabled ? t('terminal.ready', null, 'Ready') : v.macAsked ? t('terminal.not_ready_yet', null, 'Not ready yet') : t('terminal.waiting_for_name', null, 'Waiting for {name}'); + macRow.setHint(v.macAsked && !(v.info && v.info.enabled) && v.service !== 'running' ? t('terminal.set_up_the_ssh_server_first', null, 'Set up the SSH server first') : ''); - pill.textContent = TEXT[t.status] || t.status; - pill.className = 'pill ' + (t.status === 'ready' ? 'good' : t.status === 'unavailable' || t.status === 'error' ? 'bad' : 'muted'); - openBtn.disabled = t.status !== 'ready'; - status.setHint(t.message || (t.status === 'ready' ? 'As ' + t.user : t.status === 'unavailable' ? (UI.peer(s).os === 'mac' ? 'Turn on Remote Login on {name}' : 'Set up the SSH server on {name}') : '')); - cmdRow.hidden = t.status !== 'ready'; + pill.textContent = TEXT[tm.status] || tm.status; + pill.className = 'pill ' + (tm.status === 'ready' ? 'good' : tm.status === 'unavailable' || tm.status === 'error' ? 'bad' : 'muted'); + openBtn.disabled = tm.status !== 'ready'; + status.setHint(tm.message || (tm.status === 'ready' ? t('terminal.as_user', { user: tm.user }, 'As {user}') : tm.status === 'unavailable' ? (UI.peer(s).os === 'mac' ? t('terminal.turn_on_remote_login_on', null, 'Turn on Remote Login on {name}') : t('terminal.set_up_the_ssh_server_on_name', null, 'Set up the SSH server on {name}')) : '')); + cmdRow.hidden = tm.status !== 'ready'; }; }, }); diff --git a/windows/vcam.js b/windows/vcam.js index af96aadb..f1b3e626 100644 --- a/windows/vcam.js +++ b/windows/vcam.js @@ -15,6 +15,8 @@ const fs = require('fs'); const os = require('os'); const path = require('path'); const { scriptElevated } = require('./ps'); +const i18n = require('../shared/i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); const BIN = path.join(__dirname, '..', 'windows-helper', 'bin'); const EXE = path.join(BIN, 'twindesk-vcam.exe'); @@ -58,13 +60,13 @@ const driver = { name: 'DuoDesk Camera', async check() { - if (Number((os.release().split('.')[2]) || 0) < 22000) return { supported: false, message: 'Needs Windows 11: Windows 10 has no virtual cameras' }; - if (!fs.existsSync(EXE) || !fs.existsSync(DLL)) return { supported: false, message: 'Not in this build of DuoDesk' }; + if (Number((os.release().split('.')[2]) || 0) < 22000) return { supported: false, message: tr('win_vcam.needs_win11', null, 'Needs Windows 11: Windows 10 has no virtual cameras') }; + if (!fs.existsSync(EXE) || !fs.existsSync(DLL)) return { supported: false, message: tr('win_vcam.not_in_build', null, 'Not in this build of DuoDesk') }; const [reg, st] = await Promise.all([registered(), exe('status')]); if (reg && st.camera === true) return { supported: true, installed: true }; // Only the old "TwinDesk Camera": installed again (renamed) once per start; until then it works as it is. if (st.camera !== true && st.legacy === true) { - return migrating ? { supported: true, installed: true, message: 'Still named “TwinDesk Camera” here: it’s renamed at the next start' } : { supported: true, installed: false }; + return migrating ? { supported: true, installed: true, message: tr('win_vcam.still_legacy_name', null, 'Still named “TwinDesk Camera” here: it’s renamed at the next start') } : { supported: true, installed: false }; } return { supported: true, installed: false }; }, @@ -91,16 +93,16 @@ const driver = { try { await scriptElevated('vcam-install', { Dll: DLL, Name: dllName(), Log: log }, 120000); } catch (e) { - throw new Error(/cancel/i.test(e.message) ? 'The administrator prompt was declined' : e.message); + throw new Error(/cancel/i.test(e.message) ? tr('vdd.admin_declined', null, 'The administrator prompt was declined') : e.message); } - const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: the setup didn’t finish'; + const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: ' + tr('win_vcam.setup_unfinished', null, 'the setup didn’t finish'); try { fs.unlinkSync(log); } catch {} if (r !== 'ok') throw new Error(r.replace(/^error: /, '')); } const st = await exe('status'); if (st.camera !== true) { const r = await exe('add'); - if (!r.ok) throw new Error('Windows didn’t add the camera: ' + (r.error || 'unknown')); + if (!r.ok) throw new Error(tr('win_vcam.didnt_add', { error: r.error || 'unknown' }, 'Windows didn’t add the camera: ' + (r.error || 'unknown'))); } }, diff --git a/windows/vdd.js b/windows/vdd.js index 25cc2ae9..a6cedabb 100644 --- a/windows/vdd.js +++ b/windows/vdd.js @@ -10,6 +10,8 @@ const fs = require('fs'); const path = require('path'); const { script, scriptElevated } = require('./ps'); const Helper = require('./helper'); +const i18n = require('../shared/i18n.js'); +const tr = (k, p, d) => i18n.t(k, p, d); // Pinned release, driver package only: the "x86" one is x64 despite its name (see the project's // silent-install.ps1). Windows on ARM needs the ARM64 one (same files and settings layout). @@ -48,7 +50,7 @@ class Vdd { this._set({ checked: true, installed: !!(r.device && r.tasks), on: r.status === 'OK' }); if (this.state.installed && this.state.on && !this.wanted) await this.setOn(false); } catch (e) { - this._set({ checked: true, message: 'Couldn’t check the display driver: ' + e.message }); + this._set({ checked: true, message: tr('vdd.check_failed', { error: e.message }, 'Couldn’t check the display driver: ' + e.message) }); } } @@ -63,18 +65,18 @@ class Vdd { // ask WMI: Win32_Processor.Architecture 12 = ARM64. let sid; [sid, cpu] = (await script('vdd-whoami')).trim().split(/\s+/); - if (!/^S-1-[\d-]+$/.test(sid)) throw new Error('couldn’t read this account’s id'); + if (!/^S-1-[\d-]+$/.test(sid)) throw new Error(tr('win_vdd.cant_read_account', null, 'couldn’t read this account’s id')); const driver = DRIVERS[cpu === '12' ? 'arm64' : 'x64']; await scriptElevated('vdd-install', { Helper: Helper.EXE, UserSid: sid, Log: log, Url: driver.url, Sha256: driver.sha256 }, 300000); - const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: the setup didn’t finish'; + const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: ' + tr('win_vcam.setup_unfinished', null, 'the setup didn’t finish'); if (r !== 'ok') throw new Error(r.replace(/^error: /, '')); this.state.message = ''; } catch (e) { - if (/cancel/i.test(e.message)) this.state.message = 'The administrator prompt was declined'; + if (/cancel/i.test(e.message)) this.state.message = tr('vdd.admin_declined', null, 'The administrator prompt was declined'); // Windows on ARM takes only Microsoft-signed drivers; the ARM64 build is signed by SignPath // only (VirtualDrivers/Virtual-Display-Driver#465). Install works again once a signed one is pinned. - else if (cpu === '12' && /800B0109/.test(e.message)) this.state.message = 'Extend isn’t available on Windows on ARM yet: Windows there accepts only Microsoft-signed display drivers, and the virtual display driver’s ARM64 build isn’t one (Virtual-Display-Driver#465)'; - else this.state.message = 'Installing the display driver failed: ' + e.message; + else if (cpu === '12' && /800B0109/.test(e.message)) this.state.message = tr('vdd.arm_unsupported', null, 'Extend isn’t available on Windows on ARM yet: Windows there accepts only Microsoft-signed display drivers, and the virtual display driver’s ARM64 build isn’t one (Virtual-Display-Driver#465)'); + else this.state.message = tr('vdd.install_failed', { error: e.message }, 'Installing the display driver failed: ' + e.message); } finally { try { fs.unlinkSync(log); } catch (_) { /* none */ } this.state.busy = ''; @@ -89,10 +91,10 @@ class Vdd { try { if (this.state.on) await this.setOn(false); await scriptElevated('vdd-remove', { Log: log }, 120000); - const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: it didn’t finish'; + const r = fs.existsSync(log) ? fs.readFileSync(log, 'utf8').trim() : 'error: ' + tr('win_vdd.didnt_finish', null, 'it didn’t finish'); if (r !== 'ok') throw new Error(r.replace(/^error: /, '')); } catch (e) { - this.state.message = /cancel/i.test(e.message) ? 'The administrator prompt was declined' : 'Removing the display driver failed: ' + e.message; + this.state.message = /cancel/i.test(e.message) ? tr('vdd.admin_declined', null, 'The administrator prompt was declined') : tr('win_vdd.remove_failed', { error: e.message }, 'Removing the display driver failed: ' + e.message); } finally { try { fs.unlinkSync(log); } catch (_) { /* none */ } this.state.busy = ''; @@ -107,7 +109,7 @@ class Vdd { if (!this.state.installed) return false; await new Promise((resolve) => execFile(SCHTASKS, ['/run', '/tn', on ? '\\MacShare\\Extend on' : '\\MacShare\\Extend off'], { windowsHide: true, timeout: 15000 }, (err) => { - if (err) this.state.message = 'Couldn’t switch the virtual monitor: ' + String(err.message).split('\n')[0]; + if (err) this.state.message = tr('vdd.switch_failed', { error: String(err.message).split('\n')[0] }, 'Couldn’t switch the virtual monitor: ' + String(err.message).split('\n')[0]); resolve(); })); const until = Date.now() + 20000; @@ -121,7 +123,7 @@ class Vdd { // remembers that per set of monitors). The helper extends only then. if (on) await this.helper.request('displayExtend', { monitor: MONITOR_ID }).catch(() => {}); if (Date.now() > until) { - this._set({ message: on ? 'The virtual monitor didn’t appear' : 'The virtual monitor didn’t go away' }); + this._set({ message: on ? tr('win_vdd.didnt_appear', null, 'The virtual monitor didn’t appear') : tr('win_vdd.didnt_go_away', null, 'The virtual monitor didn’t go away') }); return false; } await new Promise((r) => setTimeout(r, 500)); From 0cc2260046acf59c38f06b981676255363e0d392 Mon Sep 17 00:00:00 2001 From: Mau Date: Sun, 1 Nov 2026 11:44:28 -0300 Subject: [PATCH 3/4] =?UTF-8?q?feat(windows):=20ask=20for=20the=20installe?= =?UTF-8?q?r=20language=20(English=20or=20Portugu=C3=AAs)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- windows/installer/build.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/windows/installer/build.js b/windows/installer/build.js index fb2596f1..5ec63ab7 100644 --- a/windows/installer/build.js +++ b/windows/installer/build.js @@ -144,6 +144,10 @@ async function pack(arch) { uninstallerIcon: path.join(__dirname, 'icon.ico'), license: path.join(ROOT, 'LICENSE'), include: path.join(__dirname, 'installer.nsh'), + // Installer language: asks on start, English or Brazilian Portuguese (installer screens only). + multiLanguageInstaller: true, + displayLanguageSelector: true, + installerLanguages: ['en_US', 'pt_BR'], shortcutName: 'DuoDesk', createDesktopShortcut: true, createStartMenuShortcut: true, From 0ed68c61a0e1a25a26e5d6dd644690c9372c78ad Mon Sep 17 00:00:00 2001 From: Mau Date: Sun, 1 Nov 2026 11:49:33 -0300 Subject: [PATCH 4/4] chore(desktop): version 2.6.0; the installer's language becomes the app's Co-Authored-By: Claude Sonnet 5.5 --- linux/package-lock.json | 4 ++-- linux/package.json | 2 +- mac/package-lock.json | 4 ++-- mac/package.json | 2 +- windows/installer/installer.nsh | 14 ++++++++++++++ windows/main.js | 11 +++++++++++ windows/package-lock.json | 4 ++-- windows/package.json | 2 +- 8 files changed, 34 insertions(+), 9 deletions(-) diff --git a/linux/package-lock.json b/linux/package-lock.json index f0d8bcf5..144247c2 100644 --- a/linux/package-lock.json +++ b/linux/package-lock.json @@ -1,12 +1,12 @@ { "name": "macshare-linux", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "macshare-linux", - "version": "2.5.0", + "version": "2.6.0", "license": "GPL-3.0", "dependencies": { "ws": "^8.18.0" diff --git a/linux/package.json b/linux/package.json index ca29fb47..4bcb9824 100644 --- a/linux/package.json +++ b/linux/package.json @@ -1,7 +1,7 @@ { "name": "macshare-linux", "productName": "DuoDesk", - "version": "2.5.0", + "version": "2.6.0", "description": "DuoDesk for Linux: share mouse, keyboard, clipboard, files, sound and screens with a Mac, a PC or another Linux computer.", "license": "GPL-3.0", "author": "0xCodez (https://github.com/0xCodez)", diff --git a/mac/package-lock.json b/mac/package-lock.json index 9f6c167e..6ead1ff7 100644 --- a/mac/package-lock.json +++ b/mac/package-lock.json @@ -1,12 +1,12 @@ { "name": "macshare-mac", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "macshare-mac", - "version": "2.5.0", + "version": "2.6.0", "license": "GPL-3.0", "dependencies": { "ws": "^8.22.0" diff --git a/mac/package.json b/mac/package.json index 0fa79743..7f799a78 100644 --- a/mac/package.json +++ b/mac/package.json @@ -1,7 +1,7 @@ { "name": "macshare-mac", "productName": "DuoDesk", - "version": "2.5.0", + "version": "2.6.0", "description": "DuoDesk — the Mac side: pairing, secure link, screen sharing and shared mouse/keyboard with a Windows PC.", "license": "GPL-3.0", "author": "0xCodez (https://github.com/0xCodez)", diff --git a/windows/installer/installer.nsh b/windows/installer/installer.nsh index c083b824..ea9ebf33 100644 --- a/windows/installer/installer.nsh +++ b/windows/installer/installer.nsh @@ -36,6 +36,20 @@ !macroend !macro customInstall + ; The language picked in the installer (1046 = Português do Brasil) is the app's first language: + ; main.js adopts this file once. The installer is per-machine, the file is the user's. + SetShellVarContext current + CreateDirectory "$APPDATA\MacShare" + ${If} $LANGUAGE == 1046 + FileOpen $0 "$APPDATA\MacShare\install-lang" w + FileWrite $0 "pt-BR" + FileClose $0 + ${Else} + FileOpen $0 "$APPDATA\MacShare\install-lang" w + FileWrite $0 "en" + FileClose $0 + ${EndIf} + SetShellVarContext all ; Renamed from MacShare: its rules (and its Program Files folder's exe) go. nsExec::Exec 'netsh advfirewall firewall delete rule name="MacShare"' nsExec::Exec 'netsh advfirewall firewall delete rule name="MacShare (TCP 47800)"' diff --git a/windows/main.js b/windows/main.js index 8badf98e..ddc76622 100644 --- a/windows/main.js +++ b/windows/main.js @@ -194,6 +194,7 @@ function loadDevice() { function start() { device = loadDevice(); settings = normalize(store.read('settings.json', {})); + adoptInstallerLanguage(); applyLanguage(); discovery = new Discovery(device); @@ -1161,6 +1162,16 @@ function saveSettings() { store.write('settings.json', settings); } +// The installer's language choice (installer.nsh writes install-lang) becomes the app's, once, unless the user already picked one. +function adoptInstallerLanguage() { + const f = path.join(app.getPath('userData'), 'install-lang'); + try { + const l = require('fs').readFileSync(f, 'utf8').trim(); + if (settings.app.lang === 'auto' && (l === 'en' || l === 'pt-BR')) { settings.app.lang = l; saveSettings(); } + require('fs').unlinkSync(f); + } catch (_) { /* no file: nothing to adopt */ } +} + // The tray and the other native texts follow the General page's language (settings.app.lang). function applyLanguage() { const l = settings && settings.app && settings.app.lang; diff --git a/windows/package-lock.json b/windows/package-lock.json index cee474f1..44776256 100644 --- a/windows/package-lock.json +++ b/windows/package-lock.json @@ -1,12 +1,12 @@ { "name": "macshare-win", - "version": "2.5.0", + "version": "2.6.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "macshare-win", - "version": "2.5.0", + "version": "2.6.0", "license": "GPL-3.0", "dependencies": { "ws": "^8.18.0" diff --git a/windows/package.json b/windows/package.json index 8e216548..8f68e298 100644 --- a/windows/package.json +++ b/windows/package.json @@ -1,7 +1,7 @@ { "name": "macshare-win", "productName": "DuoDesk", - "version": "2.5.0", + "version": "2.6.0", "description": "DuoDesk for Windows: pair with a Mac, view its screen, share mouse, keyboard and clipboard.", "license": "GPL-3.0", "author": "0xCodez (https://github.com/0xCodez)",