First correction, to avoid unneeded repeted lines:
1) use 'general.useragent.locale' instead of 'general.useragent.contentlocale', you will directly have the locale folder in $cmdline[2]
2) To be sure inifile is here, before the variables setting, test the presence of the inifile
3) It will allow anybody to add there own language translation, obviously supported by K-Meleon, for example pt-BR, pl-PL, ... and all the future languages supported without any au3 file modification.
Here is the part to modify (correct the inifile test, I don't know the au3 syntax):
if file($locales & $cmdline[2] & "\kmextman.ini")
$lang=$cmdline[2]
else
$lang=("en-US")
end
if $lang=("en-US") then
$txt1=("K-Meleon Extensions Manager Error")
$txt2=("Only execute the manager from inside k-meleon. ")
$txt3=("K-meleon Extensions Manager")
$txt4=("uninstall")
$txt5=("edit macro")
$txt6=("run installer")
$txt7=("Note: K-meleon will be restarted on an uninstall/install")
$txt8=("can't uninstall: malformed ini, please reinstall this extension or contact the author")
$txt9=("The extension: ")
$txt10=(" has been uninstalled successfully. ")
$txt11=("macro editor mode: when done remember to save and restart k-meleon for changes to take effect")
$txt12=("this extension does not include a macro")
$txt13=("You don't have any installed extensions. Would you like to download extensions?")
$txt14=("installed extensions:")
$txt15=("install date:")
;$txt16=()
;$txt18=()
;$txt19=()
;$txt20=()
else
$txt1=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "1", "kmextman")
$txt2=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "2", "kmextman")
$txt3=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "3", "kmextman")
$txt4=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "4", "kmextman")
$txt5=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "5", "kmextman")
$txt6=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "6", "kmextman")
$txt7=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "7", "kmextman")
$txt8=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "8", "kmextman")
$txt9=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "9", "kmextman")
$txt10=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "10", "kmextman")
$txt11=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "11", "kmextman")
$txt12=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "12", "kmextman")
$txt13=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "13", "kmextman")
$txt14=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "14", "kmextman")
$txt15=IniRead($locales & $lang & "\kmextman.ini", "kmextman", "15", "kmextman")
endif
Other thing : it's a really bad choice to put kmextman.exe in rootfolder. Its place ought to be something like Tools, no ?
I haven't read all the au3 file, but it seems that and inifile with for each file type an item giving the number of files, would allow to use iteration, to avoid repeted lines.
Example:
$findmacro=IniRead($inipath, "macros", "1", "supercalafragelisticexpialido.ciaus")
$findmacro2=IniRead($inipath, "macros", "2", "supercalafragelisticexpialido.ciaus")
....
A+
Mozilla/5.0 (x11; U; Linux x86_64; fr-FR; rv:38.0) Gecko/20100101 Ubuntu/12.04 K-Meleon/76.0
Web:
http://jujuland.pagesperso-orange.fr/
Mail : alain [dot] aupeix [at] wanadoo [dot] fr
Ubuntu 12.04 - Gramps 3.4.9 - Harbour 3.2.0 - Hwgui 2.20-3 - K-Meleon 76.0 rc
Edited 4 time(s). Last edit at 10/06/2009 08:24PM by JujuLand.