Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
using potx-cli.php in the folder of privatemsg Version DRUPAL-6--1 (cvs-checkout), i get this messge:
The first parameter to t() should be a literal string. There should be no variables, concatenation, constants or other non-literal strings there.
At t(ucwords($type)) in views/views_handler_field_privatemsg_link.inc on line 82.
Read more at http://drupal.org/node/322732
and it is like the message says.
Comments
Comment #1
BerdirThis is copy & paste code from views.module that I had to override to be able to customize my options form. I could remove the ucwords() but not the variable, as that is the name/lable of the column.
Comment #2
BerdirComment #3
Thomas_Zahreddin CreditAttribution: Thomas_Zahreddin commentedhm, the version 6.x-1.5
has 3 warning, see end of page
http://localize.drupal.org/translate/projects/privatemsg/releases/231119
for variables the t()-function does not work, if you want to go with variable and translation, then the module i18n is necessary. But the handling for strings is inconvenient, because they have to be written in the settings.php.
Better is the solution with i18nstrings, which updates the translation table from module locale, but adds the dependency of i18n to the project.
A way around the dependency goes massaging:
function messaging_translate($name, $string, $langcode = NULL, $textgroup = 'messaging') {
return function_exists('i18nstrings') ? i18nstrings($textgroup . ':' . $name, $string, $langcode) : $string;
}
but means all function calls have to be updated.
What do you think ?
Comment #4
oadaeh CreditAttribution: oadaeh as a volunteer commentedThis issue is being closed because it is against a branch for a version of Drupal that is no longer supported.
If you feel that this issue is still valid, feel free to re-open and update it (and any possible patch) to work with the 7.x-1.x branch (bug fixes only) or the 7.x-2.x branch.
Thank you.