Skip to content
⌘ NSIS Forum Archive

Translate ZipDLL

50 posts

Vytautas#
Lithuanian translation attached 😎

Vytautas
deguix#
Also I noticed in an earlier post that the reason you used some functions and not macros was because fo errors with labels.
But this case is different, is a really small code just to call ZipDLL Plugin. The real reason for using functions in my functions is that much of they are big, and using macros in those cases waste a lot of space in the compiled installator.

(OUT OF TOPIC) A question for kichik, the Zip2Exe could be done using the NSIS?

Below, the ZipDLL with Lithuan Translation included.
CodeSquid#
Thx for your updates.

One question deguix, what if I want to extract a single file with the name 'all'?
If I understand understand your code right, it's not possible with your version.
deguix#
So, you want this way:

ZIPDLL_EXTRACT "SOURCE" "DESTINATION" (<ALL>|"FILE")

(<All> can't be a file as it have < and >)

I changed it and I added some more changes:

- If SOURCE doesn't exist, will set errors.
- If DESTINATION doesn't exist, will create the directory, if it couldn't be created, will set errors.

The new ZipDLL.nsh:
Vytautas#
Oops! Found some typos in my translation, must have been half asleep last night. Sorry 😳

Vytautas
CodeSquid#
I've found another problem with your version deguix:
The language ZipDLL uses is no longer set automatically. The reason is that you're using !define LANG_$LANGUAGE, however !define is evaluated a compile time, but the $LANGUAGE variable is set during runtime.
You won't be able to come around using strcmp and including all possible languages.
deguix#
When you !define a variable, it is like a "name" for it.

I did LANG_$LANGUAGE, that will change everytime the $LANGUAGE is changed. I can change 1033 to 1046 to change the LANG_$LANGUAGE that was LANG_1033 to LANG_1046.

Maybe someone can explain better than me if you still don't understand.
CodeSquid#
Please try the attaced test script.

With define you define constants which do not change at runtime.

When you !define a variable, it is like a "name" for it.
Not excactly, that only works if you assign a value to a define, like
!define VARNAME $1

I'm no expert on this either, but I'll try to explain how defines work:
LANG_$LANGUAGE is evaluated at compile time. I'm not completely sure, but i think you can use almost any characters (except spaces) in the names for defines.
Variables instead are only evaluated during runtime. After compiling the installer, all !defines, !undef !ifdef etc.. have been removed as well as all code between !ifdefs where the flag was not set. Also, in all other occurances of defines, they have been replaced with their constant value (constants like numbers, strings or the name of a variable, but never the contents of a variable)
deguix#
I think it's fixed now:
CodeSquid#
I've found another small problem, your strcmp jumps were one instruction too short, you were always pushing /TRANSLATE every time.

I've also fixed the Lithuanian version, the brackets were missing in !ifdef FILE_<ALL>

I've also added some ifdefs around each language to check whether the language has been included in NSIS at all. (Using the LANG_LANGNAME macros)

The new version also contains a Russian and Korean translation I got some time ago.
deguix#
I've also added some ifdefs around each language to check whether the language has been included in NSIS at all. (Using the LANG_LANGNAME macros)
You made the exactly same mistake I fixed in my first submited file:

- Supports any UI, not just Modern UI as old versions.
Forget about Modern UI, you're doing this include file for every UI (LANG_ENGLISH is a Modern UI define).

I re-fixed the file with those additional languages included.

NOTE: The new languages are Polish, Korean and Russian.

MESSAGE: Remember, every user will be thankfull if they see an installer fully translatable in their languages. Please, submit a new ZipDLL plugin translation here!
deguix#
Ops! I forgot the file!
CodeSquid#
Please try the attached sample script, the LANG_LANGNAME defines are not modern UI specific.

Though the old MUI_LANGUAGEFILE_LANGNAME_USED I used in my original version were MUI specific.
deguix#
My bad, but please put the credits for every language next of them (as in this file)...
asdfuae#
Arabic

;!ifdef LANG_ARABIC #by asdfuae

;StrCmp $LANGUAGE ${LANG_ARABIC} 0 +10

;Push " خطاء: %s"
;Push "لم يحصل على خصائص الملف."
;Push "خطاء: لم يحصل على خصائص الملف."
;Push "لا يمكن استخراج %s"
;Push " خطاء: لا يمكن استخراج %s"

;!ifdef FILE_<ALL>
;Push " استخراج : %s"
;Push " استخراج مجلدات و ملفات %d"
;Push "استخراج محتويات %s إلى %s"
;!else
;Push "الملف غير موجود في السجل."
;Push "خطاء: الملف غير موجود في السجل."
;Push "استخراج الملف %s من %s إلى %s"
;!endif
latest zipdll.nsh with Arabic
kiiali#
updated with

Chinese (Traditional)
Chinese (Simplified)

thanks.
Joost Verburg#
Recieved this Danish file.
CodeSquid#
I've updated the NSIS archive page with the new version. I've also moved the credits to the top of ZipDLL.nsh so that it is possible to find them and to see which languages are already available.
Attached is the final version of ZipDLL.nsh as reference for further translations.
iostriz#
ZipDLL.nsh croatian

Here is translation for Croatian language.
I don't think that is good idea to allow everyone to make changes in file, so I'm sending them separately.
Will You please put the changes in?

--
Igor
deguix#
I just put together that Croatian language file with ZipDLL.nsh.