[ADD] web: add the language code in the translation widget

The planet icon is not very clear for translation feature.
Replace it with the code of the current language.

Task-id: 2028152
This commit is contained in:
Martin Trigaux
2019-08-13 14:12:17 +00:00
parent 2347b84c66
commit bdec8efabf
8 changed files with 11 additions and 3 deletions
@@ -41,9 +41,11 @@ var TranslatableFieldMixin = {
*/
_renderTranslateButton: function () {
if (_t.database.multi_lang && this.field.translate && this.res_id) {
var lang = _t.database.parameters.code.split('_')[0].toUpperCase();
return $('<button>', {
type: 'button',
'class': 'o_field_translate fa fa-globe btn btn-link',
'data-code': lang,
})
.on('click', this._onTranslate.bind(this));
}