mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-27 10:08:11 +08:00
Fix missing translation for field codes [SCI-7765] (#4826)
This commit is contained in:
parent
0747f414eb
commit
1e01d1f2b7
3 changed files with 10 additions and 4 deletions
|
@ -134,6 +134,11 @@
|
|||
},
|
||||
mounted() {
|
||||
$.get(this.labelTemplate.attributes.urls.fields, (result) => {
|
||||
result.default.map((value) => {
|
||||
value.key = this.i18n.t(`label_templates.default_columns.${value.key}`)
|
||||
return value;
|
||||
});
|
||||
|
||||
this.fields = result;
|
||||
this.$nextTick(() => {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
module LabelTemplates
|
||||
class TagService
|
||||
DEFAULT_COLUMNS = [
|
||||
{ key: I18n.t('label_templates.default_columns.item_id'), tag: '{{ITEM_ID}}' },
|
||||
{ key: I18n.t('label_templates.default_columns.name'), tag: '{{NAME}}' },
|
||||
{ key: I18n.t('label_templates.default_columns.added_on'), tag: '{{ADDED_ON}}' },
|
||||
{ key: I18n.t('label_templates.default_columns.added_by'), tag: '{{ADDED_BY}}' }
|
||||
{ key: 'item_id', tag: '{{ITEM_ID}}' },
|
||||
{ key: 'name', tag: '{{NAME}}' },
|
||||
{ key: 'added_on', tag: '{{ADDED_ON}}' },
|
||||
{ key: 'added_by', tag: '{{ADDED_BY}}' }
|
||||
].freeze
|
||||
|
||||
def initialize(team)
|
||||
|
|
|
@ -852,6 +852,7 @@ en:
|
|||
unsupported_key: "Key %{key} is not supported by this label template renderer."
|
||||
column_not_found: "This Label template contains placeholders for inventory columns that are not present in this Inventory. Some data might not be printed on the label. Please check the label preview and label template before printing."
|
||||
logo_not_supported: "The company logo cannot be printed on the label, as it is not set up in your SciNote. Please upload company logo in Settings."
|
||||
logo_params_error: 'Failed to parse logo parameters!'
|
||||
index:
|
||||
head_title: 'Label templates'
|
||||
search_templates: 'Filter templates'
|
||||
|
|
Loading…
Reference in a new issue