Skip to content

Commit

Permalink
fixed, again
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturnine-Softworks committed Mar 28, 2023
1 parent 907350e commit 660d537
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lexicanter",
"productName": "Lexicanter",
"version": "2.0.10",
"version": "2.0.11",
"description": "A lexicon management tool for constructed languages.",
"main": "src/index.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/app/layouts/Lexicon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
let lectSet: string[]
$: { // Update the set of lects when the `senses` array changes
senses;
lectSet = Array.from(new Set(senses.map(sense => [...sense.lects]).flat()))
senses; $Language.Lects; $Language.UseLects;
lectSet = Array.from(new Set(senses.map(sense => [...sense.lects]).flat().filter(lect => $Language.Lects.includes(lect))))
}
function scrollIntoView(word: string) {
Expand Down Expand Up @@ -286,7 +286,7 @@
<input id="wrd-input" type="text"
bind:value={$wordInput}
on:input={() => {
Object.keys($pronunciations).forEach(lect => {
lectSet.forEach(lect => {
$pronunciations[lect] = get_pronunciation($wordInput, lect);
});
}}
Expand Down Expand Up @@ -320,7 +320,7 @@
/>
{/each}
<button class="hover-highlight hover-shadow" id="add-sense-button" on:click={() => {
senses = [...senses, {definition: '', tags: '', lects: []}];
senses = [...senses, {definition: '', tags: '', lects: [...$Language.Lects]}];
}}>Add Sense</button>
{#if !($wordInput in $Language.Lexicon)}
<button class="hover-highlight hover-shadow" id="add-word-button" on:click={() => addWord(false)}>Add Word</button>
Expand Down
1 change: 1 addition & 0 deletions src/app/utils/phonetics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Lang = () => get(Language);
* @returns {string}
*/
export function get_pronunciation(word: string, lect: string): string {
console.log('Requested pronunciation for ' + word + ' in ' + lect + '.');
const rules = Lang().Pronunciations[lect];
const settings = parseRules(rules);
return applyRules(settings.rules, word, settings.categories);
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/bundle/bundle.js.map

Large diffs are not rendered by default.

0 comments on commit 660d537

Please sign in to comment.