Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-10 Thread Konstantin Maslyuk
 On 10/03/2011, at 7:19 AM, Nic wrote:

 I've been considering how to speed up the loading of the locales,
 and I have already made several optimisations to SWORD for use on
 iOS devices (which is all in the mercurial repo on bitbucket). 
 Hopefully I'll have time to do some more of these so I can
 (hopefully, eventually) use the full set of UTF8 locales in PocketSword at 
 the same time.  :)

Great, i would like to look at your work.

Also  i  found  another  performance  issue. Its related to BibleTime.
SWModule::setPosition   for   modules  with  one  testament  only  and
skipConsecutiveLinks(true)  takes  too  long, because it is increments
thought  whole  module.  It  is  better  to  cache  data  about absent
books/testament in module config.


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-10 Thread Nic Carter
Do you mind doing your own diff?
https://bitbucket.org/niccarter/pocketsword/src/8b59fc9eed79/externals/sword/
Just clone the repo and diff the externals/sword folder and you should see 
changes related to startup times. Ignore the changes in the filters, as they 
only affect display  not speed.

That BibleTime tweak sounds specific to BibleTime - I know I made a handful of 
those changes when pulling the Obj-C SWORD wrappers across to use with 
PocketSword (which I forgot to submit upstream cause they made no diffence, 
speed-wise, on a desktop  it was only on a handheld that you noticed the 
improvements - but, still, I really need to sit down and figure out my changes 
to submit to Manfred!)...

Let me know if you have any questions about the PS tweaks :)


Thanks, ybic
nic... :)

On 10/03/2011, at 19:42, Konstantin Maslyuk kale...@mail.ru wrote:

 On 10/03/2011, at 7:19 AM, Nic wrote:
 
 I've been considering how to speed up the loading of the locales,
 and I have already made several optimisations to SWORD for use on
 iOS devices (which is all in the mercurial repo on bitbucket). 
 Hopefully I'll have time to do some more of these so I can
 (hopefully, eventually) use the full set of UTF8 locales in PocketSword at 
 the same time.  :)
 
 Great, i would like to look at your work.
 
 Also  i  found  another  performance  issue. Its related to BibleTime.
 SWModule::setPosition   for   modules  with  one  testament  only  and
 skipConsecutiveLinks(true)  takes  too  long, because it is increments
 thought  whole  module.  It  is  better  to  cache  data  about absent
 books/testament in module config.
 
 
 ___
 sword-devel mailing list: sword-devel@crosswire.org
 http://www.crosswire.org/mailman/listinfo/sword-devel
 Instructions to unsubscribe/change your settings at above page

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-09 Thread Nic Carter

Just wanted to add to this (yes, I know this is over a week old - I'm about 
that far behind with email atm):

PocketSword does a check on launch for what locale the device is set to.  It 
will then find that SWORD locale and will copy that (and only that) locale to 
the correct locales.d folder so as to keep app launch time low.  I find that 
PocketSword also takes a fair bit longer to start with all the available 
locales in the locales.d folder.  We have to do a new check at each subsequent 
app launch, as the user can change their device locale between launches 
(switching the device locale will automatically force-quit all open apps, I 
have found, which is handy for me)...  :)

I've been considering how to speed up the loading of the locales, and I have 
already made several optimisations to SWORD for use on iOS devices (which is 
all in the mercurial repo on bitbucket).  Hopefully I'll have time to do some 
more of these so I can (hopefully, eventually) use the full set of UTF8 locales 
in PocketSword at the same time.  :)


Thanks, ybic
nic...  :)



Nic Carter
PocketSword Developer - an iPhone Bible Study app
www: http://crosswire.org/pocketsword
iTunes: http://itunes.apple.com/app/Pocketsword/id341046078
Twitter: http://twitter.com/pocketsword

