Jump to content
The Uniform Server Community

*UNOFFICIAL* AdminPanel_language_upgrade_DLI_(Dynamic_Language_Interface)


BananaAcid
 Share

Recommended Posts

Duplicate of thread Developer\Translators\Language system upgrade to attract more readers for discussion and testing

 

 

added and upgraded a lot of stuff...

 

just need some1 to test it out.... in case any1 is at least reading this post after all...

 

it does patch the admin panel, the apanel/cgi-bin/... cgi files get replaced with the same ones but with marked what to translate.

 

english translation is complete, german is close, all others work, but will have english strings at not yet translated text sections.

 

i am asking every 1 to test it at a seperate installation. or backup you apanels www folder.

just to make sure nothing happens to your original apanel-www installation in case something goes wrong.

 

how to get it working?

overwrite the files at your server, log into your apanel, start "start_patcher.php" by typing it into your address bar after any apanel stuff.

IT DOES NOT MODIFY ANYTHING OUTSIDE THE WWW APANEL FOLDER!

 

what does it do?   Upgrade of the current language integration.
~~~~~~~~~~~~~~~~~~
				DYNAMIC LOADING OF LANGUAGE FILES + FALLBACK:
				it dynamically selects the users language file if available or falls back to english. if none is
				found, show the string to be translated and mark it.
				Manual selection of language is possible, too. will fall back to english if none is available.
				
				CHANGES @ LANGUAGE FILES:
				just needs the same language files as before, with the $US = array... replaced to $lang = array...
				and an additional key "ISO" => "ISO-..." (for html files to include or other specific stuff),
				with a .inc.php extention. (en-uk.inc.php or a general en.inc.php, ...)
				
				any plugin can have a subfolder lang/ with its own lang array.
				
				ENFORCEING A LANGUAGE:
				any aPanel should pass on the "?langID" param to any other page it calls.
				?langID (e.g. /?en)  param will force the language to a specific one, error fallback to english.
				
				TRANSLATION HELPER:
				sendnsave is coded by me to help translating a page. just code it the usual way, then go through it,
				mark each sentence to translate and press ctrl+D. sendnsave will add it to 2 files. one will have
				the sentence to translate allready as value, while the other is a "barebone" file (empty vals).
				more at sendnsaves readme.
				
				CGI TRANSLATION:
				udrive\home\admin\www\cgi-bin\includes\lang\en is moved to ..\ and all text strings are changed
				to [[string]] and will be processed by perlproxy.php on the fly and be translated with language
				strings from the default language files of the admin panel.
				now, instead of calling the .cgis directly, replace the cginame with
				perlproxy.php/cgitocall.cgi?langID
				"?langID" is optional as it is for the rest of the aPanel. all the rest is taken care of.

Link to comment
Share on other sites

 Version 0.0.1 Change: Initial Release - languages.inc.php, start_patcher.php and other DLI basic needed stuff
		 .2 Change: added german translation.
		 .3 Change: added more translations and cgiproxy with extended language files incorporating the cgi strings.
		 .4 Change: fixed translation str for u2w.cgi + full german language support, few other translation strs
					 fixed, another duplicate removed, lang/ crap files removed

Link to comment
Share on other sites

 
.5 Change: fixed patcher RegEx and typo in cgi paths and striped debug code from perlproxy, header.pm
		 (removed the context type, since php parses it and does it itself. php would interpret it as text.)

.5b Change: fixes all over the place. including plugin language files from includes/lang folder
		 
.6 (will need to implement enforcing a language. auto choosing works since 0.0.5)

 

Full, working release. Try it. (German and English). if english is displayed, it works, but your desktop setted language doesnt (unless its english anyways).

Otherwise a few other language files are included, but without cgi translations. check out the admin lang include folder for a readme.

 

download.

 

Translators help

Plugin makers help

 

 

btw:

for the previous translations: copy and paste the cgi translations strings into the new langfile to have full translations (just needs someone to do the copy-paste work)

Link to comment
Share on other sites

 
		 RELEASE CANDIDATES
		 .6 Change: added enforcing a language by clicking on its language name.
					added header (2xheader.php) sending for characterset, since the current implementation didn't work.
					added header (2xheader.php) cache disabler, since the page shows old fields on page reload in new
					 browsers - dangerous for password stuff cuz of browser caching (makes hungerian and other non
					 ISO-8859-1 languages work).
					added header (2xheader.php) xml:lang="" to use the fitting language id.
					removed index.php part that was writing to .lang - empty .lang = automatic language choosing.

 

