Skip to content

Commit 6f3cb5f

Browse files
committed
StripeDialog: Put the money icon in the right place depending on the locale.
In French we would write "5 $" and never "$ 5".
1 parent d3ce71f commit 6f3cb5f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Dialogs/StripeDialog.vala

+7-1
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,16 @@ public class AppCenter.Widgets.StripeDialog : Granite.Dialog {
120120
var custom_amount = new Gtk.SpinButton.with_range (0, 100, 1) {
121121
activates_default = true,
122122
hexpand = true,
123-
primary_icon_name = "currency-dollar-symbolic",
124123
value = amount
125124
};
126125

126+
// Account for languages that places the monetary sign after the number
127+
if (_("$%d").split ("%d", 2)[0]._strip ().length > 0) {
128+
custom_amount.primary_icon_name = "currency-dollar-symbolic";
129+
} else {
130+
custom_amount.secondary_icon_name = "currency-dollar-symbolic";
131+
}
132+
127133
var selection_list = new Gtk.Grid () {
128134
column_spacing = 6
129135
};

0 commit comments

Comments
 (0)