Jump to content


Photo

*UNOFFICIAL* AdminPanel_language_upgrade_DLI_(Dynamic_Language_Interface)


  • Please log in to reply
12 replies to this topic

#1 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 05 April 2009 - 10:55 PM

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!


download

details on the matter

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.


#2 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 06 April 2009 - 08:25 AM


  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



#3 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 08 April 2009 - 07:25 AM

.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)

#4 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 08 April 2009 - 07:52 PM

			 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)


#5 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 09 April 2009 - 11:23 AM

SCREENSHOTS

screenshot.start_patcher.v1.png
Posted Image


screenshot.DLI_usage.png
Posted Image


screenshot.DLI_working_de.png
Posted Image


screenshot.DLI_working_de_langselect.png
Posted Image


screenshot.DLI_working_hu_---undefLangEntry.png
Posted Image


screenshot.DLI_working_sv---undefLangEntry(old_lang_files).png
Posted Image


screenshot.DLI_working_sv---cgi-called-but-missing-LangEntrries.png
Posted Image


screenshot.DLI_working_de---cgi_security_warning.png
Posted Image


screenshot.DLI_working_de---cgi_cert---key_gen.png
Posted Image

#6 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 14 April 2009 - 06:07 PM

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.

#7 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 25 April 2009 - 09:23 AM

.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.

#8 Ric

Ric

    Project Manager

  • Admin
  • PipPipPipPipPip
  • 1,535 posts
  • Gender:Male
  • Location:Cambridge,UK
  • Interests:Electronics
    Internet in general
    Open source projects
  • SourceForge IDmpgcan
  • Wiki ID: Ric
  • Main OS: Windows XP

Posted 25 April 2009 - 05:02 PM

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) [<a href='function.include'>function.include</a>]: 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() [<a href='function.include'>function.include</a>]: 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

#9 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 26 April 2009 - 05:51 PM

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.

#10 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 16 May 2009 - 02:53 PM

get the WebInstaller . new DLI version out.

#11 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 20 May 2009 - 12:40 PM

the WebInstaller can download and install DLI, AVC, BADmin

#12 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 22 May 2009 - 11:06 PM

see BADmin Panel (Admin Panel Replacement) for more admin "comfort"...

#13 BananaAcid

BananaAcid

    Beta Team Member

  • Beta Tester
  • PipPip
  • 142 posts
  • Main OS: Windows XP

Posted 12 July 2009 - 07:57 PM

Forum post & download of the WebInstaller




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users