From 223a06b77dfcca350db9e0025168e7e1a098d754 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 30 Apr 2021 16:41:41 +0200 Subject: [PATCH] Clean code --- htdocs/adherents/type_translation.php | 28 +++++++++++++++----- htdocs/langs/en_US/banks.lang | 2 +- htdocs/langs/en_US/companies.lang | 2 +- htdocs/langs/en_US/errors.lang | 6 ++--- htdocs/langs/en_US/main.lang | 4 +-- htdocs/langs/en_US/members.lang | 38 +++++++++++++-------------- 6 files changed, 47 insertions(+), 33 deletions(-) diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 84fe883e41f..7435fc440ed 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -87,7 +87,7 @@ if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->rights->ad if ($object->setMultiLangs($user) > 0) { $action = ''; } else { - $action = 'add'; + $action = 'create'; setEventMessages($object->error, $object->errors, 'errors'); } } @@ -185,7 +185,7 @@ print "\n
\n"; if ($action == '') { if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''.$langs->trans("Add").''; + print ''.$langs->trans("Add").''; if ($cnt_trans > 0) { print ''.$langs->trans("Update").''; } @@ -208,7 +208,13 @@ if ($action == 'edit') { if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print '
'.($s ? $s.' ' : '').' '.$langs->trans('Language_'.$key).': '.img_delete('', 'class="valigntextbottom"')."
"; + print '
'; + print '
'; + print ($s ? $s.' ' : '').''.$langs->trans('Language_'.$key).':'; + print '
'; + print ''; print '
'; print ''; @@ -231,11 +237,17 @@ if ($action == 'edit') { print ''; print ''; -} elseif ($action != 'add') { +} elseif ($action != 'create') { if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; + print '
'; + print ($s ? $s.' ' : '').''.$langs->trans('Language_'.$key).':'; + print '
'; + print ''; + print '
'; print '
'; @@ -244,9 +256,11 @@ if ($action == 'edit') { print '
'; print '
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'; print '
'; + + print '
'; } } - if (!$cnt_trans && $action != 'add') { + if (!$cnt_trans && $action != 'create') { print '
'.$langs->trans('NoTranslation').'
'; } } @@ -257,7 +271,7 @@ if ($action == 'edit') { * Form to add a new translation */ -if ($action == 'add' && $user->rights->adherent->configurer) { +if ($action == 'create' && $user->rights->adherent->configurer) { //WYSIWYG Editor require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 8e2d828c12a..5041ceb9c77 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -128,7 +128,7 @@ ConfirmDeleteTransaction=Are you sure you want to delete this entry? ThisWillAlsoDeleteBankRecord=This will also delete generated bank entry BankMovements=Movements PlannedTransactions=Planned entries -Graph=Graphics +Graph=Graphs ExportDataset_banque_1=Bank entries and account statement ExportDataset_banque_2=Deposit slip TransactionOnTheOtherAccount=Transaction on the other account diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index b41bb49db13..70db0184ceb 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -69,7 +69,7 @@ PhoneShort=Phone Skype=Skype Call=Call Chat=Chat -PhonePro=Prof. phone +PhonePro=Bus. phone PhonePerso=Pers. phone PhoneMobile=Mobile No_Email=Refuse bulk emailings diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 6df5438de8f..4ef471d51a4 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -4,9 +4,9 @@ NoErrorCommitIsDone=No error, we commit # Errors ErrorButCommitIsDone=Errors found but we validate despite this -ErrorBadEMail=Email %s is wrong -ErrorBadMXDomain=Email %s seems wrong (domain has no valid MX record) -ErrorBadUrl=Url %s is wrong +ErrorBadEMail=Email %s is incorrect +ErrorBadMXDomain=Email %s seems incorrect (domain has no valid MX record) +ErrorBadUrl=Url %s is incorrect ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. ErrorRefAlreadyExists=Reference %s already exists. ErrorLoginAlreadyExists=Login %s already exists. diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 8fea1ffd839..fd2a3fd0697 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -856,8 +856,8 @@ Denied=Denied ListOf=List of %s ListOfTemplates=List of templates Gender=Gender -Genderman=Man -Genderwoman=Woman +Genderman=Male +Genderwoman=Female Genderother=Other ViewList=List view ViewGantt=Gantt view diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 2ab2fb87270..5bd1a545bfa 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -15,7 +15,7 @@ ErrorMemberIsAlreadyLinkedToThisThirdParty=Another member (name: %s, logi ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours. SetLinkToUser=Link to a Dolibarr user SetLinkToThirdParty=Link to a Dolibarr third party -MembersCards=Members business cards +MembersCards=Business cards for members MembersList=List of members MembersListToValid=List of draft members (to be validated) MembersListValid=List of valid members @@ -32,7 +32,7 @@ MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive DateSubscription=Subscription date DateEndSubscription=Subscription end date -EndSubscription=End subscription +EndSubscription=Subscription Ends SubscriptionId=Subscription id WithoutSubscription=Without subscription MemberId=Member id @@ -83,10 +83,10 @@ WelcomeEMail=Welcome email SubscriptionRequired=Subscription required DeleteType=Delete VoteAllowed=Vote allowed -Physical=Physical -Moral=Moral -MorAndPhy=Moral and Physical -Reenable=Reenable +Physical=Individual +Moral=Corporation +MorAndPhy=Corporation and Individual +Reenable=Re-Enable ExcludeMember=Exclude a member ConfirmExcludeMember=Are you sure you want to exclude this member ? ResiliateMember=Terminate a member @@ -175,32 +175,32 @@ MembersStatisticsByCountries=Members statistics by country MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town MembersStatisticsByRegion=Members statistics by region -NbOfMembers=Number of members -NbOfActiveMembers=Number of current active members +NbOfMembers=Total number of members +NbOfActiveMembers=Total number of current active members NoValidatedMemberYet=No validated members found -MembersByCountryDesc=This screen show you statistics on members by countries. Graphic depends however on Google online graph service and is available only if an internet connection is is working. -MembersByStateDesc=This screen show you statistics on members by state/provinces/canton. -MembersByTownDesc=This screen show you statistics on members by town. +MembersByCountryDesc=This screen shows you the statistics of members by countries. Graphs and charts depend on the availability of the Google online graph service as well as on the availability of a working internet connection. +MembersByStateDesc=This screen show you statistics of members by state/provinces/canton. +MembersByTownDesc=This screen show you statistics of members by town. +MembersByNature=This screen show you statistics of members by nature. +MembersByRegion=This screen show you statistics of members by region. MembersStatisticsDesc=Choose statistics you want to read... MenuMembersStats=Statistics -LastMemberDate=Latest member date +LastMemberDate=Latest membership date LatestSubscriptionDate=Latest subscription date -MemberNature=Nature of member -MembersNature=Nature of members -Public=Information are public +MemberNature=Nature of the member +MembersNature=Nature of the members +Public=Information is public NewMemberbyWeb=New member added. Awaiting approval NewMemberForm=New member form -SubscriptionsStatistics=Statistics on subscriptions +SubscriptionsStatistics=Subscriptions statistics NbOfSubscriptions=Number of subscriptions -AmountOfSubscriptions=Amount of subscriptions +AmountOfSubscriptions=Amount collected from subscriptions TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) DefaultAmount=Default amount of subscription CanEditAmount=Visitor can choose/edit amount of its subscription MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page ByProperties=By nature MembersStatisticsByProperties=Members statistics by nature -MembersByNature=This screen show you statistics on members by nature. -MembersByRegion=This screen show you statistics on members by region. VATToUseForSubscriptions=VAT rate to use for subscriptions NoVatOnSubscription=No VAT for subscriptions ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s