From b852d4c79746d2d0c2bd7d727aa67b32813cc858 Mon Sep 17 00:00:00 2001
From: Uma <uma.s@vtiger.com>
Date: Mon, 4 May 2020 14:10:52 +0530
Subject: [PATCH] Fixes #1275 workflow list-view should pick translations

---
 languages/en_us/Settings/Workflows.php        | 48 +++++++++++++++++++
 modules/Settings/Workflows/models/Record.php  |  2 +-
 .../modules/Settings/Workflows.php            | 47 ++++++++++++++++++
 3 files changed, 96 insertions(+), 1 deletion(-)

diff --git a/languages/en_us/Settings/Workflows.php b/languages/en_us/Settings/Workflows.php
index 4c7af0943..36483f6ac 100644
--- a/languages/en_us/Settings/Workflows.php
+++ b/languages/en_us/Settings/Workflows.php
@@ -151,6 +151,54 @@ $languageStrings = array(
     'LBL_VTPushNotificationTask' => 'Mobile Notification',
     'LBL_VTCreateEntityTask' => 'Create Record',
 	'LBL_MAX_SCHEDULED_WORKFLOWS_EXCEEDED' => 'Maximum number(%s) of scheduled workflows has been exceeded',
+    
+    'is' => 'is %s',
+    'contains' => 'contains %s',
+    'does not contain' => 'does not contain %s',
+    'starts with' => 'starts with %s',
+    'ends with' => 'ends with %s',
+    'has changed' => 'has changed',
+    'is empty' => 'is empty',
+    'is not empty' => 'is not empty',
+    'equal to' => 'equal to %s',
+    'less than' => 'less than %s',
+    'greater than' => 'greater than %s',
+    'does not equal' => 'does not equal %s',
+    'less than or equal to' => 'less than or equal to %s',
+    'greater than or equal to' => 'greater than or equal to %s',
+    'is not' => 'is not %s',
+    'has changed to' => 'has changed to %s',
+    'has changed from' => 'has changed from %s',
+    'before' => 'before %s',
+    'after' => 'after %s',
+    'is today' => 'is today',
+    'is tomorrow' => 'is tomorrow',
+    'is yesterday' => 'is yesterday',
+	'previous month' => 'previous month',
+	'current month' => 'current month',
+	'next month' => 'next month',
+    'less than hours before' => 'less than %s hours before',
+    'less than hours later' => 'less than %s hours later',
+    'more than hours before' => 'more than %s hours before',
+    'more than hours later' => 'more than %s hours later',
+    'less than days ago' => 'less than %s days ago',
+    'less than days later' => 'less than %s days later',
+    'more than days ago' => 'more than %s days ago',
+    'more than days later' => 'more than %s days later',
+    'days ago' => '%s days ago',
+    'days later' => '%s days later',
+    'between' => 'between %s',
+    'in less than' => 'in less than %s',
+    'in more than' => 'in more than %s',
+    'is added' => 'is added',
+    'hours since %s' => 'hours since %s',
+    'LBL_EXCEEDED_ALLOWED_LIMIT_TEXT' => 'We found that you have more than %s workflows in active state, exceeding the limits of this edition. Please delete or disable some of the workflows and try again<br><br>',
+	'week days later' => '%s week days later',
+    'more than week days later' => 'more than %s week days later',
+    'less than week days later' => 'less than %s week days later',
+    'week days ago' => '%s week days ago',
+    'more than week days ago' => 'more than %s week days ago',
+    'less than week days ago' => 'less than %s week days ago',
 );
 
 $jsLanguageStrings = array(
diff --git a/modules/Settings/Workflows/models/Record.php b/modules/Settings/Workflows/models/Record.php
index 4d8344da9..4377ac23e 100644
--- a/modules/Settings/Workflows/models/Record.php
+++ b/modules/Settings/Workflows/models/Record.php
@@ -503,7 +503,7 @@ class Settings_Workflows_Record_Model extends Settings_Vtiger_Record_Model {
 				if($fieldLabel == '_VT_add_comment') {
 					$fieldLabel = 'Comment';
 				}
-				$conditionList[$conditionGroup][] = $fieldLabel.' '.vtranslate($operation, $moduleName).' '.vtranslate($value, $moduleName);
+				$conditionList[$conditionGroup][] = $fieldLabel.' '.vtranslate($operation, 'Settings:Workflows', $value);
 			}
 		}
 
diff --git a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php
index 8e77ae95c..23a671e61 100644
--- a/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php
+++ b/pkg/vtiger/translations/MexicanSpanishLanguagePack_es_mx/modules/Settings/Workflows.php
@@ -145,6 +145,53 @@ $languageStrings = array(
   'LBL_WORKFLOW_SEARCH' => 'Búsqueda por nombre',
   'LBL_UPDATED'                  => ' - Actualización'            ,
     'LBL_CREATION' => ' - Creación',
+    
+    'is' => 'es %s',
+	'contains' => 'contiene %s',
+	'does not contain' => 'no contiene %s',
+	'starts with' => 'comienza con %s',
+	'ends with' => 'termina con %s',
+	'has changed' => 'ha cambiado',
+	'is empty' => 'esta vacio',
+	'is not empty' => 'no está vacío',
+	'equal to' => 'igual a %s',
+	'less than' => 'menos de %s',
+	'greater than' => 'mayor que %s',
+	'does not equal' => 'no es igual a %s',
+	'less than or equal to' => 'menos de o igual a %s',
+	'greater than or equal to' => 'mayor o igual a %s',
+	'is not' => 'no es %s',
+	'has changed to' => 'ha cambiado a %s',
+	'has changed from' => 'ha cambiado de %s',
+	'before' => 'antes de %s',
+	'after' => 'postre',
+	'is today' => 'es hoy',
+	'is tomorrow' => 'Es mañana',
+	'is yesterday' => 'es ayer',
+	'previous month' => 'mes anterior',
+	'current month' => 'mes actual',
+	'next month' => 'próximo mes',
+	'less than hours before' => 'menos de horas %s antes',
+	'less than hours later' => 'menos de horas %s tarde',
+	'more than hours before' => 'más de horas %s antes',
+	'more than hours later' => 'más de horas %s tarde',
+	'less than days ago' => 'Hace menos de %s días',
+	'less than days later' => 'menos de %s días más tarde',
+	'more than days ago' => 'Hace más de %s días',
+	'more than days later' => 'más de %s días más tarde',
+	'days ago' => 'Hace días %s',
+	'days later' => ' %s días más tarde',
+	'between' => 'entre %s',
+	'in less than' => 'en menos de %s',
+	'in more than' => 'en más de %s',
+	'is added' => 'está agregado',
+	'hours since %s' => 'horas desde %s',
+	'week days later' => '%s días de la semana más tarde',
+	'more than week days later' => 'más de %s días de la semana más tarde',
+	'less than week days later' => 'menos de %s días de la semana más tarde',
+	'week days ago' => '%s días de la semana hace',
+	'more than week days ago' => 'más de %s días de la semana hace',
+	'less than week days ago' => 'menos de %s días de la semana hace',
 
 );
 $jsLanguageStrings = array(
-- 
GitLab