Skip to content

Commit 8318569

Browse files
committed
contrib/rate_group - fix tooltip formation error
1 parent 3d1f12f commit 8318569

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

contrib/rate_group.lua

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,6 @@ local function destroy()
9393
dt.destroy_event("rg5", "shortcut")
9494
end
9595

96-
local rate_group = _("rate group")
97-
9896
dt.register_event("rg_reject", "shortcut",
9997
function(event, shortcut)
10098
apply_rating(-1)
@@ -103,32 +101,33 @@ end, _("reject group"))
103101
dt.register_event("rg0", "shortcut",
104102
function(event, shortcut)
105103
apply_rating(0)
106-
end, rate group .. " 0")
104+
end, string.format(_("rate group %d"), 0)
105+
)
107106

108107
dt.register_event("rg1", "shortcut",
109108
function(event, shortcut)
110109
apply_rating(1)
111-
end, rate group .. " 1")
110+
end, string.format(_("rate group %d"), 1))
112111

113112
dt.register_event("rg2", "shortcut",
114113
function(event, shortcut)
115114
apply_rating(2)
116-
end, rate group .. " 2")
115+
end, string.format(_("rate group %d"), 2))
117116

118117
dt.register_event("rg3", "shortcut",
119118
function(event, shortcut)
120119
apply_rating(3)
121-
end, rate group .. " 3")
120+
end, string.format(_("rate group %d"), 3))
122121

123122
dt.register_event("rg4", "shortcut",
124123
function(event, shortcut)
125124
apply_rating(4)
126-
end, rate group .. " 4")
125+
end, string.format(_("rate group %d"), 4))
127126

128127
dt.register_event("rg5", "shortcut",
129128
function(event, shortcut)
130129
apply_rating(5)
131-
end, rate group .. " 5")
130+
end, string.format(_("rate group %d"), 5))
132131

133132
script_data.destroy = destroy
134133

0 commit comments

Comments
 (0)