]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Spelling and grammar fixes
authorVille Skyttä <ville.skytta@iki.fi>
Sun, 11 Jun 2023 06:43:39 +0000 (09:43 +0300)
committerAarni Koskela <akx@iki.fi>
Sun, 11 Jun 2023 13:24:30 +0000 (16:24 +0300)
babel/lists.py
babel/plural.py
babel/units.py
contrib/babel.js
tests/messages/test_plurals.py

index 6ea4f014aec0cc7fe64a8d888c0698aed4248872..5c435dd63200aa0aa181372c785256bff878a88f 100644 (file)
@@ -46,7 +46,7 @@ def format_list(lst: Sequence[str],
       A typical 'and' list for arbitrary placeholders.
       eg. "January, February, and March"
     * standard-short:
-      A short version of a 'and' list, suitable for use with short or abbreviated placeholder values.
+      A short version of an 'and' list, suitable for use with short or abbreviated placeholder values.
       eg. "Jan., Feb., and Mar."
     * or:
       A typical 'or' list for arbitrary placeholders.
index c5c77161bc08ce49f6139d46b52b92385ece7181..9d368481c73be2336bb2367802fe0ad63475b9ec 100644 (file)
@@ -24,7 +24,7 @@ _fallback_tag = 'other'
 def extract_operands(source: float | decimal.Decimal) -> tuple[decimal.Decimal | int, int, int, int, int, int, Literal[0], Literal[0]]:
     """Extract operands from a decimal, a float or an int, according to `CLDR rules`_.
 
-    The result is a 8-tuple (n, i, v, w, f, t, c, e), where those symbols are as follows:
+    The result is an 8-tuple (n, i, v, w, f, t, c, e), where those symbols are as follows:
 
     ====== ===============================================================
     Symbol Value
index 2da1a8a797374fcb39566aefb2e8ad8ff982a030..7b0e144deb87887773b68fe905525690d692351a 100644 (file)
@@ -50,7 +50,7 @@ def get_unit_name(
 
 def _find_unit_pattern(unit_id: str, locale: Locale | str | None = LC_NUMERIC) -> str | None:
     """
-    Expand an unit into a qualified form.
+    Expand a unit into a qualified form.
 
     Known units can be found in the CLDR Unit Validity XML file:
     https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
index 506efeb84de23247942acae0d49458c9f89269ac..b1ad341d15e8cf10923a9c03fb4513cfd571c7f7 100644 (file)
@@ -15,7 +15,7 @@
 
 /**
  * A simple module that provides a gettext like translation interface.
- * The catalog passed to load() must be a object conforming to this
+ * The catalog passed to load() must be an object conforming to this
  * interface::
  *
  *    {
index 56a22b9c5215e84870dfa0f3e7d819939e41b37b..41438f58dbf2c40693010be92c8fb6ff5eed4b44 100644 (file)
@@ -28,7 +28,7 @@ def test_get_plural_selection(locale, num_plurals, plural_expr):
     assert plurals.get_plural(locale) == (num_plurals, plural_expr)
 
 
-def test_get_plural_accpets_strings():
+def test_get_plural_accepts_strings():
     assert plurals.get_plural(locale='ga') == (5, '(n==1 ? 0 : n==2 ? 1 : n>=3 && n<=6 ? 2 : n>=7 && n<=10 ? 3 : 4)')