Author: Zero3
Date: 2009-04-10 11:17:52 +0000 (Fri, 10 Apr 2009)
New Revision: 26702

Modified:
   trunk/apps/wininstaller/src_freenethelpers/FreenetStart.ahk
   trunk/apps/wininstaller/src_freenethelpers/FreenetStop.ahk
   trunk/apps/wininstaller/src_translationhelper/Include_Lang_da.inc
Log:
Added localization support to start.exe/stop.exe with initial Danish translation

Modified: trunk/apps/wininstaller/src_freenethelpers/FreenetStart.ahk
===================================================================
--- trunk/apps/wininstaller/src_freenethelpers/FreenetStart.ahk 2009-04-10 
11:16:16 UTC (rev 26701)
+++ trunk/apps/wininstaller/src_freenethelpers/FreenetStart.ahk 2009-04-10 
11:17:52 UTC (rev 26702)
@@ -11,6 +11,8 @@
 #NoEnv                                                                 ; 
Recommended for performance and compatibility with future AutoHotkey releases
 #NoTrayIcon                                                            ; We 
won't need this...
 #SingleInstance        ignore                                                  
; Only allow one instance at any given time
+
+#Include ..\src_translationhelper\Include_TranslationHelper.ahk                
; Include translation helper
 
 SendMode, Input                                                                
; Recommended for new scripts due to its superior speed and reliability
 StringCaseSense, Off                                                   ; Treat 
A-Z as equal to a-z when comparing strings. Useful when dealing with folders, 
as Windows treat them as equals.
@@ -26,14 +28,19 @@
 ;
 _ServiceTimeout := 60                                                  ; 
Maximum number of seconds we wait before "timing out" and throwing an error 
when managing the system service
 _SplashFormat = A B2 T FS8                                             ; How 
our splash should look.
-
+
+;
+; General init stuff
+;
+InitTranslations()
+
 ;
 ; Check if we should be silent or not (error messages are always displayed 
though)
 ;
 _Arg1 = %1%
 If (_Arg1 == "/?")
 {
-       PopupInfoMessage("Command line options (only use one):`n/silent - Hide 
info messsages`n/verysilent - Hide info and status messages`n`nReturn codes:`n0 
- Success (service has been started)`n1 - Error occurred`n2 - Service was 
already running (no action taken)")
+       PopupInfoMessage(Trans("Command line options (only use one):`n/silent - 
Hide info messsages`n/verysilent - Hide info and status messages`n`nReturn 
codes:`n0 - Success (service started)`n1 - Error occurred`n2 - Service was 
already running (no action)"))
        ExitApp, 0
 }
 Else If (_Arg1 == "/silent")
@@ -50,7 +57,7 @@
 ;
 If not (A_IsAdmin)
 {
-       PopupErrorMessage("Freenet start script requires administrator 
privileges to start the Freenet service. Please make sure that your user 
account has administrative access to the system, and the start script is 
executed with access to use these privileges.")
+       PopupErrorMessage(Trans("Freenet start script requires administrator 
privileges to start the Freenet service. Please make sure that your user 
account has administrative access to the system, and the start script is 
executed with access to use these privileges."))
        ExitApp, 1
 }
 
@@ -59,7 +66,7 @@
 ;
 IfNotExist, installid.dat
 {
-       PopupErrorMessage("Freenet start script was unable to find the 
installid.dat ID file.`n`nMake sure that you are running Freenet start script 
from the 'bin' folder of a Freenet installation directory. If you are already 
doing so, please report this error message to the developers.")
+       PopupErrorMessage(Trans("Freenet start script was unable to find the 
installid.dat ID file.`n`nMake sure that you are running Freenet start script 
from the 'bin' folder of a Freenet installation directory. If you are already 
doing so, please report this error message to the developers."))
        ExitApp, 1
 }
 
@@ -74,12 +81,12 @@
        If (A_Index > _ServiceTimeout)
        {
                SplashImage, OFF
-               PopupErrorMessage("Freenet start script was unable to control 
the Freenet system service as it appears to be stuck.`n`nPlease reinstall 
Freenet.`n`nIf the problem keeps occurring, please report this error message to 
the developers.")
+               PopupErrorMessage(Trans("Freenet start script was unable to 
control the Freenet system service as it appears to be stuck.`n`nPlease 
reinstall Freenet.`n`nIf the problem keeps occurring, please report this error 
message to the developers."))
                ExitApp, 1
        }
        Else If (_ServiceState == -1 || _ServiceState == -4)
        {
-               PopupErrorMessage("Freenet start script was unable to find and 
control the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers.")
+               PopupErrorMessage(Trans("Freenet start script was unable to 
find and control the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf 
the problem keeps occurring, please report this error message to the 
developers."))
                ExitApp, 1
        }
        Else If (_ServiceState == 2 || _ServiceState == 3 || _ServiceState == 5 
|| _ServiceState == 6)
@@ -87,7 +94,7 @@
                If ((_Silent < 2) && !_SplashCreated)
                {
                        _SplashCreated := 1
-                       SplashImage, , %_SplashFormat%, Waiting for the Freenet 
background service to start..., , Freenet start script
+                       SplashImage, , %_SplashFormat%, % Trans("Waiting for 
the Freenet background service to start..."), , % Trans("Freenet start script")
                }
                Sleep, 1000
                Continue
@@ -102,7 +109,7 @@
                }
                Else
                {
-                       PopupErrorMessage("Freenet start script was unable to 
start the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers.")
+                       PopupErrorMessage(Trans("Freenet start script was 
unable to start the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf 
the problem keeps occurring, please report this error message to the 
developers."))
                        ExitApp, 1
                }
        }
@@ -112,12 +119,12 @@
 
                If (_ServiceHasBeenStarted)
                {
-                       PopupInfoMessage("The Freenet service has been 
started!")
+                       PopupInfoMessage(Trans("The Freenet service has been 
started!"))
                        ExitApp, 0                                      ; 0 = 
We started it
                }
                Else
                {
-                       PopupInfoMessage("The Freenet service is already 
running!")
+                       PopupInfoMessage(Trans("The Freenet service is already 
running!"))
                        ExitApp, 2                                      ; 2 = 
No action taken (service was already running)
                }
        }
@@ -129,7 +136,7 @@
 ;
 PopupErrorMessage(_ErrorMessage)
 {
-       MsgBox, 16, Freenet start script error, %_ErrorMessage%         ; 16 = 
Icon Hand (stop/error)
+       MsgBox, 16, % Trans("Freenet start script error"), %_ErrorMessage%      
        ; 16 = Icon Hand (stop/error)
 }
 
 PopupInfoMessage(_InfoMessage)
@@ -138,7 +145,7 @@
 
        If (_Silent < 1)
        {
-               MsgBox, 64, Freenet start script, %_InfoMessage%        ; 64 = 
Icon Asterisk (info)
+               MsgBox, 64, % Trans("Freenet start script"), %_InfoMessage%     
        ; 64 = Icon Asterisk (info)
        }
 }
 

Modified: trunk/apps/wininstaller/src_freenethelpers/FreenetStop.ahk
===================================================================
--- trunk/apps/wininstaller/src_freenethelpers/FreenetStop.ahk  2009-04-10 
11:16:16 UTC (rev 26701)
+++ trunk/apps/wininstaller/src_freenethelpers/FreenetStop.ahk  2009-04-10 
11:17:52 UTC (rev 26702)
@@ -11,6 +11,8 @@
 #NoEnv                                                                 ; 
Recommended for performance and compatibility with future AutoHotkey releases
 #NoTrayIcon                                                            ; We 
won't need this...
 #SingleInstance        ignore                                                  
; Only allow one instance at any given time
+
+#Include ..\src_translationhelper\Include_TranslationHelper.ahk                
; Include translation helper
 
 SendMode, Input                                                                
; Recommended for new scripts due to its superior speed and reliability
 StringCaseSense, Off                                                   ; Treat 
A-Z as equal to a-z when comparing strings. Useful when dealing with folders, 
as Windows treat them as equals.
@@ -26,6 +28,11 @@
 ;
 _ServiceTimeout := 60                                                  ; 
Maximum number of seconds we wait before "timing out" and throwing an error 
when managing the system service
 _SplashFormat = A B2 T FS8                                             ; How 
our splash should look.
+
+;
+; General init stuff
+;
+InitTranslations()
 
 ;
 ; Check if we should be silent or not (error messages are always displayed 
though)
@@ -33,7 +40,7 @@
 _Arg1 = %1%
 If (_Arg1 == "/?")
 {
-       PopupInfoMessage("Command line options (only use one):`n/silent - Hide 
info messsages`n/verysilent - Hide info and status messages`n`nReturn codes:`n0 
- Success (service has been stopped)`n1 - Error occurred`n2 - Service was not 
running (no action taken)")
+       PopupInfoMessage(Trans("Command line options (only use one):`n/silent - 
Hide info messsages`n/verysilent - Hide info and status messages`n`nReturn 
codes:`n0 - Success (service stopped)`n1 - Error occurred`n2 - Service was not 
running (no action)"))
        ExitApp, 0
 }
 Else If (_Arg1 == "/silent")
@@ -50,7 +57,7 @@
 ;
 If not (A_IsAdmin)
 {
-       PopupErrorMessage("Freenet stop script requires administrator 
privileges to start the Freenet service. Please make sure that your user 
account has administrative access to the system, and the stop script is 
executed with access to use these privileges.")
+       PopupErrorMessage(Trans("Freenet stop script requires administrator 
privileges to stop the Freenet service. Please make sure that your user account 
has administrative access to the system, and the stop script is executed with 
access to use these privileges."))
        ExitApp, 1
 }
 
@@ -59,7 +66,7 @@
 ;
 IfNotExist, installid.dat
 {
-       PopupErrorMessage("Freenet stop script was unable to find the 
installid.dat ID file.`n`nMake sure that you are running Freenet stop script 
from the 'bin' folder of a Freenet installation directory. If you are already 
doing so, please report this error message to the developers.")
+       PopupErrorMessage(Trans("Freenet stop script was unable to find the 
installid.dat ID file.`n`nMake sure that you are running Freenet stop script 
from the 'bin' folder of a Freenet installation directory. If you are already 
doing so, please report this error message to the developers."))
        ExitApp, 1
 }
 
@@ -74,12 +81,12 @@
        If (A_Index > _ServiceTimeout)
        {
                SplashImage, OFF
-               PopupErrorMessage("Freenet stop script was unable to control 
the Freenet system service as it appears to be stuck.`n`nPlease reinstall 
Freenet.`n`nIf the problem keeps occurring, please report this error message to 
the developers.")
+               PopupErrorMessage(Trans("Freenet stop script was unable to 
control the Freenet system service as it appears to be stuck.`n`nPlease 
reinstall Freenet.`n`nIf the problem keeps occurring, please report this error 
message to the developers."))
                ExitApp, 1
        }
        Else If (_ServiceState == -1 || _ServiceState == -4)
        {
-               PopupErrorMessage("Freenet stop script was unable to find and 
control the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers.")
+               PopupErrorMessage(Trans("Freenet stop script was unable to find 
and control the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers."))
                ExitApp, 1
        }
        Else If (_ServiceState == 2 || _ServiceState == 3 || _ServiceState == 5 
|| _ServiceState == 6)
@@ -87,7 +94,7 @@
                If ((_Silent < 2) && !_SplashCreated)
                {
                        _SplashCreated := 1
-                       SplashImage, , %_SplashFormat%, Waiting for the Freenet 
background service to stop..., , Freenet stop script
+                       SplashImage, , %_SplashFormat%, % Trans("Waiting for 
the Freenet background service to stop..."), , % Trans("Freenet stop script")
                }
                Sleep, 1000
                Continue
@@ -98,12 +105,12 @@
 
                If (_ServiceHasBeenStopped)
                {
-                       PopupInfoMessage("The Freenet service has been 
stopped!")
+                       PopupInfoMessage(Trans("The Freenet service has been 
stopped!"))
                        ExitApp, 0                                      ; 0 = 
We stopped it
                }
                Else
                {
-                       PopupInfoMessage("The Freenet service is already 
stopped!")
+                       PopupInfoMessage(Trans("The Freenet service is already 
stopped!"))
                        ExitApp, 2                                      ; 2 = 
No action taken (service was already stopped)
                }
        }
@@ -117,7 +124,7 @@
                }
                Else
                {
-                       PopupErrorMessage("Freenet stop script was unable to 
stop the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the problem 
keeps occurring, please report this error message to the developers.")
+                       PopupErrorMessage(Trans("Freenet stop script was unable 
to stop the Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers."))
                        ExitApp, 1
                }
        }
@@ -128,7 +135,7 @@
 ;
 PopupErrorMessage(_ErrorMessage)
 {
-       MsgBox, 16, Freenet stop script error, %_ErrorMessage%          ; 16 = 
Icon Hand (stop/error)
+       MsgBox, 16, % Trans("Freenet stop script error"), %_ErrorMessage%       
        ; 16 = Icon Hand (stop/error)
 }
 
 PopupInfoMessage(_InfoMessage)
@@ -137,7 +144,7 @@
 
        If (_Silent < 1)
        {
-               MsgBox, 64, Freenet stop script, %_InfoMessage%         ; 64 = 
Icon Asterisk (info)
+               MsgBox, 64, % Trans("Freenet stop script"), %_InfoMessage%      
        ; 64 = Icon Asterisk (info)
        }
 }
 

Modified: trunk/apps/wininstaller/src_translationhelper/Include_Lang_da.inc
===================================================================
--- trunk/apps/wininstaller/src_translationhelper/Include_Lang_da.inc   
2009-04-10 11:16:16 UTC (rev 26701)
+++ trunk/apps/wininstaller/src_translationhelper/Include_Lang_da.inc   
2009-04-10 11:17:52 UTC (rev 26702)
@@ -116,11 +116,37 @@
        ; Launcher
        Trans_Add("Freenet Launcher error", "Freenet Starter fejl")
        Trans_Add("Freenet Launcher was unable to find the installid.dat ID 
file.`n`nMake sure that you are running Freenet Launcher from a Freenet 
installation directory.`nIf you are already doing so, please report this error 
message to the developers.", "Freenet Starter kunne ikke finde installid.dat 
ID-filen.`n`nKontrollér at du kører Freenet Starter fra en 
Freenet-installationsmappe.`nHvis du allerede gør dette, så indrapporter 
venligst denne fejlbesked til udviklerne.")
-       Trans_Add("Freenet Launcher was unable to find the bin\start.exe 
launcher.`n`nPlease reinstall Freenet.`n`nIf the problem keeps occurring, 
please report this error message to the developers.", "Freenet Starter kunne 
ikke finde bin\start.exe startfilen.`n`nPrøv at geninstallere Freenet.`n`nHvis 
problemet fortsætter, så indrapporter venligst denne fejlbesked til 
udviklerne.")
+       Trans_Add("Freenet Launcher was unable to find the bin\start.exe 
launcher.`n`nPlease reinstall Freenet.`n`nIf the problem keeps occurring, 
please report this error message to the developers.", "Freenet Starter kunne 
ikke finde bin\start.exe startprogrammet.`n`nPrøv at geninstallere 
Freenet.`n`nHvis problemet fortsætter, så indrapporter venligst denne 
fejlbesked til udviklerne.")
        Trans_Add("Freenet Launcher was unable to find the freenet.ini 
configuration file.`n`nMake sure that you are running Freenet Launcher from a 
Freenet installation directory.`nIf you are already doing so, please report 
this error message to the developers.", "Freenet Starter kunne ikke finde 
freenet.ini konfigurationsfilen.`n`nKontrollér at du kører Freenet Starter fra 
en Freenet-installationsmappe.`nHvis du allerede gør dette, så indrapporter 
venligst denne fejlbesked til udviklerne.")
        Trans_Add("Freenet Launcher was unable to read the 'fproxy.port' value 
from the freenet.ini configuration file.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers.", 
"Freenet Starter kunne ikke læse 'fproxy.port' værdien fra freenet.ini 
konfigurationsfilen.`n`nPrøv at geninstallere Freenet.`n`nHvis problemet 
fortsætter, så indrapporter venligst denne fejlbesked til udviklerne.")
        Trans_Add("Freenet Launcher was unable to find a supported 
browser.`n`nPlease install one of the supported browsers, or manually`nnavigate 
to: ", "Freenet Starter kunne ikke finde en understøttet browser.`n`nInstaller 
en af de understøttede browsere, eller naviger`nmanuelt til: ")
        Trans_Add("Freenet Launcher supports the following browsers:", "Freenet 
Starter understøtter følgende browsere:")
        Trans_Add("not recommended", "ikke anbefalet")
+
+       ; Service starter
+       Trans_Add("Command line options (only use one):`n/silent - Hide info 
messsages`n/verysilent - Hide info and status messages`n`nReturn codes:`n0 - 
Success (service started)`n1 - Error occurred`n2 - Service was already running 
(no action)", "Kommandolinjeindstillinger (brug kun én):`n/silent - Skjul 
infobeskeder`n/verysilent - Skjul info- og statusbeskeder`n`nReturkoder:`n0 - 
Succes (tjeneste startet)`n1 - Fejl`n2 - Service kørte allerede (ingen 
handling)")
+       Trans_Add("Freenet start script requires administrator privileges to 
start the Freenet service. Please make sure that your user account has 
administrative access to the system, and the start script is executed with 
access to use these privileges.", "Freenet-startprogrammet kræver 
administratorrettigheder for at starte Freenet-tjenesten. Kontrollér at din 
brugerkonto har administrativ adgang til systemet, og at 
Freenet-startprogrammet køres med adgang til at udnytte disse rettigheder.")
+       Trans_Add("Freenet start script was unable to find the installid.dat ID 
file.`n`nMake sure that you are running Freenet start script from the 'bin' 
folder of a Freenet installation directory. If you are already doing so, please 
report this error message to the developers.", "Freenet startprogrammet kunne 
ikke finde installid.dat ID-filen.`n`nKontrollér at du kører Freenet 
startprogrammet fra 'bin'-mappen af en Freenet-installation.`nHvis du allerede 
gør dette, så indrapporter venligst denne fejlbesked til udviklerne.")
+       Trans_Add("Freenet start script was unable to control the Freenet 
system service as it appears to be stuck.`n`nPlease reinstall Freenet.`n`nIf 
the problem keeps occurring, please report this error message to the 
developers.", "Freenet startprogrammet kunne ikke styre Freenet-systemtjenesten 
da den tilsyneladende har sat sig fast.`n`nPrøv at geninstallere 
Freenet.`n`nHvis problemet fortsætter, så indrapporter venligst denne 
fejlbesked til udviklerne.")
+       Trans_Add("Freenet start script was unable to find and control the 
Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the problem keeps 
occurring, please report this error message to the developers.", "Freenet 
startprogrammet kunne ikke finde og styre Freenet-systemtjenesten.`n`nPrøv at 
geninstallere Freenet.`n`nHvis problemet fortsætter, så indrapporter venligst 
denne fejlbesked til udviklerne.")
+       Trans_Add("Waiting for the Freenet background service to start...", 
"Venter på at Freenet-baggrundstjenesten starter...")
+       Trans_Add("Freenet start script", "Freenet startprogram")
+       Trans_Add("Freenet start script was unable to start the Freenet system 
service.`n`nPlease reinstall Freenet.`n`nIf the problem keeps occurring, please 
report this error message to the developers.", "Freenet startprogrammet kunne 
ikke starte Freenet-systemtjenesten.`n`nPrøv at geninstallere Freenet.`n`nHvis 
problemet fortsætter, så indrapporter venligst denne fejlbesked til 
udviklerne.")
+       Trans_Add("The Freenet service has been started!", "Freenet-tjenesten 
er blevet startet!")
+       Trans_Add("The Freenet service is already running!", "Freenet-tjenesten 
kører allerede!")
+       Trans_Add("Freenet start script error", "Freenet startprogram fejl")
+
+       ; Service stopper
+       Trans_Add("Command line options (only use one):`n/silent - Hide info 
messsages`n/verysilent - Hide info and status messages`n`nReturn codes:`n0 - 
Success (service stopped)`n1 - Error occurred`n2 - Service was not running (no 
action)", "Kommandolinjeindstillinger (brug kun én):`n/silent - Skjul 
infobeskeder`n/verysilent - Skjul info- og statusbeskeder`n`nReturkoder:`n0 - 
Succes (tjeneste stoppet)`n1 - Fejl`n2 - Service kørte ikke (ingen handling)")
+       Trans_Add("Freenet stop script requires administrator privileges to 
stop the Freenet service. Please make sure that your user account has 
administrative access to the system, and the stop script is executed with 
access to use these privileges.", "Freenet-stopprogrammet kræver 
administratorrettigheder for at stoppe Freenet-tjenesten. Kontrollér at din 
brugerkonto har administrativ adgang til systemet, og at Freenet-stopprogrammet 
køres med adgang til at udnytte disse rettigheder.")
+       Trans_Add("Freenet stop script was unable to find the installid.dat ID 
file.`n`nMake sure that you are running Freenet stop script from the 'bin' 
folder of a Freenet installation directory. If you are already doing so, please 
report this error message to the developers.", "Freenet stopprogrammet kunne 
ikke finde installid.dat ID-filen.`n`nKontrollér at du kører Freenet 
stopprogrammet fra 'bin'-mappen af en Freenet-installation.`nHvis du allerede 
gør dette, så indrapporter venligst denne fejlbesked til udviklerne.")
+       Trans_Add("Freenet stop script was unable to control the Freenet system 
service as it appears to be stuck.`n`nPlease reinstall Freenet.`n`nIf the 
problem keeps occurring, please report this error message to the developers.", 
"Freenet stopprogrammet kunne ikke styre Freenet-systemtjenesten da den 
tilsyneladende har sat sig fast.`n`nPrøv at geninstallere Freenet.`n`nHvis 
problemet fortsætter, så indrapporter venligst denne fejlbesked til 
udviklerne.")
+       Trans_Add("Freenet stop script was unable to find and control the 
Freenet system service.`n`nPlease reinstall Freenet.`n`nIf the problem keeps 
occurring, please report this error message to the developers.", "Freenet 
stopprogrammet kunne ikke finde og styre Freenet-systemtjenesten.`n`nPrøv at 
geninstallere Freenet.`n`nHvis problemet fortsætter, så indrapporter venligst 
denne fejlbesked til udviklerne.")
+       Trans_Add("Waiting for the Freenet background service to stop...", 
"Venter på at Freenet-baggrundstjenesten stopper...")
+       Trans_Add("Freenet stop script", "Freenet stopprogram")
+       Trans_Add("The Freenet service has been stopped!", "Freenet-tjenesten 
er blevet stoppet!")
+       Trans_Add("The Freenet service is already stopped!", "Freenet-tjenesten 
er allerede stoppet!")
+       Trans_Add("Freenet stop script was unable to stop the Freenet system 
service.`n`nPlease reinstall Freenet.`n`nIf the problem keeps occurring, please 
report this error message to the developers.", "Freenet stopprogrammet kunne 
ikke stoppe Freenet-systemtjenesten.`n`nPrøv at geninstallere Freenet.`n`nHvis 
problemet fortsætter, så indrapporter venligst denne fejlbesked til 
udviklerne.")
+       Trans_Add("Freenet stop script error", "Freenet stopprogram fejl")
 }
 

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to