Image gallery term translations not displayed

psc - April 12, 2009 - 04:36
Project:Image
Version:6.x-1.0-alpha4
Component:image_gallery
Category:bug report
Priority:normal
Assigned:hop
Status:needs work
Description

I set up my Image Galleries taxonomy translation method to:

Localize terms. Terms are common for all languages, but their name and description may be localized.

and then, I went to 'Translation interface', I refreshed taxonomies, I translated the taxonomies for Image Galleries (I translated term and description of 2 galleries I've created) but when I switch from english to spanish, the names of galleries (taxonomy terms) and their descriptions don't get translated.

Am I doing something wrong in the translation process?
Is 'Localize terms' translation method not working with Image / Image_Gallery module?

Any idea how to go over this and getting my galleries translated without duplicating them (I've already tried 'Per language term' but them the pictures inside a gallery are not displyed in its translated one, forcing me to upload them again)?

My images have no language as I don't want to upload them twice (this is also another issue I hope will be solved soon !)

Any help would be more than welcome !

Thanks in advance.

psc

#1

m13 - April 13, 2009 - 09:28

yes, I have an Idea.

I am not sure this is correct http://drupal.org/node/360643
but it's all I found so far.

I have to say, I tried all possible settings "per language terms", "localize terms", "set language to vocabulary" for the Image Gallery Vocabulary but nothing seems to be working.

The problem is not the duplicate images one has to upload. The problem is that duplicate urls are created.

for example

Image galleries (vocabulary) --> image + /gr/image
floors (term in english) --> floors + /gr/floors
δάπεδα (term in greek) --> δάπεδα + /gr/δάπεδα

which means I get 4 url's and I only need 2.

the correct way would be

image galleries (vocabulary) --> image + /gr/image
floors (term in english) --> floors
δάπεδα (term in greek) --> /gr/δάπεδα.

Ι don't know whether you understand what I am talking about, it's been 3 days I am working on it and still, no result.

The only result I can get is that Localizer is not working properly with taxonomy terms OR my settings for content types and vocabularies are not set correctly.

any ideas would be appreciated.

#2

psc - April 13, 2009 - 12:07

Thanks for the link! It seems this is what I am looking for, but no idea how to aplly a patch to my sites. I am just a clever user, not a programmer... :(

psc

#3

m13 - April 13, 2009 - 12:36

hey, I discovered this one too http://drupal.org/node/377912

check out the second comment. It looks like we cannot escape duplicate urls and empty galleries :(

as for patch applying --> http://drupal.org/patch/apply

#4

steff2009 - June 3, 2009 - 15:10

Hi, here is my experience about creating and translating a gallery with Image module.

1. I created the original gallery and assigned it a name in Italian (I noticed that it was not possible to choose the gallery language upon creation, but didn't mess with it immediately)

2. I began adding images to the gallery, but saw that they would not display in the concerned gallery unless I specified the node language. As soon as I chose "Italian", the images would show.

3. I checked in the Taxonomy page and saw that a vocabulary for "Image Galleries" had automatically been created. As I wanted it to be "Gallerie di Immagini", I edited the vocabulary and changed the title. I also assigned translation mode "localize terms".

4. I then went to the translation interface, looked for string "Gallerie di Immagini" and added the EN version "Image Galleries".

5. When I started to add English translation for the images that I had created in the Italian gallery (by editing each image and clicking on "Translate"), I realized that I had to upload the image again and that a new node (for which a new alias was needed) was being created for each image in English.

When I look at my gallery and switch language, images and descriptin are brilliantly shown both in IT and in EN. I think it's correct that nodes and urls are duplicated, cause this enhances search and page ranking.

I only have one BIG problem: gallery names don't get translated!!! See what happens:

1. I'm on page Home > Gallerie di Immagini > Galleria Realizzazioni in IT
2. I switch to EN and I'm in Home > Image Galleries > Galleria Realizzazioni while it should be Home > Image Galleries > Projects Gallery!!

WHY???

The funny thing is that taxonomy terms have been translated and, if I navigate to taxonomy pages, I see all images in IT and EN under the correct titles: Galleria Realizzazioni and Projects Gallery.

Why do not gallery names get translated like taxonomy terms?

Thank you for sharing your opinion.

Cheers.

#5

joachim - June 3, 2009 - 20:54
Category:support request» bug report
Status:active» postponed (maintainer needs more info)

So what you're saying is that if your gallery is /image/tid/6, then when you go to /taxonomy/term/6 the term name is translated properly?
This suggests taxonomy module does something to terms that we do not.
Can someone find out what taxonomy module does to ensure its terms are translated?

#6

sun - June 4, 2009 - 00:24
Title:Localizing Image Galleries don't get them translated» Image gallery term translations not displayed
Status:postponed (maintainer needs more info)» active

AFAIK, i18ntaxonomy is required to translate taxonomies. Obviously, we don't really use the Taxonomy API (rather its data storage), so i18ntaxonomy is never invoked.

#7

steff2009 - June 4, 2009 - 19:24

Hi, yes taxonomy terms are translated (manually by me and switched through language switcher and i18n, as you can see at http://www.tendatech.com/taxonomy/term/4)

What it's not translated is the corresponding gallery name (see at http://www.tendatech.com/galleriarealizzazioni).

#8

steff2009 - June 14, 2009 - 09:45

Hello guys, any ideas or suggestions on my last post of one week ago above?

Thanks!

#9

joachim - June 14, 2009 - 14:06

> Can someone find out what taxonomy module does to ensure its terms are translated?

Someone needs to do the above -- I don't have time at the moment.

#10

hop - June 16, 2009 - 10:57
Assigned to:Anonymous» hop

I applyed image_gallery.patch, I created (rename) taxonomy terms and description in (to) the default language and then, I translated them in Translation interface.

AttachmentSize
image_gallery.patch 1.04 KB

#11

joachim - June 16, 2009 - 12:09
Status:active» needs review

That's a lot simpler than I thought it would be ... :)
Marking as needs review.

#12

sun - June 16, 2009 - 12:24
Status:needs review» needs work

Well, but it's wrong. ;)

t() may not be used for user-supplied strings. We either have to conditionally invoke i18ntaxonomy, or we have to change the code, so i18ntaxonomy is invoked via Taxonomy API.

#13

steff2009 - June 17, 2009 - 10:15

Hi, shall I apply the patch or wait for review results?

Or maybe a new version of the image module is going to be released?

Thanks.

#14

joachim - June 17, 2009 - 14:42

The review is that the patch is incorrect. A new patch is needed. Any fix to this bug will be here, before it appears in a new release: the issue queue is where we work on modules.

> We either have to conditionally invoke i18ntaxonomy, or we have to change the code, so i18ntaxonomy is invoked via Taxonomy API.

Do you mean that the taxonomy translation module is at fault?
I'm afraid I don't even know which modules are involved in translating terms -- is this core or contrib?
How does this translation module deal with modules that implement vocabularies such as forum? Does it do so correctly for any module or case by case?

#15

steff2009 - July 8, 2009 - 13:32

Hi, any news about working on this?

Both content translation and taxonomy modules are core (optional). Never experimented forum translation.

Cheers.

#16

arpieb - November 3, 2009 - 07:00

I haven't tried this on the image_gallery.module yet, but I'm running into the same problem (English / German taxonomy terms). I also had to tackle this in UC2 running on D6.14 with the catalog not translating using the i18n taxonomy mappings. A friendly soul pointed me to a fix using i18n that seems to be working fine in my UC2 installation. Try loading the i18nstrings.module into image_gallery.module using:

// arpieb - include tt() method from i18n:
module_load_include('module', 'i18nstrings');

Now you can invoke the tt() method from i18n that uses the taxonomy translations on the terms you want to translate like so:

...
$vocabulary = tt('taxonomy:vocabulary:' . $vocabulary->vid . ':name', $vocabulary->name);
...
$name = tt('taxonomy:term:' . $term->tid . ':name', $term->name);
...

Not the prettiest hack ever, but it works flawlessly with the UC2 product catalog vocabulary with the i18n module enabled, and I plan on trying it on image_gallery.module as well... Unless of course someone comes up with a better fix...?

-R

#17

DoctorWho - November 13, 2009 - 12:25

Is there a chance this fix (or some other one) will make it into one of the next releases? I don't really want to start modifying modules myself as it may lead to problems later.

I would guess that in this case it should not be possible to cause real problems as only the visible output is changed and never any data in the database. Is that correct, or is there a chance that it may screw up something permanently?

#18

joachim - November 13, 2009 - 17:07

I don't know enough about translations and the other modules involved to tackle this.
So getting this fixed all depends on efforts from users of this module who understand how translation works.

 
 

Drupal is a registered trademark of Dries Buytaert.