You are here

[Fixed] different failures in Peazip Portable

6 posts / 0 new
Last post
tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
[Fixed] different failures in Peazip Portable
  1. Automatic switching of the language in the platform

    Due to missing custom code in the file PeaZipPortable.ini doesn't work the automatic switching of the language in the platform.

  2. False code in the section [FilesMove]

    I have also discovered, that the code in the section [FilesMove] is incorrect. Here is the proper code:

    [FilesMove]
    settings\conf.txt=%PAL:AppDir%\PeaZip\res
    settings\custedit.txt=%PAL:AppDir%\PeaZip\res
    settings\bookmarks.txt=%PAL:AppDir%\PeaZip\res
    

[duplicate bug deleted by mod JTH]

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
partial solution

I have now found a solution regarding the automatic switching of the language in the platform.

I have done the following changes:

  1. Changes in the file PeaZipPortable.ini

    I added the following code:

    [Language]
    Base=%PortableApps.comLanguageCode%
    Default=en
    
    [LanguageStrings]
    ar-sa=ar
    be=by-lt
    cs=cz
    de=de-uml
    en=en
    es=es-es
    fr=fr
    gl=gl
    hu=hu
    it=it
    ja=ja
    ko=ko
    nl=nl
    no=no
    pl=pl
    pt=pt-pt
    pt-br=pt-br
    ro=ro
    ru=ru
    sv=sv
    tr=tr
    uk=uk
    vi=vn
    zh-cn=cn
    zh-tw=cht
    
  2. Changes in the file custom.nsh

    I added the following code:

    ${SegmentPrePrimary}
    ReadEnvStr $0 PAL:LanguageCustom
    
    ${If} ${FileExists} "$EXEDIR\App\PeaZip\res\lang\default.txt"
    Rename "$EXEDIR\App\PeaZip\res\lang\default.txt" "$EXEDIR\App\PeaZip\res\lang\default1.txt"
    Rename "$EXEDIR\App\PeaZip\res\lang\$0.txt" "$EXEDIR\App\PeaZip\res\lang\default.txt"
    ${EndIf}
    !macroend
    
    ${SegmentPostPrimary}
    ReadEnvStr $0 PAL:LanguageCustom
    
    ${If} ${FileExists} "$EXEDIR\App\PeaZip\res\lang\default.txt"
    Rename "$EXEDIR\App\PeaZip\res\lang\default.txt" "$EXEDIR\App\PeaZip\res\lang\$0.txt"
    Rename "$EXEDIR\App\PeaZip\res\lang\default1.txt" "$EXEDIR\App\PeaZip\res\lang\default.txt"
    ${EndIf}
    !macroend
    
    

Unfortunately, now occurs a new problem. By adding the code in the file custom.nsh it is no longer possible to start the program in the standalone version. Has anyone an idea how to solve this problem?

EDIT: For the automatic switching of the language in the platform it is necessary, that the additional hook ${SegmentPostPrimary} will be inserted in the file custom.nsh.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
problem solved

I have again revised the code in the file custom.nsh. Now works both the automatic switching of the language in the platform and the run of the standalone version Smile

Here is the proper code, which I have added to the file custom.nsh:

${SegmentPrePrimary}
	ReadEnvStr $0 PAL:LanguageCustom

	${If} ${FileExists} "$EXEDIR\App\PeaZip\res\lang\$0.txt"
		Rename "$EXEDIR\App\PeaZip\res\lang\$0.txt" "$EXEDIR\App\PeaZip\res\lang\default1.txt"
		Rename "$EXEDIR\App\PeaZip\res\lang\default.txt" "$EXEDIR\App\PeaZip\res\lang\default2.txt"
		Rename "$EXEDIR\App\PeaZip\res\lang\default1.txt" "$EXEDIR\App\PeaZip\res\lang\default.txt"
	${EndIf}
!macroend

${SegmentPostPrimary}
	ReadEnvStr $0 PAL:LanguageCustom

	${If} ${FileExists} "$EXEDIR\App\PeaZip\res\lang\default.txt"
		Rename "$EXEDIR\App\PeaZip\res\lang\default.txt" "$EXEDIR\App\PeaZip\res\lang\$0.txt"
		Rename "$EXEDIR\App\PeaZip\res\lang\default2.txt" "$EXEDIR\App\PeaZip\res\lang\default.txt"
	${EndIf}
!macroend

Finally here the download link: PeaZipPortable_4.8_Rev_1.paf.exe
MD5: 83237f6f4f98357e312dcbcae1919e48
Download Size: 5,58 MB

Accordingly, I have changed the supplement "Bug" in "Fixed" of the subject of my original post.

Gord Caswell
Gord Caswell's picture
Offline
Last seen: 1 month 2 weeks ago
DeveloperModerator
Joined: 2008-07-24 18:46
leave as Bug

Leave it marked as a Bug, John'll mark it fixed once it's fixed in an official build.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
already done

I've again changed the supplement from "Fixed" in "Bug".

John T. Haller
John T. Haller's picture
Online
Last seen: 8 min 22 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Settings Fixed, Locale Separately

I've fixed the settings bug in 4.8.1 Rev 2.

As for the locale, I don't really like the approach of messing with the default.txt and then leaving the app on its own. If we're going to do it, I'd rather do it properly and update the settings. Otherwise, I'd rather skip it. Language switching is not a requirement for apps.

Sometimes, the impossible can become possible, if you're awesome!

Log in or register to post comments