Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0044956Openbravo ERPE. Translationpublic2020-09-01 17:292020-11-30 09:29
vmromanos 
AtulOpenbravo 
normalminorN/A
closedfixed 
5
 
PR21Q1PR21Q1 
vmromanos
Core
No
0044956: Reduce translation effort project
Creating a full translation from scratch for Openbravo, especially for the backend, is a very time consuming task. Only the backend (Core + embedded modules) adds more than 19.000 terms to translate.

The project is about to reduce the translation scope to the "most important" parts only, so the translation effort can be heavily reduced without a big impact on the user experience.

The things that should be excluded from the translation are:
1. Description and help. This adds an important effort to the translation as they usually include long sentences.
2. Anything that is not active.
3. Any text interfaces belonging to JRXML files, as they will be superseded by the new reporting tool based on jasper reports.
4. Anything related to legacy/unsupported or not key Openbravo areas (like Manufacturing, Projects, etc.)
5. Anything that a normal end user doesn't see (like for example the Application Dictionary stuff, which is more oriented to developers).


To easily track what is elegible for a reduced translation, there will be a new flag at Menu level called "Included in Reduced Translation". This flag will control whether anything directly or indirectly linked to this menu entry (windows, tabs, fields, elements, processes, etc.) will be included into a reduced translation.
By default any existing menu entry will be included for reduced translation, however as part of the project we will define the proper configuration based on the above rules for the existing backend menu entries.


When Exporting the translation through the Import/Export Translations window, the user could select whether to export the full or the reduced version based on a new flag "Export Reduced Version", which will be unset by default.
NA
1. Create a new flag at Menu window called "Included in Reduced Translation"

2. Add an EventObserver to automatically update on cascade any entry inside the summary level updated entity. So if I unset "Application Dictionary" record (which is a summary level record), any other record inside will be automatically unset too.

3. Add a new flag "Export Reduced Version" in Import/Export Translations window to allow the user to export the full/reduced version.

4. Modify the export translation engine to exclude the necessary parts according to the AD_Menu definition. Note this is the most complex part as some entities require deep navigation to reach the AD_Menu configuration. For example: Field -> Tab -> Window -> Menu.
Each of the entities will have its own logic, and the code should be ready to be adapted to new entities if necessary.

Please note that for the specific entities "AD_Message" and "AD_TextInterfaces" it will be very difficult to reach the Menu entry, so these two entities are out of the scope of this phase.
No tags attached.
Issue History
2020-09-01 17:29vmromanosNew Issue
2020-09-01 17:29vmromanosAssigned To => AtulOpenbravo
2020-09-01 17:29vmromanosModules => Core
2020-09-01 17:29vmromanosTriggers an Emergency Pack => No
2020-09-01 17:29vmromanosStatusnew => scheduled
2020-09-03 16:15vmromanosReview Assigned To => vmromanos
2020-09-03 16:23vmromanosNote Added: 0122597
2020-09-03 16:42vmromanosNote Added: 0122598
2020-09-04 12:29hgbotNote Added: 0122686
2020-09-10 07:17hgbotNote Added: 0122895
2020-11-27 14:02hgbotResolutionopen => fixed
2020-11-27 14:02hgbotStatusscheduled => closed
2020-11-27 14:02hgbotFixed in Version => PR21Q1
2020-11-27 14:02hgbotNote Added: 0124656
2020-11-27 14:02hgbotNote Added: 0124657
2020-11-27 14:11hgbotNote Added: 0124658
2020-11-27 14:28hgbotNote Added: 0124659
2020-11-30 09:29hgbotNote Added: 0124667

Notes
(0122597)
vmromanos   
2020-09-03 16:23   
Test plan 1: "General behavior"
1. In a backend only environment without this development
2. Login as System Admin
3. Go to Language window
4. Select es_ES and set the System Language flag. Press Verify Languages
5. Go to Import/Export translations and select Spanish (Spain).
6. Press export.
7. Go to the place where the attachment folder is configured in your instance (see Openbravo.properties). Move the lang/es_ES folder to another place, for example to /tmp/xml/allWithoutBranch.
8. Now update your instance to have this development.
9. Export again the es_ES language as we did before, but this time select the Export Reduced Version flag.
10. Run a meld between the previous export folder and this one. Verify many records don't appear anymore in this version. Verify neither help nor description are available anymore.
11. Move the es_ES folder to the /tmp/xml/reducedWithBranch2/

