mattheworiordan / json.i18n-for-Titanium-Mobile

Localization library for Titanium Mobile using JSON
32 stars 7 forks source link

String.format is undefined on BlackBerry #3

Open stevelacey opened 13 years ago

stevelacey commented 13 years ago

Meaning getFormattedString fails, I hacked this fixed with:

    } else if (Ti.Platform.osname == 'blackberry') {
        // BlackBerry doesn't have String.format, fix better when necessary
        return val.replace('%s', arguments[1]);
    }

Obviously, this only works because my usage is basic (only ever one param passed). This should probably be polyfilled if you can find a reliable source for the method.

mattheworiordan commented 13 years ago

Thanks Steve, I'll integrate and push (unless you want to create a pull request?).

BTW. Did you say that Blackberry support is now discontinued altogether?

stevelacey commented 13 years ago

I don't have a proper solution, I just hacked it fixed so that I can get off BB dev and onto something interesting.

RE Appcelerator:

I get the impression that there won't be another release of the Ti BB SDK and that they won't be supporting >6.x. I don't think they're working on it at all.

I think they want to encourage use of their HTML5 (Mobile Web) SDK for future BB dev.

Steve

Sent from my iPhone

On 19 Oct 2011, at 10:28, Matthew O'Riordan reply@reply.github.com wrote:

Thanks Steve, I'll integrate and push (unless you want to create a pull request?).

BTW. Did you say that Blackberry support is now discontinued altogether?

Reply to this email directly or view it on GitHub: https://github.com/mattheworiordan/json.i18n-for-Titanium-Mobile/issues/3#issuecomment-2453705

mattheworiordan commented 13 years ago

Hi Steve

Apologies for taking so long, but I think I've just pushed up a decent solution to the problem.

Would you mind confirming if it works on Blackberry as I can't test that.

Matt

mattheworiordan commented 13 years ago

Here's the commit btw. https://github.com/mattheworiordan/json.i18n-for-Titanium-Mobile/commit/16e4a1b5103bc7942470cd7bfb0ab27fb3dc0c42