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.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | fix_icons_it.po | 1.98 KB | Matthias Lersch |
Comments
Comment #1
michelleI 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
Comment #2
michelleComment #3
gionn commentedI 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.
Comment #4
michelleOk, doing it that way will work, too, if you only have one language.
Thanks for reporting back.
Michelle
Comment #6
Matthias Lersch commentedThis 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..
Comment #7
Matthias Lersch commentedHere is a .po File thet helped me to fix the problem.
Import it and override the existing entries.
Comment #8
Matthias Lersch commentedsorry.. I'm new to this, hope that is the correct status now.
Comment #9
michelleIf 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
Comment #10
mxa055 commentedI 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.pnginstead of
/sites/all/modules/advanced_forum/styles/naked/images/el/forum-folder.pngSo 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.