For the next group of test plans you must run the following commands inside the /tmp/xml/ folder, which contains two folders with the full and the reduced translations.

Test plan 2: "AD_TextInterfaces"
1. Run grep -r "ACCS_ACCOUNT_ID_D" *
2. Verify it doesn't appear into the reduced version as it belongs to a JRXML file

Test plan 3: "AD_Element direct access through window"
1. Run fgrep -r "\"Application\"" * | grep AD_ELEMENT
2. Verify it doesn't appear into the reduced version as it is only used in a window not available for reduced translation. The window is directly accessed through the "Applications" menu entry.
3. Now go to the Menu window, search for Applications entry and set the Included In Reduced Version
4. Export the reduced translation again
5. Run fgrep -r "\"Application\"" *  | grep AD_ELEMENT. Verify the element does appear

Test plan 4: "AD_Element indirect access through process definition"
1. Run fgrep -r "\"Logger\"" * | grep AD_ELEMENT
2. Verify it doesn't appear into the reduced version as it is only used in a window not available for reduced translation. The window  is indirectly linked to through the "Log Management" window reference which is used by the "Log Management Process" definition , which is defined as a menu entry.

Test plan 5: "AD_Field"
1. Run fgrep -r "Copy from Attribute" *
2. Verify it doesn't appear into the reduced version as it is only used in a window not available for reduced translation. The window is directly accessed through the "Process Plan" menu entry.
3. Set the "Process Plan" menu entry as available for reduced translation.
4. Export the reduced translation again.
5. Repeat grep and verify this time it properly appears

Test plan 6: "AD_Process and AD_Menu"
1. Run fgrep -r "Project Status Summary" *
2. Verify it doesn't appear into the reduced version as it is only used in a report not available for reduced translation. The report is directly accessed through the "Project Status Summary" menu entry.
3. Verify also the grep doesn't detect neither the associated menu entry.

Test plan 6: "Process Definition and AD_Menu"
1. Run grep -r "Log Management" *
2. Verify it doesn't appear the related process definition and menu entry, as the menu entry "Log Management" is not available for reduced translation.

Test plan 7: "AD_Process_Para"
1. Run grep -r "Target Payment Rule" *
2. Verify the param doesn't appear in the reduced translation as it belongs to a process without a menu entry.

Test plan 8: "AD_Window and AD_Menu"
1. Run grep -r "Windows, Tabs, and Fields" *
2. Verify neither the window nor the menu entry is available in the reduced translation as the "Windows, Tabs and Fields" menu entry is not included for reduced translation

Test plan 9: "AD_Tab"
1. Run grep -r "Window Translation" *
2. Verify neither the Tab nor the element is available in the reduced translation as the "Windows, Tabs and Fields" menu entry is not included for reduced translation

Test plan 10: "AD_Reference"
1. Open AD_REFERENCE_TRL_es_ES.xml
2. Verify it doesn't contain any record to translate

Test plan 11: "OBUISEL_SELECTOR"
1. Open OBUISEL_SELECTOR_TRL_es_ES.xml
2. Verify it doesn't contain any record to translate

Test plan 12: "AD_FIELDGROUP"
1. Run fgrep -r "\"Assets\"" * | grep AD_FIELDGROUP
2. Verify the fieldgroup is not available in reduced translation, because it is only used in the "General Ledger Configuration" whose menu entry "General Ledger Configuration" is not configured for reduced translation

Test plan 13: "AD_REF_LIST"
1. Run fgrep -r "\"Servlet\"" *
2. Verify the reference list value is not available in reduced translation, because it is only used by the "AD Implementation Mapping" window, whose menu entry "AD Implementation Mapping" is not configured for reduced translation

