Go Back   Winamp Forums > Developer Center > NSIS Discussion > NSIS Translations

Reply
Thread Tools Search this Thread Display Modes
Old 30th December 2003, 13:36   #1
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
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.
Attached Files
File Type: nsh nsisdl.nsh (3.0 KB, 915 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 30th December 2003, 23:17   #2
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
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
Vytautas is offline   Reply With Quote
Old 31st December 2003, 00:26   #3
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
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
Attached Files
File Type: nsh nsisdl.nsh (3.7 KB, 613 views)
Vytautas is offline   Reply With Quote
Old 31st December 2003, 13:42   #4
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,169
Send a message via ICQ to Yathosho
!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
Yathosho is offline   Reply With Quote
Old 1st January 2004, 01:09   #5
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
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.
Attached Files
File Type: nsh nsisdl.nsh (6.1 KB, 526 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 1st January 2004, 01:51   #6
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,169
Send a message via ICQ to Yathosho
something went wrong. check my spelling, you converted some terms to lowercase (minute, sekunde etc.)
Yathosho is offline   Reply With Quote
Old 1st January 2004, 02:25   #7
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
Now the texts are exactly the same way you put...
Attached Files
File Type: nsh nsisdl.nsh (6.1 KB, 637 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 1st January 2004, 03:15   #8
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
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
Vytautas is offline   Reply With Quote
Old 2nd January 2004, 00:54   #9
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
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.
Attached Files
File Type: nsh nsisdl.nsh (6.1 KB, 573 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 2nd January 2004, 01:03   #10
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
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
Vytautas is offline   Reply With Quote
Old 2nd January 2004, 11:39   #11
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
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
kichik is offline   Reply With Quote
Old 2nd January 2004, 12:00   #12
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
I assumed that the plugin dll has some hardcoded defaults

Vytautas
Vytautas is offline   Reply With Quote
Old 13th January 2004, 15:12   #13
kiiali
Member
 
kiiali's Avatar
 
Join Date: Oct 2002
Location: Taoyuan, Taiwan (formally called Rebulic of China :-)
Posts: 73
Send a message via ICQ to kiiali
updated with

Chinese (Traditional)
Chinese (Simplified)

thanks.
Attached Files
File Type: nsh nsisdl.nsh (7.3 KB, 603 views)
kiiali is offline   Reply With Quote
Old 26th January 2004, 10:01   #14
iostriz
Junior Member
 
Join Date: May 2001
Posts: 22
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

iostriz is offline   Reply With Quote
Old 14th February 2004, 00:30   #15
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
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.
Attached Files
File Type: nsh nsisdl.nsh (8.1 KB, 597 views)

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th February 2004, 15:37   #16
evilO
Senior Member
 
Join Date: Jan 2004
Location: Strasbourg, Europe
Posts: 117
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".
Attached Files
File Type: nsh nsisdl.nsh (8.6 KB, 592 views)
evilO is offline   Reply With Quote
Old 18th February 2004, 10:56   #17
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
Yep, sometimes this applies to Portuguese language too.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 18th February 2004, 12:40   #18
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
I have found/remembered of a better way to display lithuanian plurals. Attached is the modified file.

Vytautas
Attached Files
File Type: nsh nsisdl.nsh (8.6 KB, 736 views)
Vytautas is offline   Reply With Quote
Old 10th November 2006, 09:56   #19
bholliger
Senior Member
 
Join Date: Jul 2004
Location: Switzerland
Posts: 223
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
bholliger is offline   Reply With Quote
Old 13th April 2007, 08:01   #20
Auren
Junior Member
 
Join Date: Jun 2006
Location: Ukraine, Donetsk
Posts: 18
Send a message via ICQ to Auren
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)"

Auren is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion > NSIS Translations

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump