langtable 0.0.64__py3-none-any.whl → 0.0.66__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
Binary file
langtable/langtable.py CHANGED
@@ -2565,7 +2565,7 @@ def list_all_territories() -> List[str]:
2565
2565
  '''
2566
2566
  List all territory ids langtable knows something about
2567
2567
  '''
2568
- return list(_territories_db.keys())
2568
+ return sorted(_territories_db.keys())
2569
2569
 
2570
2570
  def list_all_timezones() -> List[str]:
2571
2571
  '''
@@ -2719,5 +2719,11 @@ __module_init = __ModuleInitializer()
2719
2719
 
2720
2720
  if __name__ == "__main__":
2721
2721
  import doctest
2722
+ import sys
2722
2723
  _init()
2723
- doctest.testmod()
2724
+ (FAILED, ATTEMPTED) = doctest.testmod()
2725
+ print(f'{ATTEMPTED} tests run. {ATTEMPTED - FAILED} passed and {FAILED} failed.')
2726
+ if FAILED:
2727
+ sys.exit(FAILED)
2728
+ print(f'All tests passed.')
2729
+ sys.exit(0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langtable
3
- Version: 0.0.64
3
+ Version: 0.0.66
4
4
  Summary: guess reasonable defaults for locale, keyboard, territory, ...
5
5
  Home-page: https://github.com/mike-fabian/langtable
6
6
  Author: Mike FABIAN
@@ -13,64 +13,57 @@ Classifier: License :: OSI Approved :: GNU General Public License v3 or later (G
13
13
  Classifier: Operating System :: POSIX :: Linux
14
14
  Classifier: Programming Language :: Python
15
15
  Classifier: Topic :: System :: Installation/Setup
16
+ Description-Content-Type: text/markdown
16
17
  License-File: COPYING
17
18
 
18
- ======================================================================
19
- langtable
20
- ======================================================================
19
+ # langtable
21
20
 
22
- Purpose of this package
23
- =======================
21
+ [![PyPI version](https://badge.fury.io/py/langtable.svg)](https://badge.fury.io/py/langtable)
24
22
 
25
- langtable is used to guess reasonable defaults for locale, keyboard,
26
- territory, …, if part of that information is already known. For
27
- example, guess the territory and the keyboard layout if the language
28
- is known or guess the language and keyboard layout if the territory is
29
- already known.
23
+ Guessing reasonable defaults for locale, keyboard layout, territory, and language.
30
24
 
31
- License
32
- =======
25
+ ## Purpose of this package
26
+ _langtable_ is used to guess reasonable defaults for locale, keyboard, territory, …, if part of that information is already known. For example, guess the territory and the keyboard layout if the language is known or guess the language and keyboard layout if the territory is already known.
27
+
28
+ ## License
33
29
 
34
30
  GPLv3+, see the included file “COPYING”.
35
31
 
36
- Translations for languages and territory names are from CLDR which is
37
- governed by the Unicode Terms of Use, see the included file
38
- “unicode-license.txt”. The short name for this Unicode license is
39
- “MIT”. See:
32
+ Translations for languages and territory names are from CLDR which is governed by the Unicode Terms of Use, see the included file “unicode-license.txt”. The short name for this Unicode license is “MIT”. See:
40
33
 
41
34
  https://fedoraproject.org/wiki/Licensing:MIT?rd=Licensing/MIT#Modern_Style_without_sublicense_.28Unicode.29
42
35
 
43
- Installation
44
- ============
36
+ ## Installation
45
37
 
46
38
  To install langtable, run
47
39
 
40
+ ```
48
41
  make install DESTDIR=/usr
42
+ ```
49
43
 
50
44
  To create a distribution tarball run
51
-
45
+ ```
52
46
  make dist
53
-
47
+ ```
54
48
  To run the test cases in the source directory:
49
+ ```
50
+ make check
51
+ ```
55
52
 
56
- make test-local
57
-
58
- To run the test cases using the installed files:
59
-
60
- make install DESTDIR=/usr
61
- make test DESTDIR=/usr
62
-
63
- How to use it
64
- =============
53
+ ## How to use it
65
54
 
55
+ ```
66
56
  import langtable
57
+ ```
67
58
 
68
59
  Functions in the public API:
69
60
 
61
+ ```
70
62
  parse_locale()
71
63
  list_locales()
72
64
  list_keyboards()
73
65
  list_common_languages()
66
+ list_common_locales()
74
67
  list_common_keyboards()
75
68
  list_consolefonts()
76
69
  list_inputmethods()
@@ -82,8 +75,16 @@ Functions in the public API:
82
75
  languageId()
83
76
  territoryId()
84
77
  supports_ascii()
85
-
86
- Some examples to show the usage are found in the documentation
87
- of the public functions in langtable.py.
88
-
89
- (Some more examples are in the test cases in the file test_cases.py):
78
+ list_all_languages()
79
+ list_all_locales()
80
+ list_all_keyboards()
81
+ list_all_territories()
82
+ list_all_timezones()
83
+ list_all_scripts()
84
+ list_all_input_methods()
85
+ list_all_console_fonts()
86
+ ```
87
+
88
+ Some examples to show the usage are found in the documentation of the public functions in `langtable.py`.
89
+
90
+ Some more examples are in the test cases in the file `test_cases.py`.
@@ -1,17 +1,17 @@
1
1
  langtable/__init__.py,sha256=09oRQxG7NrxWL_v5bKHHCt-DFuK-WIIKmyLp0RtS84M,526
2
- langtable/langtable.py,sha256=fyeVfFTv79Fd1o-PYZnuhtNyQlASSszMeo1glAwpaBI,107345
2
+ langtable/langtable.py,sha256=EDytmVwXFoiTnh01Ig_xEXTlZLI2wwJ3xKMWonsg_84,107558
3
3
  langtable/data/keyboards.xml.gz,sha256=SiBNgt_lJ6qiXM_Ni1fElNRSqnaCRBhqhKSn2FEAoWg,5888
4
- langtable/data/languages.xml.gz,sha256=lMGbXhoV7jYW9Muwe8zkXwoEkDVZhfTb1tsEiWhP2rE,404447
5
- langtable/data/territories.xml.gz,sha256=3-95Zj0QQUU3Fu0xn6TCFm_cGzXVYEmPEu-9afJ2XDU,488094
6
- langtable/data/timezoneidparts.xml.gz,sha256=T2iWSxt4ikLjL0dPEIH4jzkcCcQ8MYHMdl_abu9OsRA,377867
4
+ langtable/data/languages.xml.gz,sha256=MHGBnN8IX7A1kdroD-P4Q0ObOp1XKVgzp5SM9xdxgYQ,409136
5
+ langtable/data/territories.xml.gz,sha256=aYbrZJepeZeJk9ilWu-SDJ3NbZ46w3HVhP9OhsWKgN8,494566
6
+ langtable/data/timezoneidparts.xml.gz,sha256=1bH7G-Twn4StA4J-fCDutqX_LPEJlUvQDxI0UY8ccfk,378548
7
7
  langtable/data/timezones.xml.gz,sha256=UJ6YNPOKG5yp2hEgbEK_4yWsnmrbDhHZAr6ZL-Wr0Fw,3542
8
8
  langtable/schemas/keyboards.rng,sha256=Gy8zXngR6VZ6QXGrsp4u7Aolpk-VkWTJ_8kTlT-a9ss,1301
9
9
  langtable/schemas/languages.rng,sha256=rDTnJ-yPK7CgwQCjVMhLMCf0xzGpG2cnx0iIn85f0Po,4153
10
10
  langtable/schemas/territories.rng,sha256=KnDf45rlNpmsDTmzND0WDDXGNy08N1fx0reRjKUS_SQ,3482
11
11
  langtable/schemas/timezoneidparts.rng,sha256=--LNbran9DrHSDQSZMqxYjermlPRo39GZwLtR-zF_Ug,683
12
12
  langtable/schemas/timezones.rng,sha256=l2sVJPyo48ESnNaTr1QHgv5fV26cIJZ_XxElumAc3F0,665
13
- langtable-0.0.64.dist-info/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
14
- langtable-0.0.64.dist-info/METADATA,sha256=YJD4BFf_jsz7QFJLSOpJFGYc1_1F4SfJr01TkRdLSm4,2424
15
- langtable-0.0.64.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
16
- langtable-0.0.64.dist-info/top_level.txt,sha256=vFuD4S3tAk7ZEIOqrR5tqqm-ThvhpwXxYUMxZdXY1-0,10
17
- langtable-0.0.64.dist-info/RECORD,,
13
+ langtable-0.0.66.dist-info/COPYING,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
14
+ langtable-0.0.66.dist-info/METADATA,sha256=2zyTYbg3pNTjNdx_knLqNKWtAdAVxNHERhDzTYGq8zY,2622
15
+ langtable-0.0.66.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
16
+ langtable-0.0.66.dist-info/top_level.txt,sha256=vFuD4S3tAk7ZEIOqrR5tqqm-ThvhpwXxYUMxZdXY1-0,10
17
+ langtable-0.0.66.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.38.4)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5