Download & Extend

Patch for problems found in code review

Project:FileField
Version:6.x-3.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi,

CivicActions is reviewing and upgrading modules for use on client sites. Part of that process is an internationalization code review. There was just one internationalization issue found with the filefield module.

The t() function was not really intended for use on $variables, and it prevents the potx module from extracting these strings for translation. The attached patch overcomes the two instances of this found by passing the string directly to t() / watchdog() - don't forget watchdog() calls t() on the message string provided. If you don't like this approach, you could translate the string first and then pass it in to both functions using a t() placeholder.

The patch also includes a couple of other smaller changes - one is for a missing & while the other makes use of the new D6 schema api for altering tables.

Hope the patch helps.

Cheers,
Stella

AttachmentSize
filefield_codereview_0.patch2.8 KB

Comments

#1

Status:needs review» reviewed & tested by the community

All the changes look fine, and this applies cleanly, so marking RTBC.

#2

Status:reviewed & tested by the community» fixed

moved the
into the message since it seemed to make a little more sense there. committed the attached to HEAD.

AttachmentSize
filefield_318993.patch 2.94 KB

#3

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.