Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

More translation stings

Locked
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

More translation stings

Unread post 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.
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: More translation stings

Unread post by admin »

massiws,

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

Steven
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: More translation stings

Unread post 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
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: More translation stings

Unread post 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
zazzium
Posts: 84
Joined: Mon Jul 04, 2011 12:52 am

Re: More translation stings

Unread post by zazzium »

Steven,
sorry, i misunderstood the phrase "removing that altogether", I assumed that meant removing also the username :)
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: More translation stings

Unread post by admin »

.
Locked