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.

Translateng homepage of dashboard! where is it's files?

Best Answer

  • x00x00 MVP
    Answer ✓

    The answer is oversight.

    This plug-in is benign so you can mod it, to use. You could even send a pull request to the core. I'm sure they would appreciate it.

    You can add the value to the standard definition file.

    grep is your friend.

«1

Answers

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    I think you can find it in

    plugins\GettingStarted\default.php

    and

    plugins\VanillaStats

    If you have Windows, I would recommend AgentRansack or Grep.

    This allows you to search Vanilla for key words or phrases.

  • I'm using Ubuntu. grep is available on linux, too -> toward learning search options! tnx to @whu606.

  • qwentyqwenty New
    edited May 2012

    :(

    whu606 said:
    I think you can find it in plugins\GettingStarted\default.php

    I checked the file you mentioned;

    1. Why it's not written as standard format for translating=> T( ) The page: http://YOURDOMAIN/index.php?p=/dashboard/settings has 6 paragraphs and a head-title, but just 4th part is using T( ).

    2. I tried for that 4 parts in this form:

    <?php if (!defined('APPLICATION')) exit();
    $Definition['Organize your Categories'] = 'AAAAA';
    $Definition['Customize your Public Profile'] = 'BBBBB';
    $Definition['Start your First Discussion'] = 'CCCCC';
    $Definition['Manage your Plugins'] = 'DDDDD';
    ?>
    

    Then I saved this codes into a file(gettingstarted.php) and placed in locale pack into /vanilla/locales/translationpack/. But it doesn't work?


    See codes of /plugins/GettingStarted/default.php

                .Anchor('×', '/dashboard/plugin/dismissgettingstarted/'.$Session->TransientKey(), 'Dismiss')
       ."<h1>Here's how to get started:</h1>"
       .'<ul>
          <li class="One'.(C('Plugins.GettingStarted.Dashboard', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor('Welcome to your Dashboard', 'settings').'</strong>
             <p>This is the administrative dashboard for your new community. Check
             out the configuration options to the left: from here you can configure
             how your community works. <b>Only users in the "Administrator" role can
             see this part of your community.</b></p>
          </li>
          <li class="Two'.(C('Plugins.GettingStarted.Discussions', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor("Where is your Community Forum?", '/').'</strong>
             <p>Access your community forum by clicking the "Visit Site" link on the
             top-left of this page, or by '.Anchor('clicking here', '/').'. The
             community forum is what all of your users &amp; customers will see when
             they visit '.Anchor(Gdn::Request()->Url('/', TRUE), Gdn::Request()->Url('/', TRUE)).'.</p>
          </li>
          <li class="Three'.(C('Plugins.GettingStarted.Categories', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor(T('Organize your Categories'), 'vanilla/settings/managecategories').'</strong>
             <p>Discussion categories are used to help your users organize their
             discussions in a way that is meaningful for your community.</p>
          </li>
          <li class="Four'.(C('Plugins.GettingStarted.Profile', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor(T('Customize your Public Profile'), 'profile').'</strong>
             <p>Everyone who signs up for your community gets a public profile page
             where they can upload a picture of themselves, manage their profile
             settings, and track cool things going on in the community. You should
             '.Anchor('customize your profile now', 'profile').'.</p>
          </li>
          <li class="Five'.(C('Plugins.GettingStarted.Discussion', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor(T('Start your First Discussion'), 'post/discussion').'</strong>
             <p>Get the ball rolling in your community by '
             .Anchor('starting your first discussion', 'post/discussion').' now.</p>
          </li>
          <li class="Six'.(C('Plugins.GettingStarted.Plugins', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor(T('Manage your Plugins'), 'settings/plugins').'</strong>
             <p>Change the way your community works with plugins. We\'ve bundled
             popular plugins with the software, and there are more available online.</p>
          </li>
       </ul>
    
  • peregrineperegrine MVP
    edited May 2012

    .

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

  • peregrineperegrine MVP
    edited May 2012
    /GettingStarted/locale/**en-Ca**/definitions.php
    
    try one of these
    /GettingStarted/locale/**translationpack**/definitions.php
    or
    /GettingStarted/definitions.php
    

    also clear your cache when changing locale and definitions

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

  • qwentyqwenty New
    edited May 2012

    qwenty wrote:

    1. I tried for parts assigned by T( ) into /plugins/GettingStarted/default.php in this form:
      <?php if (!defined('APPLICATION')) exit(); $Definition['Organize your Categories'] = 'AAAAA'; $Definition['Customize your Public Profile'] = 'BBBBB'; $Definition['Start your First Discussion'] = 'CCCCC'; $Definition['Manage your Plugins'] = 'DDDDD'; ?>
      Then I saved this codes into a file(gettingstarted.php) and placed in locale pack into /vanilla/locales/translationpack/. But it doesn't work?

    peregrine said:

    /GettingStarted/locale/**en-Ca**/definitions.php
    
    try one of these
    /GettingStarted/locale/**translationpack**/definitions.php
    or
    /GettingStarted/definitions.php
    

    Didn't work!

    :'(

    also clear your cache when changing locale and definitions

    It doesn't need! I refresh firefox by Ctrl+F5, which refreshes the page from scratch.

    qwenty
    1. Why it's not written as standard format for translating=> T( )
    The page: http://YOURDOMAIN/index.php?p=/dashboard/settings has 6 paragraphs and a head-title, but just 4th part is using T( ).

    Bump!

  • peregrineperegrine MVP
    edited May 2012

    refresh the server cache by deleting all the .ini files here.

    /vanilla/cache

    if its not already in the local documetation on the wiki and it works for you, maybe you could append it to the wiki documentation, how you solved it. (and please don't ask where the wiki is?, because if you do ... it will drive me to the edge.)

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

  • x00x00 MVP
    Answer ✓

    The answer is oversight.

    This plug-in is benign so you can mod it, to use. You could even send a pull request to the core. I'm sure they would appreciate it.

    You can add the value to the standard definition file.

    grep is your friend.

  • peregrine said:
    because if you do ... it will drive me to the edge.

    And I will stand by that edge with peregrine... holding him back, because we've got some more stuff to solve! :-)

    There was an error rendering this rich post.

  • x00 said:
    The answer is oversight.

    You could even send a pull request to the core. I'm sure they would appreciate it. >

    can you explain what "pull request" means please?

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

  • qwentyqwenty New
    edited May 2012

    peregrine said:
    refresh the server cache by deleting all the .ini files here.

    /vanilla/cache

    Great! Worked :) It was because of those damn ".ini" files. Now, I placed the translated file into /locales/translationpack; It's working.

    qwenty
    Why GettingStarted/default.php is not written as standard format for translating=> T( ); The page: http://YOURDOMAIN/index.php?p=/dashboard/settings has 6 paragraphs and a head-title, but just 4th part is using T( ).

    Answer:

    x00
    This plug-in is benign so you can mod it, to use... You can add the value to the standard definition file.

    tnx to @x00

    Solved. I added T( ) manually.

    for Ex: T("<h1>Here's how to get started:</h1>")
    =>

    $Definition['Here\'s how to get started:'] = 'TRANSLATION PHRASE';
    
  • peregrineperegrine MVP
    edited May 2012

    thx @xoo sounds like a great idea for qwenty to follow through on....
    http://help.github.com/send-pull-requests/. .... assuming its not a snatch and run...

    If it was a snake it would have bit you. - adding to wiki????

     <strong>'.Anchor('Welcome to your Dashboard', 'settings').'</strong>
             <p>This is the administrative dashboard for your new community. Check
             out the configuration options to the left: from here you can configure
             how your community works. <b>Only users in the "Administrator" role can
             see this part of your community.</b></p>
          </li>
          <li class="Two'.(C('Plugins.GettingStarted.Discussions', '0') == '1' ? ' Done' : '').'">
             <strong>'.Anchor("Where is your Community Forum?", '/').'</strong>
             <p>Access your community forum by clicking the "Visit Site" link on the
             top-left of this page, or by '.Anchor('clicking here', '/').'. The
             community forum is what all of your users &amp; customers will see when
             they visit '.Anchor(Gdn::Request()->Url('/', TRUE), Gdn::Request()->Url('/', TRUE)).'.</p>
          </li>
    
    
    
    
     <strong>'.Anchor(T('Welcome to your Dashboard'), 'settings').'</strong>
    
    .Anchor(T("Where is your Community Forum?"), '/')
    

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

  • x00x00 MVP
    edited May 2012

    You can do

    ....<p>'.T('SomeTextLabel','Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ipsum lacus, commodo molestie vehicula quis, mattis a elit. Curabitur nec elit nec ligula tincidunt tempor. Praesent pretium feugiat sem, iaculis mollis quam sodales et. Mauris sit amet nisl mauris. Curabitur eu felis non metus aliquet laoreet. Curabitur blandit ipsum et arcu molestie vulputate. Duis quam tortor, suscipit eu pharetra nec, accumsan elementum lectus. Donec libero nibh, dictum quis tristique quis, tincidunt non velit.').'</p>...
    

    grep is your friend.

  • @whu606 @x00 , @peregrine

    both problems are solved now, Thank you very much.

    It's better that one of you (the stuff) reports modifications via github. If not, I'll do that soon!

  • qwentyqwenty New
    edited May 2012

    How should I translate the below code which is into: models/class.permissionmodel.php?

    T('Permission.'.$JunctionTable, $JunctionTable)
    

    $JunctionTable, $JunctionTable -> ??

    $Definition['Permission.'] = '???';

    What about: T('InviteErrorPermission', T('ErrorPermission'))

  • qwentyqwenty New
    edited May 2012

    T('Permission.'.$JunctionTable, $JunctionTable)

    T('InviteErrorPermission', T('ErrorPermission'))

    these code wrote in the standard form?

  • qwenty said:
    How should I translate the below code which is into: models/class.permissionmodel.php?

    T('Permission.'.$JunctionTable, $JunctionTable)
    

    $JunctionTable, $JunctionTable -> ??

    $Definition['Permission.'] = '???';

    What about: T('InviteErrorPermission', T('ErrorPermission'))>

    $JunctionTable - probably no need since it refers to database table

    All the other T('something') - you do the same way you've been doing it.

    $Definition['Permission.'] = 'permission-in-the-language-you-are-translating';
    $Definition[InviteErrorPermission'] = 'InviteErrorPermission-in-the-language-you-are-translating';
    $Definition['ErrorPermission'] = 'ErrorPermission-in-the-language-you-are-translating';

    did you try it and it didn't work

    qwenty said:
    @whu606 @x00 , @peregrine

    both problems are solved now, Thank you very much.

    It's better that one of you (the stuff) reports modifications via github. If not, I'll do that soon!

    I suspect that means you!

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

  • peregrine said:

    T('Permission.'.$JunctionTable, $JunctionTable)

    $JunctionTable, $JunctionTable -> ??

    $Definition['Permission.'] = '???';

    What about: T('InviteErrorPermission', T('ErrorPermission'))

    $JunctionTable - probably no need since it refers to database table

    So, why "$JunctionTable" comes between T( ) ?
    Is this the correct form: T('Permission.').$JunctionTable, $JunctionTable

    $Definition[InviteErrorPermission'] = 'InviteErrorPermission-in-the-language-you-are-translating';
    $Definition['ErrorPermission'] = 'ErrorPermission-in-the-language-you-are-translating';

    They are nested; doesn't it matter? => T('InviteErrorPermission', T('ErrorPermission')) ??

    did you try it and it didn't work

    Indeed, No! because of "It seems not possible to find all codes into installed Vanilla to check them!"
    I'm just translating result of grep command and output of locale-developer plugin! I don't know where any code will be appeared!?

    I suspect that means you!

    I didn't get your intention!

  • You could test them by echoing them and see if they get picked up correctly.

    throw it somewhere in one of your pages or create a page in the custompage plugin.

    $JunctionTable = "blah";

    echo T('Permission.'.$JunctionTable, $JunctionTable);

    // I believe what I said above will work - but I am not testing them, just suggesting them.
    T('InviteErrorPermission', T('ErrorPermission'))

    use the custompage plugin and throw the line in there and see if it works the way you want.

    It's better that one of you (the stuff) reports modifications via github. If not, I'll do that soon!

    I suspect that means you!

    I didn't get your intention!

    I suspect that means you report modifications to github if you want to improve things, because no one is likely to do it for you. a tit-for-tat so to speak

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

Sign In or Register to comment.