Bug 27816: "Click to edit" in Point of sale is untranslatable

This patch adds an option to the Point of sale jEditable configuration
to explicitly set the title attribute to "Click to edit." This will
allow the string to be picked up for translation.

To test, apply the patch and test that the correct string is
translated. In this example I'm testing fr-FR:

  - Update a translation:

    > cd misc/translator
    > perl translate update fr-FR

  The "Click to edit" string should already have been translated, so
  it's not necessary to update the .po file.

  - Install the updated translation:

    > perl translate install fr-FR

In the staff interface, switch to the language you're testing and open
the point of sale page. Add some items for purchase. They should appear
in the "This sale" table. Hover your mouse over the values in the "Coût"
and "Quantité" columns. You should see the translated string, "Cliquer
pour modifier."

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Owen Leonard 2021-03-15 17:06:16 +00:00 committed by Jonathan Druart
parent a6d77fb428
commit 126326b8b3
1 changed files with 4 additions and 2 deletions

View File

@ -307,7 +307,8 @@
type : 'text',
pattern : "^\\d+(\.\\d{2})?$",
onblur : 'submit',
width : "8em"
width : "8em",
tooltip : _("Click to edit")
});
local.$('.editable_int').editable( function(value, settings) {
var aPos = local.fnGetPosition( this );
@ -317,7 +318,8 @@
type : 'text',
pattern : "[0-9]*",
onblur : 'submit',
width : "4em"
width : "4em",
tooltip : _("Click to edit")
});
},
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {