[Phpmyadmin-devel] phpMyAdmin with gettext

Piotr Przybylski piotr.prz at gmail.com
Sat Mar 13 17:48:38 CET 2010


I meant "unreadable for translators". If you do the escaping
automatic, then I agree, that this is a more bulletproof solution.

2010/3/13 Michael Keck <sfnet at michaelkeck.de>:
> Hi,
>
> perhabs you may be wrong.
> Why is this unreadable?
>
> I need this for jQuery and other JS-Libraries.
> But no body needs to read these Javascript language files, edit or modify.
> These files should be dynamicly sent to the browser, based on php functions
> (made by Michal) and the still available language files (branch gettext).
>
> Other point:
> It does not really help to set proper string encoding appropriate HTTP,
> if an user has wrong encoding setup in his browser. In such a case,
> javascript wouldn't
> work correctly and produces a errors on special chars. With \uXXXX the
> displayed text may be corrupted - but the javascript still works.
>
> Michael
>
>
> Am 13.03.2010 17:27, schrieb Piotr Przybylski:
>> JavaScript files will have a proper string encoding if you send an
>> appropriate HTTP header, no need for making language files unreadable.
>>
>> 2010/3/13 Michael Keck <sfnet at michaelkeck.de>:
>>
>>> Hi Michal,
>>>
>>> I've seen the file /libaries/messages.inc.php. Would this the final
>>> solution?
>>>
>>> If yes, I can use in template engine things like $strXxxXxx, Else if not, I
>>> will write
>>> a filter function for TWIG-templating, but I think it would be overheaded.
>>>
>>> Is it possible for you, to add a switch in your select lang library?
>>> If I need strings in Javascript, that I would be able to include such a
>>> thing like:
>>> <script type="text/javascript"
>>> src="select_lang.php?js=selected_lang"></script>
>>> This should me return javascript compatible strings as an object like
>>> var pmaStringJS = {
>>>     strAbortedClients : 'Aborted',
>>>     /* ... and so on */
>>>     'strZip' : 'zipped'
>>> }
>>> The Problem: UTF8-Strings should be encoded with \uXXXX.
>>> Sample: 'Löschen' will become 'L\u00F6schen'.
>>>
>>> Regards
>>> Michael
>>>
>>> Am 12.03.2010 13:16, schrieb Michal Čihař:
>>>
>>> Hi
>>>
>>> Dne Fri, 12 Mar 2010 12:35:50 +0100
>>> Michael Keck <sfnet at michaelkeck.de> napsal(a):
>>>
>>>
>>>
>>> okay this sounds good.
>>> But one question:
>>> How could / should I access language files with javascript?
>>>
>>>
>>> I think it will be same as with old system - PHP will generate the
>>> messages to use.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>>
>>> _______________________________________________
>>> Phpmyadmin-devel mailing list
>>> Phpmyadmin-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Download Intel® Parallel Studio Eval
>>> Try the new software tools for yourself. Speed compiling, find bugs
>>> proactively, and fine-tune applications for parallel performance.
>>> See why Intel Parallel Studio got high marks during beta.
>>> http://p.sf.net/sfu/intel-sw-dev
>>> _______________________________________________
>>> Phpmyadmin-devel mailing list
>>> Phpmyadmin-devel at lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>>>
>>>
>>>
>>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
>
>




More information about the Developers mailing list