Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- INSTALLEDMSG="`cat /tmp/petget-installed-pkgs-log`" # LN# 225-292 (Installation Messages) - https://www.pearltrees.com/s243a/source-petget-usr-sbin/id20395775/item224037650
- #121011 L18L reported problem, category names also need translating...
- ZDesktop="$(gettext 'Desktop')"
- ZSystem="$(gettext 'System')"
- ZSetup="$(gettext 'Setup')"
- ZUtility="$(gettext 'Utility')"
- ZFilesystem="$(gettext 'Filesystem')"
- ZGraphic="$(gettext 'Graphic')"
- ZDocument="$(gettext 'Document')"
- ZBusiness="$(gettext 'Business')"
- ZPersonal="$(gettext 'Personal')"
- ZNetwork="$(gettext 'Network')"
- ZInternet="$(gettext 'Internet')"
- ZMultimedia="$(gettext 'Multimedia')"
- ZFun="$(gettext 'Fun')"
- ZHelp="$(gettext 'Help')"
- Znone="$(gettext 'none')"
- ZPTNDesktop="s%CATEGORY: Desktop%CATEGORY: ${ZDesktop}%"
- ZPTNSystem="s%CATEGORY: System%CATEGORY: ${ZSystem}%"
- ZPTNSetup="s%CATEGORY: Setup%CATEGORY: ${ZSetup}%"
- ZPTNUtility="s%CATEGORY: Utility%CATEGORY: ${ZUtility}%"
- ZPTNFilesystem="s%CATEGORY: Filesystem%CATEGORY: ${ZFilesystem}%"
- ZPTNGraphic="s%CATEGORY: Graphic%CATEGORY: ${ZGraphic}%"
- ZPTNDocument="s%CATEGORY: Document%CATEGORY: ${ZDocument}%"
- ZPTNBusiness="s%CATEGORY: Business%CATEGORY: ${ZBusiness}%"
- ZPTNPersonal="s%CATEGORY: Personal%CATEGORY: ${ZPersonal}%"
- ZPTNNetwork="s%CATEGORY: Network%CATEGORY: ${ZNetwork}%"
- ZPTNInternet="s%CATEGORY: Internet%CATEGORY: ${ZInternet}%"
- ZPTNMultimedia="s%CATEGORY: Multimedia%CATEGORY: ${ZMultimedia}%"
- ZPTNFun="s%CATEGORY: Fun%CATEGORY: ${ZFun}%"
- ZPTNHelp="s%CATEGORY: Help%CATEGORY: ${ZHelp}%"
- ZPTNnone="s%CATEGORY: none%CATEGORY: ${Znone}%"
- #120927 want to translate "CATEGORY:" and "PACKAGE:" that are in /tmp/petget-installed-pkgs-log (see installpkg.sh)...
- #note, same code in downloadpkgs.sh...
- ZCATEGORY="$(gettext 'CATEGORY:')"
- ZPACKAGE="$(gettext 'PACKAGE:')"
- ZPTN1="s%CATEGORY:%${ZCATEGORY}%"
- ZPTN2="s%PACKAGE:%${ZPACKAGE}%"
- ZINSTALLEDMSG="$(sed -e "$ZPTNDesktop" -e "$ZPTNSystem" -e "$ZPTNSetup" -e "$ZPTNUtility" -e "$ZPTNFilesystem" -e "$ZPTNGraphic" -e "$ZPTNDocument" -e "$ZPTNBusiness" -e "$ZPTNPersonal" -e "$ZPTNNetwork" -e "$ZPTNInternet" -e "$ZPTNMultimedia" -e "$ZPTNFun" -e "$ZPTNHelp" -e "$ZPTNnone" -e "$ZPTN1" -e "$ZPTN2" /tmp/petget-installed-pkgs-log)" #121011 more ptns.
- MENUMSG=""
- INSTALLEDCAT="`echo -n "$INSTALLEDMSG" | rev | cut -f 1 -d ' ' | rev`"
- ZINSTALLEDCAT="`echo -n "$ZINSTALLEDMSG" | rev | cut -f 1 -d ' ' | rev`" #121011
- if [ "$INSTALLEDCAT" = "none" ];then
- MENUMSG="$(gettext '...note, this package does not have a menu entry.')"
- else
- MENUMSG="$(gettext '...look in') '${ZINSTALLEDCAT}' $(gettext 'in the menu (bottom-left of screen) to run the application.')" #121011
- fi
- #120819 having a category does not mean there will also be a menu entry...
- if [ "`grep '/usr/.*share/applications/.*\.desktop$' /root/.packages/${PKGNAME}.files`" = "" ];then
- MENUMSG="$(gettext '...note, this package does not have a menu entry.')"
- fi
- #installpkg.sh will have logged to /tmp/petget-installed-pkgs-log
- if [ "$DISPLAY" ]; then
- . /usr/lib/gtkdialog/box_ok "$(gettext 'Puppy Package Manager')" complete "$(gettext 'The following package has been successfully installed:')" "<b>${ZINSTALLEDMSG}</b>" "${MENUMSG}"
- else
- dialog --msgbox "$(gettext 'The following package has been successfully installed:') ${ZINSTALLEDMSG} ${MENUMSG}" 0 0
- fi
- RESTARTMSG="$(gettext 'Please wait, updating help page and menu...')"
- [ "$INSTALLEDCAT" = "none" ] && RESTARTMSG="$(gettext 'Please wait, updating help page...')"
- if [ "$DISPLAY" ]; then
- . /usr/lib/gtkdialog/box_splash -text "${RESTARTMSG}" &
- X3PID=$!
- else
- dialog --timeout 3 --msgbox "$(gettext 'Done. Updating menus and help pages')" 0 0
- fi
Advertisement
Add Comment
Please, Sign In to add comment