Suggestion for language file handling in CHDK - General Discussion and Assistance - CHDK Forum

Suggestion for language file handling in CHDK

  • 4 Replies
  • 1372 Views
*

Offline philmoz

  • *****
  • 3156
    • Photos
Suggestion for language file handling in CHDK
« on: 08 / April / 2013, 22:52:21 »
Advertisements
Currently CHDK compiles the English language file into the code (and CHDK-DE compiles the German language file).

For English and German users there is almost no overhead to having the language available.

For all other languages the code loads the language text file and converts it to the internal CHDK format at run time. The original English/German text is still present so there is a significant memory overhead to using any other language (~13k - 19K).

An idea I had was to convert all of the text language files to a binary format (as part of the build process) and only load the relevant language at startup (or when the user changed languages). This could be done using the module loading system although a simple binary format would probably suffice.

Advantages of this would be:
- no overhead to using other languages
- reduce the core CHDK code size by removing the code that loads & converts the text files

Disadvantages (that I can think of):
- requires a build environment to update & test language file changes
- no language file strings available until after the language file is loaded (so needs to load before the splash screen)

The problem of requiring a build environment to test an updated language file could be alleviated with a module that could convert a language text file to the binary format directly on the camera.

Any thoughts?

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

Re: Suggestion for language file handling in CHDK
« Reply #1 on: 08 / April / 2013, 23:15:20 »
Curmudgeon alert!

Off the top of my head, does this solve a problem that anyone cares about? 

Sorry - I realize almost nobody but a few of us understand & credit all the module work you have done that means low memory cameras work well.  And all your other core contributions (your sigfinder changes alone gets you a "hall of fame" position forever).

Never mind fixing & cleaning up my patches as required.  :D

I get that. 

And not to beat a dead horse but a conversation about the tsvstar UI suggestions might make more difference to the average user. 

Having said that - anything that make CHDK more efficient with the RAM space it is able to "steal" is a good thing.   Go for it?
« Last Edit: 08 / April / 2013, 23:25:12 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3156
    • Photos
Re: Suggestion for language file handling in CHDK
« Reply #2 on: 08 / April / 2013, 23:25:48 »
Off the top of my head, does this solve a problem that anyone cares about? 

:) probably not; but you never know - that's why I thought I'd throw it out to see what the reaction was.

Quote
And not to beat a dead horse but a conversation about the tsvstar UI suggestions might make more difference to the average user. 

True; but my time is somewhat limited at the moment so I was looking for 'small' things that would have less likelihood of turning into major projects ;)

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

Re: Suggestion for language file handling in CHDK
« Reply #3 on: 08 / April / 2013, 23:39:11 »
True; but my time is somewhat limited at the moment so I was looking for 'small' things that would have less likelihood of turning into major projects ;)
I hear that.

The next four little things on my small things list (now that we can disable half-press shortcuts) are
  • disabling the OSD in <ALT> mode when it's disabled in other modes. Right now it appears unless every icon is turned off individually - annoying when debugging scripts via the script console.
  • allowing selecting a script on the user menu to (optionally) actually launch it  - in addition to just being able to select it as the current script.  This could enable some quick mode change stuff via a script that uses, for example, set_config_value().  Or it could just allow a quick launch of a few critical shooting scripts.
  • a buffered console that refreshes periodically - right now its mostly useless in shooting mode.  And options like "show RAW save time" are pretty much useless when the console window disappears almost immediately
  • figure out how to make the menu refresh "hot spot" better - the focus tracking window on recent cameras make the user menu in shooting mode almost useless again (props for the fix you did for this already)
Hey - you asked  :)
« Last Edit: 09 / April / 2013, 00:16:41 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16


*

Offline msl

  • *****
  • 1269
  • A720 IS, SX220 HS 1.01a
    • CHDK-DE links
Re: Suggestion for language file handling in CHDK
« Reply #4 on: 09 / April / 2013, 13:18:38 »
Any thoughts?

Good idea!

One little issue: I know some users they use their own language file, e.g. with short menu descriptions for big fonts (for bad eyes). The most of them cannot compile their own CHDK version.

@ww: Nice plans. That sounds all well.

msl
CHDK-DE:  CHDK-DE links

 

Related Topics