Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit febe2b5

Browse files
authored
fix: Remove s when it's 1 problem solved (#149)
* fix: try to remove s when it's 1 problem solved * fix: Restore chinese version
1 parent 74c1ff5 commit febe2b5

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/leetcode-ui/popup/languages.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ function Languages:handle(res)
3232
lines:append(" " .. res.problems_solved)
3333
else
3434
lines:append("" .. res.problems_solved)
35-
lines:append(" problems solved", "leetcode_alt")
35+
if res.problems_solved == 1 then
36+
lines:append(" problem solved", "leetcode_alt")
37+
else
38+
lines:append(" problems solved", "leetcode_alt")
39+
end
3640
end
3741

3842
return lines

0 commit comments

Comments
 (0)