WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: scms locales are not automatically loaded  (Read 5864 times)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: scms locales are not automatically loaded
« Reply #30 on: May 03, 2012, 01:37:39 AM »
Mostly, we don't want the scm to head down the slippery slope of feeling it needs to compete with the tcz in terms of modularity, size, etc, therefore diluting it's main goal of being self contained.  Larger downloads are just part of that concept.
Even before the decison on handling locales was taken, the basic concept of an scm means that the download size of the scm will often exceed the size of a tcz alternative.  It is inherent within the design. Earlier posts seem to refer only to the compressed size of the download.

Upon installation to the file system, the app has to be uncompressed which results in RAM being used.  Increasing the size by incorporating locale files will exacerbate this further.  It may be particulary detrimental on older systems having smaller ammounts of RAM, or those with fixed amounts of RAM.

Might it be possible to accomodate the locale files within the scm while reducing the size used as described below.  The idea is raw and unpolished and meant to outline the concept rather than represent a finished method.

The scm contains three distinct parts:
  • app
  • app-locale
  • loading script

The loading script loads app and app-locale in separate stages:
  • stage1 load app
  • stage2 load app-locale

After stage1 but before stage2, the loading script checks for a marker file or variable which indicates whether to conduct stage2

The marker file or variable might be created by use of a checkbox, or similar means, in the TC scm management GUI


If the above is practical it will:
  • allow the scm to contain locale files
  • allow the user to choose whether to load them
  • enable the system to manage the scm as a single entity


Edit: fix typo
« Last Edit: May 03, 2012, 01:42:11 AM by SamK »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 7996
Re: scms locales are not automatically loaded
« Reply #31 on: May 03, 2012, 02:32:20 AM »
Quote
Upon installation to the file system, the app has to be uncompressed which results in RAM being used.  Increasing the size by incorporating locale files will exacerbate this further.  It may be particulary detrimental on older systems having smaller ammounts of RAM, or those with fixed amounts of RAM.

I'm afraid this is wrong. The only RAM used is the squashfs cache, which is a couple ten kb per mount. It doesn't depend on the size of the squashfs archive.

(regular file cache is of course on top, but that one can be freed if needed; squashfs cache can't.)
The only barriers that can stop you are the ones you create yourself.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1104
  • HandMace informatic works
Re: scms locales are not automatically loaded
« Reply #32 on: May 03, 2012, 02:52:05 AM »
Add dep in locales i think is the simpliest solution and package remain Light.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: scms locales are not automatically loaded
« Reply #33 on: May 03, 2012, 02:52:59 AM »
I'm afraid this is wrong.
My misunderstanding, thanks for the correction. 

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #34 on: May 03, 2012, 04:23:02 AM »
As I am totally unfamiliar with locale use, does having locales in share/locale in each scm even work in providing internationalization of each app without something exported in the app's wrapper in bin/?  I am assuming it does, but thought I would ask for clarification.


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 7996
Re: scms locales are not automatically loaded
« Reply #35 on: May 03, 2012, 04:37:17 AM »
With natively compiled apps, yes. Can't say whether it works with the binary-hacked ones (././).
The only barriers that can stop you are the ones you create yourself.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #36 on: May 03, 2012, 06:14:05 PM »
I added ripperx-locale.tcz to the ripperx.scm extension, and it does work with "LANG=it_IT /apps/bin/ripperX", so the portable apps work with locales as well when the locale data is available and added to the scm extension.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 551
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #37 on: May 03, 2012, 08:18:02 PM »
i downloaded and installed ripperx.scm
but did not find there locale files
but i found the remains of tcz extensions
Quote
/apps/ripperx/local/tce.installed/shared-mime-info
/apps/ripperx/local/tce.installed/gtk2
/apps/ripperx/local/tce.installed/gdk-pixbuf2
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #38 on: May 04, 2012, 02:18:11 AM »
/apps/ripperx/local/share/locale



The other files are small and harmless, I'll deal with them next time I have to edit the extension.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 551
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #39 on: May 04, 2012, 02:52:56 AM »
Quote
tc@box:~$ find /apps/ripperx -name "locale"
tc@box:~$
there is nothing
« Last Edit: May 04, 2012, 02:56:03 AM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #40 on: May 04, 2012, 03:24:15 AM »
I see I tested it but forgot to upload it, will upload it tonight.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #41 on: May 04, 2012, 08:08:45 AM »
Actually, the startup scripts in tce.installed usually need to be run or at least studied to see what needs to be done in initially setting up the extension.  So they are valuable to keep in the scm, as the tcz packages it was made from may get updated and their startup scripts changed, leaving no record of what was done in making the scm or what may have been missed and needs to be done in the case of troubleshooting an issue.  Best then to leave them in, they are small anyway.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 551
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #42 on: May 04, 2012, 08:54:30 AM »
Add dep in locales i think is the simpliest solution and package remain Light.
dear vinnie
i lit up a little improved idea which i have outlined here
which also may be applied to self-contained modules
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 551
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #43 on: May 04, 2012, 09:15:39 AM »
Actually, the startup scripts in tce.installed usually need to be run or at least studied to see what needs to be done in initially setting up the extension.  So they are valuable to keep in the scm, as the tcz packages it was made from may get updated and their startup scripts changed, leaving no record of what was done in making the scm or what may have been missed and needs to be done in the case of troubleshooting an issue.  Best then to leave them in, they are small anyway.
i think need move the contents of these startup scripts to /apps/scm_name/config/install
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 7338
Re: scms locales are not automatically loaded
« Reply #44 on: May 04, 2012, 10:32:43 AM »
That would only be needed if there was a function that needs to be run every time the extension is loaded, which so far is not that case.  But for something that is needed to be run every time the extension is loaded, then yes, the routines would be put in the scm's startup script.