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
1 file changed, +5 -1
+5-1lua/leetcode-ui/popup/languages.lua
| @@ -32,7 +32,11 @@ function Languages:handle(res) | ||
| 32 | 32 | lines:append(" " .. res.problems_solved) |
| 33 | 33 | else |
| 34 | 34 | 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 | |
| 36 | 40 | end |
| 37 | 41 | |
| 38 | 42 | return lines |