Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019456Openbravo ERPB. User interfacepublic2012-01-10 18:432012-02-15 17:06
iperdomo 
dbaz 
urgentminoralways
closedfixed 
303.1.5-1-ARCH
 
3.0MP93.0MP9 
Google Chrome
Core
No
0019456: [P&E] Move hardcoded labels to translatable messages
There is a hardcoded "Done" and "Add New" in one of the default buttons for Pick-and-Execute processes
Check the code:
https://code.openbravo.com/erp/devel/pi/file/ad9032d6e574/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js#l59 [^]

There is a pending merge from pi-editablepaymentplan

No tags attached.
Issue History
2012-01-10 18:43iperdomoNew Issue
2012-01-10 18:43iperdomoAssigned To => iperdomo
2012-01-10 18:43iperdomoWeb browser => Google Chrome
2012-01-10 18:43iperdomoModules => Core
2012-01-10 18:46iperdomoStatusnew => scheduled
2012-01-10 18:46iperdomofix_in_branch => pi
2012-01-10 18:51hgbotCheckin
2012-01-10 18:51hgbotNote Added: 0044216
2012-01-10 18:51hgbotStatusscheduled => resolved
2012-01-10 18:51hgbotResolutionopen => fixed
2012-01-10 18:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/22483d3d1d7fd5bb7c9d2b96d3d71ae3ddc4321b [^]
2012-01-10 20:13dbazNote Added: 0044219
2012-01-11 07:54iperdomoNote Added: 0044224
2012-01-11 11:56dbazNote Added: 0044249
2012-01-11 13:32iperdomoStatusresolved => new
2012-01-11 13:32iperdomoResolutionfixed => open
2012-01-11 13:37iperdomoWeb browserGoogle Chrome => Google Chrome
2012-01-11 13:37iperdomofix_in_branchpi =>
2012-01-11 13:37iperdomoSummary[P&E] Move hardcoded label "Done" to a Message => [P&E] Move hardcoded labels to translatable messages
2012-01-11 13:37iperdomoDescription Updatedbug_revision_view_page.php?rev_id=3044#r3044
2012-01-11 13:37iperdomoSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3046#r3046
2012-01-11 13:40iperdomoNote Added: 0044256
2012-01-14 21:21hudsonbotCheckin
2012-01-14 21:21hudsonbotNote Added: 0044365
2012-01-30 12:10iperdomoWeb browserGoogle Chrome => Google Chrome
2012-01-30 12:10iperdomoTarget Version3.0MP8 => 3.0MP9
2012-02-08 18:59dbazAssigned Toiperdomo => dbaz
2012-02-14 17:15dbazStatusnew => scheduled
2012-02-14 17:15dbazfix_in_branch => pi
2012-02-14 17:15dbazNote Added: 0045120
2012-02-14 17:15dbazStatusscheduled => resolved
2012-02-14 17:15dbazFixed in Version => 3.0MP9
2012-02-14 17:15dbazResolutionopen => fixed
2012-02-15 17:06AugustoMauchNote Added: 0045156
2012-02-15 17:06AugustoMauchStatusresolved => closed

Notes
(0044216)
hgbot   
2012-01-10 18:51   
Repository: erp/devel/pi
Changeset: 22483d3d1d7fd5bb7c9d2b96d3d71ae3ddc4321b
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Tue Jan 10 18:49:33 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/22483d3d1d7fd5bb7c9d2b96d3d71ae3ddc4321b [^]

Fixes issue 19456: Removed hardcoded label for *Done* button

---
M modules/org.openbravo.client.application/src-db/database/sourcedata/AD_MESSAGE.xml
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-pick-and-execute-view.js
---
(0044219)
dbaz   
2012-01-10 20:13   
The AD_MESSAGE definition is too generic. Two different solutions here:

a) Change MSGTIP by something more generic: "Label for 'Done' type buttons"
With this change, the label is supposed to be reused in more places.

b) Change VALUE by something more explicit, for example, "OBUIAPP_PNE_DoneButton"

IMHO I think it is better use option a)
(0044224)
iperdomo   
2012-01-11 07:54   
@dbaz:
Message tip is just a hint where is used, not every place where is actually used.

The initial intention (current) is to use the label "Done" in the Pick-and-Execute processes, but not restricted to that. The JavaScript API to get that label doesn't restrict where to use it.

Both proposed solutions are not correct.

a) Since is could be used for anything with a label "Done", not only buttons.
b) The second proposal is not the usual approach. We use the dbprefix for doing messages "namespacing", but we don't make a 2nd level namespace for an specific scenario
(0044249)
dbaz   
2012-01-11 11:56   
@iperdomo:

Of course that could be used anywhere and of course there are no rules for the name. I said button because I can not imagine an scenario with just the "Done" word besides a button. But of course it could be. My point is that you have used a very abstract VALUE for a very pasticular MSGTIP.

Are There rules to quantify how abstract or not should be these things? No.
Is there a benefit in writting MSGTIP more abstract? Just MSGTIP coherence if someone else uses the 'Done' label reusing your OBUIAPP_Done
(0044256)
iperdomo   
2012-01-11 13:40   
Here there is the other hardcoded label:
https://code.openbravo.com/erp/devel/pi-editablepaymentplan/rev/122d77bbfd2a [^]
(0044365)
hudsonbot   
2012-01-14 21:21   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/0f91795528e4 [^]

Maturity status: Test
(0045120)
dbaz   
2012-02-14 17:15   
https://code.openbravo.com/erp/devel/pi/rev/0d5c7c2a2352 [^]
(0045156)
AugustoMauch   
2012-02-15 17:06   
Code reviewed. The label "Done" and "Add new" are no longer hardcoded.