diff --git a/framework/common/config/CommonEntityLabels.xml b/framework/common/config/CommonEntityLabels.xml index b6ecede64d..d52ba4a87d 100644 --- a/framework/common/config/CommonEntityLabels.xml +++ b/framework/common/config/CommonEntityLabels.xml @@ -52,6 +52,14 @@ Bom formula for linear components 用于线性组件的材料清单公式 + + Double decline depreciatiion algorithm for fixed asset((NetBookValue - salvageCost)*2/remainingLifeInYears) + Declina algoritmo doppio svalutazione per cespiti((NetBookValue - salvageCost)*2/remainingLifeInYears) + + + Straight Line depreciatiion algorithm for fixed asset((purchaseCost - salvageCost)/expectedLifeInYears) + Riga semplice algoritmo svalutazione per cespiti((purchaseCost - salvageCost)/expectedLifeInYears) + ECOMMERCE_SITE Site de commerce électronique @@ -5880,6 +5888,10 @@ ตัวแทน 已委托 + + In Planning + In pianificazione + Benötigt Massnahmen Needs Action @@ -5892,6 +5904,10 @@ ต้องการปฏิบัติการ 需要行动 + + Planned + Pianificato + Übermittelt Sent @@ -5928,6 +5944,10 @@ ยอมรับ 已接受 + + In Use + In uso + Wartend auf Annahme Pending Acceptance @@ -5952,6 +5972,30 @@ ผู้ปฏิเสธ 已拒绝 + + Approved + Approvato + + + Approval In Process + Approvazione in corso + + + Not Ready for Approval + Non pronto per l'approvazione + + + Ready for Approval + Pronto per l'approvazione + + + Rejected + Rifiutato + + + Soft Rejected + Rifiutato leggermente + Annulliert Cancelled @@ -6048,6 +6092,18 @@ แก้ปัญหา 已解决 + + Closed + Chiuso + + + Created + Creato + + + Read + Letto + Unbekannter Akteur Unknown Party @@ -6132,6 +6188,10 @@ เสนอ 已提交 + + Available + Disponibile + Deaktiviert Deactivated @@ -6204,6 +6264,18 @@ แก้ไขเอกสารฉบับร่าง 修订方案 + + Active/Open + Attivo/Aperto + + + Inactive/Closed + Inattivo/Chiuso + + + Planned For + Pianificato per + ESR_COMPLETE Completado @@ -6253,6 +6325,34 @@ Errore servizio บริการผิดพลาด + + Approved + Approvato + + + Cancelled + Cancellato + + + Complete + Completato + + + Defined + Definito + + + Implemented + Implementato + + + In Design + In progettazione + + + Tested + Testato + Annulliert Cancelled @@ -6313,6 +6413,58 @@ ตารางเวลา 已列入计划 + + Assigned + Assegnato + + + Request Denied + Richiesta negata + + + Requested + Richiesta + + + Active + Attivo + + + Cancelled + Cancellato + + + Manually Frozen + Congelato manualmente + + + Negative Pending Replenishment + Rifornimento in attesa negativo + + + Completed + Completato + + + Deferred + Rinviato + + + Incomplete + Incompleto + + + Contractor + Imprenditore + + + Full time + Tempo pieno + + + Part time + Part time + Genehmigt Approved @@ -6417,6 +6569,10 @@ เขียนทันที 丢失 + + Activated + Attivato + Verfügbar Available @@ -6453,6 +6609,10 @@ การเปลี่ยนคุณสมบัติ (ยืนยัน) 正在递送(已承诺) + + Deactivated + Disattivato + Defekt Defective @@ -6477,6 +6637,14 @@ การส่ง 已投递 + + Defective (Non-Serialized) + Difettoso (non-serializzato) + + + On Hold (Non-Serialized) + In attesa (non-serializzato) + In Wartestellung On Hold @@ -6642,6 +6810,18 @@ ตารางเวลา 已计划 + + Assigned + Assegnato + + + Converted + Convertito + + + Qualified + Qualificato + Genehmigt Approved @@ -6715,6 +6895,58 @@ ไม่เกิดขึ้นเวลาเดียวกัน 没有同步 + + Error Confirm Sent + Errore conferma inviata + + + Out Generated - Error + Errore genereato fuori + + + Out Generated - Success + Successo genereato fuori + + + In Processed - Error + Errore durante l'esecuzione + + + In Processed - Success + Successo durante l'esecuzione + + + In Message Received + Ricevuto messaggo in entrata + + + In Message Received + Messaggio in ingresso ricevuto + + + Received Error Confirm + Conferma errore ricevuto + + + Received Success Confirm + Conferma successo ricevuto + + + Out Message Send Error + Errore invio messaggio all'esterno + + + Out Message Sent + Messaggio inviato all'esterno + + + System Error + Errore di sistema + + + Out Message Triggered + Intercettato messaggio dall'esterno + Angenommen Accepted @@ -6868,6 +7100,34 @@ ส่ง 已发送 + + Invitation Accepted + Invito accettato + + + Invitation Cancelled + Invito cancellato + + + Invitation Declined + Invito declinato + + + Invitation Pending + Invito in attesa + + + Invitation Sent + Invito inviato + + + Disabled + Disabilitato + + + Enabled + Abilitato + Zugewiesen Assigned @@ -6956,6 +7216,10 @@ ยอมรับ 已接收 + + Refunded + Rimborsato + Beglichen Settled @@ -6968,6 +7232,18 @@ ตัดสินใจ 已结清 + + Cancelled + Cancellata + + + Completed + Completata + + + Pending + In attesa + Zugewiesen Assigned @@ -7016,6 +7292,10 @@ เลือก 已分拣 + + Printed + Stampata + Annulliert Cancelled @@ -7095,6 +7375,14 @@ Chiusa ปิด + + PaidIn + Pagamento in entrata + + + PaidOut + Pagamento in uscita + POSTX_RETURNED Devuelto @@ -7116,22 +7404,35 @@ Annullata โมฆะ + + Not verified + Non verificato + + + Verified + Verificato + + + Active + Attivo + + + Closed + Chiuso + - PRR_APPROVED - Aprobado - Approuvé - Approvata - เห็นด้วย + Approved + Approvato - PRR_DELETED + Deleted Suprimido Supprimé Cancellata ลบ - PRR_PENDING + Pending Pendiente En attente Sospesa @@ -7245,6 +7546,10 @@ ดำเนินการ 正在运行 + + Scheduled + Schedulato + Annulliert Cancelled @@ -7478,6 +7783,10 @@ เสร็จสมบูรณ์ 已完成 + + Manual Refund Required + Reso manual richiesto + Erhalten Received @@ -7518,46 +7827,47 @@ Annulliert - SERVICE_CANCELLED + Cancelled Anulado Annulé Annullato ยกเลิก - SERVICE_CRASHED + Crashed Caído Planté Bloccato เงินสด - SERVICE_FAILED + Failed Fallado Échoué Fallito ผิดพลาด - SERVICE_FINISHED + Finished Finalizado Fini Finito เสร็จสิ้น - SERVICE_PENDING + Pending Pendiente En attente Sospeso ยังค้างอยู่ + + Running + In esecuzione + - SERVICE_RUNNING - En ejecución - En fonction + Queued In esecuzione - ดำเนินการ Annulliert @@ -7671,6 +7981,26 @@ Annullato โมฆะ + + Accepted + Accettato + + + Cancelled + Cancellato + + + Completed + Completato + + + Requested + Richiesto + + + Shipped + Spedito + Synchronisiert Synchronized @@ -7684,6 +8014,82 @@ เกิดขึ้นเวลาเดียวกัน 已同步 + + Approved + Approvato + + + Completed + Completato + + + In-Process + In attesa + + + Available + Disponibile + + + In Use + In uso + + + Cancelled + Cancellato + + + Completed + Completato + + + Created + Creato + + + Available + Disponibile + + + Away + Lontano + + + Busy + Occupato + + + Cancelled + Cancellato + + + Complete + Completo + + + In Progress + In corso + + + On Hold + In attesa + + + Planning + Pianificato + + + Approved + Approvato + + + Deleted + Cancellato + + + Pending + In attesa + Abgebrochen Aborted @@ -12659,6 +13065,10 @@ แคนเดลา (หน่วยวัดความเข้มของแสง) 烛光 -发光度 (发光强度) + + Each + Ciascuno + Mol - Stoffmenge Mole - Substance (molecule) @@ -12671,6 +13081,10 @@ โมล - สสาร (โมเลกุล) 摩尔 -物质 (分子) + + Per Person + Per persona + Balboa Panama Panamanian Balboa diff --git a/framework/common/config/CommonUiLabels.xml b/framework/common/config/CommonUiLabels.xml index 6e5c1ba4c0..36d1b8aa8b 100644 --- a/framework/common/config/CommonUiLabels.xml +++ b/framework/common/config/CommonUiLabels.xml @@ -1387,7 +1387,7 @@ Copyright Droit d'auteur - + يحتمل استعمالها ك Může být použit jako @@ -3416,6 +3416,16 @@ 查找 查找 + + lookup:anywho.com + A qui est ce n° ? + lookup:anywho.com + + + http://www.anywho.com/qry/wp_rl?npa=${telecomNumber.areaCode?if_exists}&telephone=${telecomNumber.contactNumber?if_exists}&btnsubmit.x=20&btnsubmit.y=8 + http://www.pagesjaunes.fr/quidonc/aquiestcenumero.do + http://www.anywho.com/qry/wp_rl?npa=${telecomNumber.areaCode?if_exists}&telephone=${telecomNumber.contactNumber?if_exists}&btnsubmit.x=20&btnsubmit.y=8 + Look up White pages Páginas Blancas @@ -3433,16 +3443,8 @@ http://whitepages.com/find_person_results.pl?fid=p&ac=${telecomNumber.areaCode?if_exists}&s=&p=${telecomNumber.contactNumber?if_exists}&pt=b&x=40&y=9 - http://www.pagesjaunes.fr/quidonc/aquiestcenumero.do - - - lookup:anywho.com - A qui est ce n° ? - - - http://www.anywho.com/qry/wp_rl?npa=${telecomNumber.areaCode?if_exists}&telephone=${telecomNumber.contactNumber?if_exists}&btnsubmit.x=20&btnsubmit.y=8 http://www.pagesjaunes.fr/quidonc/aquiestcenumero.do - + الرئيسية Úvodní stránka @@ -4729,12 +4731,6 @@ 人员 人 - - This page (${parameters.portalPageId}) could not be found! - - - The page '${portalPage.portalPageName}' [${portalPage.portalPageId}] is not owned by you, so cannot be changed! - مرسلة من Übermittelt von @@ -4764,7 +4760,7 @@ Powered by Fonctionne grâce à - + Einstellungen Preferences @@ -8169,6 +8165,10 @@ Mon portail Mio portale + + OFBiz Site + Site officiel d'OFBiz + Oagis Oagis @@ -8177,10 +8177,6 @@ Oagis การรวมภาษาทางธุรกิจ - - OFBiz Site - Site officiel d'OFBiz - طلبية Bestellung @@ -8342,6 +8338,12 @@ 会员 团体 + + This page (${parameters.portalPageId}) could not be found! + + + The page '${portalPage.portalPageName}' [${portalPage.portalPageId}] is not owned by you, so cannot be changed! + Projekt Project diff --git a/framework/security/config/SecurityEntityLabels.xml b/framework/security/config/SecurityEntityLabels.xml index c771c236a9..cc33f36790 100644 --- a/framework/security/config/SecurityEntityLabels.xml +++ b/framework/security/config/SecurityEntityLabels.xml @@ -19,6 +19,14 @@ under the License. --> + + Asset Maintenance Admin group, has all maintenance permissions. + Gruppo permesso manutenzione cespiti, ha tutti i permessi di manutenzione. + + + Asset Maintenance Technician group, has view and update. + Gruppo permesso manutenzione tecnica cespiti, ha i permessi di visualizzazione e aggiornamento. + Full Business Applications permission group, has all business app admin permissions, not technical permissions. Permisos completos para las Aplicaciones de Negocio, no posee permisos técnicos. @@ -42,6 +50,10 @@ Группа 'Ограниченный администратор каталога', содержит ограниченные права на каталог. กลุ่มผู้ดูแลระบบหมวดหมู่จำกัด, มีการอนุญาตหมวดหมู่จำกัด. + + CompDoc admin group, all permissions. + Gruppo permesso amministratore composizione documenti, ha tutti permessi di manutenzione. + Content user group; all limited content permissions. Grupo de usuarios de contenidos; todos los permisos de contenido limitados @@ -64,6 +76,30 @@ Группа 'Полный администратор', содержит все общие права. Full Admin group, has all general permissions. + + Customer user of mypage, Limited access to own custRequests, and project + Utente di mypage, accesso limitato al proprietario delle richieste cliente, e progetti + + + Employee user of mypage, Limited access to the projectmgr and comms, custReq, no email + Utente impiegato di mypage, accesso limitato ai progetti e comunicazioni, richieste cliente, no email + + + Employee user of mypage, Limited access to the projectmgr, comms,custRequests + Utente impiegato di mypage, accesso limitato ai progetti e comunicazioni, richieste cliente + + + Customer user of MYPORTAL, Limited access to own custRequests, and project + Utente di myportal, accesso limitato al proprietario delle richieste cliente, e progetti + + + Employee user of MYPORTAL, Limited access to the projectmgr and comms, custReq, no email + Utente impiegato di myportal, accesso limitato ai progetti e comunicazioni, richieste cliente, no email + + + Employee user of myportal, Limited access to the projectmgr, comms,custRequests + Utente impiegato di myportal, accesso limitato ai progetti e comunicazioni, richieste cliente + Order Admin group, has all order permissions. Administrador de Órdenes, tiene todos los permisos de Órdenes. @@ -136,6 +172,14 @@ Служащий POS พนักงาน ณ.จุดขาย + + Project Admin group, has update access to own projects. + Gruppo permesso amministrazione progetti, ha accesso in aggiornamento come proprietario progetti. + + + Project User group, has read, task create/assign and timesheet create/update access to own projects. + Gruppo permesso utente progetti, può leggere, creare/assegnare compiti e creare/aggiornare timbrature accedere ai propri progetti. + Security Admin group, has all permissions to modify security settings in party manager. Grupo de administradores de seguridad, tiene todos los permisos para modificar ajustes de seguridad en el gestor de participantes. @@ -260,6 +304,10 @@ Операции просмотра в приложении Управление учетом. แสดงการทำงานในการจัดการบัญชี + + ALL operations involving general ledger accounting transactions and entries. + Tutte le operazioni che coinvolgono transazioni e voci di contabilità + Create general ledger accounting transaction and entries. Creación de transacciones y entradas de contabilidad de libro mayor. @@ -292,7 +340,11 @@ Обновление проводок и занесений главной книги. อัพเดทรายการบัญชีแยกประเภททั่วไปและสิทธิในการเข้า - + + View general ledger accounting transaction and entries. + Visualizzare le transazioni nella contabilità generale. + + Set foreign exchange rates. Establecer tasas de cambio de divisa. Fixer les taux de devises étrangères. @@ -300,6 +352,10 @@ Устанавливать курсы иностранных валют. กำหนดอัตราการปริวรรตเงินตรา + + ALL organization accounting preferences operations + Tutte le operazioni nelle preferenze di contabilità. + Set organization accounting preferences. Establecer preferencias contables de la organización. @@ -308,6 +364,42 @@ Устанавливать учетные параметры организации. กำหนดสิทธิพิเศษให้บัญชีขององค์กร + + Delete organization accounting preferences + Operazioni di cancellazione nelle preferenze di contabilità. + + + Update organization accounting preferences + Operazioni di aggiornamento nelle preferenze di contabilità. + + + View organization accounting preferences + Operazioni di visualizzazione nelle preferenze di contabilità. + + + View the Artifact Info pages. + Visualizzazione pagine informazioni artifatti. + + + ALL Asset Maintenance operations. + Tutte le operazioni per la gestione cespiti. + + + Asset Maintenance Create operations. + Operazioni di creazione per la gestione cespiti. + + + Asset Maintenance Delete operations. + Operazioni di cancellazione per la gestione cespiti. + + + Asset Maintenance Update operations. + Operazioni di aggiornamento per la gestione cespiti. + + + Asset Maintenance View permission. + Operazioni di visualizzazione per la gestione cespiti. + ALL operations in the Catalog Manager. TODAS las operaciones en el Administrador del Catálogo. @@ -340,6 +432,10 @@ Дополнительные права для редактирования ценовой информации, включая цены, акции и правила ценообразования. ต้องการการอนุญาต, ในการเพิ่มถึงการอนุญาตการปฏิบัติอื่น ๆ, ถึงการรักษาราคาสินค้าข้อมูลการรวมราคา,โปรโมชัน,และข้อบังคับราคา + + Allow create/update of 'Purchase Allow' in the Catalog Manager. + Permetti la creazione/aggiornamento di gestione cataloghi di 'Permetti acquisto'. + Limited Create operations in the Catalog Manager. Operaciones de Creación Limitadas en el Administrador del Catálogo. @@ -380,6 +476,26 @@ Операции просмотра в приложении Управление каталогом продуктов. การแสดงการทำงานในการจัดการหมวดหมู่ + + Allow create/update of 'View Allow' in the Catalog Manager. + Permetti la creazione/aggiornamento di gestione cataloghi di 'Visualizzazione permessa'. + + + Create operations in the Common Component. + Operazioni di creazione nel componente Common. + + + Delete operations in the Common Component. + Operazioni di cancellazione nel componente Common. + + + Update operations in the Common Component. + Operazioni di aggiornamento nel componente Common. + + + View operations in the Common Component. + Operazioni di visualizzazione nel componente Common. + ALL operations in the Content Manager. TODAS las operaciones en el Administrador de Contenido. @@ -404,6 +520,22 @@ Операции удаления в приложении Управление каталогом продуктов. การลบการทำงานในการจัดการหัวข้อ + + Limited Create operations in the Content Manager. + Operazioni limitate di creazione nella gestione contenuti. + + + Limited Delete operations in the Content Manager. + Operazioni limitate di cancellazione nella gestione contenuti. + + + Limited Update operations in the Content Manager. + Operazioni limitate di aggiornamento nella gestione contenuti. + + + Limited View operations in the Content Manager. + Operazioni limitate di visualizzazione nella gestione contenuti. + Update operations in the Content Manager. Operaciones de Actualización en el Administrador de Contenido. @@ -428,6 +560,10 @@ Использование страниц Обслуживание файлов данных. ใช้ไฟล์ข้อมูลในหน้าการบำรุงรักษา + + View operations in the eBay application. + Operazioni di visualizzazione nell'applicazione eBay. + ALL with the Entity Data Maintenance pages. TODO dentro de las páginas de Mantenimiento de Datos de Entidad. @@ -476,6 +612,10 @@ Использование страниц Обслуживание данных сущностей. ใช้หน้าการรักษาสภาพเอนทิตี + + Use the Entity Sync Admin pages. + Usare le pagine di amministrazione sincronizzazione entità. + Use the Enum and Status Maintenance pages. Usar las páginas de Mantenimiento de Enumeraciones y Estados. @@ -484,6 +624,26 @@ Использование страниц Обслуживание перечеслений и статусов. Use the Enum and Status Maintenance pages. + + ALL operations in the Example Management Screens. + Tutte le operazioni di gestione esempi. + + + Create operations in the Example Management Screens. + Operazioni di creazione nella gestione esempi. + + + Delete operations in the Example Management Screens. + Operazioni di cancellazione nella gestione esempi. + + + Update operations in the Example Management Screens. + Operazioni di aggiornamento nella gestione esempi. + + + View operations in the Example Management Screens. + Operazioni di visualizzazione nella gestione esempi. + ALL operations in the Facility Manager. TODAS las operaciones en el Administrador de Establecimientos. @@ -540,6 +700,30 @@ Операции просмотра в приложении Управление объектами. การแสดงการทำงานในการจัดการคลังสินค้า + + View operations in the Google Base application. + Operazioni di visualizzazione nell'applicazione Google Base. + + + Create operations in the HumanRes Manager. + Operazioni di creazione nella gestione risorse umane. + + + Delete operations in the HumanRes Manager. + Operazioni di cancellazione nella gestione risorse umane. + + + Update operations in the HumanRes Manager. + Operazioni di aggiornamento nella gestione risorse umane. + + + View operations in the HumanRes Manager. + Operazioni di visualizzazione nella gestione risorse umane. + + + View the Labels Info pages. + Visualizzazione pagine per gestione labels. + Manual Payment Transaction. Pago Manual de Transacciones. @@ -644,6 +828,34 @@ Операции просмотра в приложении Управление маркетингом. การแสดงการทำงานในการจัดการการตลาด + + Use the customer screens in mypage. + Usare la visualizzazione clienti in mypage. + + + Usage of the employee screens in mypage: projectmanager and internal notes. + Usare la visualizzazione clienti in mypage: gestione progetti e note interne. + + + Use the employee screens in mypage. + Usare la visualizzazione impiegati in mypage. + + + Use the customer screens in myportal. + Usare la visualizzazione clienti in myportal. + + + Usage of the employee screens in myportal: projectmanager and internal notes. + Usare la visualizzazione clienti in myportal: gestione progetti e note interne. + + + Use the employee screens in myportal. + Usare la visualizzazione impiegati in myportal. + + + View operations in the Oagis application. + Operazioni di visualizzazione nell'applicazione Oagis. + Permission to access the Stock OFBiz Manager Applications. Permisos para acceder el menú de Herramientas Web. @@ -804,6 +1016,10 @@ Права на изменение цены в сбытовых заказах. การอนุญาตการเปลี่ยนแปลงราคาสำหรับรายการขาย + + Update sales orders for all stores in the Order Manager. + Permesso di aggiornamento ordini di vendita per tutti i negozi della gestione ordini. + Send order confirmation notification. Enviar notificación de confirmación de órden. @@ -836,6 +1052,22 @@ Все операции в приложении Управление участниками การทำงานทั้งหมดในการจัดการกลุ่มผู้ใช้ + + Can create Email communication events for logged-in user. + Può creare eventi comunicazione email per l'utente autenticato. + + + Can delete Email communication events for logged-in user. + Può cancellare eventi comunicazione email per l'utente autenticato. + + + Can update Email communication events for logged-in user. + Può aggiornare eventi comunicazione email per l'utente autenticato. + + + Can create Internal note communication event for logged-in user. + Può creare note interne eventi comunicazione per l'utente autenticato. + Create communication event. Crear eventos de comunicación. @@ -1092,6 +1324,46 @@ Использование страниц Обслуживание периода. ใช้หน้าการรักษาช่วงเวลา + + ALL operations in the Project Manager. + Tutte le operazioni nella gestione progetti. + + + All admin operations in the Project Manager for a project/phase/task the user is member of. + Tutte le operazioni di amministrazione nella gestione progetti per un progetto/fase/compito di cui l'utente è membro. + + + Be able to create a task (should be member of project) + Essere autorizzato a creare un compito (dovrebbe essere membro del progetto) + + + Be able to create a weekly timesheet for the loginid. + Essere autorizzato a creare una timbratura settimanale per l'utente autenticato. + + + Be able to update(report) on an existing own timesheet + Essere autorizzato ad aggiornare una timbratura esistente + + + Update operations in the Project Manager for a project/phase/task the user is member of. + Operazioni di aggiornamento nella gestione progetti per un progetto/fase/compito ci cui l'utente è membro. + + + All view operations in the Project Manager for a project/phase/task the user is member of.. + Tutte le perazioni di visualizzazione nella gestione progetti per un progetto/fase/compito ci cui l'utente è membro. + + + Be able to create any weekly timesheet. + Essere autorizzato a creare qualiasi timbratura settimanale. + + + Be able to update any weekly timesheet. + Essere autorizzato ad aggiornare qualiasi timbratura settimanale. + + + ALL View operations in the Project Manager(but can be limited by ROLE_VIEW) + Tutte le operazioni di visualizzazione nella gestione progetti (ma può essere limitato a ROLE_VIEW) + ALL operations in the Security Management Screens. TODAS las operaciones en las pantallas de Administración de Seguridad. @@ -1228,6 +1500,14 @@ Операции просмотра в Редакторе налоговых ставок. แสดงการทำงานในการแก้ไขอัตราภาษี + + Temporal expression admin + Amministrazione espressioni temporali + + + User preferences admin + Amministrazione preferenze utente + Edit a UtilCache instance. Editar una instancia de UtilCache. @@ -1260,6 +1540,22 @@ Просмотр экземпляра UtilDebug. View a UtilDebug instance. + + ALL operations on Visual Themes and Visual Theme Resources. + Tutte le operazioni sui temi visuali e risorse dei temi visuali + + + Create Visual Themes and Visual Theme Resources. + Creare temi visuali e risorse dei temi visuali + + + Delete Visual Themes and Visual Theme Resources. + Cancella temi visuali e risorse dei temi visuali + + + Update Visual Themes and Visual Theme Resources. + Aggiorna temi visuali e risorse dei temi visuali + Permission to access the WebTools Menu. Permisos para acceder el menú de Herramientas Web. @@ -1292,6 +1588,22 @@ Операции удаления в приложении Организатор. ลบการทำงานในการจัดการความพยายามในการทำงาน + + Limited Create operations in the Work Effort Manager. + Operazioni limitate in creazione nelle gestione impegni di lavoro. + + + Limited Delete operations the Work Effort Manager. + Operazioni limitate in cancellazione nelle gestione impegni di lavoro. + + + Limited Update operations in the Work Effort Manager. + Operazioni limitate in aggiornamento nelle gestione impegni di lavoro. + + + Limited View operations in the Work Effort Manager. + Operazioni limitate in visualizzazione nelle gestione impegni di lavoro. + Update operations in the Work Effort Manager. Operaciones de Actualización en el Administrador de Esfuerzos de Trabajo. diff --git a/framework/webtools/config/WebtoolsUiLabels.xml b/framework/webtools/config/WebtoolsUiLabels.xml index d3c2fc96b5..52f9c486c3 100644 --- a/framework/webtools/config/WebtoolsUiLabels.xml +++ b/framework/webtools/config/WebtoolsUiLabels.xml @@ -194,6 +194,10 @@ Importa i Dati da XML Readers นำเข้าข้อมูลผู้ตรวจ + + Entity Eo Model Bundle + Entità Eo Model Bundle + Entity SQL Processor Processeur d'entités SQL @@ -1502,6 +1506,10 @@ La traduction ${key} existe déjà dans le fichier ${fileName} La label ${key} esiste gi‚àö‚Ć nel file ${fileName} + + Only Not Used Labels + Solo traduzioni non usate + Only Missing Translations Solo traduzioni mancanti diff --git a/framework/webtools/servicedef/services.xml b/framework/webtools/servicedef/services.xml index 6311b0beca..d8daed5e71 100644 --- a/framework/webtools/servicedef/services.xml +++ b/framework/webtools/servicedef/services.xml @@ -141,4 +141,17 @@ under the License. + + Update Label Key + + + + + + + + + + diff --git a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java index de9fe1ff18..2e3339c4f4 100644 --- a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java +++ b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelManagerFactory.java @@ -38,8 +38,11 @@ import org.ofbiz.base.util.UtilProperties; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; import org.ofbiz.base.util.cache.UtilCache; +import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.model.ModelReader; import org.ofbiz.service.DispatchContext; +import org.ofbiz.service.GenericServiceException; +import org.ofbiz.service.LocalDispatcher; import org.ofbiz.service.ServiceUtil; import org.w3c.dom.Comment; import org.w3c.dom.Document; @@ -63,7 +66,7 @@ public class LabelManagerFactory { protected static Map> references = null; protected static int duplicatedLocalesLabels = 0; - protected static String delegatorName; + protected static GenericDelegator delegator; protected static ModelReader entityModelReader; protected static DispatchContext dispatchContext; @@ -73,7 +76,7 @@ public class LabelManagerFactory { } LabelManagerFactory lmf = labelManagerFactoryCache.get(delegatorName); - + if (lmf == null) { lmf = new LabelManagerFactory(delegatorName); labelManagerFactoryCache.put(delegatorName, lmf); @@ -82,10 +85,9 @@ public class LabelManagerFactory { } protected LabelManagerFactory(String delegatorName) throws GeneralException { - LabelManagerFactory.delegatorName = delegatorName; - LabelManagerFactory.entityModelReader = ModelReader.getModelReader(delegatorName); - LabelManagerFactory.dispatchContext = new DispatchContext("LabelManagerDispCtx", null, this.getClass().getClassLoader(), null); - + delegator = GenericDelegator.getGenericDelegator(delegatorName); + entityModelReader = ModelReader.getModelReader(delegatorName); + dispatchContext = new DispatchContext("LabelManagerFactoryDispCtx", null, this.getClass().getClassLoader(), null); prepareAll(); } @@ -99,53 +101,63 @@ public class LabelManagerFactory { int duplicatedLocales = 0; try { + boolean sharkComponent = false; Collection componentConfigs = ComponentConfig.getAllComponents(); for (ComponentConfig componentConfig: componentConfigs) { String componentName = componentConfig.getComponentName(); List resourceFiles = FileUtil.findXmlFiles(componentConfig.getRootLocation(), null, "resource", null); + boolean cycle = true; + while (cycle) { + for (File resourceFile: resourceFiles) { + String fileName = resourceFile.getName(); + Document resourceDocument = UtilXml.readXmlDocument(resourceFile.toURI().toURL()); + Element resourceElem = resourceDocument.getDocumentElement(); + String labelKeyComment = ""; - for (File resourceFile: resourceFiles) { - String fileName = resourceFile.getName(); - Document resourceDocument = UtilXml.readXmlDocument(resourceFile.toURI().toURL()); - Element resourceElem = resourceDocument.getDocumentElement(); - String labelKeyComment = ""; + for (Node propertyNode: UtilXml.childNodeList(resourceElem.getFirstChild())) { + if (propertyNode instanceof Element) { + Element propertyElem = (Element)propertyNode; + String labelKey = StringUtil.htmlSpecialChars(propertyElem.getAttribute("key"), true, true, false); + String labelComment = ""; - for (Node propertyNode: UtilXml.childNodeList(resourceElem.getFirstChild())) { - if (propertyNode instanceof Element) { - Element propertyElem = (Element)propertyNode; - String labelKey = StringUtil.htmlSpecialChars(propertyElem.getAttribute("key"), true, true, false); - String labelComment = ""; + for (Node valueNode: UtilXml.childNodeList(propertyElem.getFirstChild())) { + if (valueNode instanceof Element) { + Element valueElem = (Element)valueNode; + String localeName = valueElem.getAttribute("xml:lang"); + String labelValue = StringUtil.htmlSpecialChars(UtilXml.nodeValue(valueElem.getFirstChild()), true, true, false); + LabelInfo label = (LabelInfo)labels.get(labelKey + keySeparator + fileName); - for (Node valueNode: UtilXml.childNodeList(propertyElem.getFirstChild())) { - if (valueNode instanceof Element) { - Element valueElem = (Element)valueNode; - String localeName = valueElem.getAttribute("xml:lang"); - String labelValue = StringUtil.htmlSpecialChars(UtilXml.nodeValue(valueElem.getFirstChild()), true, true, false); - LabelInfo label = (LabelInfo)labels.get(labelKey + keySeparator + fileName); - - if (UtilValidate.isEmpty(label)) { - label = new LabelInfo(labelKey, labelKeyComment, fileName, componentName, localeName, labelValue, labelComment); - labels.put(labelKey + keySeparator + fileName, label); - } else { - if (label.setLabelValue(localeName, labelValue, labelComment, false)) { - duplicatedLocales++; + if (UtilValidate.isEmpty(label)) { + label = new LabelInfo(labelKey, labelKeyComment, fileName, componentName, localeName, labelValue, labelComment); + labels.put(labelKey + keySeparator + fileName, label); + } else { + if (label.setLabelValue(localeName, labelValue, labelComment, false)) { + duplicatedLocales++; + } } + localesFound.add(localeName); + componentNamesFound.add(componentName); + fileNamesFound.put(fileName, resourceFile.toURI().toString()); + fileComponent.put(fileName, componentName); + labelComment = ""; + } else if (valueNode instanceof Comment) { + labelComment = labelComment + StringUtil.htmlSpecialChars(valueNode.getNodeValue(), true, true, false); } - localesFound.add(localeName); - componentNamesFound.add(componentName); - fileNamesFound.put(fileName, resourceFile.toURI().toString()); - fileComponent.put(fileName, componentName); - labelComment = ""; - } else if (valueNode instanceof Comment) { - labelComment = labelComment + StringUtil.htmlSpecialChars(valueNode.getNodeValue(), true, true, false); } + labelKeyComment = ""; + } else if (propertyNode instanceof Comment) { + labelKeyComment = labelKeyComment + StringUtil.htmlSpecialChars(propertyNode.getNodeValue(), true, true, false); } - labelKeyComment = ""; - } else if (propertyNode instanceof Comment) { - labelKeyComment = labelKeyComment + StringUtil.htmlSpecialChars(propertyNode.getNodeValue(), true, true, false); } } + if (!sharkComponent) { + componentName = "shark"; + resourceFiles = FileUtil.findXmlFiles(System.getProperty("ofbiz.home") + "/specialpurpose/shark", null, "resource", null); + sharkComponent = true; + } else { + cycle = false; + } } } @@ -159,6 +171,18 @@ public class LabelManagerFactory { duplicatedLocalesLabels = duplicatedLocales; } + public static GenericDelegator getDelegator() { + return delegator; + } + + public static ModelReader getModelReader() { + return entityModelReader; + } + + public static DispatchContext getDispatchContext() { + return dispatchContext; + } + public static Map getLabels() { return labels; } @@ -186,39 +210,43 @@ public class LabelManagerFactory { public static Map> getReferences() { return references; } - + public static Set getLabelsList() { return labels.keySet(); } - + public static Set getReferencesList() { return references.keySet(); } - + public static int getLabelReferenceFile(String key) { int refFile = 0; boolean keyFound = false; - + + if (key == null) { + key = ""; + } + for (Map.Entry e: fileNamesFound.entrySet()) { String keyToSearch = key + keySeparator + e.getKey(); - + if (labels.containsKey(keyToSearch)) { keyFound = true; break; } } - + if (!keyFound) { Map reference = references.get(key); - + if (UtilValidate.isNotEmpty(reference)) { refFile = reference.size(); } } - + return refFile; } - + public static int getDuplicatedLocalesLabels() { return duplicatedLocalesLabels; } @@ -266,6 +294,35 @@ public class LabelManagerFactory { return ServiceUtil.returnSuccess(); } + public static Map updateAndSaveLabelKey(DispatchContext dctx, Map context) { + String key = (String)context.get("key"); + String keyComment = (String)context.get("keyComment"); + String update_label = (String)context.get("update_label"); + String fileName = (String)context.get("fileName"); + String confirm = (String)context.get("confirm"); + String removeLabel = (String)context.get("removeLabel"); + List localeNames = UtilGenerics.cast(context.get("localeNames")); + List localeValues = UtilGenerics.cast(context.get("localeValues")); + List localeComments = UtilGenerics.cast(context.get("localeComments")); + Locale locale = (Locale) context.get("locale"); + LocalDispatcher dispatcher = dctx.getDispatcher(); + + Map contextInput = UtilMisc.toMap("key", key, "keyComment", keyComment, "update_label", update_label, + "fileName", fileName, "confirm", confirm, "removeLabel", removeLabel, + "localeNames", localeNames, "localeValues", localeValues, "localeComments", localeComments); + try { + Map updatedKey = dispatcher.runSync("updateLabelKey", contextInput); + + if (ServiceUtil.isError(updatedKey)) { + return updatedKey; + } else { + return dispatcher.runSync("saveLabelsToXmlFile", UtilMisc.toMap("fileName", fileName)); + } + } catch (GenericServiceException e) { + return ServiceUtil.returnError("error on saving label key :" + key); + } + } + private static int updateLabelValue(List localeNames, List localeValues, List localeComments, LabelInfo label, String key, String keyComment, String fileName) { int notEmptyLabels = 0; int i = 0; @@ -295,3 +352,4 @@ public class LabelManagerFactory { return notEmptyLabels; } } + diff --git a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java index 8b0ea09e68..5ed7bcfd47 100644 --- a/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java +++ b/framework/webtools/src/org/ofbiz/webtools/labelmanager/LabelReferences.java @@ -6,9 +6,9 @@ * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -23,7 +23,12 @@ import java.io.IOException; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.TreeMap; +import java.util.TreeSet; + +import javolution.util.FastList; +import javolution.util.FastMap; import org.ofbiz.base.util.Debug; import org.ofbiz.base.util.FileUtil; @@ -31,7 +36,14 @@ import org.ofbiz.base.util.GeneralException; import org.ofbiz.base.util.UtilFormatOut; import org.ofbiz.base.util.UtilValidate; import org.ofbiz.base.util.UtilXml; +import org.ofbiz.entity.GenericDelegator; import org.ofbiz.entity.GenericEntityException; +import org.ofbiz.entity.GenericValue; +import org.ofbiz.entity.condition.EntityComparisonOperator; +import org.ofbiz.entity.condition.EntityCondition; +import org.ofbiz.entity.condition.EntityConditionList; +import org.ofbiz.entity.condition.EntityExpr; +import org.ofbiz.entity.condition.EntityOperator; import org.ofbiz.entity.model.ModelEntity; import org.ofbiz.entity.model.ModelField; import org.ofbiz.service.ModelParam; @@ -46,46 +58,55 @@ public class LabelReferences { private static final String uiLabelMapInLayoutSettings = "uiLabelMap."; private static final String formFieldTitle = "FormFieldTitle_"; private static final String getMessage = "UtilProperties.getMessage"; + private static final String getEntityLabel = ".get(\""; + private static final String startExpression = "${"; + private static final String endExpression = "}"; private static Map> references = null; - + public static Map> getLabelReferences() throws GeneralException { references = new TreeMap>(); - + // get labels from FTL files getLabelsFromFtlFiles(); - + // get labels from java files getLabelsFromJavaFiles(); - + // get labels from simple method files getLabelsFromSimpleMethodFiles(); - + // get labels from form widgets files getLabelsFromFormWidgets(); - + // get labels from screen widgets files getLabelsFromScreenWidgets(); - + // get labels from menu widgets files getLabelsFromMenuWidgets(); - + + // get labels from tree widgets files + getLabelsFromTreeWidgets(); + + // get labels from Ofbiz components files + getLabelsFromOfbizComponents(); + return references; } - + private static void getLabelsFromFtlFiles() throws GeneralException { try { List ftlFiles = FileUtil.findFiles("ftl", null, null, uiLabelMap); - + for (File ftlFile: ftlFiles) { String fileNameURI = ftlFile.toURI().toString(); String inFile = FileUtil.readString("UTF-8", ftlFile); int pos = 0; while (pos >= 0){ pos = inFile.indexOf(uiLabelMap, pos); - + if (pos >= 0) { int endLabel = inFile.indexOf("}", pos); - + if (endLabel >= 0) { String labelKey = inFile.substring(pos + uiLabelMap.length(), endLabel); setLabelReference(labelKey, fileNameURI); @@ -96,15 +117,22 @@ public class LabelReferences { } } } + /* + ftlFiles = FileUtil.findFiles("ftl", null, null, getEntityLabel); + + for (File ftlFile: ftlFiles) { + getFtlEntityLabels(ftlFile, getEntityLabel); + } + */ } catch(IOException ioe) { throw new GeneralException(ioe.getMessage()); } } - + private static void getLabelsFromJavaFiles() throws GeneralException { try { List javaFiles = FileUtil.findFiles("java", null, null, getMessage); - + for (File javaFile: javaFiles) { getJavaLabels(javaFile, getMessage); } @@ -112,7 +140,7 @@ public class LabelReferences { throw new GeneralException(ioe.getMessage()); } } - + private static void getJavaLabels(File javaFile, String message) throws GeneralException { try { String fileNameURI = javaFile.toURI().toString(); @@ -120,32 +148,32 @@ public class LabelReferences { int pos = 0; while (pos >= 0){ pos = inFile.indexOf(message, pos); - + if (pos >= 0) { int offSet = (pos + 200 > inFile.length()) ? inFile.length() : pos + 200; String searchComma = inFile.substring(pos, offSet); int firstComma = searchComma.indexOf(",\"", 0); - + if (firstComma < 0) { firstComma = searchComma.indexOf(", \"", 0); pos = pos + firstComma + 3; } else { pos = pos + firstComma + 2; } - + if (firstComma >= 0) { offSet = (pos + 100 > inFile.length()) ? inFile.length() : pos + 100; searchComma = inFile.substring(pos, offSet); int secondComma = searchComma.indexOf("\",", 0); int endString = pos; - + if (secondComma < 0) { secondComma = searchComma.indexOf("\" ,", 0); endString = endString + secondComma + 1; } else { endString = endString + secondComma; } - + if (secondComma >= 0) { setLabelReference(inFile.substring(pos, endString), fileNameURI); pos = endString; @@ -158,16 +186,50 @@ public class LabelReferences { throw new GeneralException(ioe.getMessage()); } } - + + private static void getFtlEntityLabels(File javaFile, String message) throws GeneralException { + try { + String fileNameURI = javaFile.toURI().toString(); + String inFile = FileUtil.readString("UTF-8", javaFile); + int pos = 0; + while (pos >= 0){ + pos = inFile.indexOf(message, pos); + + if (pos >= 0) { + int offSet = (pos + 200 > inFile.length()) ? inFile.length() : pos + 200; + String searchDoubleQuote = inFile.substring(pos + 6, offSet); + int firstComma = searchDoubleQuote.indexOf("\"", 0); + + if (firstComma >= 0) { + offSet = (firstComma + 100 > inFile.length()) ? inFile.length() : firstComma + 100; + String searchLocale = searchDoubleQuote.substring(firstComma, offSet); + int endMethodName = searchLocale.indexOf(", locale)", 0); + + if (endMethodName < 0) { + endMethodName = searchLocale.indexOf(",locale)", 0); + } + if (endMethodName >= 0) { + setLabelReference(inFile.substring(pos + 6, pos + 6 + firstComma), fileNameURI); + pos = pos + 6; + } + } + pos += 1; + } + } + } catch(IOException ioe) { + throw new GeneralException(ioe.getMessage()); + } + } + private static void getLabelsFromSimpleMethodFiles() throws GeneralException { try { List simpleMethodsFiles = FileUtil.findXmlFiles(null, null, "simple-methods", "http://ofbiz.apache.org/dtds/simple-methods.xsd"); - + for (File simpleMethodFile: simpleMethodsFiles) { String fileNameURI = simpleMethodFile.toURI().toString(); Document simpleMethodDocument = UtilXml.readXmlDocument(simpleMethodFile.toURI().toURL()); Element rootElem = simpleMethodDocument.getDocumentElement(); - + for (Element elem1: UtilXml.childElementList(rootElem)) { checkSimpleMethodTag(elem1, fileNameURI); for (Element elem2: UtilXml.childElementList(elem1)) { @@ -193,41 +255,54 @@ public class LabelReferences { throw new GeneralException(e.getMessage()); } } - + private static void checkSimpleMethodTag(Element elem, String fileNameURI) throws GeneralException { // fail-property labels if ("fail-property".equals(elem.getTagName())) { getFailPropertyTag(elem, fileNameURI); - // property-to-field labels - } else if ("property-to-field".equals(elem.getTagName())) { - getPropertyToFieldTag(elem, fileNameURI); } } - + private static void getLabelsFromFormWidgets() throws GeneralException { try { List formsFiles = FileUtil.findXmlFiles(null, null, "forms", "http://ofbiz.apache.org/dtds/widget-form.xsd"); - + for (File formsFile: formsFiles) { + Map autoFieldsEntity = FastMap.newInstance(); + Map autoFieldsService = FastMap.newInstance(); String fileNameURI = formsFile.toURI().toString(); Document formDocument = UtilXml.readXmlDocument(formsFile.toURI().toURL()); Element rootElem = formDocument.getDocumentElement(); - + for (Element elem1: UtilXml.childElementList(rootElem)) { - checkFormsTag(elem1, fileNameURI); + checkFormsTag(elem1, fileNameURI, autoFieldsEntity, autoFieldsService); for (Element elem2: UtilXml.childElementList(elem1)) { - checkFormsTag(elem2, fileNameURI); + checkFormsTag(elem2, fileNameURI, autoFieldsEntity, autoFieldsService); for (Element elem3: UtilXml.childElementList(elem2)) { - checkFormsTag(elem3, fileNameURI); + checkFormsTag(elem3, fileNameURI, autoFieldsEntity, autoFieldsService); for (Element elem4: UtilXml.childElementList(elem3)) { - checkFormsTag(elem4, fileNameURI); + checkFormsTag(elem4, fileNameURI, autoFieldsEntity, autoFieldsService); for (Element elem5: UtilXml.childElementList(elem4)) { - checkFormsTag(elem5, fileNameURI); + checkFormsTag(elem5, fileNameURI, autoFieldsEntity, autoFieldsService); } } } } } + + for (Map.Entry entry: autoFieldsEntity.entrySet()) { + if ("N".equals(entry.getValue())) { + String labelKey = formFieldTitle + entry.getKey(); + setLabelReference(labelKey, fileNameURI); + } + } + + for (Map.Entry entry: autoFieldsService.entrySet()) { + if ("N".equals(entry.getValue())) { + String labelKey = formFieldTitle + entry.getKey(); + setLabelReference(labelKey, fileNameURI); + } + } } } catch(IOException ioe) { throw new GeneralException(ioe.getMessage()); @@ -235,17 +310,17 @@ public class LabelReferences { throw new GeneralException(e.getMessage()); } } - - private static void checkFormsTag(Element elem, String fileNameURI) throws GeneralException { + + private static void checkFormsTag(Element elem, String fileNameURI, Map autoFieldsEntity, Map autoFieldsService) throws GeneralException { // auto fields entity labels if ("auto-fields-entity".equals(elem.getTagName())) { - getAutoFieldsEntityTag(elem, fileNameURI); + getAutoFieldsEntityTag(elem, fileNameURI, autoFieldsEntity); // auto fields service labels } else if ("auto-fields-service".equals(elem.getTagName())) { - getAutoFieldsServiceTag(elem, fileNameURI); + getAutoFieldsServiceTag(elem, fileNameURI, autoFieldsService); // field labels } else if ("field".equals(elem.getTagName())) { - getFieldTag(elem, fileNameURI); + getFieldTag(elem, fileNameURI, autoFieldsEntity, autoFieldsService); // option description labels } else if ("option".equals(elem.getTagName())) { getOptionTag(elem, fileNameURI); @@ -253,18 +328,24 @@ public class LabelReferences { } else if ("hyperlink".equals(elem.getTagName()) || "sub-hyperlink".equals(elem.getTagName())) { getHyperlinkTag(elem, fileNameURI); + // entity-options labels + } else if ("entity-options".equals(elem.getTagName())) { + getEntityOptionsTag(elem, fileNameURI); + // display-entity labels + } else if ("display-entity".equals(elem.getTagName())) { + getDisplayEntityTag(elem, fileNameURI); } } - + private static void getLabelsFromScreenWidgets() throws GeneralException { try { List screensFiles = FileUtil.findXmlFiles(null, null, "screens", "http://ofbiz.apache.org/dtds/widget-screen.xsd"); - + for (File screensFile: screensFiles) { String fileNameURI = screensFile.toURI().toString(); Document screenDocument = UtilXml.readXmlDocument(screensFile.toURI().toURL()); Element rootElem = screenDocument.getDocumentElement(); - + for (Element elem1: UtilXml.childElementList(rootElem)) { checkScreensTag(elem1, fileNameURI); for (Element elem2: UtilXml.childElementList(elem1)) { @@ -314,7 +395,7 @@ public class LabelReferences { throw new GeneralException(e.getMessage()); } } - + private static void checkScreensTag(Element elem, String fileNameURI) { // set labels if ("set".equals(elem.getTagName())) { @@ -330,16 +411,16 @@ public class LabelReferences { getLinkTag(elem, fileNameURI); } } - + private static void getLabelsFromMenuWidgets() throws GeneralException { try { List menusFiles = FileUtil.findXmlFiles(null, null, "menus", "http://ofbiz.apache.org/dtds/widget-menu.xsd"); - + for (File menuFiles: menusFiles) { String fileNameURI = menuFiles.toURI().toString(); Document menuDocument = UtilXml.readXmlDocument(menuFiles.toURI().toURL()); Element rootElem = menuDocument.getDocumentElement(); - + for (Element elem1: UtilXml.childElementList(rootElem)) { checkMenuTag(elem1, fileNameURI); for (Element elem2: UtilXml.childElementList(elem1)) { @@ -362,23 +443,92 @@ public class LabelReferences { throw new GeneralException(e.getMessage()); } } - + private static void checkMenuTag(Element elem, String fileNameURI) { // menu-item labels if ("menu-item".equals(elem.getTagName())) { getMenuItemTag(elem, fileNameURI); } } - + + private static void getLabelsFromTreeWidgets() throws GeneralException { + try { + List treeFiles = FileUtil.findXmlFiles(null, null, "menus", "http://ofbiz.apache.org/dtds/widget-tree.xsd"); + + for (File treeFile: treeFiles) { + String fileNameURI = treeFile.toURI().toString(); + Document menuDocument = UtilXml.readXmlDocument(treeFile.toURI().toURL()); + Element rootElem = menuDocument.getDocumentElement(); + + for (Element elem1: UtilXml.childElementList(rootElem)) { + checkTreeTag(elem1, fileNameURI); + for (Element elem2: UtilXml.childElementList(elem1)) { + checkTreeTag(elem2, fileNameURI); + for (Element elem3: UtilXml.childElementList(elem2)) { + checkTreeTag(elem3, fileNameURI); + for (Element elem4: UtilXml.childElementList(elem3)) { + checkTreeTag(elem4, fileNameURI); + for (Element elem5: UtilXml.childElementList(elem4)) { + checkTreeTag(elem5, fileNameURI); + } + } + } + } + } + } + } catch(IOException ioe) { + throw new GeneralException(ioe.getMessage()); + } catch(Exception e) { + throw new GeneralException(e.getMessage()); + } + } + + private static void checkTreeTag(Element elem, String fileNameURI) { + // link labels + if ("link".equals(elem.getTagName())) { + getLinkTag(elem, fileNameURI); + } + } + + private static void getLabelsFromOfbizComponents() throws GeneralException { + try { + List componentsFiles = FileUtil.findXmlFiles(null, null, "ofbiz-component", "http://ofbiz.apache.org/dtds/ofbiz-component.xsd"); + + for (File componentFile: componentsFiles) { + String fileNameURI = componentFile.toURI().toString(); + Document menuDocument = UtilXml.readXmlDocument(componentFile.toURI().toURL()); + Element rootElem = menuDocument.getDocumentElement(); + + for (Element elem1: UtilXml.childElementList(rootElem)) { + checkOfbizComponentTag(elem1, fileNameURI); + for (Element elem2: UtilXml.childElementList(elem1)) { + checkOfbizComponentTag(elem2, fileNameURI); + } + } + } + } catch(IOException ioe) { + throw new GeneralException(ioe.getMessage()); + } catch(Exception e) { + throw new GeneralException(e.getMessage()); + } + } + + private static void checkOfbizComponentTag(Element elem, String fileNameURI) { + // webapp labels + if ("webapp".equals(elem.getTagName())) { + getWebappTag(elem, fileNameURI); + } + } + private static void setLabelReference(String labelKey, String fileNameURI) { Map reference = references.get(labelKey); if (UtilValidate.isEmpty(reference)) { reference = new TreeMap(); reference.put(fileNameURI, new Integer(1)); - references.put(labelKey, reference); + references.put(labelKey, reference); } else { Integer labelsInFile = reference.get(fileNameURI); - + if (UtilValidate.isEmpty(labelsInFile)) { labelsInFile = new Integer(1); } @@ -388,19 +538,19 @@ public class LabelReferences { reference.put(fileNameURI, labelsInFile); } } - + private static boolean getLabelFromTag(Element element, String fileNameURI, String attributeValue, String stringToSearch) { boolean stringFound = false; - + if (UtilValidate.isNotEmpty(attributeValue)) { int pos = 0; - + while (pos >= 0){ pos = attributeValue.indexOf(stringToSearch, pos); - + if (pos >= 0) { int graph = attributeValue.indexOf("}", pos); - + if (graph >= 0) { String labelKey = attributeValue.substring(pos + stringToSearch.length(), graph); setLabelReference(labelKey, fileNameURI); @@ -413,12 +563,12 @@ public class LabelReferences { } return stringFound; } - + private static void getSetTag(Element element, String fileNameURI) { String setField = UtilFormatOut.checkNull(element.getAttribute("field")); String setValue = UtilFormatOut.checkNull(element.getAttribute("value")); String fromField = UtilFormatOut.checkNull(element.getAttribute("from-field")); - + if (UtilValidate.isNotEmpty(setField)) { if (UtilValidate.isNotEmpty(setValue) && ("applicationTitle".equals(setField) || @@ -426,7 +576,7 @@ public class LabelReferences { "title".equals(setField))) { // set field with hardcoded labels if (!getLabelFromTag(element, fileNameURI, setValue, uiLabelMap)) { - setLabelReference(setValue, fileNameURI);; + setLabelReference(setValue, fileNameURI); } } else if (UtilValidate.isNotEmpty(fromField) && ("layoutSettings.companyName".equals(setField) || @@ -441,71 +591,71 @@ public class LabelReferences { } } } - + private static void getScreenletTag(Element element, String fileNameURI) { String screenTitle = UtilFormatOut.checkNull(element.getAttribute("title")); - + if (UtilValidate.isNotEmpty(screenTitle)) { // screenlet title with hardcoded labels if (!getLabelFromTag(element, fileNameURI, screenTitle, uiLabelMap)) { - setLabelReference(screenTitle, fileNameURI);; + setLabelReference(screenTitle, fileNameURI); } } } - - private static void getAutoFieldsEntityTag(Element element, String fileNameURI) throws GeneralException { + + private static void getAutoFieldsEntityTag(Element element, String fileNameURI, Map autoFieldsEntity) throws GeneralException { try { String entityName = UtilFormatOut.checkNull(element.getAttribute("entity-name")); String defaultFieldType = UtilFormatOut.checkNull(element.getAttribute("default-field-type")); - + if (UtilValidate.isNotEmpty(entityName) && UtilValidate.isNotEmpty(defaultFieldType) && (!("hidden".equals(defaultFieldType)))) { - ModelEntity entity = LabelManagerFactory.entityModelReader.getModelEntity(entityName); - + ModelEntity entity = LabelManagerFactory.getModelReader().getModelEntity(entityName); + for (Iterator f = entity.getFieldsIterator(); f.hasNext();) { ModelField field = f.next(); - setLabelReference(formFieldTitle + field.getName(), fileNameURI); + autoFieldsEntity.put(field.getName(), "N"); } } } catch(Exception e) { throw new GeneralException(e.getMessage()); } } - - private static void getAutoFieldsServiceTag(Element element, String fileNameURI) throws GeneralException { + + private static void getAutoFieldsServiceTag(Element element, String fileNameURI, Map autoFieldsService) throws GeneralException { try { String serviceName = UtilFormatOut.checkNull(element.getAttribute("service-name")); String defaultFieldType = UtilFormatOut.checkNull(element.getAttribute("default-field-type")); - + if (UtilValidate.isNotEmpty(serviceName) && (!("hidden".equals(defaultFieldType)))) { - ModelService modelService = LabelManagerFactory.dispatchContext.getModelService(serviceName); + ModelService modelService = LabelManagerFactory.getDispatchContext().getModelService(serviceName); List modelParams = modelService.getInModelParamList(); Iterator modelParamIter = modelParams.iterator(); - + while (modelParamIter.hasNext()) { ModelParam modelParam = (ModelParam) modelParamIter.next(); // skip auto params that the service engine populates... if ("userLogin".equals(modelParam.name) || "locale".equals(modelParam.name) || "timeZone".equals(modelParam.name)) { continue; } - + if (modelParam.formDisplay) { if (UtilValidate.isNotEmpty(modelParam.entityName) && UtilValidate.isNotEmpty(modelParam.fieldName)) { ModelEntity modelEntity; try { - modelEntity = LabelManagerFactory.entityModelReader.getModelEntity(modelParam.entityName); - + modelEntity = LabelManagerFactory.getModelReader().getModelEntity(modelParam.entityName); + if (modelEntity != null) { ModelField modelField = modelEntity.getField(modelParam.fieldName); - + if (modelField != null) { - setLabelReference(formFieldTitle + modelField.getName(), fileNameURI); + autoFieldsService.put(modelField.getName(), "N"); } } } catch (GenericEntityException e) { Debug.logError(e, module); } } - + setLabelReference(formFieldTitle + modelParam.name, fileNameURI); } } @@ -514,25 +664,34 @@ public class LabelReferences { throw new GeneralException(e.getMessage()); } } - + private static void getHyperlinkTag(Element element, String fileNameURI) { String hyperlinkDescription = UtilFormatOut.checkNull(element.getAttribute("description")); - + if (UtilValidate.isNotEmpty(hyperlinkDescription)) { // hyperlink description with hardcoded labels if (!getLabelFromTag(element, fileNameURI, hyperlinkDescription, uiLabelMap)) { - setLabelReference(hyperlinkDescription, fileNameURI);; + setLabelReference(hyperlinkDescription, fileNameURI); } } } - - private static void getFieldTag(Element element, String fileNameURI) { - String labelKey = UtilFormatOut.checkNull(element.getAttribute("name")); - labelKey = formFieldTitle + labelKey; - String fieldTitle = UtilFormatOut.checkNull(element.getAttribute("title")); - String tooltip = UtilFormatOut.checkNull(element.getAttribute("tooltip")); - boolean escludeField= false; - + + private static void getFieldTag(Element element, String fileNameURI, Map autoFieldsEntity, Map autoFieldsService) { + String fieldName = UtilFormatOut.checkNull(element.getAttribute("name")); + String labelKey = formFieldTitle + fieldName; + String fieldTitle = UtilFormatOut.checkNull(element.getAttribute("title")); + String tooltip = UtilFormatOut.checkNull(element.getAttribute("tooltip")); + + if (UtilValidate.isNotEmpty(autoFieldsEntity) && UtilValidate.isNotEmpty(autoFieldsEntity.get(fieldName))) { + autoFieldsEntity.put(fieldName, "Y"); + } + + if (UtilValidate.isNotEmpty(autoFieldsService) && UtilValidate.isNotEmpty(autoFieldsService.get(fieldName))) { + autoFieldsService.put(fieldName, "Y"); + } + + boolean escludeField = false; + for (Element fieldTypeElem: UtilXml.childElementList(element)) { if ("hidden".equals(fieldTypeElem.getTagName())) { escludeField = true; @@ -540,7 +699,7 @@ public class LabelReferences { escludeField = true; } } - + if (!escludeField) { // field name labels if (UtilValidate.isEmpty(fieldTitle)) { @@ -548,88 +707,278 @@ public class LabelReferences { } else { // field title with hardcoded labels if (!getLabelFromTag(element, fileNameURI, fieldTitle, uiLabelMap)) { - setLabelReference(fieldTitle, fileNameURI);; + setLabelReference(fieldTitle, fileNameURI); } } - + if (UtilValidate.isNotEmpty(tooltip)) { // tooltip with hardcoded labels if (!getLabelFromTag(element, fileNameURI, tooltip, uiLabelMap)) { - setLabelReference(tooltip, fileNameURI);; + setLabelReference(tooltip, fileNameURI); } } } } - + private static void getLabelTag(Element element, String fileNameURI) { String labelText = UtilFormatOut.checkNull(element.getAttribute("text")); String labelValue = UtilFormatOut.checkNull(UtilXml.elementValue(element)); - + // label text labels if (UtilValidate.isNotEmpty(labelText)) { // label text with hardcoded labels if (!getLabelFromTag(element, fileNameURI, labelText, uiLabelMap)) { - setLabelReference(labelText, fileNameURI);; + setLabelReference(labelText, fileNameURI); } // label value labels } else if (UtilValidate.isNotEmpty(labelValue)) { // label value with hardcoded labels if (!getLabelFromTag(element, fileNameURI, labelValue, uiLabelMap)) { - setLabelReference(labelValue, fileNameURI);; + setLabelReference(labelValue, fileNameURI); } } } - + private static void getMenuItemTag(Element element, String fileNameURI) { String menuItemTitle = UtilFormatOut.checkNull(element.getAttribute("title")); - + if (UtilValidate.isNotEmpty(menuItemTitle)) { // menu item title with hardcoded labels if (!getLabelFromTag(element, fileNameURI, menuItemTitle, uiLabelMap)) { - setLabelReference(menuItemTitle, fileNameURI);; + setLabelReference(menuItemTitle, fileNameURI); } } } - + private static void getFailPropertyTag(Element element, String fileNameURI) { String propertyValue = UtilFormatOut.checkNull(element.getAttribute("property")); - + if (UtilValidate.isNotEmpty(propertyValue)) { // fail-property labels setLabelReference(propertyValue, fileNameURI); } } - + private static void getOptionTag(Element element, String fileNameURI) { String description = UtilFormatOut.checkNull(element.getAttribute("description")); - + if (UtilValidate.isNotEmpty(description)) { // option description with hardcoded labels if (!getLabelFromTag(element, fileNameURI, description, uiLabelMap)) { - setLabelReference(description, fileNameURI);; + setLabelReference(description, fileNameURI); } } } - + private static void getLinkTag(Element element, String fileNameURI) { String linkText = UtilFormatOut.checkNull(element.getAttribute("text")); - + if (UtilValidate.isNotEmpty(linkText)) { // link text with hardcoded labels if (!getLabelFromTag(element, fileNameURI, linkText, uiLabelMap)) { - setLabelReference(linkText, fileNameURI);; + setLabelReference(linkText, fileNameURI); } } } - - private static void getPropertyToFieldTag(Element element, String fileNameURI) { - String property = UtilFormatOut.checkNull(element.getAttribute("property")); + + private static void getWebappTag(Element element, String fileNameURI) { + String title = UtilFormatOut.checkNull(element.getAttribute("title")); + String appBarDisplay = UtilFormatOut.checkNull(element.getAttribute("app-bar-display")); - // property-to-field labels - if (UtilValidate.isNotEmpty(property)) { - setLabelReference(property, fileNameURI); + // title labels + if (UtilValidate.isNotEmpty(title) && UtilValidate.isNotEmpty(appBarDisplay) && "true".equalsIgnoreCase(appBarDisplay)) { + setLabelReference(title, fileNameURI); + } + } + + private static void getEntityOptionsTag(Element element, String fileNameURI) { + String entityName = UtilFormatOut.checkNull(element.getAttribute("entity-name")); + String description = UtilFormatOut.checkNull(element.getAttribute("description")); + Set fields = new TreeSet(); + Set pkFields = new TreeSet(); + + try { + + if (UtilValidate.isNotEmpty(entityName)) { + GenericDelegator delegator = LabelManagerFactory.getDelegator(); + ModelEntity entity = delegator.getModelEntity(entityName); + + if (UtilValidate.isNotEmpty(entity) && UtilValidate.isNotEmpty(entity.getDefaultResourceName())) { + int pos = 0; + while (pos >= 0){ + pos = description.indexOf(startExpression, pos); + + if (pos >= 0) { + int endLabel = description.indexOf(endExpression, pos); + + if (endLabel >= 0) { + String fieldName = description.substring(pos + startExpression.length(), endLabel); + if (!fieldName.startsWith(uiLabelMapInLayoutSettings)) { + for (Map.Entry e: LabelManagerFactory.getLabels().entrySet()) { + String keyToSearch = entityName + "." + fieldName; + if (e.getKey().startsWith(keyToSearch)) { + fields.add(fieldName); + } + } + } + pos = endLabel; + } else { + pos = pos + startExpression.length(); + } + } + } + + // Search primary keys of entity + Iterator iter = entity.getPksIterator(); + while (iter != null && iter.hasNext()) { + ModelField curField = iter.next(); + pkFields.add(curField.getName()); + } + Iterator fieldsIt = fields.iterator(); + while (fieldsIt != null && fieldsIt.hasNext()) { + String fieldName = fieldsIt.next(); + List exprs = FastList.newInstance(); + for (Element entityConstraintElem: UtilXml.childElementList(element)) { + if ("entity-constraint".equals(entityConstraintElem.getTagName())) { + String constraintName = UtilFormatOut.checkNull(entityConstraintElem.getAttribute("name")); + String constraintOperator = UtilFormatOut.checkNull(entityConstraintElem.getAttribute("operator")); + String constraintValue = UtilFormatOut.checkNull(entityConstraintElem.getAttribute("value")); + + EntityComparisonOperator operator = new EntityComparisonOperator(EntityOperator.ID_EQUALS, "="); + if ("between".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_BETWEEN, "BETWEEN"); + } else if ("greater-equals".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_GREATER_THAN_EQUAL_TO, ">="); + } else if ("greater".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_GREATER_THAN, ">"); + } else if ("in".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_IN, "IN"); + } else if ("less-equals".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_LESS_THAN_EQUAL_TO, "<="); + } else if ("less".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_LESS_THAN, "<"); + } else if ("like".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_LIKE, "LIKE"); + } else if ("not-equals".equals(constraintValue)) { + operator = new EntityComparisonOperator(EntityOperator.ID_NOT_EQUAL, "<>"); + } + + exprs.add(EntityCondition.makeCondition(constraintName, operator, constraintValue)); + } + } + + EntityConditionList ecl = null; + if (exprs.size() > 0) { + ecl = EntityCondition.makeCondition(exprs, EntityOperator.AND); + } + + StringBuilder keyBuffer = new StringBuilder(); + keyBuffer.append(entityName); + keyBuffer.append('.'); + keyBuffer.append(fieldName); + List entityRecords = delegator.findList(entityName, ecl, pkFields, null, null, false); + + for (GenericValue entityRecord: entityRecords) { + boolean pkFound = false; + StringBuilder pkBuffer = new StringBuilder(keyBuffer.toString()); + Iterator itPkFields = pkFields.iterator(); + while (itPkFields != null && itPkFields.hasNext()) { + String pkField = itPkFields.next(); + Object pkFieldValue = entityRecord.get(pkField); + + if (UtilValidate.isNotEmpty(pkFieldValue)) { + pkBuffer.append('.'); + pkBuffer.append(pkFieldValue); + pkFound = true; + } + } + if (pkFound) { + setLabelReference(pkBuffer.toString(), fileNameURI); + } + } + } + } + } + } catch (GenericEntityException e) { + Debug.logError(e, "Problem getting records from " + entityName, module); + } + } + + private static void getDisplayEntityTag(Element element, String fileNameURI) { + String entityName = UtilFormatOut.checkNull(element.getAttribute("entity-name")); + String description = UtilFormatOut.checkNull(element.getAttribute("description")); + Set fields = new TreeSet(); + Set pkFields = new TreeSet(); + + try { + + if (UtilValidate.isNotEmpty(entityName)) { + GenericDelegator delegator = LabelManagerFactory.getDelegator(); + ModelEntity entity = delegator.getModelEntity(entityName); + + if (UtilValidate.isNotEmpty(entity) && UtilValidate.isNotEmpty(entity.getDefaultResourceName())) { + int pos = 0; + while (pos >= 0){ + pos = description.indexOf(startExpression, pos); + + if (pos >= 0) { + int endLabel = description.indexOf(endExpression, pos); + + if (endLabel >= 0) { + String fieldName = description.substring(pos + startExpression.length(), endLabel); + if (!fieldName.startsWith(uiLabelMapInLayoutSettings)) { + for (Map.Entry e: LabelManagerFactory.getLabels().entrySet()) { + String keyToSearch = entityName + "." + fieldName; + if (e.getKey().startsWith(keyToSearch)) { + fields.add(fieldName); + } + } + } + pos = endLabel; + } else { + pos = pos + startExpression.length(); + } + } + } + + // Search primary keys of entity + Iterator iter = entity.getPksIterator(); + while (iter != null && iter.hasNext()) { + ModelField curField = iter.next(); + pkFields.add(curField.getName()); + } + Iterator fieldsIt = fields.iterator(); + while (fieldsIt != null && fieldsIt.hasNext()) { + String fieldName = fieldsIt.next(); + StringBuilder keyBuffer = new StringBuilder(); + keyBuffer.append(entityName); + keyBuffer.append('.'); + keyBuffer.append(fieldName); + List entityRecords = delegator.findList(entityName, null, pkFields, null, null, false); + + for (GenericValue entityRecord: entityRecords) { + boolean pkFound = false; + StringBuilder pkBuffer = new StringBuilder(keyBuffer.toString()); + Iterator itPkFields = pkFields.iterator(); + while (itPkFields != null && itPkFields.hasNext()) { + String pkField = itPkFields.next(); + Object pkFieldValue = entityRecord.get(pkField); + + if (UtilValidate.isNotEmpty(pkFieldValue)) { + pkBuffer.append('.'); + pkBuffer.append(pkFieldValue); + pkFound = true; + } + } + if (pkFound) { + setLabelReference(pkBuffer.toString(), fileNameURI); + } + } + } + } + } + } catch (GenericEntityException e) { + Debug.logError(e, "Problem getting records from " + entityName, module); } } } - - diff --git a/framework/webtools/webapp/webtools/WEB-INF/controller.xml b/framework/webtools/webapp/webtools/WEB-INF/controller.xml index 0ee3ce4bfd..76274e190d 100644 --- a/framework/webtools/webapp/webtools/WEB-INF/controller.xml +++ b/framework/webtools/webapp/webtools/WEB-INF/controller.xml @@ -490,6 +490,13 @@ under the License. + + + + + + + diff --git a/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl b/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl index d956fc3903..abc59bd232 100644 --- a/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl +++ b/framework/webtools/webapp/webtools/labelmanager/SearchLabels.ftl @@ -70,7 +70,12 @@ under the License. -   + + ${uiLabelMap.WebtoolsLabelManagerOnlyNotUsedLabels} + + + checked> + ${uiLabelMap.WebtoolsLabelManagerOnlyMissingTranslations} diff --git a/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl b/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl index bbbb475d61..7687031c9d 100644 --- a/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl +++ b/framework/webtools/webapp/webtools/labelmanager/UpdateLabel.ftl @@ -30,7 +30,7 @@ under the License. <#else> - + diff --git a/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl b/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl index ffa320e693..d058877dfb 100644 --- a/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl +++ b/framework/webtools/webapp/webtools/labelmanager/ViewFile.ftl @@ -18,6 +18,9 @@ under the License. -->
+ + + diff --git a/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl b/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl index 6809c81798..81e3fcab6e 100644 --- a/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl +++ b/framework/webtools/webapp/webtools/labelmanager/ViewLabels.ftl @@ -17,10 +17,8 @@ specific language governing permissions and limitations under the License. -->
${uiLabelMap.WebtoolsLabelManagerKey} ${parameters.sourceKey?if_exists}
${uiLabelMap.WebtoolsLabelManagerFileName} ${parameters.fileName?if_exists}
@@ -55,6 +53,12 @@ under the License. <#assign previousKey = ""> <#list labelsList as labelList> <#assign label = labels.get(labelList)> + <#assign labelKey = label.labelKey> + <#assign referenceNum = 0> + <#assign reference = references.get(labelKey)?if_exists> + <#if reference?exists && reference?has_content> + <#assign referenceNum = reference.size()> + <#assign showLabel = true> <#if parameters.onlyMissingTranslations?exists && parameters.onlyMissingTranslations == "Y" && parameters.labelLocaleName?exists && parameters.labelLocaleName != ""> @@ -66,6 +70,9 @@ under the License. + <#if showLabel && parameters.onlyNotUsedLabels?exists && parameters.onlyNotUsedLabels == "Y" && (referenceNum > 0)> + <#assign showLabel = false> + <#if showLabel && parameters.labelKey?exists && parameters.labelKey != "" && parameters.labelKey != label.labelKey> <#assign showLabel = false> @@ -76,16 +83,10 @@ under the License. <#assign showLabel = false> <#if showLabel == true> - <#assign labelKey = label.labelKey> class="alternate-row"> - <#assign referenceNum = 0> - <#assign reference = references.get(labelKey)?if_exists> - <#if reference?exists && reference?has_content> - <#assign referenceNum = reference.size()> - <#list localesFound as localeFound> <#assign labelVal = label.getLabelValue(localeFound)?if_exists> diff --git a/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl b/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl index 30eae55107..7202d566a1 100644 --- a/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl +++ b/framework/webtools/webapp/webtools/labelmanager/ViewReferences.ftl @@ -30,15 +30,16 @@ under the License. - <#if parameters.sourceKey?exists> + <#if parameters.sourceKey?exists && parameters.sourceKey?has_content> <#assign rowNum = "2"> <#assign rowNumber = 1> - <#assign reference = references.get(parameters.sourceKey)> - <#assign entries = reference.entrySet()> - <#list entries as entry> + <#assign reference = references.get(parameters.sourceKey)?if_exists> + <#if reference?exists && reference?has_content> + <#assign entries = reference.entrySet()> + <#list entries as entry> - + <#if rowNum == "2"> @@ -47,7 +48,8 @@ under the License. <#assign rowNum = "2"> <#assign rowNumber = rowNumber + 1> - + +
${uiLabelMap.WebtoolsLabelManagerRow}
${rowNumber} class="submenutext">${label.labelKey} ${label.fileName} <#if (referenceNum > 0)>${referenceNum}<#else>${referenceNum}${uiLabelMap.WebtoolsLabelManagerFileName} ${uiLabelMap.WebtoolsLabelManagerReferences}
${rowNumber}${entry.getKey()}${entry.getKey()} ${entry.getValue()}
diff --git a/framework/webtools/widget/EntityScreens.xml b/framework/webtools/widget/EntityScreens.xml index fa6b714ffa..946103db4a 100644 --- a/framework/webtools/widget/EntityScreens.xml +++ b/framework/webtools/widget/EntityScreens.xml @@ -373,7 +373,7 @@ under the License. - +