Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
GiggyMantis committed Oct 28, 2024
1 parent 2503895 commit 833e8ee
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
5 changes: 0 additions & 5 deletions ipa_characters.txt

This file was deleted.

13 changes: 8 additions & 5 deletions scripts/IPAKeyboardTool.gd
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
extends Control

const IPA_CHARACTERS_FILE_LOCATION = "res://ipa_characters.txt"
const IPA_CHARACTERS = "
pbɓtdɗʈɖcɟʄȶȡkɡɠqɢʛʡʔmɱnɳɲȵŋɴʙⱱrɾɽʀɸβfvθðszʃʒʂʐçʝɕʑxɣχʁħʕʜʢhɦʍwɥʋɹɻjɰɬɮꞎlɫɭʎȴʟɺɧʘǀǃǂǁʦʣʧʤʨʥꭧꭦ
iyɨʉɯuɪʏʊeøɘɵɤoəɛœɜɞʌɔɐæɶaɑɒɚɝ
˩˨˧˦˥↓↑↗↘
◌̊◌̈◌̽◌̃◌͊◌͋◌̚◌ᵊ◌͡◌◌ː◌ˑ◌̆◌ʰ◌˭◌ʼ◌ⁿ◌ˡ◌ʷ◌ʲ◌ˤ◌ˠ◌ˀ◌̥◌̬◌̤◌̰◌͓◌̨◌̹◌̜◌̮◌̼◌̪◌̺◌̻◌̟◌̠◌̩◌̯◌͜◌◌̙◌̘◌̞◌̝◌̴◌˞◌̋◌́◌̄◌̀◌̏◌᷈◌᷅◌᷄◌̂◌̌
ˈˌ/[]∅|‖.‿⟨⟩
"

func _ready():
var load_file = FileAccess.open(IPA_CHARACTERS_FILE_LOCATION, FileAccess.READ)
var lines = load_file.get_as_text()

var diacritic = false

for char in lines:
for char in IPA_CHARACTERS:
# Ignore whitespace chars
if char.strip_edges(true, true).is_empty():
continue
Expand Down
19 changes: 13 additions & 6 deletions scripts/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ extends Control
@export var translation_settings: OptionButton
@export var part_of_speech_list: TextEdit

const default_parts_of_speech_filename = "res://config/default_parts_of_speech.txt"
const config_filename = "config/options.cfg"
const DEFAULT_PARTS_OF_SPEECH = "noun
adjective
adverb
verb
adposition
interjection
conjunction
pronoun
phrase"
const CONFIG_FILENAME = "config/options.cfg"

var save_location = "unsaved.json"

Expand Down Expand Up @@ -58,8 +66,7 @@ func _new_project():
$TabManager.current_tab = 1

func _reload_parts_of_speech():
var f = FileAccess.open(default_parts_of_speech_filename, FileAccess.READ)
part_of_speech_list.text = f.get_as_text()
part_of_speech_list.text = DEFAULT_PARTS_OF_SPEECH

func _reload_sound_changes():
$TabManager/SOUND_CHANGE_TOOL/Categories.text = ""
Expand Down Expand Up @@ -104,11 +111,11 @@ func save_config_file(language: int):

config.set_value("Glossorola", "language", language)

config.save(config_filename)
config.save(CONFIG_FILENAME)

func load_config_file():
var config = ConfigFile.new()
var err = config.load(config_filename)
var err = config.load(CONFIG_FILENAME)

# If the file didn't load, ignore.
if err != OK:
Expand Down

0 comments on commit 833e8ee

Please sign in to comment.