Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

how to tranlsate some kind of text

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:

Comments

  • Options

    show a screenshot of where you see the issue.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited December 2014

    @‌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‌

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    hgtonighthgtonight ∞ · New Moderator

    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?'));
    }
    

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options
    peregrineperegrine MVP
    edited December 2014

    thanks for confirming @hgtonight it was hemipteran

    and @jackmaessen for intrepid sleuthing.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options

    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

  • Options


    This text is already translated but the original was:

    Delete Comment

    Are you sure you want to delete this comment

  • Options

    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 message
    if ($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'));

  • Options

    an image always helps.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
  • Options
    peregrineperegrine MVP
    edited December 2014

    $Definition['HeadlineFormat.ConversationMessage'] = '{ActivityUserID,User} sXent you a message';

    next time post the definition you tried. and an image. it is far more helpful.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    peregrineperegrine MVP
    edited December 2014

    are you adding these to the transifex?

    these HeadlinFormat definitions are not going to change old notifications, only new ones.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Options
    jackmaessenjackmaessen ✭✭✭
    edited December 2014

    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

  • Options
    jackmaessenjackmaessen ✭✭✭
    edited December 2014

    these HeadlinFormat definitions are not going to change old notifications, only new ones.

    I understand, the old ones are already put into the DB

Sign In or Register to comment.