]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Use https URLs throughout project where available 588/head
authorJon Dufresne <jon.dufresne@gmail.com>
Sun, 10 Jun 2018 02:44:44 +0000 (19:44 -0700)
committerJon Dufresne <jon.dufresne@gmail.com>
Wed, 13 Jun 2018 14:20:37 +0000 (07:20 -0700)
Updated docs and code comments.

18 files changed:
.ci/appveyor.yml
.ci/run_with_env.cmd
CONTRIBUTING.md
babel/dates.py
babel/languages.py
babel/numbers.py
babel/plural.py
babel/support.py
babel/units.py
docs/_templates/sidebar-links.html
docs/conf.py
docs/dates.rst
docs/installation.rst
docs/intro.rst
docs/locale.rst
docs/messages.rst
docs/numbers.rst
scripts/import_cldr.py

index 816b938f65a56869cd29862765d98fcaf0a6e93e..f357713f4819b1902c038d511bc918a485102902 100644 (file)
@@ -4,7 +4,7 @@ environment:
   global:
     # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the
     # /E:ON and /V:ON options are not enabled in the batch script intepreter
-    # See: http://stackoverflow.com/a/13751649/163740
+    # See: https://stackoverflow.com/a/13751649
     CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\.ci\\run_with_env.cmd"
 
   matrix:
index 3a472bc836c30415445def35bc58338a1cbe38c5..0f5b8e097e130a990ba4c8995fc1860c2a2bf728 100644 (file)
 ::
 :: More details at:
 :: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
-:: http://stackoverflow.com/a/13751649/163740
+:: https://stackoverflow.com/a/13751649
 ::
 :: Author: Olivier Grisel
-:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
+:: License: CC0 1.0 Universal: https://creativecommons.org/publicdomain/zero/1.0/
 @ECHO OFF
 
 SET COMMAND_TO_RUN=%*
index c1b7e69596cf2875d9311114759780f6ed444ea7..079ef06b2e4ccc38b2951180737f5a277c956cbd 100644 (file)
@@ -51,5 +51,5 @@ shall be amended so the history is not cluttered by "fixup commits".
 ## Writing Good Commits
 
 Please see
-http://api.coala.io/en/latest/Developers/Writing_Good_Commits.html
+https://api.coala.io/en/latest/Developers/Writing_Good_Commits.html
 for guidelines on how to write good commits and proper commit messages.
index cf58a485dc3c6cd63215ac549612533779bce548..4bae3eaa085f1942e11519769e3f7d10aa4dd73d 100644 (file)
@@ -34,7 +34,7 @@ from babel._compat import string_types, integer_types, number_types, PY2
 #  be inherited, the inheritance of this value can be explicitly disabled by
 #  use of the 'no inheritance marker' as the value, which is 3 simultaneous [sic]
 #  empty set characters ( U+2205 )."
-#  - http://www.unicode.org/reports/tr35/tr35-dates.html#Metazone_Names
+#  - https://www.unicode.org/reports/tr35/tr35-dates.html#Metazone_Names
 
 NO_INHERITANCE_MARKER = u'\u2205\u2205\u2205'
 
