summaryrefslogtreecommitdiff
path: root/jfr_playoff/gui/frames/translations.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-07-22 11:39:02 +0200
committeremkael <emkael@tlen.pl>2019-07-22 11:39:02 +0200
commit8bf96412b75689c578f5690dd0974304265d7fea (patch)
tree00927af4c406028b437a1890840ea7168267f1f9 /jfr_playoff/gui/frames/translations.py
parent37a2b34d2dd68092196e391b8ccc08c092f9912a (diff)
Collecting and saving config file
Diffstat (limited to 'jfr_playoff/gui/frames/translations.py')
-rw-r--r--jfr_playoff/gui/frames/translations.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/jfr_playoff/gui/frames/translations.py b/jfr_playoff/gui/frames/translations.py
index 3ba660f..e5b8940 100644
--- a/jfr_playoff/gui/frames/translations.py
+++ b/jfr_playoff/gui/frames/translations.py
@@ -23,6 +23,9 @@ class TranslationRow(RepeatableFrame):
self.key.set(value[0])
self.value.set(value[1])
+ def getValue(self):
+ return (self.key.get(), self.value.get())
+
class TranslationConfigurationFrame(ScrollableFrame):
def setTranslations(self, translations):
@@ -33,6 +36,11 @@ class TranslationConfigurationFrame(ScrollableFrame):
values.append(value)
self.repeater.setValue(values)
+ def getTranslations(self):
+ return {
+ key: value for key, value in self.repeater.getValue()
+ }
+
def renderContent(self, container):
self.repeater = WidgetRepeater(container, TranslationRow)
self.repeater.pack(side=tk.TOP, fill=tk.BOTH, expand=True)