Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   problem with russian language (UMUI) (http://forums.winamp.com/showthread.php?t=380526)

marcins 9th February 2015 08:28

problem with russian language (UMUI)
 
I have problem with russian language. Of course I'm using Unicode version of NSIS.

Most translations is working, but for example "welcome screen" looks like this:

http://i.imgur.com/BQKHI6o.png

but all others screens are ok, and font is ok!

But still on the last screen I have all in English... or when everything is installed correctly and there is question about restart, then I have again question marks instead of Russian words.

http://i.imgur.com/oqkZYOc.png
all in english...

http://i.imgur.com/knf5kDp.png

I've downloaded new translations from translations subforum and replaced old files.

.nsh file inside UltraModernUI looks ok
http://i.imgur.com/EDHKS36.png

both .nsh and .nlf files in .\Contrib\Language files\ are ok also

all files are in UTF-8 w/o BOM. And everything looks ok but not first and last page.
I even tried to manually !define MUI_TEXT_WELCOME_INFO_TEXT inside my installer but it doesn't work either.

JasonFriday13 9th February 2015 09:56

3 Attachment(s)
Try this and see if it works (I'm using an unmodified 3.0b1 install):
PHP Code:

Name "Language Test"
OutFile "LangTest.exe"

Unicode True
RequestExecutionLevel User

!include "MUI2.nsh"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "Russian"

Section
  SetAutoClose False
SectionEnd 


marcins 9th February 2015 10:52

Thanks for answer but I'm using Ultra ModernUI skin and afasik it's only working with version 2.X of NSIS.

JasonFriday13 9th February 2015 11:19

Wow, I remember when it first came out way back then, I had just started using nsis. The last release is in 2005, which is way before unicode support came in. Quite a bit has changed since then, installoptions has been deprecated for nsdialogs, the plugin api has changed, the latest nsis releases support ansi and unicode, plus unofficial 64 bit support.

The welcome and finish dialogs (and who knows what other dialogs) use installoptions, and I think all the files in UMUI are ansi (I doubt they are utf-8 with no bom but I'm probably wrong).

So probably the only way to get the dialogs to show the correct language is to rewrite the UMUI dialogs to use nsdialogs instead of installoptions.

Really UMUI needs a basic update to support newer nsis versions. I might have a crack at it sometime just for fun, but I'm not promising anything.

marcins 9th February 2015 11:23

Thanks for help anyway JasonFriday13!

JasonFriday13 9th February 2015 11:29

I noticed the sourceforge page has a download as recent as 2010, maybe give that a try: http://sourceforge.net/projects/ultr...%201.00b2-dev/

marcins 9th February 2015 12:19

I already have it.

But funny thing is that when you look inside zip package and then Language files you will notice that some of language files are empty. For example Russian.nsh is. But then still even if I replace this with other translated .nsh file I still got "????".

Ill try to do another check on clean virtual machine.

marcins 9th February 2015 12:52

Well on clean system I have same problem. Welcome page is only question marks and all other screens are translated.

It looks like this is a bug in UMUI :/

MaGoth 9th February 2015 18:00

Hi, Marcin
RU: Я также использую NSIS UNICODE(2.46.5 ++), только все файлы *.nsi и *.nsh, сохраняю в кодировке: UTF-16 LE. Создаю мульти-язычные инсталляторы и никаких проблем нет.
Возможно в этом ваша проблема..

EN: I also use NSIS UNICODE(2.46.5 ++), but all files *.nsi and *.nsh, save encoding: UTF-16 LE. Creating multilingual installers and no problems.
Possibly in this your problem..

Anders 9th February 2015 18:08

I'm guessing the Install Options .ini files need a UTF16-LE BOM...

T.Slappy 10th February 2015 06:50

Install Options plug-in does not support Unicode (at all!).

Use nsDialogs plug-in (which means you will need to rewrite some part of UMUI).

Anders 10th February 2015 07:38

Quote:

Originally Posted by T.Slappy (Post 3018991)
Install Options plug-in does not support Unicode (at all!).

What? As long as the .ini is a UTF16LE file with a BOM it should work when building Unicode installers...

marcins 11th February 2015 06:54

well thank you guys for answers... but i still can't figure it out...

I define in my .nsi file something like this.

code:
!define MUI_TEXT_WELCOME_INFO_TITLE "!! Вас приветствует мастер установки TEST"


all I can see is "??? ???????? ?????? ????????? TEST".

I was trying with UTF-8, UTF-16LE and other formats. Next page is working fine but not first...

and I'm not using options.ini file, at least I don't know nothing about it.

@MaGoth are you using Ultra ModernUI?

MaGoth 11th February 2015 12:02

Hi marcins,
It all depends on the situation, but problems like you I do not.
Can you send me a PM in your project files *.nsh and *.nsi?

T.Slappy 12th February 2015 05:32

Quote:

Originally Posted by Anders (Post 3018993)
What? As long as the .ini is a UTF16LE file with a BOM it should work when building Unicode installers...

I had aslo some issues with InstallOptions in Unicode installers (so I can confirm this behavior).

After some research I found this old forum: http://forums.winamp.com/showthread.php?t=275900

As there are known these problems for long time I suppose it is true.

Use nsDialogs instead - nsDialog is much much much better (and faster and reliable and provides more functionality etc. etc.! :)

Anders 12th February 2015 17:26

Quote:

Originally Posted by T.Slappy (Post 3019117)
I had aslo some issues with InstallOptions in Unicode installers (so I can confirm this behavior).

How many times to I have to repeat myself, the .ini needs a UTF16LE BOM. Finding a 8 year old thread does not really matter, this only applies to NSIS 3...

Anders 12th February 2015 17:28

So, for the final time, if the .ini starts with a UTF16LE BOM then the Wide versions of the Windows ini functions will read UTF16 files correctly:
Quote:

Unicode true

Page custom myIO

!include InstallOptions.nsh

Function myIO
InitPluginsDir
FileOpen $0 "$pluginsdir\io.ini" w
FileWriteUTF16LE $0 ${U+FEFF}
FileClose $0
WriteIniStr $pluginsdir\io.ini "Settings" NumFields 1
WriteIniStr $pluginsdir\io.ini "Field 1" Type Label
WriteIniStr $pluginsdir\io.ini "Field 1" Text "H${U+20AC}llo World from ${U+2115}SI${U+53}\n${U+D3EC}${U+BBF8}${U+B2DB}\n${U+1F47E}|ALIEN MONSTER|${U+1F61E}\n${U+3371} (SQUARE HPA = U+3371)\n${U+10400} (DESERET CAPITAL LETTER LONG I = U+d801 U+dc00)"
WriteIniStr $pluginsdir\io.ini "Field 1" Left 10
WriteIniStr $pluginsdir\io.ini "Field 1" Top 10
WriteIniStr $pluginsdir\io.ini "Field 1" Right -10
WriteIniStr $pluginsdir\io.ini "Field 1" Bottom -10
!insertmacro INSTALLOPTIONS_DISPLAY "io.ini"
FunctionEnd

Section
SectionEnd


All times are GMT. The time now is 17:20.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.