On 01/03/2011, at 8:44 PM, Konstantin Maslyuk wrote:

 Since  SlideBible  has problems with locales too, it takes too long to
 load  all  locales,  normally  application  starts in 4 secs, with all
 locales  -  60  secs.  I  think  it is able to change locale selection
 mechanism to load new locales on demand.
 
 Also   if   frontend   will   decide  when  to  update  locales,  like
 InstallMgr::updateLocales(),  it would be ok, but updated locales will
 be  available  after  restart.  Otherwise  system  localemgr should be
 replaced at runtime and i do not know what it would involve.
 
 I would make it, if it would help anyone.
 
 
 ___
 sword-devel mailing list: sword-devel@crosswire.org
 http://www.crosswire.org/mailman/listinfo/sword-devel
 Instructions to unsubscribe/change your settings at above page


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-02 Thread David Haslam
Thanks for all the responses received so far.

It would seem that I have identified a real need, one that could be
translated [pun] into a set of specified user requirements for the install
managers and the various front-ends, as well as how we host front-end
localizations for each application.

May God bless each of you in your thinking and wisdom as you go about
starting to tackle these things.

How this works out under the constraints from Apple for iOS is something I
can safely leave to Nic [and his co-workers??]. Maybe it requires some
outside the box lateral thinking to overcome those obstacles.

Davod

--
View this message in context: 
http://sword-dev.350566.n4.nabble.com/Installing-new-updated-locales-like-we-do-for-modules-tp3329105p3331272.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-02 Thread Peter von Kaehne

 Von: Jonathan Morgan jonmmor...@gmail.com
 On Wed, Mar 2, 2011 at 10:25 AM, Peter von Kaehne ref...@gmx.net wrote:
  It is a reasonably common thing that we add a locale to sword, but the
  releases are not that frequent. If we get a new Bible text which
  includes cross references, obtaining/creating a sword locale is usually
  a must to get the cross references to work.
 
 
 I'm not sure that I understand this.  Do you mean that we need the locales
 to *create* the module (e.g. detect localised cross references in the
 original source), or that we need the locales to *display *the module (I
 would have thought any OSIS modules would use OSIS refs rather than
 localised references, and so would work OK), or that users of that text
 would want to type in references in that locale (or something else?)

Sorry, yes I was a bit wooly in my last post.

1) The correct locale is required to create a module with references
2) For normal use the locale is not needed per se - but
3) For searching for references in the user's locale the correct locale might 
be required.
-- 
NEU: FreePhone - kostenlos mobil telefonieren und surfen!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-02 Thread Martin Denham
From an Android perspective this would be tricky because the Android
framework specifies that locale specific directories are integrated in a
specific structure within each Android application and Android App Market
also analyses the application structure to highlight which languages an app
has been localised for.

Applying and distributing localisations has not been an issue so far for And
Bible partly because there are releases every month or two but also,
possibly, because a pre-release notification seems to prompt translators to
update or contribute translations.

Regards
Martin

On 2 March 2011 10:20, Peter von Kaehne ref...@gmx.net wrote:


  Von: Jonathan Morgan jonmmor...@gmail.com
  On Wed, Mar 2, 2011 at 10:25 AM, Peter von Kaehne ref...@gmx.net
 wrote:
   It is a reasonably common thing that we add a locale to sword, but the
   releases are not that frequent. If we get a new Bible text which
   includes cross references, obtaining/creating a sword locale is usually
   a must to get the cross references to work.
  
 
  I'm not sure that I understand this.  Do you mean that we need the
 locales
  to *create* the module (e.g. detect localised cross references in the
  original source), or that we need the locales to *display *the module (I
  would have thought any OSIS modules would use OSIS refs rather than
  localised references, and so would work OK), or that users of that text
  would want to type in references in that locale (or something else?)

 Sorry, yes I was a bit wooly in my last post.

 1) The correct locale is required to create a module with references
 2) For normal use the locale is not needed per se - but
 3) For searching for references in the user's locale the correct locale
 might be required.
 --
 NEU: FreePhone - kostenlos mobil telefonieren und surfen!
 Jetzt informieren: http://www.gmx.net/de/go/freephone

 ___
 sword-devel mailing list: sword-devel@crosswire.org
 http://www.crosswire.org/mailman/listinfo/sword-devel
 Instructions to unsubscribe/change your settings at above page

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-01 Thread David Haslam
The iPhone can support the schwa characters Əə, so there should be no barrier
to Apple for making an iOS localization for Azerbaijani.
Just time and coffee, plus suitable contacts who speak the language and can
understand the context for each item.