@@ -592,7 +592,7 @@ def get_timezone_name(dt_or_tzinfo=None, width='long', uncommon=False,
     format.
 
     For more information see `LDML Appendix J: Time Zone Display Names
-    <http://www.unicode.org/reports/tr35/#Time_Zone_Fallback>`_
+    <https://www.unicode.org/reports/tr35/#Time_Zone_Fallback>`_
 
     .. versionadded:: 0.9
 
@@ -1018,7 +1018,7 @@ def format_interval(start, end, skeleton=None, tzinfo=None, fuzzy=True, locale=L
     locale = Locale.parse(locale)
 
     # NB: The quote comments below are from the algorithm description in
-    #     http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
+    #     https://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
 
     # > Look for the intervalFormatItem element that matches the "skeleton",
     # > starting in the current locale and then following the locale fallback
@@ -1527,7 +1527,7 @@ PATTERN_CHARS = {
 }
 
 #: The pattern characters declared in the Date Field Symbol Table
-#: (http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
+#: (https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table)
 #: in order of decreasing magnitude.
 PATTERN_CHAR_ORDER = "GyYuUQqMLlwWdDFgEecabBChHKkjJmsSAzZOvVXx"
 
@@ -1675,7 +1675,7 @@ def split_interval_pattern(pattern):
     Split an interval-describing datetime pattern into multiple pieces.
 
     > The pattern is then designed to be broken up into two pieces by determining the first repeating field.
-    - http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
+    - https://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
 
     >>> split_interval_pattern(u'E d.M. \u2013 E d.M.')
     [u'E d.M. \u2013 ', 'E d.M.']
index 0513d002d4f465861dddf471b728f4aedd3d9f5f..09743670508f60e517b4106b0ca67dbb6a549125 100644 (file)
@@ -60,7 +60,7 @@ def get_territory_language_info(territory):
 
     .. note:: Note that the format of the dict returned may change between Babel versions.
 
-    See http://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
+    See https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html
 
     :param territory: Territory code
     :type territory: str
index cc825c866dd67979f58776715e00261be6774766..518d4945e2a251f278877dcdf6505fa7b69ff8c3 100644 (file)
@@ -17,7 +17,7 @@
 """
 # TODO:
 #  Padding and rounding increments in pattern:
-#  - http://www.unicode.org/reports/tr35/ (Appendix G.6)
+#  - https://www.unicode.org/reports/tr35/ (Appendix G.6)
 import re
 from datetime import date as date_, datetime as datetime_
 import warnings
index 38093fe6e415fbd57769b50baf6898571babd39b..eb1eef268302b4edc3bfe450c252a0894c633bbb 100644 (file)
@@ -33,7 +33,7 @@ def extract_operands(source):
     t      visible fractional digits in n, without trailing zeros.
     ====== ===============================================================
 
-    .. _`CLDR rules`: http://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Operands
+    .. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Operands
 
     :param source: A real number
     :type source: int|float|decimal.Decimal
@@ -91,7 +91,7 @@ class PluralRule(object):
     exclusive; for a given numeric value, only one rule should apply (i.e.
     the condition should only be true for one of the plural rule elements.
 
-    .. _`CLDR rules`: http://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules
+    .. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules
     """
 
     __slots__ = ('abstract', '_func')
index 932fcf2bbe2e4f3fc5fabb05e0c18a265a2a3238..87cb059675435812f1b01734a97e9ad57a0c7096 100644 (file)
@@ -343,7 +343,7 @@ class NullTranslations(gettext.NullTranslations, object):
     dungettext = udngettext
 
     # Most of the downwards code, until it get's included in stdlib, from:
-    #    http://bugs.python.org/file10036/gettext-pgettext.patch
+    #    https://bugs.python.org/file10036/gettext-pgettext.patch
     #
     # The encoding of a msgctxt and a msgid in a .mo file is
     # msgctxt + "\x04" + msgid (gettext version >= 0.15)
index 4260b3d5687d35924406564c622c6f6b0a78b136..be851c230cc6f650ba94010a03164c520bded6c8 100644 (file)
@@ -26,7 +26,7 @@ def get_unit_name(measurement_unit, length='long', locale=LC_NUMERIC):
 
     :param measurement_unit: the code of a measurement unit.
                              Known units can be found in the CLDR Unit Validity XML file:
-                             http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
+                             https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
 
     :param length: "short", "long" or "narrow"
     :param locale: the `Locale` object or locale identifier
@@ -44,7 +44,7 @@ def _find_unit_pattern(unit_id, locale=LC_NUMERIC):
     Expand an unit into a qualified form.
 
     Known units can be found in the CLDR Unit Validity XML file:
-    http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
+    https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
 
     >>> _find_unit_pattern("radian", locale="en")
     'angle-radian'
@@ -105,7 +105,7 @@ def format_unit(value, measurement_unit, length='long', format=None, locale=LC_N
     :param value: the value to format. If this is a string, no number formatting will be attempted.
     :param measurement_unit: the code of a measurement unit.
                              Known units can be found in the CLDR Unit Validity XML file:
-                             http://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
+                             https://unicode.org/repos/cldr/tags/latest/common/validity/unit.xml
     :param length: "short", "long" or "narrow"
     :param format: An optional format, as accepted by `format_decimal`.
     :param locale: the `Locale` object or locale identifier
@@ -219,7 +219,7 @@ def format_compound_unit(
     >>> format_compound_unit(format_currency(35, "JPY", locale="de"), denominator_unit="liter", locale="de")
     '35\\xa0\\xa5 pro Liter'
 
-    See http://www.unicode.org/reports/tr35/tr35-general.html#perUnitPatterns
+    See https://www.unicode.org/reports/tr35/tr35-general.html#perUnitPatterns
 
     :param numerator_value: The numerator value. This may be a string,
                             in which case it is considered preformatted and the unit is ignored.
index 99c347420e7c4fca3835061631548117545dc421..71d11b850e589db8544bc38db39b25bfae8ae763 100644 (file)
@@ -10,6 +10,6 @@
 <ul>
   <li><a href="http://babel.pocoo.org/">Babel Website</a></li>
   <li><a href="https://pypi.org/project/Babel/">Babel @ PyPI</a></li>
-  <li><a href="http://github.com/python-babel/babel">Babel @ github</a></li>
-  <li><a href="http://github.com/python-babel/babel/issues">Issue Tracker</a></li>
+  <li><a href="https://github.com/python-babel/babel">Babel @ github</a></li>
+  <li><a href="https://github.com/python-babel/babel/issues">Issue Tracker</a></li>
 </ul>
index 47196622a6a59956a35f93cd736d5e18038112e7..63c2d7749c2c608afea68aabdc0d72d0a5243ef1 100644 (file)
@@ -253,7 +253,7 @@ texinfo_documents = [
 #texinfo_show_urls = 'footnote'
 
 intersphinx_mapping = {
-    'http://docs.python.org/2': None,
+    'https://docs.python.org/2/': None,
 }
 
 extlinks = {
index 0ddd7bc9519878c3e335b436b7f9ffb2d9db9dd0..44201877efb75c8f472f61e364b0bd4bc87bbb02 100644 (file)
@@ -124,7 +124,7 @@ the `Locale Data Markup Language specification`_. The following table is just a
 relatively brief overview.
 
  .. _`Locale Data Markup Language specification`:
-    http://unicode.org/reports/tr35/#Date_Format_Patterns
+    https://unicode.org/reports/tr35/#Date_Format_Patterns
 
 Date Fields
 -----------
index 0aea3abfe835050db0e44dcd66f2b41d6c61b96b..0a7804e86266aaec9b4a893639b64c677926977d 100644 (file)
@@ -80,7 +80,7 @@ use a git checkout.
 
 Get the git checkout in a new virtualenv and run in development mode::
 
-    $ git clone http://github.com/python-babel/babel.git
+    $ git clone https://github.com/python-babel/babel
     Initialized empty Git repository in ~/dev/babel/.git/
     $ cd babel
     $ virtualenv venv
index db36f32d30155e389c6755a21cee32b6de3562d8..7733f70b1356771ab909873784edfd21847328eb 100644 (file)
@@ -43,7 +43,7 @@ of locale data, such as the localized names of countries, languages, or
 time-zones, which are frequently needed in web-based applications.
 
 For these requirements, Babel includes data extracted from the `Common
-Locale Data Repository (CLDR) <http://unicode.org/cldr/>`_, and provides a
+Locale Data Repository (CLDR) <https://unicode.org/cldr/>`_, and provides a
 number of convenient methods for accessing and using this data. See
 :ref:`locale-data`, :ref:`date-and-time`, and :ref:`numbers` for more
 information on this aspect of Babel.
index cf4f6d5c53f7189d0a2db508599de18d6b7345de..425fb776c266a66394b9b321ca2a8ddfdf7720b7 100644 (file)
@@ -15,8 +15,8 @@ and you'd like to display the names of those countries in the language the
 user prefers. Instead of translating all those country names yourself in your
 application, you can make use of the translations provided by the locale data
 included with Babel, which is based on the `Common Locale Data Repository
-(CLDR) <http://unicode.org/cldr/>`_ developed and maintained by the `Unicode
-Consortium <http://unicode.org/>`_.
+(CLDR) <https://unicode.org/cldr/>`_ developed and maintained by the `Unicode
+Consortium <https://unicode.org/>`_.
 
 
 The ``Locale`` Class
index f1f695c24a8983d21b63ccea66271928a23a8140..9c66a42ebb6d709afaa3b4b41cc2f1fec77ae7f1 100644 (file)
@@ -32,8 +32,8 @@ used in an application. They are commonly stored in PO (Portable Object) and MO
 (Machine Object) files, the formats of which are defined by the GNU `gettext`_
 tools and the GNU `translation project`_.
 
- .. _`gettext`: http://www.gnu.org/software/gettext/
- .. _`translation project`: http://sourceforge.net/projects/translation
+ .. _`gettext`: https://www.gnu.org/software/gettext/
+ .. _`translation project`: https://sourceforge.net/projects/translation/
 
 The general procedure for building message catalogs looks something like this:
 
@@ -81,7 +81,7 @@ extracted from source files can not only depend on the file extension, but
 needs to be controllable in a precise manner.
 
 .. _`Jinja2`: http://jinja.pocoo.org/
-.. _`Genshi`: http://genshi.edgewall.org/
+.. _`Genshi`: https://genshi.edgewall.org/
 
 Babel accepts a configuration file to specify this mapping of files to
 extraction methods, which is described below.
index b2a9522819580d8d6d13b3dddcb2846427d39965..df834eaf8c9615ec7154ba0887e715577ca77cdd 100644 (file)
@@ -47,7 +47,7 @@ The syntax for custom number format patterns is described in detail in the
 the specification. The following table is just a relatively brief overview.
 
  .. _`Locale Data Markup Language specification`:
-    http://unicode.org/reports/tr35/#Number_Format_Patterns
+    https://unicode.org/reports/tr35/#Number_Format_Patterns
 
   +----------+-----------------------------------------------------------------+
   | Symbol   | Description                                                     |
@@ -134,7 +134,7 @@ behaves as desired.
 
 .. _Decimal: https://docs.python.org/3/library/decimal.html#decimal-objects
 .. _Context: https://docs.python.org/3/library/decimal.html#context-objects
-.. _`UTS #35 section 3.3`: http://www.unicode.org/reports/tr35/tr35-numbers.html#Formatting
+.. _`UTS #35 section 3.3`: https://www.unicode.org/reports/tr35/tr35-numbers.html#Formatting
 .. _cdecimal: https://pypi.org/project/cdecimal/
 
 
index f1dd391bef730367b829833d6bd34bfe68413611..a3e8f69ea671944cfb1dbad92e33074f9d11853e 100755 (executable)
@@ -756,7 +756,7 @@ def parse_decimal_formats(data, tree):
                 pattern = numbers.parse_pattern(text_type(pattern_el.text))
                 if pattern_type:
                     # This is a compact decimal format, see:
-                    # http://www.unicode.org/reports/tr35/tr35-45/tr35-numbers.html#Compact_Number_Formats
+                    # https://www.unicode.org/reports/tr35/tr35-45/tr35-numbers.html#Compact_Number_Formats
 
                     # These are mapped into a `compact_decimal_formats` dictionary
                     # with the format {length: {count: {multiplier: pattern}}}.
@@ -861,7 +861,7 @@ def parse_date_fields(data, tree):
 
 
 def parse_interval_formats(data, tree):
-    # http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
+    # https://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats
     interval_formats = data.setdefault("interval_formats", {})
     for elem in tree.findall("dateTimeFormats/intervalFormats/*"):
         if 'draft' in elem.attrib: