refspy.models.language
Data object for language options.
Program strings that vary with the selected language.
Attributes:
- verse_markers: The equivalent of 'v.' and vv.' in English.
- ambiguous_aliases: Book names or abbreviations that are also common words.
- number_prefixes: The equivalent of 'I' and 'First' (etc) in English.
- default_link_pattern: see
refspy.manager.Manager.template() - demonstration_text: For generating demo HTML and images
- nt_translation: default BibleGateway translations for New Testament
- ot_translation: default BibleGateway translations for Old Testament
- dc_translation: default BibleGateway translations for Deuterocanonicals
- dc_notes: notes suggested to be shown with deutrocanonicals matches
1"""Data object for language options. 2 3Program strings that vary with the selected language. 4 5Attributes: 6 verse_markers: The equivalent of 'v.' and vv.' in English. 7 ambiguous_aliases: Book names or abbreviations that are also common words. 8 number_prefixes: The equivalent of 'I' and 'First' (etc) in English. 9 default_link_pattern: see `refspy.manager.Manager.template()` 10 demonstration_text: For generating demo HTML and images 11 nt_translation: default BibleGateway translations for New Testament 12 ot_translation: default BibleGateway translations for Old Testament 13 dc_translation: default BibleGateway translations for Deuterocanonicals 14 dc_notes: notes suggested to be shown with deutrocanonicals matches 15""" 16 17from pydantic import BaseModel 18 19from refspy.models.syntax import Syntax 20 21 22class Language(BaseModel): 23 verse_markers: list[str] 24 ambiguous_aliases: list[str] 25 number_prefixes: dict[str, list[str]] 26 syntax: Syntax 27 default_link_pattern: str 28 demonstration_text: str 29 nt_translation: str 30 ot_translation: str 31 dc_translation: str 32 dc_notes: list[str]
class
Language(pydantic.main.BaseModel):
23class Language(BaseModel): 24 verse_markers: list[str] 25 ambiguous_aliases: list[str] 26 number_prefixes: dict[str, list[str]] 27 syntax: Syntax 28 default_link_pattern: str 29 demonstration_text: str 30 nt_translation: str 31 ot_translation: str 32 dc_translation: str 33 dc_notes: list[str]
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
syntax: refspy.models.syntax.Syntax