Translateng homepage of dashboard! where is it's files?
Best Answer
-
x00
MVP
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.
1

Answers
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.
I checked the file you mentioned;
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 usingT( ).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 & 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>.
also clear your cache when changing locale and definitions
qwenty wrote:
peregrine said:
Didn't work!
:'(
It doesn't need! I refresh firefox by Ctrl+F5, which refreshes the page from scratch.
Bump!
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.)
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.
And I will stand by that edge with peregrine... holding him back, because we've got some more stuff to solve! :-)
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?
http://help.github.com/send-pull-requests/
Great! Worked
It was because of those damn ".ini" files. Now, I placed the translated file into
/locales/translationpack; It's working.Answer:
tnx to @x00
Solved. I added
T( )manually.for Ex:
T("<h1>Here's how to get started:</h1>")=>
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 & 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?"), '/')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>...@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!
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'))T('Permission.'.$JunctionTable, $JunctionTable)T('InviteErrorPermission', T('ErrorPermission'))these code wrote in the standard form?
$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
I suspect that means you!
So, why "$JunctionTable" comes between T( ) ?
Is this the correct form:
T('Permission.').$JunctionTable, $JunctionTableThey are nested; doesn't it matter? =>
T('InviteErrorPermission', T('ErrorPermission'))??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 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.
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