WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
scms locales are not automatically loaded
« on: April 30, 2012, 10:27:52 AM »
I load gimp2-basic but gimp2-basic-locale
dCore user

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: scms locales are not automatically loaded
« Reply #1 on: April 30, 2012, 10:31:56 AM »
By defintion of scm there are no dependencies.
If you need the locale too then install/mount it.
10+ Years Contributing to Linux Open Source Projects.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #2 on: April 30, 2012, 12:01:32 PM »
is there any logic or need for separating locales
if it is self-contained modules?
this is logical if needed goal to reduce of scm size
but then need to load two pieces as a single composite module
in order to avoid losing logic of self-contained modules
this is not question and not assertion
it's just a thought out loud
« Last Edit: April 30, 2012, 03:04:52 PM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: scms locales are not automatically loaded
« Reply #3 on: April 30, 2012, 12:51:01 PM »
By defintion of scm there are no dependencies.
this is not true,  for example audacious-gtk2.scm dipends on gtk2.scm
dCore user

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: scms locales are not automatically loaded
« Reply #4 on: April 30, 2012, 04:21:40 PM »
We all know that is the one exception. We would not have it any other way. This has been discussed many times.
10+ Years Contributing to Linux Open Source Projects.

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: scms locales are not automatically loaded
« Reply #5 on: April 30, 2012, 05:11:16 PM »
I think we could do the same way of TCZ, the locales.scm may depend on the program.scm, basically there are not other reasons for loading locales more than translating software in use, or not?

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: scms locales are not automatically loaded
« Reply #6 on: April 30, 2012, 05:17:29 PM »
As for the -locale part of the extension, they are used by few.  So some of the larger ones have been separated as to not punish the many with a larger download, and they are very easy to locate and load, no real need for adding them to dep files really.

I think a reasonable criteria is that if a locale pack is around 5mb compressed, and is over half the size of the main extension, then it makes sense to keep it separate.  Otherwise it can just be included.

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #7 on: April 30, 2012, 06:24:06 PM »
I think we could do the same way of TCZ, the locales.scm may depend on the program.scm, basically there are not other reasons for loading locales more than translating software in use, or not?
make tcz extensions are dependent from their locale was not very successful solution
this brings certain restrictions when removing extensions and those deps which are also dependent from locales
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: scms locales are not automatically loaded
« Reply #8 on: April 30, 2012, 06:25:12 PM »
I have explained bad, I think it is right to separate locales, because doing so there are no contraindications.
However, if I need only load the application simply I does not load the translation, but if I need translated all I need to load only its locales with the right dependencies.

O.T. for the future you have any idea how to unify scm with the ondemand?

P.s. @ abnormis, hey man! I mean the locales dependent from the program not the program dependent from the locales! es:
scm-load -i program.scm charge only program
scm-load -i locales.scm charge program and locales
« Last Edit: April 30, 2012, 06:28:55 PM by vinnie »

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #9 on: April 30, 2012, 06:45:06 PM »
P.s. @ abnormis, hey man! I mean the locales dependent from the program not the program dependent from the locales! es:
scm-load -i program.scm charge only program
scm-load -i locales.scm charge program and locales
dear vinnie
just that i meant that it is not a successful solution
if change this then must in such way as it is implemented in tce-load by checking lang bootcode during extensions load
O.T. for the future you have any idea how to unify scm with the ondemand?
are you mean this topic?
« Last Edit: April 30, 2012, 07:00:54 PM by AbNoRMiS »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: scms locales are not automatically loaded
« Reply #10 on: May 01, 2012, 12:52:56 PM »
Yes :P

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #11 on: May 01, 2012, 04:59:00 PM »
it seems that is not enough to have an idea
necessary to have a ready-to-use solution ;)
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline vinnie

  • Hero Member
  • *****
  • Posts: 1187
  • HandMace informatic works
Re: scms locales are not automatically loaded
« Reply #12 on: May 01, 2012, 07:17:01 PM »
I think that scm should still be well digested by comunity,
I do not even frame well the situation, so I prefer to listen in silence  ;)
« Last Edit: May 01, 2012, 07:20:12 PM by vinnie »

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #13 on: May 01, 2012, 08:03:28 PM »
if option useless then it will be documented
if option is useful then it will be improved :D
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)

Offline AbNoRMiS

  • Hero Member
  • *****
  • Posts: 550
  • nothing can be impeccable in this imperfect world
    • @ß№®M!$
