From 25eeff4f199a0d63b003fbe7d1e1fd666c2fd3f0 Mon Sep 17 00:00:00 2001 From: Tommaso Basilici Date: Sat, 18 Apr 2015 15:12:06 +0200 Subject: [PATCH 1/6] first commit to fix issue #2584 - checks for duplicate lang strings across all en_US lang files --- dev/translation/sanity_check_en_langfiles.php | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 dev/translation/sanity_check_en_langfiles.php diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php new file mode 100644 index 00000000000..b39108ab746 --- /dev/null +++ b/dev/translation/sanity_check_en_langfiles.php @@ -0,0 +1,60 @@ + +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +*/ + +// directory containing the english lang files +$workdir = "../../htdocs/langs/en_US/"; + +$files = scandir($workdir); +$exludefiles = array('.','..','README'); +$files = array_diff($files,$exludefiles); +$langstrings_3d = array(); +$langstrings_full = array(); +foreach ($files AS $file) { + $path_file = pathinfo($file); + // we're only interested in .lang files + if ($path_file['extension']=='lang') { + $content = file($workdir.$file); + foreach ($content AS $line => $row) { + // don't want comment lines + if (substr($row,0,1) !== '#') { + // don't want lines without the separator (why should those even be here, anyway...) + if (strpos($row,'=')!==false) { + $row_array = explode('=',$row); + $langstrings_3d[$path_file['basename']][$line+1]=$row_array[0]; + $langstrings_full[]=$row_array[0]; + } + } + } + } +} + +foreach ($langstrings_3d AS $filename => $file) { + foreach ($file AS $linenum => $value) { + $keys = array_keys($langstrings_full, $value); + if (count($keys)>1) { + foreach ($keys AS $key) { + $dups[$value][$filename] = $linenum; + } + } + } +} + +echo "

Duplicate strings in lang files in $workdir

"; +echo "
";
+print_r($dups);
+
+?>
\ No newline at end of file

From 82a269f2336f054a2ff7f9cf5f30082bc7d64e1f Mon Sep 17 00:00:00 2001
From: Tommaso Basilici 
Date: Sat, 18 Apr 2015 15:26:18 +0200
Subject: [PATCH 2/6] issue #2584 - also finds duplicates on same file

---
 dev/translation/sanity_check_en_langfiles.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index b39108ab746..17dab085259 100644
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -47,7 +47,7 @@ foreach ($langstrings_3d AS $filename => $file) {
 		$keys = array_keys($langstrings_full, $value);
 		if (count($keys)>1) {
 				foreach ($keys AS $key) {
-					$dups[$value][$filename] = $linenum;
+					$dups[$value][$filename][$linenum] = '';
 				}
 		}
 	}

From 9a3b5305fee543131764c7d3cd6a6df2015625e5 Mon Sep 17 00:00:00 2001
From: faust 
Date: Sat, 18 Apr 2015 15:35:19 +0200
Subject: [PATCH 3/6] fix duplicate lines

---
 htdocs/langs/en_US/agenda.lang   | 1 -
 htdocs/langs/en_US/printing.lang | 1 -
 htdocs/langs/en_US/trips.lang    | 1 -
 3 files changed, 3 deletions(-)

diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index 87a22582431..dd485291e73 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -55,7 +55,6 @@ OrderBilledInDolibarr=Order %s classified billed
 OrderApprovedInDolibarr=Order %s approved
 OrderRefusedInDolibarr=Order %s refused
 OrderBackToDraftInDolibarr=Order %s go back to draft status
-OrderCanceledInDolibarr=Order %s canceled
 ProposalSentByEMail=Commercial proposal %s sent by EMail
 OrderSentByEMail=Customer order %s sent by EMail
 InvoiceSentByEMail=Customer invoice %s sent by EMail
diff --git a/htdocs/langs/en_US/printing.lang b/htdocs/langs/en_US/printing.lang
index f0cd2a40292..d86e998cf50 100644
--- a/htdocs/langs/en_US/printing.lang
+++ b/htdocs/langs/en_US/printing.lang
@@ -49,7 +49,6 @@ PRINTIPP_PORT=Port
 PRINTIPP_USER=Login
 PRINTIPP_PASSWORD=Password
 NoPrinterFound=No printers found (check your CUPS setup)
