Page 1 of 1

More translation stings

Posted: Wed Aug 22, 2012 8:03 am
by massiws
Hi,

I added little changes to code to translate few other text strings:
- Delete (header column in subform)
- of (in the pager)
- "Logged in as" and "help" (in bottom-right corner)

First I added the translation strings in Setup > Translation;.
Then I modified the following files:

form.php - lines 1100 and 2351:

Code: Select all

1100     print "<span $help >" . nuTranslate('Logged in as') . " $r->sus_login_name&nbsp;|&nbsp;" . nuTranslate('Help') . "</span>";
...
2351     $s  .= "$TAB         <span style='vertical-align:top;font-size:10pt;font-family:tahoma;font-weight:bold;'>" . nuTranslate('Delete') . "</span>$CRLF";
browse.php - line 823 and 834:

Code: Select all

823     $s .= "<span class='nuBrowse' style='border-style:none'>" . nuTranslate('Page') . " <input onchange='runPage(0)' style='margin:0px;padding:0px;border-style:none;text-align:center;width:40px;height:15px;font-size:14px' name='displayPage' id='displayPage' value='$this->PageNo'> /$pPages</span>\n";
...
834     $s .= "<span $help >" .nuTranslate('Logged in as') . " $r->sus_login_name&nbsp;|&nbsp;".  nuTranslate('Help')."</span>";
I changed the word "of" in the pager with " /", so don't need translation! If you want the word translated, change the line 823 in browse.php in this way:

Code: Select all

823     $s .= "<span class='nuBrowse' style='border-style:none'>" . nuTranslate('Page') . " <input onchange='runPage(0)' style='margin:0px;padding:0px;border-style:none;text-align:center;width:40px;height:15px;font-size:14px' name='displayPage' id='displayPage' value='$this->PageNo'> " . nuTranslation('of') . "$pPages</span>\n";
Hope it helps.

Re: More translation stings

Posted: Thu Aug 23, 2012 8:33 am
by admin
massiws,

OK I'll add them, all but Logged in as, I'm actually removing that altogether.

Steven

Re: More translation stings

Posted: Thu Aug 23, 2012 9:58 am
by zazzium
Steven,
OK I'll add them, all but Logged in as, I'm actually removing that altogether.
I think, the "Logged in as" is quite useful on the developer point of view. (for testing and checking accounts with different rights)

zazzium

Re: More translation stings

Posted: Thu Aug 23, 2012 7:02 pm
by admin
zazzium

I agree, I'm just removing the phrase. The user name will remain in brackets.

I try to make it as uncluttered as possible.

Steven

Re: More translation stings

Posted: Thu Aug 23, 2012 10:01 pm
by zazzium
Steven,
sorry, i misunderstood the phrase "removing that altogether", I assumed that meant removing also the username :)

Re: More translation stings

Posted: Fri Aug 24, 2012 5:24 am
by admin
.