Closed (fixed)
Project:
Google Analytics
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Oct 2008 at 22:04 UTC
Updated:
14 Jul 2012 at 23:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
catchThis is a good change. I'd thought about trying to take out the spans too, but stella rightly pointed out that they're needed for context. Applies cleanly and should be rtbc.
Comment #2
hass commentedLooks like you also found a context sensitive core bug :-). See system.admin.inc line 677+. I've taken over this stupid bug from there... :-(. I commit this later.
EDIT: correct the filename
Comment #3
hass commentedThought some more about this patch and the core bug. I think we should first fix the core bug and then reuse the core translation string.
The below is not 100% context sensitive, but seems to be the only way for core:
Comment #4
stella commentedComment #5
hass commentedDo we have a reference to the core case? :-)
Comment #6
stella commentedNo, after a discussion on IRC, it seems module names are not translated on purpose. So here's a new patch that just moves the leading space and the span tags outside the call to t().
Cheers,
Stella
Comment #7
hass commentedNope, this is incorrect and something I hear very often. People telling you this are not aware about context sensitive translation issues. It doesn't matter if module names should be translated or not. We must go with patch in #4. See my comment in http://drupal.org/node/311883#comment-1024509. Otherwise we keep it as is. Also review the code I pointed out in #2 of the systems module.
Comment #8
stella commentedIf module names are not meant to be translated, but are still needed in the string to provide context, then the patch in #4 is still wrong as it calls t() on the "Search" string, whereas it should just be passed in as "Search", no?
Comment #9
hass commentedYes, but the longer string with placeholders is correct. On the other side I don't know why a module name shouldn't be translatable and I know we are doing translation of module names in German if it comes to context sensitive sentences. We should first fix the context sensitive string bug on the core modules page and then we also change it in GA. I'd like to reuse this one and this is also what we are already doing today!
I could apply the patch and remove the t() on 'search' if required. Aside - where is it written that we shouldn't translate module names?
Comment #10
stella commentedOk, you're already aware of the post at #152375: Implement translatable module names (with context) for addressing whether or not module names should be translated. Therefore I'm not going to post a patch for Drupal core to translate the module names in admin/build/modules as that would be duplicating the work and discussion already ongoing at #152375.
From looking at that post, there doesn't seem to be a final conclusion or decision on how it should be handled - looks like the format may be changing so it includes filename or original name or similar (http://lists.drupal.org/pipermail/translations/2007-June/000390.html).
Therefore I propose we just address the leading space in the t() call on the line in question in this issue, and then when there is an agreed solution to #152375, you implement the same thing in google analytics.
Cheers,
Stella
Comment #11
hass commentedSeems I forgotten my own case... shame on me :-).
Have you taken a look to systems module line 677+ (~20 following lines)? This code use the string we are using in GA in core with the leading space. I have simply taken this over... If this lines change in core I will follow core to reuse the core string. :-)
t('@module_name (<span class="admin-enabled">enabled</span>)', array('@module_name' => 'Search'))looks good to me and would be good for core, too.Comment #12
stella commentedOk, so you're postponing this then - updating status accordingly.
Comment #13
hass commentedCore patches are at #320793: Context sensitive translation issue in system module.
Comment #14
hass commentedComment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.