[#32829] The statistics popup form com_finder is not full translatable#2613
[#32829] The statistics popup form com_finder is not full translatable#2613zero-24 wants to merge 17 commits intojoomla:masterfrom zero-24:patch-2
Conversation
|
done |
|
done @infograf768 |
|
so this shoud work now :) |
There was a problem hiding this comment.
We could even do this in a backward compatible way:
<?php
$lang_key = 'PLG_FINDER_STATISTICS_'. str_replace(' ', '_', $type->type_title);
$lang_string = JText::_($lang_key);
echo ($lang_string == $lang_key) ? $type->type_title : $lang_string;
?>
This way if third party extensions don't have the language string (yet), it will not show as an untranslated string.
|
It works for 3rd party extensions as long as they have the language string in their files. I've commented in code to show a solution in case the string isn't present. Maybe someone knows an even better one. Also to consider: I would use a language key which is consistent with the other keys in the file. So something like |
or or strtoupper('PLG_FINDER_' . $type->element . 'TYPE' . str_replace(' ', '_', $type->type_title)'') what is better? The first looks not right (not closed) or i'm wrong? EDIT:
merged |
|
Aye, my line was wrong. The |
|
@Bakual |
|
@zero-24 I had a closer look at the data. Unfortunately my idea doesn't work out as the element isn't even stored anywhere. We would have to use the plugin name for that, but that is just crappy code then. |
|
ok thanks @Bakual |
see:
#2609
and
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=32829