Edgewall Software

Opened 8 years ago

Last modified 8 years ago

#12511 closed defect

Untranslated buttons in spam filter admin panel — at Initial Version

Reported by: Jun Omae Owned by: Ryan J Ollos
Priority: normal Milestone: plugin - spam-filter
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

After [14814,14815], labels in the buttons of spam filter admin are euntranslated.

The gettext in tracspamfilter.api is not the same as gettext in trac.util.translation. Instead, we should use dgettext and dngettext with tracspamfilter catalog like this:

-        <input type="submit" name="cleantemp" value="${ngettext('Remove %(num)s temporary session',
+        <input type="submit" name="cleantemp" value="${dngettext('tracspamfilter', 'Remove %(num)s temporary session',

Those translation methods can easily be replaced by sed.

for i in tracspamfilter/templates/*.html; do
  sed -i \
    -e "s/\<_(/dgettext('tracspamfilter', /g" \
    -e "s/\<gettext(/dgettext('tracspamfilter', /g" \
    -e "s/\<ngettext(/dngettext('tracspamfilter', /g" \
    $i
done

Change History (1)

by Jun Omae, 8 years ago

Attachment: untranslated-buttons.png added
Note: See TracTickets for help on using tickets.