Plugin Directory


Ignore:
Timestamp:
10/15/2026 07:29:29 PM (4 days ago)
Author:
roxyapi
Message:

Update to version 1.21.0 from GitHub

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roxyapi/trunk/src/Generated/Forms/CalculateLuckPillarsForm.php

    r3747703 r3749195  
    1919
    2020        public static function spec(): array {
     21                $labels = \RoxyAPI\Generated\FormLabels::for_language( \RoxyAPI\Support\Language::from_locale( determine_locale() ) );
    2122                return array(
    2223                        'operation_id' => 'calculateLuckPillars',
    2324                        'title'        => __( 'Luck Pillars', 'roxyapi' ),
    2425                        'submit_label' => __( 'Get reading', 'roxyapi' ),
    25                         'fold_optional' => true,
     26                        'locations'    => array( array( 'anchor' => 'timezone', 'section' => '', 'id' => '', 'fields' => array( 'timezone' => 'timezone', 'latitude' => 'latitude', 'longitude' => 'longitude' ) ) ),
    2627                        'sections'     => array(
    2728
    … …  
    3031                                array(
    3132                                        'name' => 'date',
    32                                         'label' => __( 'Date', 'roxyapi' ),
     33                                        'label' => $labels['fields']['date'] ?? 'Date',
    3334                                        'required' => true,
    34                                         'help' => __( 'Birth date in YYYY-MM-DD format', 'roxyapi' ),
    3535                                        'type' => 'date',
     36                                        'fold' => false,
    3637                                ),
    3738                                array(
    3839                                        'name' => 'time',
    39                                         'label' => __( 'Time', 'roxyapi' ),
     40                                        'label' => $labels['fields']['time'] ?? 'Time',
    4041                                        'required' => true,
    41                                         'help' => __( 'Birth time in 24-hour HH:MM:SS format', 'roxyapi' ),
    4242                                        'type' => 'time',
     43                                        'fold' => false,
    4344                                ),
    4445                                array(
    4546                                        'name' => 'timezone',
    46                                         'label' => __( 'Timezone', 'roxyapi' ),
     47                                        'label' => $labels['fields']['timezone'] ?? 'Timezone',
    4748                                        'required' => true,
    4849                                        'help' => __( 'Select the timezone of the location.', 'roxyapi' ),
    4950                                        'type' => 'timezone',
     51                                        'min' => -14,
     52                                        'max' => 14,
     53                                        'fold' => false,
    5054                                ),
    5155                                array(
    5256                                        'name' => 'latitude',
    53                                         'label' => __( 'Latitude', 'roxyapi' ),
     57                                        'label' => $labels['fields']['latitude'] ?? 'Latitude',
    5458                                        'required' => false,
    55                                         'help' => __( 'Birth latitude in decimal degrees', 'roxyapi' ),
    5659                                        'type' => 'number',
    5760                                        'min' => -90,
    5861                                        'max' => 90,
     62                                        'default' => 0,
    5963                                        'step' => 'any',
     64                                        'fold' => false,
    6065                                ),
    6166                                array(
    6267                                        'name' => 'longitude',
    63                                         'label' => __( 'Longitude', 'roxyapi' ),
     68                                        'label' => $labels['fields']['longitude'] ?? 'Longitude',
    6469                                        'required' => false,
    65                                         'help' => __( 'Birth longitude in decimal degrees', 'roxyapi' ),
    6670                                        'type' => 'number',
    6771                                        'min' => -180,
    6872                                        'max' => 180,
    6973                                        'step' => 'any',
     74                                        'fold' => false,
    7075                                ),
    7176                                array(
    7277                                        'name' => 'dayBoundary',
    73                                         'label' => __( 'Day boundary', 'roxyapi' ),
     78                                        'label' => $labels['fields']['dayBoundary'] ?? 'Day boundary',
    7479                                        'required' => false,
    75                                         'help' => __( 'Which instant starts the sexagenary DAY, which only matters for a birth between 23:00 and 23:59', 'roxyapi' ),
    7680                                        'type' => 'enum',
    7781                                        'enum' => array( 'split-zi', 'midnight', 'early-zi' ),
     82                                        'default' => 'split-zi',
     83                                        'enum_labels' => array( $labels['enums']['dayBoundary.split-zi'] ?? 'Split zi', $labels['enums']['dayBoundary.midnight'] ?? 'Midnight', $labels['enums']['dayBoundary.early-zi'] ?? 'Early zi' ),
     84                                        'fold' => true,
    7885                                ),
    7986                                array(
    8087                                        'name' => 'yearBoundary',
    81                                         'label' => __( 'Year boundary', 'roxyapi' ),
     88                                        'label' => $labels['fields']['yearBoundary'] ?? 'Year boundary',
    8289                                        'required' => false,
    83                                         'help' => __( 'Which instant starts the sexagenary YEAR', 'roxyapi' ),
    8490                                        'type' => 'enum',
    8591                                        'enum' => array( 'li-chun', 'lunar-new-year' ),
     92                                        'default' => 'li-chun',
     93                                        'enum_labels' => array( $labels['enums']['yearBoundary.li-chun'] ?? 'Li chun', $labels['enums']['yearBoundary.lunar-new-year'] ?? 'Lunar new year' ),
     94                                        'fold' => true,
    8695                                ),
    8796                                array(
    8897                                        'name' => 'hourClock',
    89                                         'label' => __( 'Hour clock', 'roxyapi' ),
     98                                        'label' => $labels['fields']['hourClock'] ?? 'Hour clock',
    9099                                        'required' => false,
    91                                         'help' => __( 'Which clock the day boundary and the hour branch are read from, so a correction that carries a birth across midnight moves the day pillar with the hour', 'roxyapi' ),
    92100                                        'type' => 'enum',
    93101                                        'enum' => array( 'clock', 'local-mean', 'solar' ),
     102                                        'default' => 'clock',
     103                                        'enum_labels' => array( $labels['enums']['hourClock.clock'] ?? 'Clock', $labels['enums']['hourClock.local-mean'] ?? 'Local mean', $labels['enums']['hourClock.solar'] ?? 'Solar' ),
     104                                        'fold' => true,
    94105                                ),
    95106                                array(
    96107                                        'name' => 'gender',
    97                                         'label' => __( 'Gender', 'roxyapi' ),
     108                                        'label' => $labels['fields']['gender'] ?? 'Gender',
    98109                                        'required' => true,
    99                                         'help' => __( 'Subject sex, used only to pick the luck-pillar direction: a male born in a yang-stem year and a female born in a yin-stem year run forward through the sexagenary cycle, and the other two combinations run backward', 'roxyapi' ),
    100110                                        'type' => 'enum',
    101111                                        'enum' => array( 'male', 'female' ),
     112                                        'enum_labels' => array( $labels['enums']['gender.male'] ?? 'Male', $labels['enums']['gender.female'] ?? 'Female' ),
     113                                        'fold' => false,
    102114                                ),
    103115                                array(
    104116                                        'name' => 'count',
    105                                         'label' => __( 'Count', 'roxyapi' ),
     117                                        'label' => $labels['fields']['count'] ?? 'How many',
    106118                                        'required' => false,
    107                                         'help' => __( 'How many ten-year luck pillars to return, 1 to 12', 'roxyapi' ),
    108119                                        'type' => 'integer',
    109120                                        'min' => 1,
    110121                                        'max' => 12,
     122                                        'default' => 8,
     123                                        'fold' => true,
    111124                                ),
    112125                                array(
    113126                                        'name' => 'annualFromYear',
    114                                         'label' => __( 'Annual from year', 'roxyapi' ),
     127                                        'label' => $labels['fields']['annualFromYear'] ?? 'Annual pillars from year',
    115128                                        'required' => false,
    116                                         'help' => __( 'First Gregorian year of the annual pillar overlay', 'roxyapi' ),
    117129                                        'type' => 'integer',
    118130                                        'min' => 1551,
    119131                                        'max' => 2649,
     132                                        'fold' => true,
    120133                                ),
    121134                                array(
    122135                                        'name' => 'annualYears',
    123                                         'label' => __( 'Annual years', 'roxyapi' ),
     136                                        'label' => $labels['fields']['annualYears'] ?? 'Years of annual pillars',
    124137                                        'required' => false,
    125                                         'help' => __( 'How many consecutive years the annual overlay covers, 1 to 20', 'roxyapi' ),
    126138                                        'type' => 'integer',
    127139                                        'min' => 1,
    128140                                        'max' => 20,
     141                                        'default' => 10,
     142                                        'fold' => true,
    129143                                ),
    130144                        ),
Note: See TracChangeset for help on using the changeset viewer.