WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > NSIS Translations > Translate NSISdl
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

Translate NSISdl

I made a NSISdl include file for NSIS, it includes 4 macros:

NSISDL_DOWNLOAD SOURCE DESTINATION
NSISDL_DOWNLOAD_TIMEOUT SOURCE DESTINATION TIMEOUT
NSISDL_DOWNLOAD_QUIET SOURCE DESTINATION
NSISDL_DOWNLOAD_QUIET_TIMEOUT SOURCE DESTINATION TIMEOUT

It:

- supports automatic translation.
- creates the directory where will be created the DESTINATION file.
- doesn't need Modern UI to work.
- uses LangStrings, so you can use too these in your script:

NSISDL_DOWNLOADING
NSISDL_CONNECTING
NSISDL_SECOND
NSISDL_MINUTE
NSISDL_HOUR
NSISDL_PLURAL
NSISDL_PROGRESS
NSISDL_REMAINING

i.e. MessageBox MB_OK "$(NSISDL_SECOND)"

NOTE: When you use any macro of this include file, they will SetDetailsPrint to both.

If someone wants to make a translation for NSISdl, use the English language as a base for your work.

Attachment: nsisdl.nsh
This has been downloaded 635 time(s).

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 12-30-2003 02:36 PM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

I'm trying to translate the plugin to Lithuanian, however because of the structual diferences in the Lithuanian language compared to English I am running into a problem with the plural define.

Example: hour is valanda but hours is valandos note that the ending changes completely.

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 12-31-2003 12:17 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

Attached is the file including Lithuanian Translation with a comment note about the hours string.

PS. Also modified the other translation to use the NSISDL_LANG define instead of the language number.

Vytautas

Attachment: nsisdl.nsh
This has been downloaded 455 time(s).

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 12-31-2003 01:26 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
Yathosho
Forum King

Registered: Jan 2002
From: AT-DE

!define NSISDL_LANG "1031" #German (by Jan T. Sott)

LangString NSISDL_DOWNLOADING ${NSISDL_LANG} "Dateidownload: %s"
LangString NSISDL_CONNECTING ${NSISDL_LANG} "Verbindung wird aufgebaut"
LangString NSISDL_SECOND ${NSISDL_LANG} "Sekunde"
LangString NSISDL_MINUTE ${NSISDL_LANG} "Minute"
LangString NSISDL_HOUR ${NSISDL_LANG} "Stunde"
LangString NSISDL_PLURAL ${NSISDL_LANG} "n"
LangString NSISDL_PROGRESS ${NSISDL_LANG} "%dkB (%d%%) von %dkB @ %d.%01dkB/s"
LangString NSISDL_REMAINING ${NSISDL_LANG} "(Verbleibende Zeit: %d %s%s)"

!undef NSISDL_LANG


"Dateidownload" is the term used by IE, so i took it aswell

__________________
Fossil 2002 III | VISBOT TV | NSIS Icons | PimpBot | Old Winamp Forums look?

Quick Link | Report this post to a moderator | IP: Logged

Yathosho is offline Old Post 12-31-2003 02:42 PM
Click Here to See the Profile for Yathosho Click here to Send Yathosho a Private Message Visit Yathosho's homepage! Find more posts by Yathosho Add Yathosho to your buddy list Edit/Delete Message Reply w/Quote
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

Thanks, language added.

I made some more changes:

- Added 4 macros to use with NSISdlSmooth.dll (these macros need "NSISdlSmooth" plugin installed to work):

NSISDLSMOOTH_DOWNLOAD SOURCE DESTINATION
NSISDLSMOOTH_DOWNLOAD_TIMEOUT SOURCE DESTINATION TIMEOUT
NSISDLSMOOTH_DOWNLOAD_QUIET SOURCE DESTINATION
NSISDLSMOOTH_DOWNLOAD_QUIET_TIMEOUT SOURCE DESTINATION TIMEOUT

- Changed way to detect languages, it detects first if you loaded a language file and uses it depending on the $LANGUAGE variable. So, you can't use a language without loading its NSIS language file first.

Attachment: nsisdl.nsh
This has been downloaded 359 time(s).

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 01-01-2004 02:09 AM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
Yathosho
Forum King

Registered: Jan 2002
From: AT-DE

something went wrong. check my spelling, you converted some terms to lowercase (minute, sekunde etc.)

__________________
Fossil 2002 III | VISBOT TV | NSIS Icons | PimpBot | Old Winamp Forums look?

Quick Link | Report this post to a moderator | IP: Logged

Yathosho is offline Old Post 01-01-2004 02:51 AM
Click Here to See the Profile for Yathosho Click here to Send Yathosho a Private Message Visit Yathosho's homepage! Find more posts by Yathosho Add Yathosho to your buddy list Edit/Delete Message Reply w/Quote
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

Now the texts are exactly the same way you put...

Attachment: nsisdl.nsh
This has been downloaded 450 time(s).

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 01-01-2004 03:25 AM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

deguix, I checked out your newest language translation system and I noticed one problem. Most script have all of there include files at the very start of the script, e.g before the languages are inserted into the script. Therefore none of the translations will ever be included in the script.

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 01-01-2004 04:15 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

You're right. Returning to the old style (just that)...

I'm not testing much because I'm using a new home computer, and I have to share with some persons and play new games (yeah!) but I still here.

Attachment: nsisdl.nsh
This has been downloaded 415 time(s).

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 01-02-2004 01:54 AM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

I assume that if the /translate is used and the values are blank that the plugin uses hardcoded defaults. Cos I noticed that LandString does not set a default translation if one does not exist.

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 01-02-2004 02:03 AM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
kichik
M.I.A.
[NSIS Dev, Mod]

Registered: Oct 2001
From: Jerusalem, Israel

No, it doesn't. If you want defaults you'd have to use the MUI mechanism which is using defines and using the default if a define is not defined. I hope that made sense, heh

__________________
NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius

Quick Link | Report this post to a moderator | IP: Logged

kichik is offline Old Post 01-02-2004 12:39 PM
Click Here to See the Profile for kichik Click here to Send kichik a Private Message Visit kichik's homepage! Find more posts by kichik Add kichik to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

I assumed that the plugin dll has some hardcoded defaults

Vytautas

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 01-02-2004 01:00 PM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
kiiali
Member

Registered: Oct 2002
From: Taoyuan, Taiwan (formally called Rebulic of China :-)

updated with

Chinese (Traditional)
Chinese (Simplified)

thanks.

Attachment: nsisdl.nsh
This has been downloaded 429 time(s).

Quick Link | Report this post to a moderator | IP: Logged

kiiali is offline Old Post 01-13-2004 04:12 PM
Click Here to See the Profile for kiiali Click here to Send kiiali a Private Message Click Here to Email kiiali Visit kiiali's homepage! Find more posts by kiiali Add kiiali to your buddy list Edit/Delete Message Reply w/Quote
iostriz
Junior Member

Registered: May 2001
From:

Croatian nsisdl update



!define NSISDL_LANG "1050" #Croatian (by Igor Ostriz)

LangString NSISDL_DOWNLOADING ${NSISDL_LANG} "Preuzimanje %s"
LangString NSISDL_CONNECTING ${NSISDL_LANG} "Spajanje ..."
LangString NSISDL_SECOND ${NSISDL_LANG} "sekunde"
LangString NSISDL_MINUTE ${NSISDL_LANG} "minute"
LangString NSISDL_HOUR ${NSISDL_LANG} "sat"
LangString NSISDL_PLURAL ${NSISDL_LANG} "a"
LangString NSISDL_PROGRESS ${NSISDL_LANG} "%dkB (%d%%) od %dkB @ %d.%01dkB/s"
LangString NSISDL_REMAINING ${NSISDL_LANG} "(%d %s%s preostalo)"

!undef NSISDL_LANG

Quick Link | Report this post to a moderator | IP: Logged

iostriz is offline Old Post 01-26-2004 11:01 AM
Click Here to See the Profile for iostriz Click here to Send iostriz a Private Message Click Here to Email iostriz Find more posts by iostriz Add iostriz to your buddy list Edit/Delete Message Reply w/Quote
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

I changed again to the old style, because it inserted unnecessary LangStrings of languages you didn't want.

Now have to include the Language Files first, then you include this file.

Included Croatian translation with the new NSISdl.nsh.

Attachment: nsisdl.nsh
This has been downloaded 398 time(s).

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 02-14-2004 01:30 AM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
evilO
Senior Member

