Watching of Tracker won't work in other language than 'en'
- Status
- Closed
- Subject
- Watching of Tracker won't work in other language than 'en'
- Version
- 1.9.x
- Category
- Error
- Feature
- Trackers
- Submitted by
- purcaholic
- Volunteered to solve
- purcaholic
- Rating
- Description
Hi there,
found a issue while using the tracker on a TikiWiki installation which is running in german language.
Following code is used in file tiki-view_tracker.php to set the monitor state:
Copy to clipboardif (in_array($user_email, $emails)) { $smarty->assign('email_mon', tra('Cancel monitoring')); } else { $smarty->assign('email_mon', tra('Monitor')); }
and the smarty template '/templates/tiki-view_tracker.tpl' uses following snippet to handle the monitor state:
Copy to clipboard{if $email_mon eq 'Monitor'} <a href="tiki-view_tracker.php?trackerId={$trackerId}&monitor=y" title="{tr}monitor{/tr}"><img src="img/icons/icon_watch.png" width="16" height="16" border="0" align="right" hspace="5" alt="{tr}monitor{/tr}" /></a> {else} <a href="tiki-view_tracker.php?trackerId={$trackerId}&monitor=n" title="{tr}stop monitor{/tr}"><img src="img/icons/icon_unwatch.png" width="16" height="16" border="0" align="right" hspace="5" alt="{tr}stop monitor{/tr}" /></a> {/if}
The smarty variable $email_mon contains 'Monitor', if TiiWiki runs in englisch, in other languages the content will differ, depending on translation (e. g. 'Überwachen' in german).Greetings
purcaholic- Solution
I'm a TikiWiki greenhorn, but a usage of an language independent smarty variable could be a solution (maybe there is a better way...).
tiki-view_tracker.php:
Copy to clipboardif (in_array($user_email, $emails)) { $smarty->assign('email_mon', tra('Cancel monitoring')); $smarty->assign('email_mon_state', 'n'); } else { $smarty->assign('email_mon', tra('Monitor')); $smarty->assign('email_mon_state', 'y'); }
/templates/tiki-view_tracker.tpl:
Copy to clipboard{if $email_mon_state eq 'y'} <a href="tiki-view_tracker.php?trackerId={$trackerId}&monitor=y" title="{tr}monitor{/tr}"><img src="img/icons/icon_watch.png" width="16" height="16" border="0" align="right" hspace="5" alt="{tr}monitor{/tr}" /></a> {else} <a href="tiki-view_tracker.php?trackerId={$trackerId}&monitor=n" title="{tr}stop monitor{/tr}"><img src="img/icons/icon_unwatch.png" width="16" height="16" border="0" align="right" hspace="5" alt="{tr}stop monitor{/tr}" /></a> {/if}
Fixed 1.9.9
- Importance
- 2
- Priority
- 10
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 1370
- Created
- Tuesday 02 October, 2007 17:38:43 UTC
by Unknown - LastModif
- Wednesday 03 October, 2007 12:48:00 UTC