]> git.ipfire.org Git - thirdparty/babel.git/commit
Keep @modifiers when parsing locales (#947)
authormartin f. krafft <github.com@pobox.madduck.net>
Thu, 26 Jan 2023 17:46:06 +0000 (18:46 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Jan 2023 17:46:06 +0000 (19:46 +0200)
commitd019ed198d90c5dee2b5dd5f39ffa922263f50e4
treebb999836bd4e83b263dbbe0f1c3b51abbdc0a109
parent6bf793ae5b902b3e3f2cb494f2fc230c2641890c
Keep @modifiers when parsing locales (#947)

Locale modifiers ("@variants") are described in the GNU gettext
documentation like this:

> The ‘@variant’ can denote any kind of characteristics that is not
> already implied by the language ll and the country CC. […] It can also
> denote a dialect of the language, …

Wherein Babel previously would discard these, this patch stores the
modifier information in the `Locale` objects, handling string
representation accordingly.

Resolves: #946
Signed-off-by: martin f. krafft <madduck@madduck.net>
Co-authored-by: Aarni Koskela <akx@iki.fi>
babel/core.py
tests/test_core.py