Registered: Jan 2004
From: Strasbourg, Europe

Added the french translation

evilO/Olive


PS: I have met a "structural difference" as Vytautas would say , therefore I have changed "XX remaining" to "temps restant: XX", which corresponds to "time remaining: XX".

Attachment: nsisdl.nsh
This has been downloaded 421 time(s).

__________________
Man and nations will act rationally when all other possibilities have been exhausted.

Quick Link | Report this post to a moderator | IP: Logged

evilO is offline Old Post 02-17-2004 04:37 PM
Click Here to See the Profile for evilO Click here to Send evilO a Private Message Click Here to Email evilO Find more posts by evilO Add evilO to your buddy list Edit/Delete Message Reply w/Quote
deguix
Major Dude

Registered: Dec 2002
From: Everett - MA, USA

Yep, sometimes this applies to Portuguese language too.

__________________
My Wiki Pages

Working now on:
New projects. (language: any)

Quick Link | Report this post to a moderator | IP: Logged

deguix is offline Old Post 02-18-2004 11:56 AM
Click Here to See the Profile for deguix Click here to Send deguix a Private Message Click Here to Email deguix Find more posts by deguix Add deguix to your buddy list Edit/Delete Message Reply w/Quote
Vytautas
Major Dude

Registered: May 2003
From: Victoria, Australia

I have found/remembered of a better way to display lithuanian plurals. Attached is the modified file.

Vytautas

Attachment: nsisdl.nsh
This has been downloaded 502 time(s).

__________________
My NSIS Mods and Files

Quick Link | Report this post to a moderator | IP: Logged

Vytautas is offline Old Post 02-18-2004 01:40 PM
Click Here to See the Profile for Vytautas Click here to Send Vytautas a Private Message Click Here to Email Vytautas Visit Vytautas's homepage! Find more posts by Vytautas Add Vytautas to your buddy list Edit/Delete Message Reply w/Quote
bholliger
Senior Member

Registered: Jul 2004
From: Switzerland

Hi Deguix!

Thank you for this header file!

> NOTE: When you use any macro of this include file, they will
> SetDetailsPrint to both.

We could replace

code:
SetDetailsPrint both

with
code:
SetDetailsPrint lastused


This would set the mode back to the value as it was before calling the macro.

The only problem is that the execution of another 'lastused' parameter would have no effect.

Cheers

Bruno

Quick Link | Report this post to a moderator | IP: Logged

bholliger is offline Old Post 11-10-2006 10:56 AM
Click Here to See the Profile for bholliger Click here to Send bholliger a Private Message Visit bholliger's homepage! Find more posts by bholliger Add bholliger to your buddy list Edit/Delete Message Reply w/Quote
Auren
Junior Member

Registered: Jun 2006
From: Ukraine, Donetsk

Russian Translation

Here's a Russian translation of NSISdl plugin:

code:
;There's a note about time translation into Russian. I used variants of words using "()" symbols to fit ;any form of the word corresponding to the actual time. There's no need in ;NSISDL_PLURAL ${NSISDL_LANG}. !define NSISDL_LANG "1049" #Russian (by Yan Mosyagin aka Auren) LangString NSISDL_DOWNLOADING ${NSISDL_LANG} "Загрузка %s" LangString NSISDL_CONNECTING ${NSISDL_LANG} "Подключение ..." LangString NSISDL_SECOND ${NSISDL_LANG} "секунд(а,ы)" LangString NSISDL_MINUTE ${NSISDL_LANG} "минут(а,ы)" LangString NSISDL_HOUR ${NSISDL_LANG} "час(а,ов)" LangString NSISDL_PLURAL ${NSISDL_LANG} "" LangString NSISDL_PROGRESS ${NSISDL_LANG} "%dkB (%d%%) из %dkB @ %d.%01dkB/s" LangString NSISDL_REMAINING ${NSISDL_LANG} "(осталось %d %s%s)"

Quick Link | Report this post to a moderator | IP: Logged

Auren is offline Old Post 04-13-2007 08:01 AM
Click Here to See the Profile for Auren Click here to Send Auren a Private Message Click Here to Email Auren Find more posts by Auren Add Auren to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:51 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Developer Center > NSIS Discussion > NSIS Translations > Translate NSISdl
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON