Opened 4 years ago

Closed 4 years ago

#10994 closed defect (fixed)

[PATCH] Better than separated messages for translations

Reported by: jun66j5 Owned by: stoecker
Priority: normal Component: TracIniAdminPanelPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0


The following code in templates/editor-data.js separates messages for translation.

var text_modified = '${_("Modified: ")}';
var text_defaults = '${_(" | Defaults: ")}';
var text_optionscount = '${_(" | Options count: ")}';

It would be better to be the following instead.

var info_format = '${javascript_quote(_("Modified: %(mod)d | Defaults: %(def)d | Options count: %(opt)d"))}';

In addition, should use javascript_quote.

-  s['${option_name}'] = '${option.stored_value.replace('\\\\', '\\\\\\\\').replace("'", "\\\\'")}';
+  s['${javascript_quote(option_name)}'] = '${javascript_quote(option.stored_value)}';

Full patch: traciniadminpanel-better-i18n-r12844.diff

Attachments (1)

traciniadminpanel-better-i18n-r12844.diff (2.7 KB) - added by jun66j5 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by jun66j5

comment:1 Changed 4 years ago by jun66j5

  • Trac Release changed from 0.12 to 1.0

comment:2 Changed 4 years ago by jun66j5

The help in the following should be not separated to three messages.

  • inieditorpanel/templates/admin_tracini.html

    1919  <body>
    2020    <h2>Edit Trac Settings (trac.ini)</h2>
    22     <p class="help">
     22    <p class="help" i18n:msg="">
    2323      Allows you to edit the trac.ini file.<br/><i>Note:</i> To "delete" an option from the trac.ini file, just set it to its default value.
    2424    </p>

comment:3 Changed 4 years ago by stoecker

  • Resolution set to fixed
  • Status changed from new to closed

(In [12848]) fix #10994 - i18n optimizations

Add Comment

Modify Ticket

as closed The owner will remain stoecker.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.