Test plan 14: "Menu Event Observer"
1. Login as System admin and go to Menu window
2. Search for Application Dictionary record. Set "Included in Reduced Translation" and save it.
3. Go to tree view and verify every record inside this folder has the flag to Yes too.
4. Set the flag to No in Application Dictionary record and save.
5. Go to tree view and verify every record inside this folder has the flag to No too.
(0122598)
vmromanos   
2020-09-03 16:42   
Statistics about the translation reduction in Core can be found at https://docs.google.com/spreadsheets/d/1m1CoGiKzJ5MIwi08KvJCIgZNRp0T1Ev9vS7Vx2f38ro/edit?usp=sharing [^]
(0122686)
hgbot   
2020-09-04 12:29   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/146 [^]
(0122895)
hgbot   
2020-09-10 07:17   
Merge Request created: https://gitlab.com/openbravo/tools/translations/org.openbravo.translator.helper/-/merge_requests/1 [^]
(0124656)
hgbot   
2020-11-27 14:02   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 602c434da38f65c7d6f605e947d2f8b9524ca1ae
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2020-11-27T14:01:22+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/602c434da38f65c7d6f605e947d2f8b9524ca1ae [^]

Fixed ISSUE-44956: Reduce translation effort project

---
A src-test/src/org/openbravo/test/reducedtranslation/ReducedTranslationExportTests.java
A src-test/src/org/openbravo/test/reducedtranslation/ReducedTranslationMenuEventObserverTest.java
A src-test/src/org/openbravo/test/reducedtranslation/ReducedTrlTestConstants.java
A src/org/openbravo/erpCommon/ad_forms/ReducedTranslationHelper.java
A src/org/openbravo/event/ADMenuEventHandler.java
M modules/org.openbravo.advpaymentmngt/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.client.myob/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.financial.paymentreport/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.service.datasource/src-db/database/sourcedata/AD_MENU.xml
M modules/org.openbravo.utility.cleanup.log/src-db/database/sourcedata/AD_MENU.xml
M src-db/database/model/tables/AD_MENU.xml
M src-db/database/model/triggers/AD_MENU_MOD_TRG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src-db/database/sourcedata/AD_MENU.xml
M src-db/database/sourcedata/AD_REFERENCE.xml
M src-db/database/sourcedata/AD_REF_LIST.xml
M src-db/database/sourcedata/AD_TEXTINTERFACES.xml
M src-test/src/org/openbravo/test/AllAntTaskTests.java
M src-test/src/org/openbravo/test/base/TestConstants.java
M src/org/openbravo/erpCommon/ad_forms/Translation.html
M src/org/openbravo/erpCommon/ad_forms/Translation.java
M src/org/openbravo/erpCommon/ad_forms/Translation.xml
M src/org/openbravo/erpCommon/ad_forms/TranslationManager.java
M src/org/openbravo/erpCommon/ad_forms/Translation_data.xsql
---
(0124657)
hgbot   
2020-11-27 14:02   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/146 [^]
(0124658)
hgbot   
2020-11-27 14:11   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 4a0c06c29f17ec11401e564ddacffce09b9b49d1
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 2020-11-27T14:11:03+01:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/4a0c06c29f17ec11401e564ddacffce09b9b49d1 [^]

Related to ISSUE-44956: Fixed eclipse warnings

---
M src-test/src/org/openbravo/test/AllAntTaskTests.java
---
(0124659)
hgbot   
2020-11-27 14:28   
Merge request merged: https://gitlab.com/openbravo/tools/translations/org.openbravo.translator.helper/-/merge_requests/1 [^]
(0124667)
hgbot   
2020-11-30 09:29   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: c134c548676c0378bf7341f7f8193e97d125328b
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 2020-11-30T11:01:01+05:30
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/c134c548676c0378bf7341f7f8193e97d125328b [^]

Related to ISSUE-44956:Fix translation test failures

**Use language sq_AL instead of es_ES in Reduced Translation
Tests

---
M src-test/src/org/openbravo/test/base/TestConstants.java
M src-test/src/org/openbravo/test/reducedtranslation/ReducedTranslationExportTests.java
---