I am sending a notification with the only word "takes" and some pictures. See attachment.
I was following something similar to what is described for Terra Mystica somewhere in the docs.
I know I should not use html in the notifications, but I have only 1 word to translate and the rest are 1, 2 or 3 pictures.
The issue is that the word is not translated
This is the code I am using:
Code: Select all
$collects_translated = self::_('takes');
Code: Select all
$collects_translated = clienttranslate('takes');
Code: Select all
$message_to_send = '<div>${player_name} '.$collects_translated.' '.$notificationtoall.'</div>';
Code: Select all
self::notifyAllPlayers( "tilesPlayednotification",
$message_to_send,
array(
'player_id' => $player_id,
'player_name' => self::getActivePlayerName(),
'tile_ids' => $cards,
'player_name' => self::getActivePlayerName()
)
);
Code: Select all
$notificationtoall .= "<div class='cardspritesthumb cardthumb_{$mytile['tile_character']}_{$mytile['tile_face']}'></div> ";
Code: Select all
<div><!--PNS--><span class="playername"><!--PNS--><span class="playername" style="color:#ff0000;">Emanuele Ornella</span><!--PNE--></span><!--PNE--> takes <div class="cardspritesthumb cardthumb_1_normal"></div> <div class="cardspritesthumb cardthumb_1_normal"></div> </div>
Also: another question. In studio.boargamearena.com seems there is only English as language. So I cannot effectively test other solutions if not deploying a new version in production. Which is not effective if I am not sure about the solution.. I do not like to try in production just because I do not know if the change is a real solution! So is there any way I can test this in studio.boargamearena.com ? I mean the translations of the text?
This would be also good to test if I forgot some translation before deploying to production.
Thanks,
Ema