Ignore:
Timestamp:
12/28/15 21:30:11 (9 years ago)
Author:
nanardon
Message:

Translate attribute with their definition

Location:
trunk/LATMOS-Accounts/lib/LATMOS/Accounts
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Address.pm

    r1498 r1550  
    4848            name =>         { inline => 1, }, 
    4949            exported =>     { inline => 1, }, 
    50             user =>         { inline => 1, 
     50            user =>         { 
     51                inline => 1, 
    5152                reference => 'user', 
     53                label => l('User'), 
    5254            }, 
    5355            site =>         { 
    5456                reference => 'site', 
     57                label => l('Site'), 
    5558            }, 
    5659            sn =>           { 
     
    6467                    return $user->_get_c_field($attr->name); 
    6568                }, 
     69                label => l('Last name'), 
    6670            }, 
    6771            mail =>         { 
     
    7579                    return $user->_get_c_field($attr->name); 
    7680                }, 
     81                label => l('Email'), 
    7782            }, 
    7883            givenName => { 
     
    8691                    return $user->_get_c_field($attr->name); 
    8792                }, 
     93                label => l('First name'), 
    8894            }, 
    8995            postalAddress => { 
     
    108114                    ); 
    109115                }, 
     116                label => l('Postal address'), 
    110117            }, 
    111118            displayName =>  { 
     
    120127                    ); 
    121128                }, 
     129                label => l('Name'), 
    122130            }, 
    123131            co => { 
     
    141149                    } 
    142150                }, 
     151                label => l('Country'), 
    143152            }, 
    144153            l => { 
     
    162171                    } 
    163172                }, 
     173                label => l('City'), 
    164174            }, 
    165175            postalCode =>   { 
     
    183193                    } 
    184194                }, 
     195                label => l('Postal code'), 
    185196            }, 
    186197            streetAddress => { 
     
    205216                    } 
    206217                }, 
     218                label => l('Street'), 
    207219            }, 
    208220            postOfficeBox => { 
     
    226238                    } 
    227239                }, 
     240                label => l('Post office box'), 
    228241            }, 
    229242            st => { 
     
    247260                    } 
    248261                }, 
     262                label => l('Street'), 
    249263            }, 
    250264            facsimileTelephoneNumber => { 
     
    268282                    } 
    269283                }, 
     284                label => l('Fax number'), 
    270285            }, 
    271286            o =>            { 
     
    289304                    } 
    290305                }, 
    291             }, 
    292             isMainAddress => { formtype => 'CHECKBOX', }, 
     306                label => l('o'), 
     307            }, 
     308            isMainAddress => { 
     309                formtype => 'CHECKBOX', 
     310                label => l('Main address'), 
     311            }, 
    293312            active => { ro => 1 }, 
    294             telephoneNumber => { }, 
    295             physicalDeliveryOfficeName => { }, 
     313            telephoneNumber => { 
     314                label => l('Phone number'), 
     315            }, 
     316            physicalDeliveryOfficeName => { 
     317                label => l('Office'), 
     318            }, 
    296319            otherTelephone => { }, 
    297320            ipPhone => { }, 
    298321            homePhone => { }, 
    299             description => { }, 
     322            description => { 
     323                label => l('Description'), 
     324            }, 
    300325        } 
    301326    ); 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Aliases.pm

    r1501 r1550  
    6666            }, 
    6767            forward         => { 
     68                label => l('Forward'), 
    6869                mandatory => 1, 
    6970                multiple => 1, 
     
    114115                    return @res ? \@res : undef; 
    115116                }, 
     117                label => l('Final recipient') 
    116118            }, 
    117119            parents         => { 
    118120                ro => 1, 
    119121                get => $recurs, 
     122                label => l('Parents') 
    120123            }, 
    121124            anyparents      => { 
     
    137140                reference => 'user', 
    138141                multiple => 1, 
     142                label => l('User'), 
    139143            }, 
    140144            expire    => { 
    141145                inline => 1, 
    142146                formtype => 'DATE', 
    143             }, 
    144             comment => { }, 
     147                label => l('Expire'), 
     148            }, 
     149            comment => { 
     150                label => l('Comment'), 
     151            }, 
    145152            autoMemberFilter => { 
    146153                multiple => 1, 
     
    150157                    $self->object->populate_dyn_aliases; 
    151158                    return 1; 
    152                 } 
    153  
     159                }, 
     160                label => l('Automate filter'), 
    154161            }, 
    155162            autoExclude => { 
    156163                multiple => 1, 
    157164                reference => 'user', 
     165                label => l('User excluded'), 
    158166            }, 
    159167        } 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Employment.pm

    r1540 r1550  
    5252        user =>         { inline => 1, 
    5353            reference => 'user', 
    54         }, 
    55         description => { }, 
     54            label => l('User'), 
     55        }, 
     56        description => { 
     57            label => l('Description'), 
     58        }, 
    5659        firstday => { 
    5760            inline => 1, 
    5861            formtype => 'DATE', 
    5962            monitored => 1, 
     63            label => l('First day'), 
    6064        }, 
    6165        lastday => { 
     
    6367            formtype => 'DATE', 
    6468            monitored => 1, 
     69            label => l('Last day'), 
    6570        }, 
    6671        'state' => { 
     
    8186                } 
    8287            }, 
     88            label => l('State'), 
    8389        }, 
    8490        contratType => { 
     
    8894            }, 
    8995            monitored => 1, 
     96            label => l('Type of contract'), 
    9097        }, 
    9198        managerContact => { 
     
    98105            }, 
    99106            reference => 'user', 
     107            label => l('Contact'), 
    100108        }, 
    101109        department => { 
     
    105113            }, 
    106114            monitored => 1, 
    107         }, 
    108         company => { }, 
    109         endcircuit    => { formtype => 'DATE', monitored => 1, }, 
     115            label => l('Department'), 
     116        }, 
     117        company => { 
     118            label => l('Company'), 
     119        }, 
     120        endcircuit    => { 
     121            formtype => 'DATE', 
     122            monitored => 1, 
     123            label => l('End of entrance'), 
     124        }, 
    110125        previous => { 
    111126            ro => 1, 
     
    126141                return $res->{name}; 
    127142            }, 
     143            label => l('Previous'), 
    128144        }, 
    129145        next => { 
     
    145161                return $res->{name}; 
    146162            }, 
     163            label => l('Next'), 
    147164        }, 
    148165        minFirstDay => { 
     
    182199                } 
    183200            }, 
     201            label => l('Minimal first day'), 
    184202        }, 
    185203        maxLastDay => { 
     
    222240                } 
    223241            }, 
     242            label => l('Maximal last day'), 
    224243        }, 
    225244    }; 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Group.pm

    r1475 r1550  
    3232                iname => 'gidnumber', 
    3333                mandatory => 1,  
     34                label => l('GID'), 
    3435            }, 
    3536            gidnumber  => { inline => 1, uniq => 1, hide => 1, }, 
     
    6970                    $self->object->_set_group_members($data); 
    7071                }, 
     72                label => l('Member'), 
    7173            }, 
    7274            member     => { 
     
    9092                    $self->object->_set_group_members($data); 
    9193                }, 
     94                label => l('Member'), 
    9295            }, 
    9396            sAMAccountName => { iname => 'name', ro => 1 }, 
     
    102105                    sort keys %uniq; 
    103106                }, 
     107                label => l('Manager'), 
    104108            }, 
    105109            managedAlsoBy  => { 
     
    114118                    sort keys %uniq; 
    115119                }, 
     120                label => l('Secondary Manager'), 
    116121            }, 
    117122            sutype => { 
    118123                reference => 'sutype', 
    119124                monitored => 1, 
     125                label => l('Structure'), 
    120126            }, 
    121127            autoMemberFilter => { 
     
    126132                    $self->object->populate_dyn_group; 
    127133                    return 1; 
    128                 } 
    129             }, 
    130             label => { }, 
    131             expire => { }, 
    132             description => { }, 
    133             comment => { }, 
     134                }, 
     135                label => l('Automatics filters'), 
     136            }, 
     137            label => { 
     138                label => l('Label'), 
     139            }, 
     140            expire => { 
     141                label => l('Expire'), 
     142            }, 
     143            description => { 
     144                label => l('Description'), 
     145            }, 
     146            comment => { 
     147                label => l('Comment'), 
     148            }, 
    134149            memberCount => { 
    135150                managed => 1, 
     
    138153                    my ($self) = @_; 
    139154                    scalar(@{$self->object->_get_c_field('memberUID')}); 
    140                 } 
     155                }, 
     156                label => l('Member count'), 
    141157            }, 
    142158        } 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Nethost.pm

    r1436 r1550  
    5252                        return undef; 
    5353                    }; 
    54                 } 
     54                }, 
     55                label => l('Ip'), 
    5556            }, 
    5657            ipFrom  => { 
     
    7677                    return $count; 
    7778                }, 
     79                label => l('Ip from...'), 
    7880            }, 
    7981            macaddr => { 
     
    9092                    return $_[0] =~ /^([0-9a-f]{2}([:-]|$)){6}$/i ? 1 : undef; 
    9193                }, 
     94                label => l('Hardware address'), 
    9295            }, 
    9396            cname   => { 
    9497                monitored => 1, 
    9598                multiple => 1, 
    96                 input => sub { lc($_[0]) }  
     99                input => sub { lc($_[0]) }, 
     100                label => l('Aliases'), 
    97101            }, 
    98102            related   => { 
    99103                multiple => 1, uniq => 1, 
    100104                reference => 'nethost', 
     105                label => l('Related'), 
    101106            }, 
    102107            owner   => { 
     
    104109                reference => 'user', 
    105110                delayed => 1, 
     111                label => l('Owner'), 
    106112            }, 
    107113            user    => { 
    108114                reference => 'user', 
    109115                delayed => 1, 
     116                label => l('User'), 
    110117            }, 
    111118            netZone => { 
     
    139146                }, 
    140147            }, 
    141             puppetClass => { multiple => 1, }, 
     148            label => l('NetZones'), 
     149            puppetClass => { 
     150                multiple => 1, 
     151                label => l('Puppet Class'), 
     152            }, 
    142153            netZoneExclude => { 
    143154                multiple => 1, ro => 1, managed => 1, 
     
    169180            }, 
    170181            exported => { formtype => 'CHECKBOX', }, 
    171             noInheritPuppet => { formtype => 'CHECKBOX', }, 
     182            noInheritPuppet => { 
     183                formtype => 'CHECKBOX', 
     184            }, 
    172185            otherName => { 
    173186                multiple => 1, 
    174187                input => sub { lc($_[0]) }, 
    175             }, 
    176             sshfp => { multiple => 1, }, 
     188                label => l('Other name'), 
     189            }, 
     190            sshfp => { 
     191                multiple => 1, 
     192                label => l('SSH finger print'), 
     193            }, 
    177194            ip6 => { }, 
    178195            sshfpUpdate  => { 
     
    197214                } 
    198215            }, 
    199             comment => { }, 
    200             description => { }, 
    201             encryptKey => { }, 
    202             reverse => { }, 
    203             serialNumber => { }, 
     216            comment => { 
     217                label => l('Comment'), 
     218            }, 
     219            description => { 
     220                label => l('Description'), 
     221            }, 
     222            encryptKey => { 
     223                label => l('Encrypted key'), 
     224            }, 
     225            reverse => { 
     226                label => l('Reverse name'), 
     227            }, 
     228            serialNumber => { 
     229                label => l('Serial number'), 
     230            }, 
    204231        } 
    205232    ) 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/Service.pm

    r1346 r1550  
    3333            date   => { ro => 1, inline => 1, }, 
    3434            create => { ro => 1, inline => 1, }, 
    35             start  => { inline => 1, formtype => 'DATE', }, 
    36             end    => { inline => 1, formtype => 'DATE', }, 
     35            start  => { 
     36                inline => 1, formtype => 'DATE', 
     37                label => l('Start'), 
     38            }, 
     39            end    => { 
     40                inline => 1, formtype => 'DATE', 
     41                label => l('End'), 
     42            }, 
    3743            type   => { }, 
    3844 
     
    5359                    return @res; 
    5460                }, 
     61                label => l('Depend on'), 
    5562            }, 
    5663            manager => { 
    5764                multiple => 1, 
    5865                reference => 'user', 
     66                label => l('Manager'), 
    5967            }, 
    60             comment => { }, 
    61             description => { }, 
     68            comment => { 
     69                label => l('Comment'), 
     70            }, 
     71            description => { 
     72                label => l('Description'), 
     73            }, 
    6274        } 
    6375    ) 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/User.pm

    r1549 r1550  
    129129                mandatory => 1, 
    130130                formopts => { length => 7 }, 
     131                label => l('UID'), 
    131132            }, 
    132133            uidnumber => { inline => 1, hide => 1, monitored => 1 }, 
     
    167168                }, 
    168169                reference => 'group', 
    169             }, 
    170             loginShell => { mandatory => 1 }, 
     170                label => l('GID'), 
     171            }, 
     172            loginShell => { 
     173                mandatory => 1 
     174                label => l('Shell'), 
     175            }, 
    171176            gidnumber => { inline => 1, hide => 1, 
    172177                can_values => sub { 
     
    195200                formopts => { rawvalue => 1, }, 
    196201                monitored => 1, 
    197                 label => sub { l('Locked') }, 
     202                label => l('Locked'), 
    198203            }, 
    199204            expire        => { 
     
    201206                formtype => 'DATETIME', 
    202207                monitored => 1, 
     208                label => l('Expire'), 
    203209            }, 
    204210            endcircuit    => { 
     
    206212                formtype => 'DATE', 
    207213                monitored => 1, 
     214                label => l('End of entrance'), 
    208215            }, 
    209216            endEmployment => { 
     
    216223                    $self->_computeEndEmployment($self->base->config('employment_delay')); 
    217224                }, 
     225                label => l('End of employment'), 
    218226            }, 
    219227            endStrictEmployment => { 
     
    283291                    return $end ? $end->iso8601 : undef 
    284292                }, 
     293                label => l('End of any employment'), 
    285294            }, 
    286295            cn        => { 
     
    350359                    return $res; 
    351360                }, 
     361                label => l('Member of'), 
    352362            }, 
    353363            forward => { 
     
    390400                    return; 
    391401                }, 
     402                label => l('Forward'), 
    392403            }, 
    393404            aliases   => { 
     
    443454                    $res 
    444455                }, 
     456                label => l('Aliases'), 
    445457            }, 
    446458            revaliases => { 
     
    495507            }, 
    496508            manager => { 
    497                 label => l('Manager'), 
    498509                reference => 'user', 
    499510                ro => 1, 
     
    509520                    } 
    510521                }, 
     522                label => l('Responsible'), 
    511523            }, 
    512524            department => { 
     
    516528                }, 
    517529                monitored => 1, 
     530                label => l('Department'), 
    518531            }, 
    519532            contratType => { 
     
    523536                }, 
    524537                monitored => 1, 
     538                label => l('Type of contract'), 
    525539            }, 
    526540            site => { 
     
    539553                }, 
    540554                set => $subsetaddress, 
     555                label => l('Site'), 
    541556            }, 
    542557            co => { 
     
    563578                }, 
    564579                set => $subsetaddress, 
     580                label => l('City'), 
    565581            }, 
    566582            postalCode => { 
     
    575591                }, 
    576592                set => $subsetaddress, 
     593                label => l('Postal code'), 
    577594            }, 
    578595            streetAddress => { 
     
    588605                }, 
    589606                set => $subsetaddress, 
     607                label => l('Street'), 
    590608            }, 
    591609            postOfficeBox => { 
     
    600618                }, 
    601619                set => $subsetaddress, 
     620                label => l('Post office box'), 
    602621            }, 
    603622            st => { 
     
    624643                }, 
    625644                set => $subsetaddress, 
     645                label => l('Fax number'), 
    626646            }, 
    627647            o => { 
    628648                ro => 1, 
    629649                iname => 'company', 
    630             }, 
    631             ou => { iname => 'department', ro => 1 }, 
     650                label => l('Company'), 
     651            }, 
     652            ou => { 
     653                iname => 'department', 
     654                ro => 1, 
     655                label => l('Department'), 
     656            }, 
    632657            telephoneNumber => { 
    633658                get => sub { 
     
    641666                }, 
    642667                set => $subsetaddress, 
     668                label => l('Phone number'), 
    643669            }, 
    644670            physicalDeliveryOfficeName => { 
     
    653679                }, 
    654680                set => $subsetaddress, 
     681                label => l('Office'), 
    655682            }, 
    656683            uid => { iname => 'name', ro => 1 }, 
     
    675702                    return to_ascii($gecos); 
    676703                }, 
     704                label => l('GECOS'), 
    677705            }, 
    678706            displayName  => { 
     
    689717                    || $self->object->id; 
    690718                }, 
     719                label => l('Name'), 
    691720            }, 
    692721            sAMAccountName  => { 
     
    828857                    } 
    829858                }, 
    830             }, 
    831             facsimileTelephoneNumber => { ro => 1, }, 
     859                label => l('Postal Address'), 
     860            }, 
     861            facsimileTelephoneNumber => { 
     862                ro => 1, 
     863                label => l('Fax number'), 
     864            }, 
    832865            allsite   => { 
    833866                ro => 1, 
     
    845878                monitored => 1, 
    846879                iname => 'manager', 
     880                label => l('Manager'), 
    847881            }, 
    848882            expireText => { 
     
    892926                delayed => 1, 
    893927                ro => 1, 
     928                label => l('Departments'), 
    894929            }, 
    895930            arrivalDate => { }, 
    896             expired => { ro => 1 }, 
    897             active => { ro => 1 }, 
     931            expired => { 
     932                ro => 1 
     933                label => l('Expired'), 
     934            }, 
     935            active => { 
     936                ro => 1 
     937                label => l('Active'), 
     938            }, 
    898939            pwdAccountLockedTime => { 
    899940                managed => 1, 
     
    921962            }, 
    922963            userPassword => { readable => 0, }, 
    923             wWWHomePage => { }, 
     964            wWWHomePage => { 
     965                label => l('Web Page'), 
     966            }, 
    924967            title => { }, 
    925             snNative => { }, 
    926             givenNameNative => { }, 
    927             sn => { }, 
     968            snNative => { 
     969                label => l('Native name'), 
     970            }, 
     971            givenNameNative => { 
     972                label => l('Native first name'), 
     973            }, 
     974            sn => { 
     975                label => l('Name'), 
     976            }, 
    928977            shadowWarning => { }, 
    929978            shadowMin => { }, 
     
    935984            nickname => { }, 
    936985            mobile => { }, 
    937             mail => { }, 
     986            mail => { 
     987                label => l('Email'), 
     988            }, 
    938989            labeledURI => { }, 
    939990            jobType => { }, 
    940991            ipPhone => { }, 
    941             initials => { }, 
     992            initials => { 
     993                label => l('Initials'), 
     994            }, 
    942995            homePhone => { }, 
    943             homeDirectory => { }, 
     996            homeDirectory => { 
     997                label => l('Home directory'), 
     998            }, 
    944999            halReference => { }, 
    9451000            grade => { }, 
    946             givenName => { }, 
     1001            givenName => { 
     1002                label => l('first name'), 
     1003            }, 
    9471004            encryptedPassword => { }, 
    948             description => { }, 
    949             company => { }, 
    950             comment => { }, 
     1005            description => { 
     1006                label => l('Description'), 
     1007            }, 
     1008            company => { 
     1009                label => l('Company'), 
     1010            }, 
     1011            comment => { 
     1012                label => l('Comment'), 
     1013            }, 
    9511014            college => { }, 
    9521015            passwordLastSet => { 
    9531016                ro => 1, 
     1017                label => l('Password set'), 
    9541018            }, 
    9551019            currentEmployment => { 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Sql/objects.pm

    r1503 r1550  
    8686    # Common to all object attribute: 
    8787    my %commons = ( 
    88         name      => { inline => 1, ro => 1, }, 
    89         create    => { inline => 1, ro => 1, }, 
    90         date      => { inline => 1, ro => 1, }, 
     88        name      => { 
     89            inline => 1, 
     90            ro => 1, 
     91            label => l('Name'), 
     92        }, 
     93        create    => { 
     94            inline => 1, 
     95            ro => 1, 
     96            label => l('Created'), 
     97        }, 
     98        date      => { 
     99            inline => 1, 
     100            ro => 1, 
     101            label => l('Last modified'), 
     102        }, 
    91103        exported   =>   { inline => 1, formtype => 'CHECKBOX', hide => 1, monitored => 1 }, 
    92104        unexported =>   { 
     
    102114                $self->object->_set_c_fields('exported', $data ? 0 : 1); 
    103115            }, 
     116            label => l('Hidden'), 
    104117        }, 
    105         services   =>   { managed => 1,  multiple => 1, reference => 'service' }, 
    106         modifiedby =>   { inline  => 1, reference => 'user', ro => 1 }, 
    107         createdby =>    { inline  => 1, reference => 'user', ro => 1 }, 
     118        services   =>   { 
     119            managed => 1, 
     120            multiple => 1, 
     121            reference => 'service', 
     122            label => l('Service'), 
     123        }, 
     124        modifiedby =>   { 
     125            inline  => 1, 
     126            reference => 'user', 
     127            ro => 1, 
     128            label => l('Modified by'), 
     129        }, 
     130        createdby => { 
     131            inline  => 1, 
     132            reference => 'user', 
     133            ro => 1, 
     134            label => l('Created by'), 
     135        }, 
    108136    ); 
    109137 
  • trunk/LATMOS-Accounts/lib/LATMOS/Accounts/I18N.pm

    r1549 r1550  
    2525 
    2626if (!$init) { 
    27     #POSIX::setlocale(POSIX::LC_ALL(), ""); 
    2827    if (-d 'po') { 
    2928        Locale::gettext::bindtextdomain('linkaccounts', 'po') 
Note: See TracChangeset for help on using the changeset viewer.