-FileWasSentToPrinter=File %s was sent to printer
 NoDefaultPrinterDefined=No default printer defined
 DefaultPrinter=Default printer
 Printer=Printer
diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang
index 30b6070632b..d4e4e8c4359 100644
--- a/htdocs/langs/en_US/trips.lang
+++ b/htdocs/langs/en_US/trips.lang
@@ -44,7 +44,6 @@ TF_HOTEL=Hotel
 TF_TAXI=Taxi
 
 ErrorDoubleDeclaration=You have declared another expense report into a similar date range.
-ListTripsAndExpenses=List of expense reports
 AucuneNDF=No expense reports found for this criteria
 AucuneLigne=There is no expense report declared yet
 AddLine=Add a line

From fb57cced55d5d25926bc01d0afd9a3bc9221507f Mon Sep 17 00:00:00 2001
From: faust 
Date: Sat, 18 Apr 2015 16:04:48 +0200
Subject: [PATCH 4/6] en_US: fix typos and errors

---
 htdocs/langs/en_US/categories.lang | 30 +++++++++++++++---------------
 htdocs/langs/en_US/cron.lang       | 16 ++++++++--------
 2 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang
index 11b1dc8eac0..a73526ca08a 100644
--- a/htdocs/langs/en_US/categories.lang
+++ b/htdocs/langs/en_US/categories.lang
@@ -42,19 +42,19 @@ ImpossibleAddCat=Impossible to add the tag/category
 ImpossibleAssociateCategory=Impossible to associate the tag/category to
 WasAddedSuccessfully=%s was added successfully.
 ObjectAlreadyLinkedToCategory=Element is already linked to this tag/category.
-CategorySuccessfullyCreated=This tag/category %s has been added with success.  
-ProductIsInCategories=Product/service owns to following tags/categories
-SupplierIsInCategories=Third party owns to following suppliers tags/categories
-CompanyIsInCustomersCategories=This third party owns to following customers/prospects tags/categories
-CompanyIsInSuppliersCategories=This third party owns to following suppliers tags/categories
-MemberIsInCategories=This member owns to following members tags/categories 
-ContactIsInCategories=This contact owns to following contacts tags/categories
+CategorySuccessfullyCreated=This tag/category %s has been added successfully.
+ProductIsInCategories=Product/service is linked to following tags/categories
+SupplierIsInCategories=Third party is linked to following suppliers tags/categories
+CompanyIsInCustomersCategories=This third party is linked to following customers/prospects tags/categories
+CompanyIsInSuppliersCategories=This third party is linked to following suppliers tags/categories
+MemberIsInCategories=This member is linked to following members tags/categories
+ContactIsInCategories=This contact is linked to following contacts tags/categories
 ProductHasNoCategory=This product/service is not in any tags/categories
 SupplierHasNoCategory=This supplier is not in any tags/categories
 CompanyHasNoCategory=This company is not in any tags/categories
 MemberHasNoCategory=This member is not in any tags/categories
 ContactHasNoCategory=This contact is not in any tags/categories
-ClassifyInCategory=Classify in tag/category
+ClassifyInCategory=Add to tag/category
 NoneCategory=None
 NotCategorized=Without tag/category
 CategoryExistsAtSameLevel=This category already exists with this ref
@@ -67,13 +67,13 @@ ContentsNotVisibleByAllShort=Contents not visible by all
 CategoriesTree=Tags/categories tree
 DeleteCategory=Delete tag/category
 ConfirmDeleteCategory=Are you sure you want to delete this tag/category ?
-RemoveFromCategory=Remove link with tag/categorie
-RemoveFromCategoryConfirm=Are you sure you want to remove link between the transaction and the tag/category ?
+RemoveFromCategory=Remove link with tag/category
+RemoveFromCategoryConfirm=Are you sure you want to unlink the transaction from the tag/category ?
 NoCategoriesDefined=No tag/category defined