Meanwhile, with the help of my contacts, Nic and I could have the
PocketSword localization prepared in the wings, so to speak.

David

-- 
View this message in context: 
http://sword-dev.350566.n4.nabble.com/Installing-new-updated-locales-like-we-do-for-modules-tp3329105p3330569.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-01 Thread Konstantin Maslyuk
Since  SlideBible  has problems with locales too, it takes too long to
load  all  locales,  normally  application  starts in 4 secs, with all
locales  -  60  secs.  I  think  it is able to change locale selection
mechanism to load new locales on demand.

Also   if   frontend   will   decide  when  to  update  locales,  like
InstallMgr::updateLocales(),  it would be ok, but updated locales will
be  available  after  restart.  Otherwise  system  localemgr should be
replaced at runtime and i do not know what it would involve.

I would make it, if it would help anyone.


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-01 Thread Peter von Kaehne
On Tue, 2011-03-01 at 14:30 +1100, Nic Carter wrote: 
 
 On 01/03/2011, at 12:23 PM, David Haslam wrote:

  For anyone with a slow connection, this would save time considerably, since
  the files containing the localization strings must be a lot smaller than the
  download for the whole front-end.
 
 yup, for the names of the books of the Bible, this would simply be text files 
 [..]

I think this would be useful for two reasons

It is a reasonably common thing that we add a locale to sword, but the
releases are not that frequent. If we get a new Bible text which
includes cross references, obtaining/creating a sword locale is usually
a must to get the cross references to work. 

So, it would be nice to be able to load them like modules. On the other
side, my understanding is that every time a SWMgr is created the whole
bunch of existing locales is read, which can be a bit of a slow process.
At least when I called vs2osisref multiple (thousands of) times in a
shell script to fix references in an OSIS text I could speed up my shell
script considerably by removing installed locales down to the one I
needed - from running 2 hrs down to 10 mins. 

Using the bindings and creating only one SWMgr made the whole problem
for my purposes academic, but I gather that proper frontends still have
a multiplicity of instances created and running at any given time?

So, if locales were given module status, for downlod via module
manager, we could 

a) add them without waiting for a new release
b) potentially (dependent on if my understanding is right) significantly
speed up start up of frontend by only installing the locales actually
wanted/needed by the user.

Peter




___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-01 Thread Peter von Kaehne
On Tue, 2011-03-01 at 14:30 +1100, Nic Carter wrote: 
 
 On 01/03/2011, at 12:23 PM, David Haslam wrote:

  For anyone with a slow connection, this would save time considerably, since
  the files containing the localization strings must be a lot smaller than the
  download for the whole front-end.
 
 yup, for the names of the books of the Bible, this would simply be text files 
 [..]

I think this would be useful for two reasons

It is a reasonably common thing that we add a locale to sword, but the
releases are not that frequent. If we get a new Bible text which
includes cross references, obtaining/creating a sword locale is usually
a must to get the cross references to work. 

So, it would be nice to be able to load them like modules. On the other
side, my understanding is that every time a SWMgr is created the whole
bunch of existing locales is read, which can be a bit of a slow process.
At least when I called vs2osisref multiple (thousands of) times in a
shell script to fix references in an OSIS text I could speed up my shell
script considerably by removing installed locales down to the one I
needed - from running 2 hrs down to 10 mins. 

Using the bindings and creating only one SWMgr made the whole problem
for my purposes academic, but I gather that proper frontends still have
a multiplicity of instances created and running at any given time?

So, if locales were given module status, for downlod via module
manager, we could 

a) add them without waiting for a new release
b) potentially (dependent on if my understanding is right) significantly
speed up start up of frontend by only installing the locales actually
wanted/needed by the user.

Peter



___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-03-01 Thread Jonathan Morgan
Hi Peter,

