Skip to content

Commit

Permalink
Enhancement - Plantillas PDF - Valores del checkbox traducidos (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
ainaraRT authored Dec 19, 2024
1 parent f269a80 commit ef0dce3
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 28 deletions.
54 changes: 28 additions & 26 deletions modules/AOS_PDF_Templates/language/ca_ES.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,54 +43,54 @@
}

$mod_strings = array(
'LBL_ASSIGNED_TO_ID' => 'ID Usuari Assignat',
'LBL_ASSIGNED_TO_ID' => 'Assignat a',
'LBL_ASSIGNED_TO_NAME' => 'Assignat a',
'LBL_ID' => 'ID',
'LBL_DATE_ENTERED' => 'Data de Creació',
'LBL_DATE_MODIFIED' => 'Última Modificació',
'LBL_MODIFIED' => 'Modificat Per',
'LBL_MODIFIED_NAME' => 'Modificat per Nom',
'LBL_CREATED' => 'Creat Per',
'LBL_DATE_ENTERED' => 'Data de creació',
'LBL_DATE_MODIFIED' => 'Última modificació',
'LBL_MODIFIED' => 'Modificat per',
'LBL_MODIFIED_NAME' => 'Modificat per',
'LBL_CREATED' => 'Creat per',
'LBL_PDF_COMMENT' => 'Text complet en PDF', //PR 3532 and 4337
'LBL_DESCRIPTION' => 'Cos',
'LBL_HEADER' => 'Capçalera',
'LBL_FOOTER' => 'Peu de pàgina',
'LBL_DELETED' => 'Esborrat',
'LBL_NAME' => 'Nom',
'LBL_CREATED_USER' => 'Creat per Usuari',
'LBL_MODIFIED_USER' => 'Modificat per Usuari',
'LBL_LIST_FORM_TITLE' => 'Llistat de plantilles PDF',
'LBL_CREATED_USER' => 'Creat per',
'LBL_MODIFIED_USER' => 'Modificat per',
'LBL_LIST_FORM_TITLE' => 'Llista de Plantilles PDF',
'LBL_MODULE_NAME' => 'Plantilles PDF',
'LBL_MODULE_TITLE' => 'Plantilles PDF: Inici',
'LBL_HOMEPAGE_TITLE' => 'Les meves plantilles PDF',
'LNK_NEW_RECORD' => 'Crear plantilla PDF',
'LNK_LIST' => 'Veure plantilles PDF',
'LBL_SEARCH_FORM_TITLE' => 'Cercar plantilles PDF',
'LBL_HISTORY_SUBPANEL_TITLE' => 'Veure Historial',
'LBL_MODULE_TITLE' => 'Plantilles PDF',
'LBL_HOMEPAGE_TITLE' => 'Les meves Plantilles PDF',
'LNK_NEW_RECORD' => 'Crea una plantilla PDF',
'LNK_LIST' => 'Mostra les Plantilles PDF',
'LBL_SEARCH_FORM_TITLE' => 'Cerca Plantilles PDF',
'LBL_HISTORY_SUBPANEL_TITLE' => 'Historial',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activitats',
'LBL_NEW_FORM_TITLE' => 'Noves plantilles PDF',
'LBL_NEW_FORM_TITLE' => 'Nova Plantilla PDF',
'LBL_TYPE' => 'Tipus',
'LBL_ACTIVE' => 'Actiu',
'LBL_BUTTON_INSERT' => 'Insertar',
'LBL_WARNING_OVERWRITE' => 'Avís: això sobreescriurà el seu treball actual ',
'LBL_INSERT_FIELDS' => 'Inserir camps',
'LBL_BUTTON_INSERT' => 'Insereix',
'LBL_WARNING_OVERWRITE' => 'Avís: això sobreescriurà el vostre treball actual ',
'LBL_INSERT_FIELDS' => 'Insereix els camps',

'LBL_SAMPLE' => 'Carregar mostra',
'LBL_PAGE' => 'Pàgina',
'LBL_PREPARED_FOR' => 'Preparat per a',
'LBL_PREPARED_BY' => 'Preparat per',
'LBL_QUOTE_SAMPLE' => 'Exemple de pressupost',
'LBL_INVOICE_SAMPLE' => 'Exemple de factura',
'LBL_ACCOUNT_SAMPLE' => 'Compte Mostra',
'LBL_CONTACT_SAMPLE' => 'Mostra contacte',
'LBL_LEAD_SAMPLE' => 'Enviar Mostra',
'LBL_ACCOUNT_SAMPLE' => 'Exemple de compte',
'LBL_CONTACT_SAMPLE' => 'Exemple de contacte',
'LBL_LEAD_SAMPLE' => 'Exemple de client potencial',
'LBL_ANY_STREET' => 'Qualsevol carrer',
'LBL_ANY_TOWN' => 'Qualsevol ciutat',
'LBL_ANY_TOWN' => 'Qualsevol població',
'LBL_ANY_WHERE' => 'Qualsevol lloc',

'LBL_QUOTE_GROUP_SAMPLE' => 'Mostra del grup de pressupost',
'LBL_INVOICE_GROUP_SAMPLE' => 'Exemple de factura',
'LBL_MARGIN_LEFT' => 'Marge esquerra',
'LBL_QUOTE_GROUP_SAMPLE' => 'Exemple de grup de pressupost',
'LBL_INVOICE_GROUP_SAMPLE' => 'Exemple de grup de factura',
'LBL_MARGIN_LEFT' => 'Marge esquerre',
'LBL_MARGIN_RIGHT' => 'Marge dret',
'LBL_MARGIN_TOP' => 'Marge superior',
'LBL_MARGIN_BOTTOM' => 'Marge inferior',
Expand All @@ -100,4 +100,6 @@
'LBL_DETAILVIEW_PANEL1' => 'Marges',
'LBL_PAGE_SIZE' => 'Mida de la pàgina',
'LBL_ORIENTATION' => 'Orientació',
'LBL_CHECKBOX_TRUE' => 'Cert',
'LBL_CHECKBOX_FALSE' => 'Fals',
);
5 changes: 5 additions & 0 deletions modules/AOS_PDF_Templates/language/en_us.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,9 @@
'LBL_DETAILVIEW_PANEL1' => 'Margins',
'LBL_PAGE_SIZE' => 'Page Size',
'LBL_ORIENTATION' => 'Orientation',
// STIC-Custom 20241125 ART - Translated checkbox values in PDF Templates -
// https://github.com/SinergiaTIC/SinergiaCRM/pull/486
'LBL_CHECKBOX_TRUE' => 'True',
'LBL_CHECKBOX_FALSE' => 'False',
// END STIC-Custom
);
2 changes: 2 additions & 0 deletions modules/AOS_PDF_Templates/language/es_ES.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@
'LBL_DETAILVIEW_PANEL1' => 'Márgenes',
'LBL_PAGE_SIZE' => 'Tamaño de Página',
'LBL_ORIENTATION' => 'Orientación',
'LBL_CHECKBOX_TRUE' => 'Verdadero',
'LBL_CHECKBOX_FALSE' => 'Falso',
);
2 changes: 2 additions & 0 deletions modules/AOS_PDF_Templates/language/gl_ES.lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@
'LBL_DETAILVIEW_PANEL1' => 'Marxes',
'LBL_PAGE_SIZE' => 'Tamaño de Páxina',
'LBL_ORIENTATION' => 'Orientación',
'LBL_CHECKBOX_TRUE' => 'Verdadero',
'LBL_CHECKBOX_FALSE' => 'Falso',
);
11 changes: 9 additions & 2 deletions modules/AOS_PDF_Templates/templateParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,16 @@ public static function parse_template_bean($string, $key, &$focus)
$repl_arr[$key . "_" . $fieldName] = (string)$focus->$fieldName;
} elseif ($field_def['type'] == 'bool') {
if ($focus->{$fieldName} == "1") {
$repl_arr[$key . "_" . $fieldName] = "true";
// STIC-Custom 20241125 ART - Translated checkbox values in PDF Templates
// https://github.com/SinergiaTIC/SinergiaCRM/pull/486
// $repl_arr[$key . "_" . $fieldName] = "true";
$repl_arr[$key . "_" . $fieldName] = translate('LBL_CHECKBOX_TRUE', 'AOS_PDF_Templates');
} else {
$repl_arr[$key . "_" . $fieldName] = "false";
// STIC-Custom 20241125 ART - Translated checkbox values in PDF Templates -
// https://github.com/SinergiaTIC/SinergiaCRM/pull/486
// $repl_arr[$key . "_" . $fieldName] = "false";
$repl_arr[$key . "_" . $fieldName] = translate('LBL_CHECKBOX_FALSE', 'AOS_PDF_Templates');
// END STIC-Custom
}
} elseif ($field_def['type'] == 'image') {
$secureLink = $sugar_config['site_url'] . '/' . "public/" . $focus->id . '_' . $fieldName;
Expand Down

0 comments on commit ef0dce3

Please sign in to comment.