瀏覽代碼

LibUnicode: Tweak the definition of the plurality "many"

As noted at the top of this method, this is a naive implementation of
the Unicode plurality specification. But for now, we should tweak the
defintion of "many" to be "more than 2" (which is what I had in mind
when I wrote this, but forgot about fractions).
Timothy Flynn 3 年之前
父節點
當前提交
80493908d3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibUnicode/Locale.cpp

+ 1 - 1
Userland/Libraries/LibUnicode/Locale.cpp

@@ -995,7 +995,7 @@ Optional<NumberFormat> select_pattern_with_plurality(Vector<NumberFormat> const&
     } else if (number == 2) {
         if (auto patterns = find_plurality(NumberFormat::Plurality::Two); patterns.has_value())
             return patterns;
-    } else {
+    } else if (number > 2) {
         if (auto patterns = find_plurality(NumberFormat::Plurality::Many); patterns.has_value())
             return patterns;
     }