From a04fb197c8dfcb8d926475ac4754e09dc1fa7ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 11 Jun 2023 09:43:39 +0300 Subject: [PATCH] Spelling and grammar fixes --- babel/lists.py | 2 +- babel/plural.py | 2 +- babel/units.py | 2 +- contrib/babel.js | 2 +- tests/messages/test_plurals.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/babel/lists.py b/babel/lists.py index 6ea4f014a..5c435dd63 100644 --- a/babel/lists.py +++ b/babel/lists.py @@ -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. diff --git a/babel/plural.py b/babel/plural.py index c5c77161b..9d368481c 100644 --- a/babel/plural.py +++ b/babel/plural.py @@ -24,7 +24,7 @@ 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 diff --git a/babel/units.py b/babel/units.py index 2da1a8a79..7b0e144de 100644 --- a/babel/units.py +++ b/babel/units.py @@ -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 diff --git a/contrib/babel.js b/contrib/babel.js index 506efeb84..b1ad341d1 100644 --- a/contrib/babel.js +++ b/contrib/babel.js @@ -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:: * * { diff --git a/tests/messages/test_plurals.py b/tests/messages/test_plurals.py index 56a22b9c5..41438f58d 100644 --- a/tests/messages/test_plurals.py +++ b/tests/messages/test_plurals.py @@ -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)')