Re: scms locales are not automatically loaded
« Reply #14 on: May 02, 2012, 12:44:08 AM »
propose to consider and testing changes in the script /usr/bin/scm-load
to be able download, install and uninstall scm locale with primary scm
modified script attached
Quote
mountpkg() {
        if [ -f "$1".md5.txt ]; then
     md5sum -c "$1".md5.txt >/dev/null
     if [ "$?" != 0 ]; then
         echo "Error on $EXTENSION"
         abort
     fi
    fi
   
   APP=`basename $1 .scm`
    [ -d /apps/"$APP" ] || sudo mkdir -p /apps/"$APP"
   sudo busybox mount "$1" /apps/"$APP" -t squashfs -o loop,ro,bs=4096
   if [ "$?" == 0 ]; then
      if [ "$LANG" != "C" ] && [ -f $APP-locale.scm ] && [ ! -d /apps/$APP-locale ]; then
         if [ -f $APP-locale.scm.md5.txt ] && md5sum -c $APP-locale.scm.md5.txt >/dev/null; then
            sudo mkdir -p /apps/$APP-locale
            sudo busybox mount $APP-locale.scm /apps/$APP-locale -t squashfs -o loop,ro,bs=4096
         else
            echo "Error on $APP-locale.scm"
         fi
      fi
      if [ "$(ls -A /apps/"$APP")" ]; then
          if [ -x /apps/"$APP"/config/install ]; then
                      sudo /apps/"$APP"/config/install
                    fi
          [ -d /usr/local/share/applications/ ] || sudo mkdir -p /usr/local/share/applications/
          ls -A /apps/"$APP"/share/applications/*.desktop > /dev/null 2>&1 && \
sudo ln -s /apps/"$APP"/share/applications/*.desktop /usr/local/share/applications/ > /dev/null 2>&1
         
          [ -d /usr/local/share/pixmaps/ ] || sudo mkdir -p /usr/local/share/pixmaps/
          ls -A /apps/"$APP"/share/pixmaps/*.png > /dev/null 2>&1 && \
sudo ln -s /apps/"$APP"/share/pixmaps/*.png /usr/local/share/pixmaps/ > /dev/null 2>&1
         

          if ls -A /apps/"$APP"/bin > /dev/null 2>&1 && ! grep "link_bin=no" /apps/"$APP"/config/spec > /dev/null 2>&1; then
         sudo ln -s /apps/"$APP"/bin/* /apps/bin/ > /dev/null 2>&1
          fi
          if [ ! "$BOOTING" ]; then
             desktop.sh "$APP"
         [ $(which "$DESKTOP"_restart) ] && "$DESKTOP"_restart
         [ -n "$ICONS" ] && "$ICONS".sh &
          fi
      fi
      
   fi
}
Quote
fetch_app(){
   echo "0" > /tmp/appserr
   [ -f "$1".dep ] && [ ! -f "$EXTENSION" ] && rm -f "$DEPLIST"
   wget -cq "$MIRROR"/"$1".dep 2>/dev/null
   wget -cq "$MIRROR"/"$1".md5.txt 2>/dev/null
   wget -c "$MIRROR"/"$1"
   md5sum -c "$1".md5.txt
   if [ "$?" != 0 ]; then
      echo "Error on $EXTENSION"
      abort
   fi
   SCMLOCALE=${1%.scm}-locale.scm
   if [ "$LANG" != "C" ] && [ ! -f $SCMLOCALE ] && wget --spider -q $MIRROR/$SCMLOCALE >/dev/null 2>&1; then
      wget -cq $MIRROR/$SCMLOCALE.md5.txt 2>/dev/null
      wget -c $MIRROR/$SCMLOCALE
      md5sum -c $SCMLOCALE.md5.txt || echo "Error on $SCMLOCALE"
   fi
}
Quote
remove(){
   FREEDESKTOPAPP=/usr/local/share/applications/"$APPNAME".desktop
   MENUNAME="$(awk 'BEGIN{FS="="}{if ($1 == "Name") print $2}' "$FREEDESKTOPAPP")"
   
   if [ "$LANG" != "C" ] && [ -d /apps/$APPNAME-locale ]; then
      sudo umount -d /apps/$APPNAME-locale
      sudo rmdir /apps/$APPNAME-locale
   fi

   # Remove menu item
   read DESKTOP < /etc/sysconfig/desktop
   [ $(which "$DESKTOP"_rmitem) ] && "$DESKTOP"_rmitem "$APPNAME"
   [ $(which "$DESKTOP"_rmitem) ] && "$DESKTOP"_rmitem "$MENUNAME"
   [ $(which "$DESKTOP"_restart) ] && "$DESKTOP"_restart
   
   # Remove icon
   if [ -n "$ICONS" ]; then
      ICONSPEC="$(awk 'BEGIN{FS="="}{if ($1 == "X-FullPathIcon") print $2}' "$FREEDESKTOPAPP")"
      [ -n "$ICONSPEC" ] && "$ICONS"_rm_icon "$MENUNAME" && "$ICONS".sh &
   fi

   for I in `find /apps/bin`; do
          readlink "$I" | grep "/apps/$APPNAME/bin" > /dev/null 2>&1 && sudo rm "$I"
        done
        for I in `find /usr/local/share/applications`; do
          readlink "$I" | grep "/apps/$APPNAME/share/applications" > /dev/null 2>&1 && sudo rm "$I"
        done
   for I in `find /usr/local/share/pixmaps`; do
          readlink "$I" | grep "/apps/$APPNAME/share/pixmaps" > /dev/null 2>&1 && sudo rm "$I"
        done   
   sudo umount -d /apps/"$APPNAME"
   sudo rmdir /apps/"$APPNAME"
}

Removed attachment as it is against forum policy.
« Last Edit: May 02, 2012, 11:41:29 AM by roberts »
Basic Design Concept © @ß№®M!$
please forgive my terrible english :)