diff --git a/plover/gui/main.py b/plover/gui/main.py index 3b112a6f2..73be12687 100644 --- a/plover/gui/main.py +++ b/plover/gui/main.py @@ -177,11 +177,11 @@ def __init__(self, config): app.init_engine(self.steno_engine, self.config) break except InvalidConfigurationError as e: - self.show_alert(unicode(e)) + self._show_alert(unicode(e)) dlg = ConfigurationDialog(self.steno_engine, self.config, parent=self) - re = dlg.ShowModel() + ret = dlg.ShowModal() if ret == wx.ID_CANCEL: self._quit() return diff --git a/plover/main.py b/plover/main.py index 62484a04c..99628e7ef 100644 --- a/plover/main.py +++ b/plover/main.py @@ -33,14 +33,15 @@ def init_config_dir(): This usually only does anything the first time plover is launched. """ - # Create the configuration directory if needed. if not os.path.exists(CONFIG_DIR): os.makedirs(CONFIG_DIR) - # Copy the default dictionary to the configuration directory. - shutil.copyfile(os.path.join(ASSETS_DIR, DEFAULT_DICTIONARY_FILE), - os.path.join(CONFIG_DIR, - DEFAULT_DICTIONARY_FILE)) + + # Copy the default dictionary to the configuration directory. + if not os.path.exists(DEFAULT_DICTIONARY_FILE): + dict_filename = os.path.basename(DEFAULT_DICTIONARY_FILE) + shutil.copyfile(os.path.join(ASSETS_DIR, dict_filename), + DEFAULT_DICTIONARY_FILE) # Create a default configuration file if one doesn't already # exist. diff --git a/plover/test_translation.py b/plover/test_translation.py index 9d7ba5f99..1645637e6 100644 --- a/plover/test_translation.py +++ b/plover/test_translation.py @@ -556,6 +556,15 @@ def test_suffix_folding(self): self.translate(stroke('K-LG')) self.assertTranslations(lt) + def test_suffix_folding_multi_stroke(self): + self.define('K/-L', 'look') + self.define('-G', '{^ing}') + lt = self.lt('K/-LG') + self.assertEqual(lt[0].english, 'look {^ing}') + self.translate(stroke('K')) + self.translate(stroke('-LG')) + self.assertTranslations(lt) + def test_suffix_folding_no_suffix(self): self.define('K-L', 'look') lt = self.lt('K-LG')