From 09e9bb130a1b21b54bea279e1b4b1af33075216b Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Sat, 19 Jul 2014 17:47:15 -0500 Subject: [PATCH] i18n: Fix javascript translations And add translations for the draft mechanism --- js/redactor-osticket.js | 4 ++-- setup/cli/modules/i18n.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/redactor-osticket.js b/js/redactor-osticket.js index 71a203d17..c0f696687 100644 --- a/js/redactor-osticket.js +++ b/js/redactor-osticket.js @@ -31,11 +31,11 @@ RedactorPlugins.draft = { .css({'position':'absolute','top':'3em','right':'0.5em'}) .hide() .append($('<span>') - .text('Draft Saved')); + .text(__('Draft Saved'))); // Float the [Draft Saved] box with the toolbar this.$toolbar.append(this.$draft_saved); if (this.opts.draftDelete) { - var trash = this.buttonAdd('deleteDraft', 'Delete Draft', this.deleteDraft); + var trash = this.buttonAdd('deleteDraft', __('Delete Draft'), this.deleteDraft); this.buttonAwesome('deleteDraft', 'icon-trash'); trash.parent().addClass('pull-right'); trash.addClass('delete-draft'); diff --git a/setup/cli/modules/i18n.php b/setup/cli/modules/i18n.php index e43bbee7e..1d9295d48 100644 --- a/setup/cli/modules/i18n.php +++ b/setup/cli/modules/i18n.php @@ -201,7 +201,7 @@ class i18n_Compiler extends Module { // Add in translation of javascript strings $phrases = array(); if ($mo && ($js = $this->__getAllJsPhrases())) { - $mo = unserialize($mo); + $mo = (eval (substr($mo, 5))); # Chop off <?php foreach ($js as $c) { foreach ($c['forms'] as $f) { $phrases[$f] = @$mo[$f] ?: $f; -- GitLab