- Home
- About
- My work
- Photoshop poster design
- Kaun banega crorepati game (kbc2) (download the game)
- Textoo : iPhone (and now Android) app to send free SMS using web gateways
- 3ds max animation
- Multi user avatar chat based flash website for Incident 09
- Video editing / post production / audio mixing
- Joomla real estate component built using ExtJS
- Facebook cricket betting application
- Swishmax projects & Flash website for Incident 08 using Swish
- PHP-Selenium Framework for UI Automation
- PHP based CMS with chat
- Twitter reputation score
- Downloads
- Contact
Java resource bundle modification to identify hardcoded strings
In Java, Internationalization of applications is supported through the ResourceBundle class. The strings which need to be translated are packaged in individual resource bundles and each language will have its own resource bundle which is loaded by the ResourceBundle Class based on the application logic.
I was involved in the modification of the Java ResourceBundle class to make it optionally decorate all the strings coming from any specific resource bundle with certain special characters like {{ or [[ so that it will be possible to visually identify any hard coded strings in the application. My role in this project was to specifically hack the XliffResourceBundle class which decorates the strings from Xliff resource bundle files. The decoration process had to be turned off or on by the user and had to obey certain rules/filters which allows the user to decorate specific strings (exclude any numbers/dates etc).
As all strings which support internationalization typically use the resource bundle class to fetch the translated strings, modifying the class itself at the root level will help one to indentify the ones which are not using this class (and hence hardcoded).
But one might ask “why not write a tool to scan through hardcoded strings using regex”. Yes , you could do this, but there are cases where this method wont be sufficient. The strings could still be following your regex pattern and might not be using the resourcebundle class to fetch the translated strings. Only modifying resource nundle class can provide a foolproof way to identify them.
Why ?
Identifying hardcoded strings is very much necessary for any software application which has to be internationalized. Especially when the software is used all over the world. Typically Arab speaking and Chinese users contribute to a major percentage of profits and they prefer localized versions of the user interface. Localizing the UI after a software has become successful will take minimal effort and the results of such a move are quite astounding.
But usually during inital phases of development, no developer will give much importance to externalizing string and coding in a way that makes localization of each UI easier. The tendency is to concentrate on the functionality of the software and make things work well. The problem comes when the functionality breaks during the localiztion process. Also from the profits point of view, localizing the software becomes important. But to the developer, who feels that putting additional efforts to just make the software work under different locales and obey the rules of different regions in showing the dates/currency and timezone implications , it is something of least interest. They are the developers who just copy past code samples from the internet and never give importance to how things work. Such negligence gives rise to performance issues too. But internationalizing existing programs also become difficult is this is the case.
Incoming search terms:
- blackberry java resourcebundle (3)
- resourcebundle blackberry (2)
- play framework resource bundle (2)
- java resourcebundle modify (2)
- selenium resource bundle (2)
- determine hard coded strings in java classes (2)
- java XLIFF resource-bundle (1)
- online kbc games for class 2nd (1)
- java resourcebundle modify resource (1)
- play framework resource bundles (1)
Textoo Pro ; in the works
about 13 years ago - 1 comment
July 17th 2011 : Textoo Pro now in the apple app store. Download it here : http://textoo.in July 10th 2011 : Textoo v2.0 renamed to Textoo Pro Release of Textoo Pro has been postponed to July 15th 2011 due to app store codesign issues. Here’s a sneak peek into the brand new version of Textoo…
Webcast Recording: Titanium for New Developers
about 13 years ago - 5 comments
Hi all, This is a recording of the webcast on Titanium for New developers ( a high level overview of Titanium architecture), hosted by Kevin Whinnery at Appcelerator Inc. This webcast was broadcast on 5th Jan 2011, 9am PST. Click here to view the webcast Incoming search terms:Titanium for New Developers webcast (7)titanium webcasts (3)titanium…
What’s my twitter reputation score ?
about 13 years ago - 1 comment
Last month, Twitter founder Evan Williams announced during the Web 2.0 summit that Twitter.com internally keeps a record of every users reputation score. This made me wonder how do they calculate each users reputation mathematically. After some thought, I charted out a few parameters based on which they could possibly arrive at a quantitative measure…
Chat with me
about 13 years ago - 85 comments
I am Available mostly between 11 am to 6 pm (GMT + 5.30). If I appear offline, just drop in a mail. I will respond to it ASAP. Incoming search terms:kiran kumar karne (3)contact kiran kumar (3)160by2 (2)www the kiran kumar com (2)kiran kumar u (2)yhsm-inucbr_001 (2)freesms8 cannot edit contact (1)play online falsh gamescrorepati (1)sardughar…
27th Oct – Appcelerator Titanium Webinar Recording , questions and answers
about 13 years ago - 4 comments
Recording Watch the webcast recording for the Q&A session here Q&A Transcript These are the questions and answers which were posted during the Titanium webinar which took place on 27th Oct 2010 Q: Will Blackberry still be windows only? A: it’ll be mac when RIM adds a Mac simulator Audience Question Q: Does Titanium support…
Titanium Mobile vs Sencha Touch
about 13 years ago - 9 comments
I just tried out the sencha touch examples on the android 1.6 simulator and the performance is pathetic. Seems like google forgot to properly implement their javascript V8 engine onto their OS. Appcelerator’s Titanium Mobile and Sencha touch are 2 different frameworks which address a totally different set of audiences. Comparing them is like comparing…
PHP-Selenium Framework for UI Automation
about 13 years ago - 2 comments
Developed a Wrapper for PHPUnit for Selenium to add features like XLIFF 2 way integration, HTML Report generation, data driven testing using XML data banks, screenshot capture on errors etc.
Kaun banega crorepati game (kbc2) (download the game)
about 13 years ago - 300 comments
Update as of 5th June 2011 : Source code for the game has been published on this page. Now you can change the game as you wish, using Swishmax (www.swishzone.com) Update as of 20th Dec 2010 : I have been noticing quite a lot of visitors reaching this page through google search. So drop in…
3ds max animation
about 13 years ago - 4 comments
Playiing with reflection & refraction materials combined with smoke and particles became my new way to pass time. With help from the ’3dsmax 6 Bible’, I learnt a few basics. Here are some of the videos I rendered:
Textoo : iPhone (and now Android) app to send free SMS using web gateways
about 13 years ago - 4 comments
Textoo, the first iPhone/Android app I made to send free SMS to India using web gateways. Made using Titanium SDK and PHP on server side. More info at http://textoo.in
about 10 years ago
Hi,
It is great work you did!
Where can you get the XliffResourceBundle class? Which package is this class?
Thanks,
Stuart