mirror of https://github.com/nealey/vail.git
Compare commits
No commits in common. "460cb75e5b15d3a83d7042dc677817bc8936e87e" and "d1f2b1d0874b43246f1b04e465ecb46490c54719" have entirely different histories.
460cb75e5b
...
d1f2b1d087
|
@ -1 +1 @@
|
|||
i18n
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
title:
|
||||
repeater: Repeater
|
||||
mode: Mode
|
||||
notes: Notes
|
||||
knobs: Knobs
|
||||
key:
|
||||
key: Key
|
||||
dit: Dit
|
||||
dah: Dah
|
||||
keyer:
|
||||
cootie: Straight Key / Cootie
|
||||
bug: Bug
|
||||
elbug: Electronic Bug
|
||||
singledot: Single Dot
|
||||
ultimatic: Ultimatic
|
||||
iambic: Iambic (plain)
|
||||
iambica: Iambic A
|
||||
iambicb: Iambic B
|
||||
keyahead: Keyahea
|
||||
label:
|
||||
wpm: WPM
|
||||
ms: ms
|
||||
wiki: Help
|
||||
rx-delay: receive delay
|
||||
telegraph-sounds: Telegraph sounds
|
||||
title:
|
||||
discord: Text/Voice chat on Discord
|
||||
wiki: Vail Wiki
|
||||
description:
|
||||
ck: Send <code>CK</code> (check) to the repeater, and play when it comes back.
|
||||
reset: Reset all Vail preferences to default.
|
||||
notes: Enter your own notes here.
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
title:
|
||||
repeater: Répéteur
|
||||
mode: Mode
|
||||
notes: Remarques
|
||||
knobs: Réglages
|
||||
key:
|
||||
key: Key
|
||||
dit: Dit
|
||||
dah: Dah
|
||||
keyer:
|
||||
cootie: Straight Key / Cootie
|
||||
bug: Bug
|
||||
elbug: Electronic Bug
|
||||
singledot: Single Dot
|
||||
ultimatic: Ultimatic
|
||||
iambic: Iambic (plain)
|
||||
iambica: Iambic A
|
||||
iambicb: Iambic B
|
||||
keyahead: Keyahead
|
||||
label:
|
||||
wpm: WPM
|
||||
ms: ms
|
||||
wiki: Help
|
||||
rx-delay: retard de réception
|
||||
telegraph-sounds: Sons télégraphiques
|
||||
title:
|
||||
discord: Text/Voice chat on Discord
|
||||
wiki: Vail Wiki
|
||||
description:
|
||||
ck: Transmettre <code>CK</code> (check) au répéteur, et le jouer quand il arrive.
|
||||
reset: Réinitialiser les paramètres par défaut.
|
||||
notes: Écrivez vos nôtes ici.
|
|
@ -40,7 +40,7 @@
|
|||
<div class="level">
|
||||
<div class="level-left">
|
||||
<div class="level-item">
|
||||
<h1 class="title" data-i18n="heading.repeater">Repeater</h1>
|
||||
<h1 class="title">Repeater</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="level-right">
|
||||
|
@ -123,22 +123,22 @@
|
|||
<div>
|
||||
<div class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label" data-i18n="heading.mode">Mode</label>
|
||||
<label class="label">Mode</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<div class="select">
|
||||
<select id="keyer-mode">
|
||||
<option value="cootie" data-i18n="keyer.cootie">Straight Key / Cootie</option>
|
||||
<option value="bug" data-i18n="keyer.bug">Bug</option>
|
||||
<option value="elbug" data-i18n="keyer.elbug">ElBug</option>
|
||||
<option value="singledot" data-i18n="keyer.singledot">Single Dot</option>
|
||||
<option value="ultimatic" data-i18n="keyer.ultimatic">Ultimatic</option>
|
||||
<option value="iambic" data-i18n="keyer.iambic">Iambic (Plain)</option>
|
||||
<option value="iambica" data-i18n="keyer.iambica">Iambic A</option>
|
||||
<option value="iambicb" data-i18n="keyer.iambicb">Iambic B</option>
|
||||
<option value="keyahead" data-i18n="keyer.keyahead">Keyahead</option>
|
||||
<option value="cootie">Straight Key / Cootie</option>
|
||||
<option value="bug">Bug</option>
|
||||
<option value="elbug">ElBug</option>
|
||||
<option value="singledot">Single Dot</option>
|
||||
<option value="ultimatic">Ultimatic</option>
|
||||
<option value="iambic">Iambic (Plain)</option>
|
||||
<option value="iambica">Iambic A</option>
|
||||
<option value="iambicb">Iambic B</option>
|
||||
<option value="keyahead">Keyahead</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -149,10 +149,9 @@
|
|||
<div class="field is-horizontal">
|
||||
<div class="field-label">
|
||||
<label class="label">
|
||||
<output for="keyer-rate"></output>
|
||||
<span data-i18n="label.wpm">WPM</span>
|
||||
<output for="keyer-rate"></output> WPM
|
||||
/
|
||||
<span data-fill="keyer-ms"></span><span data-i18n="label:ms">ms</span>
|
||||
<span data-fill="keyer-ms"></span>ms
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
|
@ -176,12 +175,12 @@
|
|||
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<h2 class="title" data-i18n="heading.notes" data-i18n="heading.notes"></h2>
|
||||
<textarea class="textarea" data-i18n-placeholder="description.notes" id="notes"></textarea>
|
||||
<h2 class="title">Notes</h2>
|
||||
<textarea class="textarea" placeholder="Enter your own notes here" id="notes"></textarea>
|
||||
<nav class="breadcrumb has-bullet-separator">
|
||||
<ul>
|
||||
<li><a href="https://discord.gg/GBzj8cBat7" target="_blank" data-i18n-title="title.discord"><i class="mdi mdi-discord"></i></a></li>
|
||||
<li><a href="https://github.com/nealey/vail/wiki" target="_blank" data-i18n-title="title.wiki">Help</a></li>
|
||||
<li><a href="https://discord.gg/GBzj8cBat7" target="_blank" title="Text/voice chat on Discord"><i class="mdi mdi-discord"></i></a></li>
|
||||
<li><a href="https://github.com/nealey/vail/wiki" target="_blank" title="Vail Wiki">Help</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
@ -189,24 +188,24 @@
|
|||
|
||||
<div class="column">
|
||||
<div class="box">
|
||||
<h2 class="title" data-i18n="heading.knobs">Knobs</h2>
|
||||
<h2 class="title">Knobs</h2>
|
||||
<div class="block">
|
||||
<div class="control">
|
||||
<button id="ck" class="button is-primary">
|
||||
CK
|
||||
</button>
|
||||
</div>
|
||||
<div class="" data-i18n="description.ck">
|
||||
<div class="">
|
||||
Send <code>CK</code> (check) to the repeater, and play when it comes back.
|
||||
</div>
|
||||
</div>
|
||||
<div class="block">
|
||||
<div class="control">
|
||||
<button id="reset" class="button" data-i18n="label.reset">
|
||||
<button id="reset" class="button">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
<div data-i18n="description.reset">
|
||||
<div>
|
||||
Reset all Vail preferences to default.
|
||||
</div>
|
||||
</div>
|
||||
|
@ -216,7 +215,7 @@
|
|||
<div class="field-label">
|
||||
<label class="label">
|
||||
<output for="rx-delay"></output>s
|
||||
<span data-i18n="label.rx-delay">rx delay</span>
|
||||
rx delay
|
||||
</label>
|
||||
</div>
|
||||
<div class="field-body">
|
||||
|
@ -251,7 +250,7 @@
|
|||
<p>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="telegraph-buzzer">
|
||||
<span data-i18n="label.telegraph-sounds">Telegraph sounds</span>
|
||||
Telegraph sounds
|
||||
</label>
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
import {Xlat} from "./xlat.mjs"
|
||||
|
||||
class I18n {
|
||||
constructor() {
|
||||
for (let lang of navigator.languages) {
|
||||
this.table = Xlat[lang]
|
||||
if (this.table) {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Fill() {
|
||||
if (!this.table) {
|
||||
return
|
||||
}
|
||||
|
||||
for (let e of document.querySelectorAll("[data-i18n]")) {
|
||||
e.innerHTML = this.lookup(e.dataset.i18n, e.innerHTML)
|
||||
}
|
||||
|
||||
for (let e of document.querySelectorAll("[data-i18n-placeholder]")) {
|
||||
e.placeholder = this.lookup(e.dataset.i18nPlaceholder, e.placeholder)
|
||||
}
|
||||
|
||||
for (let e of document.querySelectorAll("[data-i18n-title")) {
|
||||
e.title = this.lookup(e.dataset.i18nTitle, e.title)
|
||||
}
|
||||
}
|
||||
|
||||
lookup(key, dfl=null) {
|
||||
let obj = this.table
|
||||
for (let k of key.split(".")) {
|
||||
obj = obj[k]
|
||||
}
|
||||
return obj || dfl
|
||||
}
|
||||
}
|
||||
|
||||
async function Setup() {
|
||||
let i = new I18n()
|
||||
i.Fill()
|
||||
}
|
||||
|
||||
export {
|
||||
Setup,
|
||||
}
|
|
@ -3,7 +3,6 @@ import * as Outputs from "./outputs.mjs"
|
|||
import * as Inputs from "./inputs.mjs"
|
||||
import * as Repeaters from "./repeaters.mjs"
|
||||
import * as Chart from "./chart.mjs"
|
||||
import * as I18n from "./i18n.mjs"
|
||||
|
||||
const DefaultRepeater = "General"
|
||||
const Millisecond = 1
|
||||
|
@ -454,7 +453,6 @@ function init() {
|
|||
if (navigator.serviceWorker) {
|
||||
navigator.serviceWorker.register("sw.js")
|
||||
}
|
||||
I18n.Setup()
|
||||
try {
|
||||
window.app = new VailClient()
|
||||
} catch (err) {
|
||||
|
|
|
@ -1,122 +0,0 @@
|
|||
export const Xlat = {
|
||||
"fr": {
|
||||
"heading": {
|
||||
"repeater": "Répéteur",
|
||||
"mode": "Mode",
|
||||
"notes": "Remarques",
|
||||
"knobs": "Réglages"
|
||||
},
|
||||
"key": {
|
||||
"key": "Key",
|
||||
"dit": "Dit",
|
||||
"dah": "Dah"
|
||||
},
|
||||
"keyer": {
|
||||
"cootie": "Straight Key / Cootie",
|
||||
"bug": "Bug",
|
||||
"elbug": "Electronic Bug",
|
||||
"singledot": "Single Dot",
|
||||
"ultimatic": "Ultimatic",
|
||||
"iambic": "Iambic (plain)",
|
||||
"iambica": "Iambic A",
|
||||
"iambicb": "Iambic B",
|
||||
"keyahead": "Keyahead"
|
||||
},
|
||||
"label": {
|
||||
"wpm": "WPM",
|
||||
"ms": "ms",
|
||||
"wiki": "Aide",
|
||||
"rx-delay": "retard de réception",
|
||||
"telegraph-sounds": "Sons télégraphiques"
|
||||
},
|
||||
"title": {
|
||||
"discord": "Chat textuel et du voix, sur Discord",
|
||||
"wiki": "Vail Wiki"
|
||||
},
|
||||
"description": {
|
||||
"ck": "Transmettre <code>CK</code> (check) au répéteur, et sonner le réponse.",
|
||||
"reset": "Réinitialiser les paramètres par défaut.",
|
||||
"notes": "Écrivez vos nôtes ici."
|
||||
}
|
||||
},
|
||||
"en": {
|
||||
"heading": {
|
||||
"repeater": "Repeater",
|
||||
"mode": "Mode",
|
||||
"notes": "Notes",
|
||||
"knobs": "Knobs"
|
||||
},
|
||||
"key": {
|
||||
"key": "Key",
|
||||
"dit": "Dit",
|
||||
"dah": "Dah"
|
||||
},
|
||||
"keyer": {
|
||||
"cootie": "Straight Key / Cootie",
|
||||
"bug": "Bug",
|
||||
"elbug": "Electronic Bug",
|
||||
"singledot": "Single Dot",
|
||||
"ultimatic": "Ultimatic",
|
||||
"iambic": "Iambic (plain)",
|
||||
"iambica": "Iambic A",
|
||||
"iambicb": "Iambic B",
|
||||
"keyahead": "Keyahead"
|
||||
},
|
||||
"label": {
|
||||
"wpm": "WPM",
|
||||
"ms": "ms",
|
||||
"wiki": "Help",
|
||||
"rx-delay": "receive delay",
|
||||
"telegraph-sounds": "Telegraph sounds"
|
||||
},
|
||||
"title": {
|
||||
"discord": "Text/Voice chat on Discord",
|
||||
"wiki": "Vail Wiki"
|
||||
},
|
||||
"description": {
|
||||
"ck": "Send <code>CK</code> (check) to the repeater, and play when it comes back.",
|
||||
"reset": "Reset all Vail preferences to default.",
|
||||
"notes": "Enter your own notes here."
|
||||
}
|
||||
},
|
||||
"se": {
|
||||
"heading": {
|
||||
"repeater": "Repeater",
|
||||
"mode": "Läge",
|
||||
"notes": "Anteckningar",
|
||||
"knobs": "Rattar"
|
||||
},
|
||||
"key": {
|
||||
"key": "Nyckel",
|
||||
"dit": "Dit",
|
||||
"dah": "Dah"
|
||||
},
|
||||
"keyer": {
|
||||
"cootie": "Handpump / Cootie",
|
||||
"bug": "Bug",
|
||||
"elbug": "Elektronisk Bug",
|
||||
"singledot": "Enkelpunktig",
|
||||
"ultimatic": "Ultimatisk",
|
||||
"iambic": "Iambic (normal)",
|
||||
"iambica": "Iambic-läge A",
|
||||
"iambicb": "Iambic-läge B",
|
||||
"keyahead": "Förtelegrafera"
|
||||
},
|
||||
"label": {
|
||||
"wpm": "Ord per minut",
|
||||
"ms": "Millisekunder",
|
||||
"wiki": "Hjälp",
|
||||
"rx-delay": "Mottagningsfördröjning",
|
||||
"telegraph-sounds": "Telegrafljud"
|
||||
},
|
||||
"title": {
|
||||
"discord": "Text- eller röstkommunicera på Discord",
|
||||
"wiki": "Vail Wiki"
|
||||
},
|
||||
"description": {
|
||||
"ck": "Sänd <code>CK</code> (kontroll) till repeater:en, och få uppspelat vid återkomst.",
|
||||
"reset": "Återställ till standardinställningarna.",
|
||||
"notes": "Angiv Dina egna anteckningar här."
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue