Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08EB3C72C for ; Fri, 13 Apr 2012 19:24:17 +0000 (UTC) Received: (qmail 4439 invoked by uid 500); 13 Apr 2012 19:24:16 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 4412 invoked by uid 500); 13 Apr 2012 19:24:16 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 4404 invoked by uid 99); 13 Apr 2012 19:24:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 19:24:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gibson.becky@gmail.com designates 209.85.161.175 as permitted sender) Received: from [209.85.161.175] (HELO mail-gx0-f175.google.com) (209.85.161.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Apr 2012 19:24:12 +0000 Received: by ggcy3 with SMTP id y3so1886354ggc.6 for ; Fri, 13 Apr 2012 12:23:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kRNr+TlFmWV5hZJrnFGujmElfK2uLoAcYyPVcXusEKc=; b=XyEZCQlOXNyDvLGnqELzt4T7w6Xpj+uN3LRDwG8qMb4rRU/h7DCVeiWgA7jLZAeR7o 1r1a1t6YOB7JzaQpDEkV78Kk7y0CY91fPMKtWlYLVEU8pZvqhpOuEBFmtkYicbLAG0eJ p2GA1oAXAEzmUD7kza6ZuRHfRLJH+cR5FhPvDox+bkQsR3pMPBOUtH571FJ5zUmpEtb/ 6Jb6W1pPyXeR7I4nqR45XcPN6wP9lKZQn8QfvDL8+IfJuW4dcjsFNuYGybkwLvfdb7u5 CsGgAvl2QY6lTz+vjz14Iga3VvcUTslHC2fXqHQkKIEvC8JIvPvX17E0WmAcaXmRpuUV 7P2g== MIME-Version: 1.0 Received: by 10.236.125.234 with SMTP id z70mr2875700yhh.18.1334345031929; Fri, 13 Apr 2012 12:23:51 -0700 (PDT) Received: by 10.147.181.15 with HTTP; Fri, 13 Apr 2012 12:23:51 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Apr 2012 15:23:51 -0400 Message-ID: Subject: Re: [iOS] Factoring out JavaScript code from Objective-C From: Becky Gibson To: callback-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=485b397dd071a2d05804bd946988 X-Virus-Checked: Checked by ClamAV on apache.org --485b397dd071a2d05804bd946988 Content-Type: text/plain; charset=ISO-8859-1 I'm not sure that makes it any easier. Yes, we can check for things like Capital C Cordova, vs lower case c cordova, but it makes the actual coding more disjoint IMHO. Generally the strings are pretty specific to the plugin. And, having them all in a separate file makes it harder to separate out the plugin code. I think what we really need is better testing mechanisms to catch these type of errors. my two cents, -becky On Fri, Apr 13, 2012 at 2:58 PM, Shazron wrote: > We currently have to write out JavaScript from Objective-C, and these > strings can't be checked easily all in one place (note the bugs found > today slated for 1.6.1) > > I'm proposing we either use: > 1. NSLocalizedString [1][2] where the strings are in an external strings > file > 2. an Obj-C templating [3] solution that we need to create, > essentially the same as 1 but with more features, although that's more > complex > 3. Move all the JS strings into an Obj-C file as string constants > > Items 1 and 2 require the .strings file to be in the user's > application potentially (I haven't tested whether loading strings from > the current framework bundle will work) and may be an upgrade > nightmare (and we don't want users to edit them). > Item 3 might be easiest, since it will all be baked-in. > > My preference is 1 (if the framework bundle loading works), then 3. > > > [1] http://www.cocoadev.com/index.pl?NSLocalizedString > [2] http://cocoawithlove.com/2011/04/user-interface-strings-in-cocoa.html > [3] A bit of overkill though, Mustache for Obj-C: > https://github.com/hiddenmemory/Tipi > --485b397dd071a2d05804bd946988--