https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37781

--- Comment #4 from Jonathan Druart <[email protected]> ---
If you are in a .tt files writing JS code, you cannot use the JS functions
defined in i18n.js (__, __p, etc.)
Only strings within _() will be picked.

You can however use the TT plugin: tp("Active", "On")

Full code would be:

  "data": function( row, type, val, meta ) {
      if ( row.debug ) {
          return "[% tp("Active", "On") | html %]";
      }
      else {
          return "[% tp("Active", "Off") | html %]";
      }
  },

% gulp po:update --lang fr-FR

% git grep -C 2 'msgctxt "Active"' fr-FR*
fr-FR-messages.po-#:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:404
fr-FR-messages.po-#, fuzzy
fr-FR-messages.po:msgctxt "Active"
fr-FR-messages.po-msgid "On"
fr-FR-messages.po-msgstr "Oman"
fr-FR-messages.po-
fr-FR-messages.po-#:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/smtp_servers.tt:407
fr-FR-messages.po:msgctxt "Active"
fr-FR-messages.po-msgid "Off"
fr-FR-messages.po-msgstr ""

(No idea where "Oman" is coming from!)

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to