Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2008 at 03:13 UTC
Updated:
13 Apr 2011 at 19:31 UTC
Field titles (such as Node's "Published", Comment's "Author's website" or Taxonomy's "Term description") are currently translated twice or at least are send twice through t().
If I for example translate "Published" to "Veröffentlicht", and then search for "Veröffentlicht" in the translate interface, two entries are shown: The correctly tranlsated one and another one now specifying "Veröffentlicht" as an English term that can be translated again.
Is this on purpose? Otherwise we make sure views doesn't translate field titles at all and expect t() to be used in the implementation only.
Comments
Comment #1
merlinofchaos commentedI think that the double translation may be coming from field labels, which are filled in from defaults that are already translated, but the label itself is also dynamically translated. I'm not sure this is preventable.
Comment #2
oerpli commentedNo idea if my problem is the same as yours, but i wrote this:
http://abraham.labs.novij.at/misc/viewsfix.js
And it works for me.
fix();Just enable a block with "
" where you need the titles removed.
Comment #3
esmerel commentedpotential solution given, no response.
Comment #4
robertgarrigos commentedI'm having this same problem with views-7. This is the problem:
We have a D7 with catalan, as main language, english and spanish, and a view with a table which contains a column with a label named "any", which in catalan means year. The problem is that "any" has also a meaning in english, which is translatable into catalan as "qualsevol".
Now, the problem is that if I use "Year" as the label, views shows "Qualsevol", this is, it translates year into catalan as "any" and it translates again "any" (as if it was in english) as "qualsevol". It double translates, as merlinofchaos mention in #1. BTW, If I put "any" it translates it as "qualsevol", so there is no way to put "any" meaning "year" in catalan other than puting "any ", with a blank space, for instance.
Is this, really, not preventable?
Comment #5
bojanz commentedThe translation logic completely changed in the meantime, so it might just be preventable.
Comment #6
iamjon commentedClosing from a lack of activity.
Comment #7
bojanz commentedLet's keep this active, sounds like a real fixable problem.
Comment #8
dawehner@bojanz
Sadly this seems to be wrong.
The problem are the labels. The default value of this label is already translated into language X. So for example title get's titleX.
This is the value of the label option.
Then the view is rendered and wush: t('titleX') and there is the double translation.
Comment #9
merlinofchaos commentedSo we actually need to be sure that we fetch *untranslated* labels from entity api.
Comment #10
merlinofchaos commentedHmm. Interestingly, I'm not sure this is the case as I thought it was.
I can't see a why labels might be getting double translated at this point. Are we sure this is still happening with the new translation system?
Comment #11
dawehnerIt's not about the translation system of views.
Let's take for example content: title => the default label is t('title')
So the stored value in german for example is "titel".
And then when you execute the view the label "titel" is runned through the translation system again.
Comment #12
dawehnerSo there are two issues:
in d6--2 the stored value was runned through t() and changed so also in the interface itself.
If you save then the value get's runned through t() again etc.
This is fixed with the new translation mechanism in views3.
There is the other case described in #340064-11: Double translation of Field titles
Togehter i see this issue as fixed. Please open it again if i'm wrong.