#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 13 months ago.

Download all attachments as: .zip

Change History (4)

Changed 13 months ago by jun66j5

comment:1 Changed 13 months ago by jun66j5

  • Trac Release changed from 0.12 to 1.0

comment:2 Changed 13 months 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 13 months 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 .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from stoecker. Next status will be 'closed'.
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.