Hi,

I changed my default site language from English to Italian, and the icons on the forum list disappeared. Instead, discussion icons aren't hidden (sites/all/modules/advanced_forum/styles/naked/images/topic-default.png).

I notice a translation folder inside the module folder, so i created an it folder with the images copied from the english ones:

~/public_html/sites/all/modules/advanced_forum/translations/images$ ls -l it/blue_lagoon/
total 120
-rw-r--r-- 1 2377 12 nov 16:17 blank_lock.png
-rw-r--r-- 1 2496 12 nov 16:17 blank_note.png
-rw-r--r-- 1 1601 12 nov 16:17 blank.png
-rw-r--r-- 1 1461 12 nov 16:17 blank_small.png
-rw-r--r-- 1 2219 12 nov 16:17 buddy-add.png
-rw-r--r-- 1 2248 12 nov 16:17 buddy-remove.png
[..]
but nothing changed.

I have missing something? Thanks.

CommentFileSizeAuthor
#7 fix_icons_it.po1.98 KBMatthias Lersch

Comments

michelle’s picture

I believe you need to put them in a directory called "it" as a subdirectory of your images directory. It's been a very long time and I wasn't the one that wrote this bit but looking at the code seems to confirm that.

Michelle

michelle’s picture

Status: Active » Postponed (maintainer needs more info)
gionn’s picture

I see that the filenames are wrapped arount the t() function, so the images should be placed in the same folder of the english ones, but with filename translated (if the translation is available)?

I removed the t() from every image file as parameter, and now I have icons on all other languages.

$links['topic_reply']['title'] = advanced_forum_theme_image('post-reply.png', t('Post reply'));
michelle’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Ok, doing it that way will work, too, if you only have one language.

Thanks for reporting back.

Michelle

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Matthias Lersch’s picture

Category: support » bug
Status: Closed (fixed) » Postponed

This is not Fixed!

The translation file for IT stil has translations for the filenames in it like this:

#: advanced_forum.module:371
msgid "post-reply.png"
msgstr "post-reply.gif"

Why translate Image-Filenames for IT form PNG to GIF.. that makes no sense..

Matthias Lersch’s picture

Status: Postponed » Reviewed & tested by the community
StatusFileSize
new1.98 KB

Here is a .po File thet helped me to fix the problem.
Import it and override the existing entries.

Matthias Lersch’s picture

Status: Reviewed & tested by the community » Active

sorry.. I'm new to this, hope that is the correct status now.

michelle’s picture

Category: bug » support
Status: Active » Closed (fixed)

If you are updating the Italian translation, please use the correct issue for that: #460734: Italian Translation

Also, I took a quick look and that PO file is missing all the string translations and translating the images from English to English so that's not a fix. The PO file should just contain the string translations; image filename translations are not needed.

Michelle

mxa055’s picture

Version: 6.x-1.1 » 6.x-2.0-alpha2

I had a problem with showing up forum icons when display language was not English and after some digging I found the problem.

advanced_forum_path_to_images() method ads the $language to the end of the path so the path becomes

$image_path_language_prefix = $image_path . '/' . $language_prefix;

but then again in advanced_forum_theme_image() method you pass the t($image_file) so the image file name is $language_prefix/image_file.png

and the path is derived by calling
$image = advanced_forum_path_to_images() . "/$image_file";

so it results in a path that looks like this
/sites/all/modules/advanced_forum/styles/naked/images/el/el/forum-folder.png
instead of
/sites/all/modules/advanced_forum/styles/naked/images/el/forum-folder.png

So I think using the t() function is redundant. In my case removing it solved the problem and I still have different versions for each language.