diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..f2c0292 --- /dev/null +++ b/.tx/config @@ -0,0 +1,8 @@ +[main] +host = https://www.transifex.com + +[silverstripe-ldap.master] +file_filter = lang/.yml +source_file = lang/en.yml +source_lang = en +type = YML diff --git a/lang/_manifest_exclude b/lang/_manifest_exclude new file mode 100644 index 0000000..e69de29 diff --git a/lang/en.yml b/lang/en.yml new file mode 100644 index 0000000..d1ae595 --- /dev/null +++ b/lang/en.yml @@ -0,0 +1,60 @@ +en: + SilverStripe\LDAP\Authenticators\LDAPAuthenticator: + CANTCHANGEPASSWORD: 'We couldn''t change your password, please contact an administrator.' + INVALIDCREDENTIALS: 'Invalid credentials' + NOUSER: 'Your account hasn''t been setup properly, please contact an administrator.' + PLEASEUSEUSERNAME: 'Please enter your username instead of your email to log in.' + PROBLEMFINDINGDATA: 'There was a problem retrieving your user data' + SilverStripe\LDAP\Authenticators\LDAPChangePasswordHandler: + NOUSER: 'Your account hasn''t been setup properly, please contact an administrator.' + SilverStripe\LDAP\Authenticators\LDAPLostPasswordHandler: + NOTERESETPASSWORDUSERNAME: 'Enter your username and we will send you a link with which you can reset your password' + NOTERESETPASSWORDUSERNAMEOREMAIL: 'Enter your username or your email address and we will send you a link with which you can reset your password' + PASSWORDSENTHEADER: 'Password reset link sent to ''{username}''' + PASSWORDSENTTEXT: 'Thank you! A reset link has been sent to ''{username}'', provided an account exists.' + SilverStripe\LDAP\Extensions\LDAPGroupExtension: + ADDMAPPEDGROUP: 'Add LDAP group mapping' + AUTOMAPPEDGROUPS: 'Automatically mapped LDAP Groups' + INFOIMPORTED: 'This group is automatically imported from LDAP.' + LASTSYNCED: 'Last synced' + MAPPEDGROUPS: 'Mapped LDAP Groups' + SilverStripe\LDAP\Extensions\LDAPMemberExtension: + CHANGEFIELDSUPDATELDAP: 'Changing fields here will update them in LDAP.' + IMPORTEDFIELD: ' (imported)' + INFOIMPORTED: 'This user is automatically imported from LDAP. Manual changes to imported fields will be removed upon sync.' + ISEXPIRED: 'Has user''s LDAP/AD login expired?' + LASTSYNCED: 'Last synced' + SilverStripe\LDAP\Forms\LDAPChangePasswordForm: + USERNAME: Username + USERNAMEOREMAIL: Email + SilverStripe\LDAP\Forms\LDAPLoginForm: + AUTHENTICATORNAME: LDAP + ENTERUSERNAME: 'Please enter your username to get a password reset link.' + ENTERUSERNAMEOREMAIL: 'Please enter your username or your email address to get a password reset link.' + USERNAME: Username + USERNAMEINSTEADOFEMAIL: 'Please enter your username instead of your email to get a password reset link.' + USERNAMEOREMAIL: 'Username or email' + SilverStripe\LDAP\Jobs\LDAPAllSyncJob: + SYNCTITLE: 'Sync all groups and users from Active Directory, and set mappings up.' + SilverStripe\LDAP\Jobs\LDAPMemberSyncJob: + SYNCTITLE: 'Sync all users from Active Directory' + SilverStripe\LDAP\Model\LDAPGroupMapping: + LDAPGROUP: 'LDAP Group' + ONELEVEL_DESCRIPTION: 'Only users within this group' + PLURALNAME: 'LDAP Group Mappings' + PLURALS: + one: 'A LDAP Group Mapping' + other: '{count} LDAP Group Mappings' + SCOPE: Scope + SELECTONE: 'Select one' + SINGULARNAME: 'LDAP Group Mapping' + SUBTREE_DESCRIPTION: 'Users within this group and all nested groups within' + SilverStripe\LDAP\Services\LDAPService: + ACCOUNTLOCKEDOUT: 'Your account has been temporarily locked because of too many failed login attempts. Please try again later.' + INVALIDCREDENTIALS: 'The provided details don''t seem to be correct. Please try again.' + SilverStripe\LDAP\Tasks\LDAPGroupSyncTask: + SYNCTITLE: 'Sync all groups from Active Directory' + SilverStripe\LDAP\Tasks\LDAPMemberSyncTask: + SYNCTITLE: 'Sync all users from Active Directory' + Silverstripe\Security\Member: + SUBJECTPASSWORDRESET: 'Your password reset link' diff --git a/src/Extensions/LDAPGroupExtension.php b/src/Extensions/LDAPGroupExtension.php index 96204ec..7ab69ca 100644 --- a/src/Extensions/LDAPGroupExtension.php +++ b/src/Extensions/LDAPGroupExtension.php @@ -94,7 +94,7 @@ public function updateCMSFields(FieldList $fields) } else { $field = GridField::create( 'LDAPGroupMappings', - _t('LDAPGroupExtension.MAPPEDGROUPS', 'Mapped LDAP Groups'), + _t(__CLASS__ . '.MAPPEDGROUPS', 'Mapped LDAP Groups'), $this->owner->LDAPGroupMappings() ); $config = GridFieldConfig_RecordEditor::create(); diff --git a/src/Model/LDAPGroupMapping.php b/src/Model/LDAPGroupMapping.php index cb0ad10..9836ddb 100644 --- a/src/Model/LDAPGroupMapping.php +++ b/src/Model/LDAPGroupMapping.php @@ -50,6 +50,10 @@ class LDAPGroupMapping extends DataObject 'ldapService' => '%$' . LDAPService::class, ]; + private static $singular_name = 'LDAP Group Mapping'; + + private static $plural_name = 'LDAP Group Mappings'; + /** * {@inheritDoc} * @return FieldList