go and download :unsure:

 

YAY, im so good, nananana, so good, so gooood.... :) i am proud of myself. it seems to be stable und easily useable. EXTENDING the previous introduced basic stuff. time to get more users.

 

go and translate ppl! (see the previous post)

Link to comment
Share on other sites

Hi,

 

since there is nothing from the official side about this patch (like a roadmap or planing how to support languages), there is nothing really that needs to be changed.

 

I would love to see languagefiles beeing completed (as mentioned above) to be helpful.

 

This patch doesn't (and shouldn't -> perlscripts) break any plugins.

 

Those non-standard plugins (not from the uniserver package) are not translated. They will show up as usual. if the US array is used, you can use the patch on it to have it translated. or use sendnsave. just needs a translation string array. you might just be doing it with the help of the notes file (see above).

 

Translation instructions are clear, i wont code the translation tool by now, since there is no feedback yet...

 

YOUR feedback is welcome! ANYTHING would be helpful...

 

BananaAcid.

Link to comment
Share on other sites

  • 2 weeks later...

			 .7 RC1   : added cgi translation ! uses the common language files  /apanel/www/includes/lang/*.inc.php
					if cgi is called myfile.cgi -> additional translation files (plugin style)
					 /apanel/www/includes/lang/myfile.en.inc.php will be used too, if available
					see Info for plugin makers.

 

all will be translated and all working, it seems. still need testers.

Link to comment
Share on other sites

Download site - Site black-background makes it difficult to read! Anyway.

Downloaded - src (v0.0.7 - 25. April 09) RC1 (cgi translation support working).7z

Extracted files:

Extracted clean copy of US

Overlaid matching folders – Note: Self-extraction archive would be easier - Just that I am lazy.

Started servers and Apanel - following errors and warnings displayed:

 

Taken from initial displayed main page (similar messages for left menu)

Warning: include(Z:/home/admin/www/includes/lang/.php) [function.include]: failed to open stream: No such file or directory in Z:\home\admin\www\start.php on line 13

 

Warning: include() [function.include]: Failed opening 'Z:/home/admin/www/includes/lang/.php' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear;/home/admin/www/plugins/pear/PEAR') in Z:\home\admin\www\start.php on line 13

 

Warning: Cannot modify header information - headers already sent by (output started at Z:\home\admin\www\start.php:13) in Z:\home\admin\www\includes\header.php on line 14

 

Log files show (excerpt):

[sat Apr 25 19:22:37 2009] [error] [client 127.0.0.1] PHP Warning: include(Z:/home/admin/www/includes/lang/.php) [function.include]: failed to open stream: No such file or directory in Z:\\home\\admin\\www\\navigation.php on line 13, referer: http://localhost/apanel/

[sat Apr 25 19:22:37 2009] [error] [client 127.0.0.1] PHP Warning: include() [function.include]: Failed opening 'Z:/home/admin/www/includes/lang/.php' for inclusion (include_path='.;/usr/local/PHP/includes;/usr/local/PHP/pear;/home/admin/www/plugins/pear/PEAR') in Z:\\home\\admin\\www\\navigation.php on line 13, referer: http://localhost/apanel/

 

Languages (Left menu):

Clicked English link: Apanel restored, above warnings and errors no longer displayed.

Stopped servers - cleaned browser cache - restarted servers and Apanel - Above warning and errors not reproducible (Hence problem is an initial start issue on clean installs).

 

However when tested these links failed:

German (Germany) French (France) Hungarian Swedish - with the above warnings

 

Running in English mode does not appear to break Apanel.

 

I will wait for the next release before doing further tests.

 

All the best

Ric :D

Link to comment
Share on other sites

ok am at it. installed a 3rd server ... for testing this stuff... (first is apollo, second is mona, third is mona testbed...) others are Teamspeak, Mumble, Counter-Strike:Source, slimftpd, conferencing media straming server, ...

 

:-D well my server didn't complain yet. multiple core cpus rule! thinking back, this wouldnt have been possible several years ago without the loss of performance...

 

 

EDIT: sorted it all out. should work now.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 13 years later...

ok am at it. installed a 3rd server ... for testing this stuff... (first is apollo, second is mona, third is mona testbed...) others are Teamspeak, Mumble, Counter-Strike:Source, slimftpd, conferencing media straming server

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...