how to tranlsate some kind of text
jackmaessen
✭✭✭
yet another problem with translation: I followed these instructions: http://vanillaforums.org/discussion/comment/220442#Comment_220442 There is one case i can not translate: In the file applications\vanilla\js\discussion.js there is this line: confirmHeading: gdn.definition('ConfirmDeleteCommentHeading', 'Delete Comment'),
By following the instructions it should be translated this way in my locale.php
$Definition['ConfirmDeleteCommentHeading'] = 'Translated text'; But it doens't work...
Tagged:
1
Comments
show a screenshot of where you see the issue.
@linc
re:jack's comment - only way to change things is modifiying the js since,
this may be a bug. it seems untranslateable to me.
neither
ConfirmDeleteCommentText
or
ConfirmDeleteCommentHeading
or
Delete Comment
or
Are you sure you want to delete this comment?
the definition is not loaded, it seems to me.
file an issue on github @jackmaessen
@Linc
https://github.com/vanilla/vanilla/issues/2306
This definitely looks like a bug. Plugin patch:
public function DiscussionController_Render_Before($Sender) { $Sender->AddDefinition('ConfirmDeleteCommentHeading', T('ConfirmDeleteCommentHeading', 'Delete Comment')); $Sender->AddDefinition('ConfirmDeleteCommentText', T('ConfirmDeleteCommentText', 'Are you sure you want to delete this comment?')); }thanks for confirming @hgtonight it was hemipteran
and @jackmaessen for intrepid sleuthing.
yes indeed, hgtonight has the right piece of code and it is in applications\vanilla\js\discussion.js
The text appears as a popu when you want to delete a comment in a topic
This text is already translated but the original was:
Delete Comment
Are you sure you want to delete this comment
I found another problem with translation:
The words sent you a in the notification in the navbar seem also not translateable.
These words appear in: applications\conversations\models\class.conversationmodel.php
$Activity = array(,'ActivityType' => 'ConversationMessage',
'ActivityUserID' => $Session->UserID,
'HeadlineFormat' => T('HeadlineFormat.ConversationMessage', '{ActivityUserID,User} sent you a message')
and in applications\conversations\settings\structure.php
// X sent you a messageif ($SQL->GetWhere('ActivityType', array('Name' => 'ConversationMessage'))->NumRows() == 0)
$SQL->Insert('ActivityType', array('AllowComments' => '0', 'Name' => 'ConversationMessage', 'FullHeadline' => '%1$s sent you a %8$s.', 'ProfileHeadline' => '%1$s sent you a %8$s.', 'RouteCode' => 'message', 'Notify' => '1', 'Public' => '0'));
an image always helps.
$Definition['HeadlineFormat.ConversationMessage'] = '{ActivityUserID,User} sXent you a message';
next time post the definition you tried. and an image. it is far more helpful.
are you adding these to the transifex?
these HeadlinFormat definitions are not going to change old notifications, only new ones.
yes i will add them all to transifix and when i am ready with all translations, i will post them in the dutch locale plugin topic so that people can use them for the missing translations. These locales are far away from complete but never mind, i will help to create a complete overview
I understand, the old ones are already put into the DB