when generating the .pot file for project_issue using the php potx-cli, I had the following error:
[augustin@203 project_issue-5]$ php potx-cli.php
Processing comment.inc...
Processing issue.inc...
Invalid marker content in issue.inc:1600
* t($node->category)
Processing mail.inc...
Processing project_issue.module...
Processing project_issue.install...
Invalid marker content in project_issue.install:748
* t("This and all subsequent updates of Project issue were safely aborted. Correct the problems listed above, then <a href=\"".base_path()."update.php?op=selection\">re-run update.php</a>, click 'Select versions', select update %update for project_issue, and click 'Update'.",array('%update'=>$current_update))
Processing project_issue.info...
Processing generate/project_issue_generate.inc...
Processing generate/project_issue_generate.module...
Processing generate/project_issue_generate.info...
Done.
Dereck confirmed that it is project_issue bug, not potx. You can't put dynamic stuff inside t().
Comments
Comment #1
hunmonk commentedthe second one should be pretty easy to fix. for the first one, should we bag the t() call altogether?
Comment #2
beginner commentedI removed the t(), but I'm not sure it's the right thing to do.
The second one was one loooooooong line, so I broke it into bits.
Comment #3
hunmonk commentedcleaned this up a bit, and added a check_plain() around $node->category, for future-proofing.
Comment #4
beginner commentedYour !update_path is clearer than my !base_path ! :)
I mean the code is clearer this way.
Comment #5
dwwNope. ;) project_issue_category() already maps the internal, 1-word english versions into the t()'ed, "human readable" versions of each category. We should always be using
project_issue_category($node->category)whenever we publicly print a category somewhere. The check_plain() isn't needed, since it's always hard-coded, though, i suppose for the utterly paranoid, it doesn't hurt. However, we should really make sure we useproject_issue_category()correctly when printing these out, so that we always get the right thing (even for d.o and english-only sites).Also, I thought we always wanted check_plain() on URLs inside t() calls, so it should be
@update_pathnot!update_pathfor the hunk against project_issue.install.Comment #6
dwwI tested the change in project_issue.install from the previous patch -- that was good, so I committed to HEAD.
Converting this issue to deal with improper/missing uses of project_issue_category(), as per my previous comment. Here's a (moderately tested) patch. Another pair of eyes wouldn't hurt, but I'm pretty sure this is what we want. As a separate patch like this, it should also hopefully be easier to backport, since the project_issue.install hunk is specific to HEAD (and lo, I just tried and the patch applies (with minor fuzz) on all branches -- yay!).
Comment #7
oadaeh commentedLooks good to me and worked correctly for me.
Comment #8
dwwCommitted to HEAD, DRUPAL-5, DRUPAL-4-7--2 and DRUPAL-4-7.
Comment #9
beginner commentedthanks.
Comment #10
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.