]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
License clarification and cleanup
authorArmin Ronacher <armin.ronacher@active-4.com>
Wed, 24 Jul 2013 13:09:42 +0000 (15:09 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Wed, 24 Jul 2013 13:09:42 +0000 (15:09 +0200)
20 files changed:
AUTHORS
babel/__init__.py
babel/_compat.py
babel/core.py
babel/dates.py
babel/localedata.py
babel/localtime/__init__.py
babel/messages/__init__.py
babel/messages/catalog.py
babel/messages/checkers.py
babel/messages/extract.py
babel/messages/frontend.py
babel/messages/jslexer.py
babel/messages/mofile.py
babel/messages/plurals.py
babel/messages/pofile.py
babel/numbers.py
babel/plural.py
babel/support.py
babel/util.py

diff --git a/AUTHORS b/AUTHORS
index 3663977611b96dc170652adf02edcc5441db896a..09d0bc03be1a3a10738a33df3b6627ff59f89859 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -17,7 +17,12 @@ Contributors:
 - Daniel Neuhäuser <dasdasich@gmail.com>
 - Nick Retallack <nick@bitcasa.com>
 - Thomas Waldmann <tw@waldmann-edv.de>
+- Lennart Regebro <regebro@gmail.com>
 
 Babel was previously developed under the Copyright of Edgewall Software.  The
 following copyright notice holds true for releases before 2013: "Copyright (c)
 2007 - 2011 by Edgewall Software"
+
+In addition to the regular contributions Babel includes a fork of Lennart
+Regebro's tzlocal that originally was licensed under the CC0 license.  The
+original copyright of that project is "Copyright 2013 by Lennart Regebro".
index ae7d6ca98d664a2c629fd1d6a78e30d21b015455..fa5d59af95d73893100e113fb564388c60738a7c 100644 (file)
@@ -1,29 +1,20 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
+"""
+    babel
+    ~~~~~
 
-"""Integrated collection of utilities that assist in internationalizing and
-localizing applications.
+    Integrated collection of utilities that assist in internationalizing and
+    localizing applications.
 
-This package is basically composed of two major parts:
+    This package is basically composed of two major parts:
 
- * tools to build and work with ``gettext`` message catalogs
- * a Python interface to the CLDR (Common Locale Data Repository), providing
-   access to various locale display names, localized number and date
-   formatting, etc.
    * tools to build and work with ``gettext`` message catalogs
    * a Python interface to the CLDR (Common Locale Data Repository), providing
+       access to various locale display names, localized number and date
+       formatting, etc.
 
-:see: http://www.gnu.org/software/gettext/
-:see: http://docs.python.org/lib/module-gettext.html
-:see: http://www.unicode.org/cldr/
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 from babel.core import UnknownLocaleError, Locale, default_locale, \
index 1f7f91bc116c25233c5545e681d4bd5d3a1107a3..86096daa6110cc73e4d54cf6da8242aebc5c761e 100644 (file)
@@ -1,17 +1,3 @@
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-
 import sys
 
 PY2 = sys.version_info[0] == 2
index 034c35b1703d595826fd1693641f7fc6be6d4c57..d22ccaa1c3c8999fb0d97ad4e5181a38f9f3bf85 100644 (file)
@@ -1,17 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Core locale representation and locale data access."""
+"""
+    babel.core
+    ~~~~~~~~~~
+
+    Core locale representation and locale data access.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 import os
 
index 996fecd1e4ad025d9fa83665d3eca8031318d3ab..c15015af37b089503a8e6683f074718acc4fbc1b 100644 (file)
@@ -1,24 +1,19 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Locale dependent formatting and parsing of dates and times.
-
-The default locale for the functions in this module is determined by the
-following environment variables, in that order:
-
- * ``LC_TIME``,
- * ``LC_ALL``, and
- * ``LANG``
+"""
+    babel.dates
+    ~~~~~~~~~~~
+
+    Locale dependent formatting and parsing of dates and times.
+
+    The default locale for the functions in this module is determined by the
+    following environment variables, in that order:
+
+     * ``LC_TIME``,
+     * ``LC_ALL``, and
+     * ``LANG``
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 from __future__ import division
index d6e47039a3fe626bdbaa4dfce707b43823fa7634..e05b6a946d8368318a0af0aa78eb2dc7a98569f0 100644 (file)
@@ -1,20 +1,15 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Low-level locale data access.
-
-:note: The `Locale` class, which uses this module under the hood, provides a
-       more convenient interface for accessing the locale data.
+"""
+    babel.localedata
+    ~~~~~~~~~~~~~~~~
+
+    Low-level locale data access.
+
+    :note: The `Locale` class, which uses this module under the hood, provides a
+           more convenient interface for accessing the locale data.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 import os
index 842a03efdf92d76e923b39c4fd56191bac6f19d1..cdb3e9b5d5272c212b3fb0b77c3f121ad87c8b84 100644 (file)
@@ -1,3 +1,15 @@
+# -*- coding: utf-8 -*-
+"""
+    babel.localtime
+    ~~~~~~~~~~~~~~~
+
+    Babel specific fork of tzlocal to determine the local timezone
+    of the system.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
+
 import sys
 import pytz
 import time
index 8110724c02177f45dd0f8fc3b3caaf3d3c82bc56..1b63bae2ee60722c7dc4995261013a8b9e2eb49e 100644 (file)
@@ -1,16 +1,12 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
+"""
+    babel.messages
+    ~~~~~~~~~~~~~~
 
-"""Support for ``gettext`` message catalogs."""
+    Support for ``gettext`` message catalogs.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 from babel.messages.catalog import *
index 4f3afcb03f0e16a98c87b27eaf59e90322012c0e..e187acbd08a2b74192503c781e10907cf12c2729 100644 (file)
@@ -1,17 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Data structures for message catalogs."""
+"""
+    babel.messages.catalog
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    Data structures for message catalogs.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 from cgi import parse_header
 from datetime import datetime, time as time_
index fe8ab3a51e8687edd43e20d79ae6a20cb2a1aca7..de46e995a53c0ca7ea50f867d5d019784b042373 100644 (file)
@@ -1,19 +1,14 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Various routines that help with validation of translations.
-
-:since: version 0.9
+"""
+    babel.messages.checkers
+    ~~~~~~~~~~~~~~~~~~~~~~~
+
+    Various routines that help with validation of translations.
+
+    :since: version 0.9
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 from babel.messages.catalog import TranslationError, PYTHON_FORMAT
index 1e99ce2603c1f821198026d014f876ddaa0a17d9..201ebd2a04ccd7878deec7706f8bdd6e2147a684 100644 (file)
@@ -1,24 +1,20 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Basic infrastructure for extracting localizable messages from source files.
-
-This module defines an extensible system for collecting localizable message
-strings from a variety of sources. A native extractor for Python source files
-is builtin, extractors for other sources can be added using very simple plugins.
-
-The main entry points into the extraction functionality are the functions
-`extract_from_dir` and `extract_from_file`.
+"""
+    babel.messages.extract
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    Basic infrastructure for extracting localizable messages from source files.
+
+    This module defines an extensible system for collecting localizable message
+    strings from a variety of sources. A native extractor for Python source
+    files is builtin, extractors for other sources can be added using very
+    simple plugins.
+
+    The main entry points into the extraction functionality are the functions
+    `extract_from_dir` and `extract_from_file`.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 import os
index 8bd636b93d480b705949ebe03dcef200ea6c7af1..a15b5aabe102601848de7af5b75713be34f73067 100755 (executable)
@@ -1,18 +1,13 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Frontends for the message extraction functionality."""
+"""
+    babel.messages.frontend
+    ~~~~~~~~~~~~~~~~~~~~~~~
+
+    Frontends for the message extraction functionality.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 try:
     from ConfigParser import RawConfigParser
index 08493d31a4c93da74041d07ce6c7a45a468c992d..d49687be539159d4afc7d06a33e7c0d38b936265 100644 (file)
@@ -1,18 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2008-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""A simple JavaScript 1.5 lexer which is used for the JavaScript
-extractor.
+"""
+    babel.messages.jslexer
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    A simple JavaScript 1.5 lexer which is used for the JavaScript
+    extractor.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 from operator import itemgetter
index f355c73235fe5e6c03affaf8ab021389e45151f1..c92cbad9b642c7552348c86f26b9678ca856c14a 100644 (file)
@@ -1,21 +1,12 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Writing of files in the ``gettext`` MO (machine object) format.
-
-:since: version 0.9
-:see: `The Format of MO Files
-       <http://www.gnu.org/software/gettext/manual/gettext.html#MO-Files>`_
+"""
+    babel.messages.mofile
+    ~~~~~~~~~~~~~~~~~~~~~
+
+    Writing of files in the ``gettext`` MO (machine object) format.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 import array
index 172339e611e62924594a6147a5f01d210ba0b5d0..9b4b4ac26662ae174f3edf4d2c1e703a597b144c 100644 (file)
@@ -1,17 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Plural form definitions."""
+"""
+    babel.messages.plurals
+    ~~~~~~~~~~~~~~~~~~~~~~
+
+    Plural form definitions.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 from babel.core import default_locale, Locale
 from operator import itemgetter
index 5d0d96cd2bc9a0d58f29ce9753cc272accd8b59b..6c9c6f9f073379e23e5f9601ac7efe6fe7057cf2 100644 (file)
@@ -1,21 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Reading and writing of files in the ``gettext`` PO (portable object)
-format.
-
-:see: `The Format of PO Files
-       <http://www.gnu.org/software/gettext/manual/gettext.html#PO-Files>`_
+"""
+    babel.messages.pofile
+    ~~~~~~~~~~~~~~~~~~~~~
+
+    Reading and writing of files in the ``gettext`` PO (portable object)
+    format.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 import os
index f792e7e59d480a557aad03d2a7a19d76c407cef6..8d159784462a90cc24566549efe38dddc6c95ab5 100644 (file)
@@ -1,24 +1,19 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Locale dependent formatting and parsing of numeric data.
-
-The default locale for the functions in this module is determined by the
-following environment variables, in that order:
-
- * ``LC_NUMERIC``,
- * ``LC_ALL``, and
- * ``LANG``
+"""
+    babel.numbers
+    ~~~~~~~~~~~~~
+
+    Locale dependent formatting and parsing of numeric data.
+
+    The default locale for the functions in this module is determined by the
+    following environment variables, in that order:
+
+     * ``LC_NUMERIC``,
+     * ``LC_ALL``, and
+     * ``LANG``
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 # TODO:
 #  Padding and rounding increments in pattern:
index afc6d1e1f33173f1ef9c4782ec57ee2ff6fc92b0..6f1605380f776b8ad4f4f2a6a93bf1acdc5aaed5 100644 (file)
@@ -1,17 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2008-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""CLDR Plural support.  See UTS #35.  EXPERIMENTAL"""
+"""
+    babel.numbers
+    ~~~~~~~~~~~~~
+
+    CLDR Plural support.  See UTS #35.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 import re
 
@@ -19,7 +15,6 @@ __all__ = ['PluralRule', 'RuleError', 'to_gettext', 'to_javascript',
            'to_python']
 
 
-
 _plural_tags = ('zero', 'one', 'two', 'few', 'many', 'other')
 _fallback_tag = 'other'
 
index 8e4f40fd71816a9708e2b9f52c59febc42575f1e..27f0897ca2843eb3cc81405e3f7b2796821eccfa 100644 (file)
@@ -1,20 +1,15 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Several classes and functions that help with integrating and using Babel
-in applications.
-
-.. note: the code in this module is not used by Babel itself
+"""
+    babel.support
+    ~~~~~~~~~~~~~
+
+    Several classes and functions that help with integrating and using Babel
+    in applications.
+
+    .. note: the code in this module is not used by Babel itself
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
 """
 
 import gettext
@@ -30,7 +25,6 @@ from babel._compat import PY2, text_type, text_to_native
 __all__ = ['Format', 'LazyProxy', 'NullTranslations', 'Translations']
 
 
-
 class Format(object):
     """Wrapper class providing the various date and number formatting functions
     bound to a specific locale and time-zone.
index e5e7e7b6584846c2b56a6ebaa10c612d0665b44a..230c261dc80f254f1ce255f7083f9af19ddc6abd 100644 (file)
@@ -1,17 +1,13 @@
 # -*- coding: utf-8 -*-
-#
-# Copyright (C) 2007-2011 Edgewall Software
-# All rights reserved.
-#
-# This software is licensed as described in the file COPYING, which
-# you should have received as part of this distribution. The terms
-# are also available at http://babel.edgewall.org/wiki/License.
-#
-# This software consists of voluntary contributions made by many
-# individuals. For the exact contribution history, see the revision
-# history and logs, available at http://babel.edgewall.org/log/.
-
-"""Various utility classes and functions."""
+"""
+    babel.util
+    ~~~~~~~~~~
+
+    Various utility classes and functions.
+
+    :copyright: (c) 2013 by the Babel Team.
+    :license: BSD, see LICENSE for more details.
+"""
 
 import codecs
 from datetime import timedelta, tzinfo
@@ -26,7 +22,6 @@ __all__ = ['distinct', 'pathmatch', 'relpath', 'wraptext', 'odict', 'UTC',
            'LOCALTZ']
 
 
-
 def distinct(iterable):
     """Yield all items in an iterable collection that are distinct.