On Wed, Mar 2, 2011 at 10:25 AM, Peter von Kaehne ref...@gmx.net wrote:

 On Tue, 2011-03-01 at 14:30 +1100, Nic Carter wrote:
 
  On 01/03/2011, at 12:23 PM, David Haslam wrote:

   For anyone with a slow connection, this would save time considerably,
 since
   the files containing the localization strings must be a lot smaller
 than the
   download for the whole front-end.
 
  yup, for the names of the books of the Bible, this would simply be text
 files [..]

 I think this would be useful for two reasons

 It is a reasonably common thing that we add a locale to sword, but the
 releases are not that frequent. If we get a new Bible text which
 includes cross references, obtaining/creating a sword locale is usually
 a must to get the cross references to work.


I'm not sure that I understand this.  Do you mean that we need the locales
to *create* the module (e.g. detect localised cross references in the
original source), or that we need the locales to *display *the module (I
would have thought any OSIS modules would use OSIS refs rather than
localised references, and so would work OK), or that users of that text
would want to type in references in that locale (or something else?)

Jon
___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

[sword-devel] Installing new/updated locales like we do for modules?

2011-02-28 Thread David Haslam
Suggestion:

For mobile front-ends like PocketSword or and-bible, it seems a pity that
the whole application needs to be downloaded after a new or updated locale
has been provided. For improved speed, might it not make better sense that
when this is the only software change, we could treat the installation of
new/updated locales like we do for modules?

For anyone with a slow connection, this would save time considerably, since
the files containing the localization strings must be a lot smaller than the
download for the whole front-end.

btw. This thought came to me when I observed that PocketSword does not yet
have a localization for Azerbaijani. I have contacts who could help with the
UI translations for this language. It was a delight to be with one during
the past few days.

If my suggestion is deemed attractive for mobile front-ends, then maybe it
could be adopted more universally for all front-ends.

David







-- 
View this message in context: 
http://sword-dev.350566.n4.nabble.com/Installing-new-updated-locales-like-we-do-for-modules-tp3329105p3329105.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Installing new/updated locales like we do for modules?

2011-02-28 Thread Nic Carter

Hi David,

Interesting thoughts:

On 01/03/2011, at 12:23 PM, David Haslam wrote:

 Suggestion:
 For mobile front-ends like PocketSword or and-bible, it seems a pity that
 the whole application needs to be downloaded after a new or updated locale
 has been provided. For improved speed, might it not make better sense that
 when this is the only software change, we could treat the installation of
 new/updated locales like we do for modules?

I agree, but there are 2 locales that PocketSword (and I assume other 
front-ends) use:  The books of the Bible (the translations of which are part of 
the SWORD svn) and the rest of the front-end (which is specific to each and 
every front-end, given they are all different).
Perhaps there could be a part of the SWORD API that can be used to retrieve the 
latest set of locales from the SWORD svn?  I can see no issues with this, and 
that would actually be pretty cool.  

 For anyone with a slow connection, this would save time considerably, since
 the files containing the localization strings must be a lot smaller than the
 download for the whole front-end.

yup, for the names of the books of the Bible, this would simply be text files 
(and for many front-ends, this would simply be a set of text files).  :)

 btw. This thought came to me when I observed that PocketSword does not yet
 have a localization for Azerbaijani. I have contacts who could help with the
 UI translations for this language. It was a delight to be with one during
 the past few days.

Wow, you meet loads of fun people from all over the place :)
While I love your idea (as my comments above have said), there is a technical 
hurdle with PocketSword and the iOS App Store in that I cannot update the 
OS-specific localisations without updating the entire PocketSword binary.  
Hence I will only update the localisations when I submit a PS update.
Also, Azerbaijani isn't one of the currently supported iOS languages, so in 
order to create a localised UI for PS in Azerbaijani, we would need to create a 
new app that only is in Azerbaijani.  :)

 If my suggestion is deemed attractive for mobile front-ends, then maybe it
 could be adopted more universally for all front-ends.

I can't comment on this bit, but it all sounds fun and interesting.  :)

Thanks!  ybic
nic...  :)


Nic Carter
PocketSword Developer - an iPhone Bible Study app
www: http://crosswire.org/pocketsword
iTunes: http://itunes.apple.com/app/Pocketsword/id341046078
Twitter: http://twitter.com/pocketsword


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page