-SuppliersCategoryShort=Suppliers tags/category
-CustomersCategoryShort=Customers tags/category
-ProductsCategoryShort=Products tags/category
-MembersCategoryShort=Members tags/category
+SuppliersCategoryShort=Suppliers tag/category
+CustomersCategoryShort=Customers tag/category
+ProductsCategoryShort=Products tag/category
+MembersCategoryShort=Members tag/category
 SuppliersCategoriesShort=Suppliers tags/categories
 CustomersCategoriesShort=Customers tags/categories
 CustomersProspectsCategoriesShort=Custo./Prosp. categories
@@ -107,4 +107,4 @@ CategoriesSetup=Tags/categories setup
 CategorieRecursiv=Link with parent tag/category automatically
 CategorieRecursivHelp=If activated, product will also linked to parent category when adding into a subcategory
 AddProductServiceIntoCategory=Add the following product/service
-ShowCategory=Show tag/category
\ No newline at end of file
+ShowCategory=Show tag/category
diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang
index cf5e1a6198c..5d7abf732ab 100644
--- a/htdocs/langs/en_US/cron.lang
+++ b/htdocs/langs/en_US/cron.lang
@@ -26,11 +26,11 @@ CronLastOutput=Last run output
 CronLastResult=Last result code
 CronListOfCronJobs=List of scheduled jobs
 CronCommand=Command
-CronList=Scheduled job
+CronList=Scheduled jobs
 CronDelete=Delete scheduled jobs
-CronConfirmDelete=Are you sure you want to delete this scheduled jobs ?
+CronConfirmDelete=Are you sure you want to delete these scheduled jobs ?
 CronExecute=Launch scheduled jobs
-CronConfirmExecute=Are you sure to execute this scheduled jobs now ?
+CronConfirmExecute=Are you sure you want to execute these scheduled jobs now ?
 CronInfo=Scheduled job module allow to execute job that have been planned
 CronWaitingJobs=Waiting jobs
 CronTask=Job
@@ -39,8 +39,8 @@ CronDtStart=Start date
 CronDtEnd=End date
 CronDtNextLaunch=Next execution
 CronDtLastLaunch=Last execution
-CronFrequency=Frequancy
-CronClass=Classe
+CronFrequency=Frequency
+CronClass=Class
 CronMethod=Method
 CronModule=Module
 CronAction=Action
@@ -55,7 +55,7 @@ CronEach=Every
 JobFinished=Job launched and finished
 #Page card
 CronAdd= Add jobs
-CronHourStart= Start Hour and date of task
+CronHourStart= Start hour and date of task
 CronEvery= And execute task each
 CronObject= Instance/Object to create
 CronArgs=Parameters
@@ -79,10 +79,10 @@ CronCreateJob=Create new Scheduled Job
 # Info
 CronInfoPage=Information
 # Common
-CronType=Task type
+CronType=Job type
 CronType_method=Call method of a Dolibarr Class
 CronType_command=Shell command
 CronMenu=Cron
 CronCannotLoadClass=Cannot load class %s or object %s
 UseMenuModuleToolsToAddCronJobs=Go into menu "Home - Modules tools - Job list" to see and edit scheduled jobs.
-TaskDisabled=Task disabled
+TaskDisabled=Job disabled

From b7fb3d7d9e45fce2a598955cb82ab1489f705da0 Mon Sep 17 00:00:00 2001
From: faust 
Date: Sat, 18 Apr 2015 16:39:57 +0200
Subject: [PATCH 5/6] en_US: 'opened' is not an adjective...

---
 htdocs/langs/en_US/admin.lang            |  4 ++--
 htdocs/langs/en_US/askpricesupplier.lang |  8 ++++----
 htdocs/langs/en_US/banks.lang            |  4 ++--
 htdocs/langs/en_US/bills.lang            |  2 +-
 htdocs/langs/en_US/boxes.lang            |  4 ++--
 htdocs/langs/en_US/main.lang             |  2 +-
 htdocs/langs/en_US/orders.lang           |  4 ++--
 htdocs/langs/en_US/products.lang         |  4 ++--
 htdocs/langs/en_US/projects.lang         |  6 +++---
 htdocs/langs/en_US/propal.lang           | 10 +++++-----
 htdocs/langs/en_US/sendings.lang         |  6 +++---
 htdocs/langs/en_US/stocks.lang           |  8 ++++----
 htdocs/langs/en_US/workflow.lang         |  2 +-
 13 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 4b7ddfe0143..cd57a4d5a16 100755
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1077,7 +1077,7 @@ TotalNumberOfActivatedModules=Total number of activated feature modules: %s%s will be used for stock decreas
 WarehouseForStockIncrease=The warehouse %s will be used for stock increase
 ForThisWarehouse=For this warehouse
 ReplenishmentStatusDesc=This is list of all product with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked), and suggest you to create supplier orders to fill the difference.
