Wiki for group translation

Being active (just a bit :P) on Joomla! Arabic forum I’ve noticed the need for a mechanism that allows for “group” translation of extensions.

I thought about Version control systems (CVS/SVN) but they are not very “user-friendly”, Wikis was another option that offered many needed features like

  • A good degree of user friendliness.
  • Multi-user ready.
  • Revisions.

But I needed a way to automatically import translation files “php files in Joomla!”, so I wrote this solution.
(more…)

parseInt() and leading zeros

I used parseInt() earlier to extract the number from a string coming for an input field, the numbers always had a leading zero, like “09 , 08, 07″ , When I sent these apparently “normal” and “easy-to-convert” values , parseInt() always returned 0! .

I had no doubts about parseInt() I thought it was my code that’s causing this problem, I double checked everything and I finally turned to parseInt() ,Everything seemed to work very well “Before” parseInt() enters.

I check w3schools and found this

If the radix parameter is omitted, JavaScript assumes the following:

* If the string begins with “0x”, the radix is 16 (hexadecimal)
* If the string begins with “0″, the radix is 8 (octal). This feature is deprecated
* If the string begins with any other value, the radix is 10 (decimal)

so if the string begins with “0″ , the radix is automatically assumed to be 8 (octal) but it seems that this feature is still Not deprecated on FF 2.0.0.4 (not sure about IE) .

To fix this I had to force parseInt() to use Decimal numeral system by explicitly specifying the radix (10).

Example:

Update June 9th 2007: I’ve came to discover that this issue is very well known and well documented all over the web , The funny thing is that Microsoft’s Solution is based on “manual” approach “that is using a loop that removes every leading ’0′ by string functions!”, although specifying the radix explicitly would solve the whole situation.

كيف وصل أدولف هتلر الي السلطة “المطلقة”؟

ادولف هنلردار بذهني منذ أيام هذا السؤال , اذ كيف نجح هذا الديكتاتور في الوصول الى السلطة المطلقة في بلد ديموقراطي واين كانت المعارضة و البرلمان من هذا كله , وكيف تخلص من المعارضين بالرغم من أنه لم يكن أكثر من رئيس الحزب النازي “Nationalsozialistische Deutsche Arbeiterpartei” ورئيسا للحكومة بدءا من يناير 1933 ولم يكن قائدا للجيش مثلا.

لكي يصل هتلر الى السلطة المطلقة كانت أمامه عدة عقبات, أحدها هو الحزب الشيوعي الذي كان يشكل القطاع الأكبر من المعارضة, ثانيها هو البرلمان الذي كان لابد للرجوع اليه قبل اتخاذ أي قرار.

لكي يتخلص من البرلمان بصورة “دستورية” كان لابد له من تمرير ما يعرف بالـ “Enabling act” وهو قانون يمنح الحكومة سلطة اتخاذ قرارت و تمرير قوانين دون الرجوع الي البرلمان, ولكن لتمرير هذا القانون كان لابد من الحصول على موافقة ثلثي أعضاء البرلمان الأمر الذي كان مستحيلا مع وجود الحزب الشيوعي, فكان لابد أولا من سحق الحزب الشيوعي.
(more…)