ramifice 0.5.5__py3-none-any.whl → 0.5.7__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.
- ramifice/fields/choice_float_field.py +1 -1
- ramifice/fields/choice_float_mult_field.py +1 -1
- ramifice/utils/translations.py +7 -1
- {ramifice-0.5.5.dist-info → ramifice-0.5.7.dist-info}/METADATA +1 -1
- {ramifice-0.5.5.dist-info → ramifice-0.5.7.dist-info}/RECORD +7 -7
- {ramifice-0.5.5.dist-info → ramifice-0.5.7.dist-info}/WHEEL +0 -0
- {ramifice-0.5.5.dist-info → ramifice-0.5.7.dist-info}/licenses/LICENSE +0 -0
@@ -27,7 +27,7 @@ class ChoiceFloatField(Field, ChoiceGroup, JsonMixin):
|
|
27
27
|
default: float | None = None,
|
28
28
|
required: bool = False,
|
29
29
|
readonly: bool = False,
|
30
|
-
choices: list[tuple[float
|
30
|
+
choices: list[tuple[float, str]] | None = None,
|
31
31
|
):
|
32
32
|
Field.__init__(
|
33
33
|
self,
|
@@ -27,7 +27,7 @@ class ChoiceFloatMultField(Field, ChoiceGroup, JsonMixin):
|
|
27
27
|
default: list[float] | None = None,
|
28
28
|
required: bool = False,
|
29
29
|
readonly: bool = False,
|
30
|
-
choices: list[tuple[float
|
30
|
+
choices: list[tuple[float, str]] | None = None,
|
31
31
|
):
|
32
32
|
Field.__init__(
|
33
33
|
self,
|
ramifice/utils/translations.py
CHANGED
@@ -28,12 +28,18 @@ import gettext as _gettext
|
|
28
28
|
from gettext import NullTranslations
|
29
29
|
from typing import Any
|
30
30
|
|
31
|
+
from .errors import PanicError
|
32
|
+
|
31
33
|
# Language code by default.
|
32
34
|
DEFAULT_LOCALE: str = "en"
|
33
35
|
# Code of current language.
|
34
36
|
CURRENT_LOCALE: str = copy.deepcopy(DEFAULT_LOCALE)
|
35
37
|
# List of codes supported by languages.
|
36
|
-
LANGUAGES:
|
38
|
+
LANGUAGES: frozenset[str] = frozenset(("en", "ru"))
|
39
|
+
|
40
|
+
if not DEFAULT_LOCALE in LANGUAGES:
|
41
|
+
msg = "ERROR: DEFAULT_LOCALE is not included in the LANGUAGES!"
|
42
|
+
raise PanicError(msg)
|
37
43
|
|
38
44
|
# Add translations for Ramifice.
|
39
45
|
ramifice_translations: dict[str, NullTranslations] = {
|
@@ -10,9 +10,9 @@ ramifice/commons/unit_manager.py,sha256=4spjvTv29AYSWaIP2A4k9E1vawPmwFau9GFK_yav
|
|
10
10
|
ramifice/fields/__init__.py,sha256=yRfX7Tvpuh27Ggcx5u9e1RRYK7Wu59EVJYxxetmuP1w,1290
|
11
11
|
ramifice/fields/bool_field.py,sha256=WWubSwsFJZu8b3MviDd2zXnNYOQaYw8toklFNSTVFLA,2072
|
12
12
|
ramifice/fields/choice_float_dyn_field.py,sha256=GMyKWLjNCP7TeQl1rnM3S7GBPd0N0so_CCCYcuGQLZM,3113
|
13
|
-
ramifice/fields/choice_float_field.py,sha256=
|
13
|
+
ramifice/fields/choice_float_field.py,sha256=7YY85Y1Em11z60oXtNqpUE-Ro-doB-3wQl33eKwOR1o,3906
|
14
14
|
ramifice/fields/choice_float_mult_dyn_field.py,sha256=Uq8eyjiOVVL_K__-C5UJCsUcgXdFYMluZBSJatGz528,3176
|
15
|
-
ramifice/fields/choice_float_mult_field.py,sha256=
|
15
|
+
ramifice/fields/choice_float_mult_field.py,sha256=GKGUKARGnEhjzDe2N29QjU7u1TQcsSmpFIbjTPy6nDo,4252
|
16
16
|
ramifice/fields/choice_int_dyn_field.py,sha256=O4cTaFIZdxZgb3AZmDIHrYwavBaG-pf-s3fF8fSeu2I,3107
|
17
17
|
ramifice/fields/choice_int_field.py,sha256=VJi_9Ilp9Vei4qDqii4OSV_xzpZJHmxeYb5Lfxkvf6Y,3894
|
18
18
|
ramifice/fields/choice_int_mult_dyn_field.py,sha256=G4iLbgipjNIuwQjh0mXo04npp7wpDnvVOlb3LmJKUEg,3172
|
@@ -72,14 +72,14 @@ ramifice/utils/fixtures.py,sha256=qsv9cg06lc82XaRlhI1j5vftmOQTTwOcDXCg_lnpK04,31
|
|
72
72
|
ramifice/utils/globals.py,sha256=uR20um3Qg_1SG1t7WyWbpq8kQD-9Mslyr_c1yh5Hw9w,1751
|
73
73
|
ramifice/utils/migration.py,sha256=kx1JX0xSgebtNtoTm_161_MqBw5kpsqCfIsc8wXYc34,11060
|
74
74
|
ramifice/utils/tools.py,sha256=sOKzwnvf6vdTNf9r6PKAdw6aB4undat2Z8tzS3M1GnQ,2733
|
75
|
-
ramifice/utils/translations.py,sha256=
|
75
|
+
ramifice/utils/translations.py,sha256=rnBoFC4sFuwX5DoWa1EL5MmkfXslbGrezdiwebJ5HUk,4233
|
76
76
|
ramifice/utils/unit.py,sha256=R34gxriT67vI6PmjMIRftNsSP036jwbnsYjxt1Wma48,2454
|
77
77
|
ramifice/utils/mixins/__init__.py,sha256=-UxYokZSlEaqoIs0aPVGtzK2CgN88mTzyhryHEtt0Yo,181
|
78
78
|
ramifice/utils/mixins/add_valid.py,sha256=TLOObedzXNA9eCylfAVbVCqIKE5sV-P5AdIN7avj-GA,407
|
79
79
|
ramifice/utils/mixins/hooks.py,sha256=33jvJRhfnJeL2Hd_YFXk3M_7wjqHaByU2wRjKyboL6s,914
|
80
80
|
ramifice/utils/mixins/indexing.py,sha256=Z0427HoaVRyNmSNN8Fx0mSICgAKV-gDdu3iR5qYUEbs,329
|
81
81
|
ramifice/utils/mixins/json_converter.py,sha256=WhigXyDAV-FfILaZuwvRFRIk0D90Rv3dG5t-mv5fVyc,1107
|
82
|
-
ramifice-0.5.
|
83
|
-
ramifice-0.5.
|
84
|
-
ramifice-0.5.
|
85
|
-
ramifice-0.5.
|
82
|
+
ramifice-0.5.7.dist-info/METADATA,sha256=rgSLGSMuMqLdj7F_5w9LiUUgzUuZAjkz8qi0zlwzT9s,22536
|
83
|
+
ramifice-0.5.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
84
|
+
ramifice-0.5.7.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
|
85
|
+
ramifice-0.5.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|