diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-29 20:01:04 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-01-29 20:01:04 +0100 |
commit | d5fb7965fcca5b85f4ff65e6bcf25b9c94b8e103 (patch) | |
tree | c1cf1f554ea926d0b8a9e8185ebdffe6582b2f89 /packaging | |
parent | 19923a1be320294c9307996e6f79ba2918829587 (diff) | |
download | mana-d5fb7965fcca5b85f4ff65e6bcf25b9c94b8e103.tar.gz mana-d5fb7965fcca5b85f4ff65e6bcf25b9c94b8e103.tar.bz2 mana-d5fb7965fcca5b85f4ff65e6bcf25b9c94b8e103.tar.xz mana-d5fb7965fcca5b85f4ff65e6bcf25b9c94b8e103.zip |
Converted CRLF newlines to LF
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/windows/make-translations.vbs | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/packaging/windows/make-translations.vbs b/packaging/windows/make-translations.vbs index 48246188..fbecd822 100644 --- a/packaging/windows/make-translations.vbs +++ b/packaging/windows/make-translations.vbs @@ -1,42 +1,42 @@ -Set fso = CreateObject("Scripting.FileSystemObject")
-Set WshShell = CreateObject("WScript.Shell")
-Dim s, infile, outfile, command
-
-Function CreateFolderIfNonexistent(folder)
- 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)
-end if
-
-CreateFolderIfNonexistent("..\..\translations\")
-
-'open translation list
-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
-loop
-
+Set fso = CreateObject("Scripting.FileSystemObject") +Set WshShell = CreateObject("WScript.Shell") +Dim s, infile, outfile, command + +Function CreateFolderIfNonexistent(folder) + 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) +end if + +CreateFolderIfNonexistent("..\..\translations\") + +'open translation list +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 +loop + WScript.echo translations, " translations compiled."
\ No newline at end of file |