-ReplenishmentOrdersDesc=This is list of all opened supplier orders including predefined products. Only opened orders with predefined products, so that may affect stocks, are visible here.
+ReplenishmentOrdersDesc=This is list of all open supplier orders including predefined products. Only open orders with predefined products, so that may affect stocks, are visible here.
 Replenishments=Replenishments
 NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s)
 NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s)
@@ -135,5 +135,5 @@ MovementCorrectStock=Stock content correction for product %s
 MovementTransferStock=Stock transfer of product %s into another warehouse
 WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
 InventoryCodeShort=Inv./Mov. code
-NoPendingReceptionOnSupplierOrder=No pending reception due to opened supplier order
-ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different eatby or sellby date (found %s but you enter %s).
\ No newline at end of file
+NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order
+ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different eatby or sellby date (found %s but you enter %s).
diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang
index 84b245fd77c..82af8e6c903 100644
--- a/htdocs/langs/en_US/workflow.lang
+++ b/htdocs/langs/en_US/workflow.lang
@@ -1,6 +1,6 @@
 # Dolibarr language file - Source file is en_US - admin 
 WorkflowSetup=Workflow module setup
-WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is opened (you make thing in order you want). You can activate the automatic actions that you are interested in.
+WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in.
 ThereIsNoWorkflowToModify=There is no workflow to modify for the activated module.
 descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed
 descWORKFLOW_PROPAL_AUTOCREATE_INVOICEAutomatically create a customer invoice after a commercial proposal is signed

From 4bb83de1461eab20cb66704f23a1147934c7afa6 Mon Sep 17 00:00:00 2001
From: faust 
Date: Sat, 18 Apr 2015 18:03:40 +0200
Subject: [PATCH 6/6] en_US: fix lang

---
 htdocs/langs/en_US/main.lang     |  2 +-
 htdocs/langs/en_US/orders.lang   | 10 +++++-----
 htdocs/langs/en_US/projects.lang |  4 ++--
 htdocs/langs/en_US/stocks.lang   | 18 +++++++++---------
 4 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index dcc18466ee0..2db8e0b4c55 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -301,7 +301,7 @@ UnitPriceHT=Unit price (net)
 UnitPriceTTC=Unit price
 PriceU=U.P.
 PriceUHT=U.P. (net)
-AskPriceSupplierUHT=P.U. HT Requested
+AskPriceSupplierUHT=P.U. net Requested
 PriceUTTC=U.P.
 Amount=Amount
 AmountInvoice=Invoice amount
diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang
index 01d04c9a4b1..a3ac2f100d7 100644
--- a/htdocs/langs/en_US/orders.lang
+++ b/htdocs/langs/en_US/orders.lang
@@ -16,13 +16,13 @@ SupplierOrder=Supplier order
 SuppliersOrders=Suppliers orders
 SuppliersOrdersRunning=Current suppliers orders
 CustomerOrder=Customer order
-CustomersOrders=Customers orders
+CustomersOrders=Customer orders
 CustomersOrdersRunning=Current customer's orders
 CustomersOrdersAndOrdersLines=Customer orders and order's lines
-OrdersToValid=Customers orders to validate
-OrdersToBill=Customers orders delivered
-OrdersInProcess=Customers orders in process
-OrdersToProcess=Customers orders to process
+OrdersToValid=Customer orders to validate
+OrdersToBill=Customer orders delivered
+OrdersInProcess=Customer orders in process
+OrdersToProcess=Customer orders to process
 SuppliersOrdersToProcess=Supplier's orders to process
 StatusOrderCanceledShort=Canceled
 StatusOrderDraftShort=Draft
diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index a93cd2fb55f..dde2aa7d469 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -95,7 +95,7 @@ DeleteATimeSpent=Delete time spent
 ConfirmDeleteATimeSpent=Are you sure you want to delete this time spent ?
 DoNotShowMyTasksOnly=See also tasks not assigned to me
 ShowMyTasksOnly=View only tasks assigned to me
-TaskRessourceLinks=Ressources
+TaskRessourceLinks=Resources
 ProjectsDedicatedToThisThirdParty=Projects dedicated to this third party
 NoTasks=No tasks for this project
 LinkedToAnotherCompany=Linked to other third party
@@ -139,7 +139,7 @@ ProjectReferers=Refering objects
 SearchAProject=Search a project
 ProjectMustBeValidatedFirst=Project must be validated first
 ProjectDraft=Draft projects
-FirstAddRessourceToAllocateTime=Associate a ressource to allocate time
+FirstAddRessourceToAllocateTime=Associate a resource to allocate time
 InputPerDay=Input per day 
 InputPerWeek=Input per week 
 InputPerAction=Input per action
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index cc03dfd38f8..3cac0ba1d0f 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -103,7 +103,7 @@ VirtualDiffersFromPhysical=According to increase/decrease stock options, physica
 UseVirtualStockByDefault=Use virtual stock by default, instead of physical stock, for replenishment feature
 UseVirtualStock=Use virtual stock
 UsePhysicalStock=Use physical stock
-CurentSelectionMode=Curent selection mode
+CurentSelectionMode=Current selection mode
 CurentlyUsingVirtualStock=Virtual stock
 CurentlyUsingPhysicalStock=Physical stock
 RuleForStockReplenishment=Rule for stocks replenishment
@@ -112,8 +112,8 @@ AlertOnly= Alerts only
 WarehouseForStockDecrease=The warehouse %s will be used for stock decrease
 WarehouseForStockIncrease=The warehouse %s will be used for stock increase
 ForThisWarehouse=For this warehouse
-ReplenishmentStatusDesc=This is list of all product with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked), and suggest you to create supplier orders to fill the difference.
-ReplenishmentOrdersDesc=This is list of all open supplier orders including predefined products. Only open orders with predefined products, so that may affect stocks, are visible here.
+ReplenishmentStatusDesc=This is a list of all products with a stock lower than desired stock (or lower than alert value if checkbox "alert only" is checked), and suggest you to create supplier orders to fill the difference.
+ReplenishmentOrdersDesc=This is a list of all open supplier orders including predefined products. Only open orders with predefined products, so that may affect stocks, are visible here.
 Replenishments=Replenishments
 NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s)
 NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s)
@@ -124,16 +124,16 @@ RecordMovement=Record transfert
 ReceivingForSameOrder=Receipts for this order
 StockMovementRecorded=Stock movements recorded
 RuleForStockAvailability=Rules on stock requirements
-StockMustBeEnoughForInvoice=Stock level must be enough to add product/service into invoice 
-StockMustBeEnoughForOrder=Stock level must be enough to add product/service into order
-StockMustBeEnoughForShipment= Stock level must be enough to add product/service into shipment
-MovementLabel=Label of movement
+StockMustBeEnoughForInvoice=Stock level must be enough to add product/service to invoice
+StockMustBeEnoughForOrder=Stock level must be enough to add product/service to order
+StockMustBeEnoughForShipment=Stock level must be enough to add product/service to shipment
+MovementLabel=Stock movement label
 InventoryCode=Movement or inventory code
 IsInPackage=Contained into package
 ShowWarehouse=Show warehouse
-MovementCorrectStock=Stock content correction for product %s
+MovementCorrectStock=Stock correction for product %s
 MovementTransferStock=Stock transfer of product %s into another warehouse
-WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
+WarehouseMustBeSelectedAtFirstStepWhenProductBatchModuleOn=Source warehouse must be defined here when "Product lot" module is on. It will be used to list wich lot/serial is available for product that required lot/serial data for movement. If you want to send products from different warehouses, just make the shipment into several steps.
 InventoryCodeShort=Inv./Mov. code
 NoPendingReceptionOnSupplierOrder=No pending reception due to open supplier order
 ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different eatby or sellby date (found %s but you enter %s).