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.

[Solved] RC2 Any fix For Terminology 'you sent you a message' ?

camocamo New
edited October 2011 in Vanilla 2.0 - 2.8
Wondering if there has been any fix in RC2 for this, or if anyone has worked out how to translate it? I tried to translate it in config/local.php but it didnt work.
Tagged:

Best Answers

  • x00x00 MVP
    Answer ✓
    I've never used conf/locale.php. I use my own in locales. Shouldn't matter.

    grep is your friend.

  • x00x00 MVP
    Answer ✓
    see the skeleton for example.

    grep is your friend.

  • UnderDogUnderDog MVP
    Answer ✓
    also tried forum/applications/vanilla/locale/en-CA/definitions.php
    At least you're trying and that deserves 2 compliments.
    Focus on the path in your last try, so forum/applications/vanilla/locale/en-CA/definitions.php
    If I enter your example I get an error
    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.';
    Fix your problem in 2 steps. The fact that you get an error means that the correct file is used.
    First step is to not use the variables, so keep these for now:
    $Definition['You sent you a'] = 'You sent a';
    Second step is to enter variables 1 by 1 and in the end you'll get this code:
    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.'; $Definition['message'] = 'frisbee';
    Last but not least, focus on the answers given:
    http://vanillaforums.org/discussion/comment/145189#Comment_145189
    good luck, happy coding.

    There was an error rendering this rich post.

  • x00x00 MVP
    edited October 2011 Answer ✓
    Yes that is the wildcard you talk about make sure it is in the string in that order. like so:

    $Definition['%1$s sent you a %8$s.'] = '%1$s any words %8$s.';

    Unless in your language you want to switch them round:

    $Definition['%1$s sent you a %8$s.'] = 'A %8$s was sent by %1$s.';

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    Are you saying that if some one else sends a message it says 'you sent you a message'?

    grep is your friend.

  • x00x00 MVP
    Answer ✓
    Agreed

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    Ok I replicated the problem it could be a bug. Technically you are a reciprocate also, but that is confusing.

    Personally I think it should list all the reciprocates bar yourself.

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    ok this will work:
    $Definition['%1$s sent you a %8$s.'] ='%1$s sent %3$s a %8$s';

    However it will only list the first reciprocate, but is good enough for now. I'll open a ticket.

    grep is your friend.

Answers

  • you mean locale.php? i would use locales/yourlocale/definitions.php

    Copy everything over from /var/www/test/forum/applications/dashboard/locale/en-CA/definitions.php too.

    Make sure to change it in the dashboard.

    grep is your friend.

  • I think there are far too many way to do this, bound to cause problems, you also have themes, and plugins.

    grep is your friend.

  • Unfortunately that does not work. Seems to be the only thing that cannot be translated.
  • not so

    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.';
    $Definition['message'] = 'frisbee';

    $Definition['%1$s added %3$s to a %8$s.'] = '%1$s included %3$s in a %8$s';
    $Definition['conversation'] = 'private message';

    grep is your friend.

  • camocamo New
    edited October 2011
    Can you please paste the full path to correct definitions file?
    For all my other definitions im using..

    /forum/conf/locale.php (does not work)

    also tried forum/applications/vanilla/locale/en-CA/definitions.php (does not work)

    is this the wrong syntax? $Definition['You sent you a'] = 'You sent a';

    If I enter your example I get an error

    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.';



  • x00x00 MVP
    Answer ✓
    I've never used conf/locale.php. I use my own in locales. Shouldn't matter.

    grep is your friend.

  • x00x00 MVP
    Answer ✓
    see the skeleton for example.

    grep is your friend.

  • neither

    $Definition['You sent you a'] = 'You sent a';

    or

    'You sent you a' => 'You sent a',

    seem to work, in any definition locale for me.
  • UnderDogUnderDog MVP
    Answer ✓
    also tried forum/applications/vanilla/locale/en-CA/definitions.php
    At least you're trying and that deserves 2 compliments.
    Focus on the path in your last try, so forum/applications/vanilla/locale/en-CA/definitions.php
    If I enter your example I get an error
    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.';
    Fix your problem in 2 steps. The fact that you get an error means that the correct file is used.
    First step is to not use the variables, so keep these for now:
    $Definition['You sent you a'] = 'You sent a';
    Second step is to enter variables 1 by 1 and in the end you'll get this code:
    $Definition['%1$s sent you a %8$s.'] = '%1$s flung you a %8$s.'; $Definition['message'] = 'frisbee';
    Last but not least, focus on the answers given:
    http://vanillaforums.org/discussion/comment/145189#Comment_145189
    good luck, happy coding.

    There was an error rendering this rich post.

  • it should work fine make sure to enable the locale and set as default in dasboard->locales

    grep is your friend.

  • $Definition['You sent you a'] is not a definition for obvious reasons. 'You' is just one of the possibilities

    grep is your friend.

  • Ok Thankyou Both, So I have the right def file, and my basic definition is on track, so far so good. I understand there must be some kind of wildcard to replace 'you' since it should be any users name right? Likewise the second 'you'. Im assuming these be the variables your talking about?

    My problem then, is that I dont know what these variables should be. Again , sadly, this example, is chinese to me -> '%8$s.'

    Where can I find documentation to learn about these variables please?
  • x00x00 MVP
    edited October 2011 Answer ✓
    Yes that is the wildcard you talk about make sure it is in the string in that order. like so:

    $Definition['%1$s sent you a %8$s.'] = '%1$s any words %8$s.';

    Unless in your language you want to switch them round:

    $Definition['%1$s sent you a %8$s.'] = 'A %8$s was sent by %1$s.';

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    Are you saying that if some one else sends a message it says 'you sent you a message'?

    grep is your friend.

  • camocamo New
    edited October 2011
    No, If I send a message to somebody, on my profile activity, it says "you sent you a message'
    Presumably because these messages/conversations are between you and the person you sent to, but the grammar is embarrassing. :)

    shouldn't the second 'you' be a wildcard also?

    Its not 'message' I want to change, but the 'you's, im thinking it should say, for ex, if I send fred a message, it should say, Either, you sent fred a message' or, 'camo sent fred a message. or vice versa, no?
  • x00x00 MVP
    Answer ✓
    Agreed

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    Ok I replicated the problem it could be a bug. Technically you are a reciprocate also, but that is confusing.

    Personally I think it should list all the reciprocates bar yourself.

    grep is your friend.

  • x00x00 MVP
    edited October 2011 Answer ✓
    ok this will work:
    $Definition['%1$s sent you a %8$s.'] ='%1$s sent %3$s a %8$s';

    However it will only list the first reciprocate, but is good enough for now. I'll open a ticket.

    grep is your friend.

  • Thats awesome Mate, thankyou very much! That makes alot more sense. Glad it wasnt just me this time! :) cheers
  • No worries. I'm surprised it went unnoticed for so long.

    grep is your friend.

Sign In or Register to comment.