irongit

A Neovim plugin enabling you to solve LeetCode problems.

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
9cauthored committed by GitHub
parent 74c1ff5commit febe2b5c8678241799fc07bcb3399af4691cdae0Browse files

1 file changed, +5 -1

+5-1lua/leetcode-ui/popup/languages.lua
@@ -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