diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 21:57:09 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-10 21:57:09 +0100 |
commit | 9f2a8799eea3d609a3863a7732ec280d83f12e47 (patch) | |
tree | 719f9e8703211937fc2452055c7a8d5be05bd2f8 /packaging/windows/make-translations.vbs | |
parent | 53840c3fe951c77fa7965efcac4ed77b52da14d9 (diff) | |
parent | a8a992ade40c9d68c9faec1cc3a54e7f064fb9d5 (diff) | |
download | mana-9f2a8799eea3d609a3863a7732ec280d83f12e47.tar.gz mana-9f2a8799eea3d609a3863a7732ec280d83f12e47.tar.bz2 mana-9f2a8799eea3d609a3863a7732ec280d83f12e47.tar.xz mana-9f2a8799eea3d609a3863a7732ec280d83f12e47.zip |
Merge branch 'aethyra/master'
Conflicts:
docs/FAQ.txt
packaging/windows/make-translations.vbs
src/Makefile.am
src/gui/colour.cpp
src/gui/colour.h
src/gui/popupmenu.cpp
src/gui/setup_colours.h
src/main.cpp
src/main.h
src/resources/resourcemanager.cpp
src/text.cpp
src/text.h
src/textmanager.cpp
src/textmanager.h
Diffstat (limited to 'packaging/windows/make-translations.vbs')
-rw-r--r-- | packaging/windows/make-translations.vbs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/packaging/windows/make-translations.vbs b/packaging/windows/make-translations.vbs index 99e88875..f349b25e 100644 --- a/packaging/windows/make-translations.vbs +++ b/packaging/windows/make-translations.vbs @@ -3,15 +3,15 @@ Set WshShell = CreateObject("WScript.Shell") Dim s, infile, outfile, command Function CreateFolderIfNonexistent(folder) - if not fso.FolderExists(folder) then - fso.CreateFolder(folder) - end if + if not fso.FolderExists(folder) then + fso.CreateFolder(folder) + end if end Function 'check for existence of msgfmt if not fso.FileExists("msgfmt.exe") then - WScript.echo "msgfmt.exe not found. Please get gettext for windows from http://gnuwin32.sourceforge.net/packages/gettext.htm and copy the files msgfmt.exe and all dll files from the gettext/bin directory into this directory and run this script again." - WScript.Quit(1) + WScript.echo "msgfmt.exe not found. Please get gettext for windows from http://gnuwin32.sourceforge.net/packages/gettext.htm and copy the files msgfmt.exe and all dll files from the gettext/bin directory into this directory and run this script again." + WScript.Quit(1) end if CreateFolderIfNonexistent("..\..\translations\") @@ -22,21 +22,21 @@ Set stream = fso.GetFile("..\..\po\LINGUAS").OpenAsTextStream(1, 0) 'iterate contents of translations file translations = 0 do while not stream.AtEndOfStream - s = stream.ReadLine() - if inStr(s, "#") = false then - 'create the output directory - CreateFolderIfNonexistent("..\..\translations\" + s) - CreateFolderIfNonexistent("..\..\translations\" + s + "\LC_MESSAGES") - 'build the translate command - infile = "../../po/" + s + ".po" - outfile = "../../translations/" + s +"/LC_MESSAGES/tmw.mo" - command = "msgfmt -c -o " + outfile + " " + infile - 'execute translate command - errval = WshShell.run(command, 0, true) - if errval = 0 then - translations = translations + 1 - end if - end if + s = stream.ReadLine() + if inStr(s, "#") = false then + 'create the output directory + CreateFolderIfNonexistent("..\..\translations\" + s) + CreateFolderIfNonexistent("..\..\translations\" + s + "\LC_MESSAGES") + 'build the translate command + infile = "../../po/" + s + ".po" + outfile = "../../translations/" + s +"/LC_MESSAGES/tmw.mo" + command = "msgfmt -c -o " + outfile + " " + infile + 'execute translate command + errval = WshShell.run(command, 0, true) + if errval = 0 then + translations = translations + 1 + end if + end if loop WScript.echo translations, " translations compiled." |