Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions po/bulky-pl.po
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,7 @@ msgstr "Zamknij"
#: usr/share/bulky/bulky.ui.h:28
msgid "Rename"
msgstr "Zmień nazwę"

#: usr/share/bulky/bulky.ui.h:29
msgid "Remove accents"
msgstr "Usuń znaki akcentowane"
8 changes: 7 additions & 1 deletion usr/lib/bulky/bulky.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import warnings
import sys
import functools
import unidecode

# Suppress GTK deprecation warnings
warnings.filterwarnings("ignore")
Expand Down Expand Up @@ -348,10 +349,13 @@ def __init__(self, application):
self.radio_lowercase = self.builder.get_object("radio_lowercase")
self.radio_uppercase = self.builder.get_object("radio_uppercase")
self.radio_firstuppercase = self.builder.get_object("radio_firstuppercase")
self.radio_accents = self.builder.get_object("radio_accents")

self.radio_titlecase.connect("toggled", self.on_widget_change)
self.radio_lowercase.connect("toggled", self.on_widget_change)
self.radio_uppercase.connect("toggled", self.on_widget_change)
self.radio_firstuppercase.connect("toggled", self.on_widget_change)
self.radio_accents.connect("toggled", self.on_widget_change)

# Tooltips
variables_tooltip = _("Use %n, %0n, %00n, %000n to enumerate.")
Expand Down Expand Up @@ -730,8 +734,10 @@ def change_case(self, index, string):
return string.lower()
elif self.radio_uppercase.get_active():
return string.upper()
else:
elif self.radio_firstuppercase.get_active():
return string.capitalize()
else:
return unidecode.unidecode(string)

def inject(self, index, string):
string = string.replace('%n', "{:01d}".format(index))
Expand Down
23 changes: 21 additions & 2 deletions usr/share/bulky/bulky.ui
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,29 @@
</packing>
</child>
<child>
<placeholder/>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<placeholder/>
<object class="GtkRadioButton" id="radio_accents">
<property name="label" translatable="yes">Remove accents</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
<property name="group">radio_uppercase</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
</packing>
</child>
<child>
<placeholder/>
Expand Down