translation strings for lua scripts from autorun

I think that everything should be fine but still need to test.
This commit is contained in:
Sergey D 2017-05-30 08:05:17 +03:00 committed by GitHub
parent 28ae128a2e
commit e16c75488a
7 changed files with 587 additions and 109 deletions

View File

@ -1,3 +1,7 @@
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'luascripts.po')
end
--todo: split up into multiple units and use the java table for the methods as well
@ -450,7 +454,7 @@ function javaInjectAgent()
]]
end
if autoAssemble(script)==false then
error('Auto assembler failed:'..script)
error(translate('Auto assembler failed:')..script)
end
@ -652,18 +656,18 @@ function JavaEventListener(thread)
--print("done")
elseif command==JAVACODECMD_TERMINATED then
print("Java:eventserver terminated")
print(translate("Java:eventserver terminated"))
break
elseif command==nil then
print("Java:Disconnected")
print(translate("Java:Disconnected"))
break
else
print("Java:Unexpected event received") --synchronize isn't necesary for print as that function is designed to synchronize internally
print(translate("Java:Unexpected event received")) --synchronize isn't necesary for print as that function is designed to synchronize internally
break --unknown command
end
end
print("Java:Event handler terminating")
print(translate("Java:Event handler terminating"))
JavaEventPipe.destroy();
end
@ -989,7 +993,7 @@ end
function java_parseSignature(sig)
if sig==nil then
error('Invalid java signature')
error(translate('Invalid java signature'))
end
--parse the given signature
@ -1102,11 +1106,11 @@ function java_invokeMethod(object, methodid, ...)
local returntype=Java_TypeSigToIDConversion[string.sub(parsedsignature.returntype,1,1)]
if returntype>=10 then
error('Array return types are not supported');
error(translate('Array return types are not supported'));
end
if argumentcount~=#parsedsignature.parameters then
error('Parameter count does not match')
error(translate('Parameter count does not match'))
end
@ -1355,7 +1359,7 @@ function java_search_refine(scantype, scanvalue)
local result=nil
if scantype==nil then
error("Scantype was not set")
error(translate("Scantype was not set"))
end
javapipe.lock()
@ -1466,15 +1470,15 @@ function java_createEntryListView(owner)
lv.RowSelect=true
local c=lv.Columns.add()
c.caption='Class'
c.caption=translate('Class')
c.width=150
c=lv.Columns.add()
c.caption='Method'
c.caption=translate('Method')
c.width=150
c=lv.Columns.add()
c.caption='Position'
c.caption=translate('Position')
c.autosize=true
return lv
@ -1492,7 +1496,7 @@ function java_foundCodeDialogLVDblClick(sender)
--show a form with the stack info
local ref=createRef(entry)
entry.form=createForm()
entry.form.Caption=string.format("More info %s.%s(%d)", entry.classname, entry.methodname, entry.location)
entry.form.Caption=string.format(translate("More info %s.%s(%d)"), entry.classname, entry.methodname, entry.location)
entry.form.Tag=ref
entry.form.Width=400
entry.form.Height=150
@ -1559,7 +1563,7 @@ function java_findWhatWrites(object, fieldid)
fcd.form.height=300
fcd.form.Position=poScreenCenter
fcd.form.BorderStyle=bsSizeable
fcd.form.caption='The following methods accessed the given variable'
fcd.form.caption=translate('The following methods accessed the given variable')
fcd.form.OnClose=java_foundCodeDialogClose
fcd.form.Tag=id
@ -1567,7 +1571,7 @@ function java_findWhatWrites(object, fieldid)
fcd.lv.Align=alClient
fcd.lv.OnDblClick=java_foundCodeDialogLVDblClick
fcd.lv.Tag=id
fcd.lv.Name='results';
fcd.lv.Name=translate('results');
fcd.entries={}
@ -1579,7 +1583,7 @@ function java_findWhatWrites(object, fieldid)
java.findwhatwriteslist[id]=fcd
else
error('java_find_what_writes only works when the jvmti agent is launched at start')
error(translate('java_find_what_writes only works when the jvmti agent is launched at start'))
end
return id
@ -1644,7 +1648,7 @@ function java_getClassSignature(jClass)
length=javapipe.readWord()
if (length>0) then
result=result..' Generic='..javapipe.readString(length);
result=result..translate(' Generic=')..javapipe.readString(length);
end
javapipe.unlock()
@ -1689,13 +1693,13 @@ function javaForm_treeviewExpanding(sender, node)
local i
if superclass~=0 then
node.add('superclass='..java_getClassSignature(superclass))
node.add(translate('superclass=')..java_getClassSignature(superclass))
java_dereferenceLocalObject(superclass)
end
node.add('---Implemented interfaces---');
node.add(translate('---Implemented interfaces---'));
for i=1, #interfaces do
local name
if interfaces[i]>0 then
@ -1707,12 +1711,12 @@ function javaForm_treeviewExpanding(sender, node)
node.add(string.format("%x : %s", interfaces[i], name))
end
node.add('---Fields---');
node.add(translate('---Fields---'));
for i=1, #fields do
node.add(string.format("%x: %s: %s (%s)", fields[i].jfieldid, fields[i].name, fields[i].signature,fields[i].generic))
end
node.add('---Methods---');
node.add(translate('---Methods---'));
for i=1, #methods do
local n=node.add(string.format("%x: %s%s %s", methods[i].jmethodid, methods[i].name, methods[i].signature, methods[i].generic))
@ -1729,13 +1733,13 @@ end
function javaForm_searchClass(sender)
javaForm.findAll=false --classes only
javaForm.findDialog.Title="Search for class..."
javaForm.findDialog.Title=translate("Search for class...")
javaForm.findDialog.execute()
end
function javaForm_searchAll(sender)
javaForm.findAll=true --everything
javaForm.findDialog.Title="Search for..."
javaForm.findDialog.Title=translate("Search for...")
javaForm.findDialog.execute()
end
@ -1824,7 +1828,7 @@ function varscan_firstScan(sender)
varscan_showResults(count)
sender.Caption="New Scan"
sender.Caption=translate("New Scan")
sender.Tag=1
java.varscan.NextScan.Enabled=#java.varscan.currentresults>0
@ -1834,7 +1838,7 @@ function varscan_firstScan(sender)
java_search_finish()
java.varscan.NextScan.Enabled=false
sender.Caption="First Scan"
sender.Caption=translate("First Scan")
sender.Tag=0
end
end
@ -1873,7 +1877,7 @@ function miJavaVariableScanClick(sender)
varscan.form.Width=400
varscan.form.Height=400
varscan.form.Position=poScreenCenter
varscan.form.Caption="Java Variable Scanner"
varscan.form.Caption=translate("Java Variable Scanner")
varscan.form.BorderStyle=bsSizeable
@ -1884,13 +1888,13 @@ function miJavaVariableScanClick(sender)
varscan.ValueText=createLabel(varscan.controls)
varscan.ValueText.Caption="Value"
varscan.ValueText.Caption=translate("Value")
varscan.FirstScan=createButton(varscan.controls)
varscan.FirstScan.Caption="First Scan"
varscan.FirstScan.Caption=translate("First Scan")
varscan.NextScan=createButton(varscan.controls)
varscan.NextScan.Caption="Next Scan"
varscan.NextScan.Caption=translate("Next Scan")
local width=6+math.max(varscan.form.Canvas.getTextWidth(varscan.FirstScan.Caption), varscan.form.Canvas.getTextWidth(varscan.NextScan.Caption)) --guess which one will be bigger... (just in case someone translates this)
@ -1939,7 +1943,7 @@ function miJavaVariableScanClick(sender)
varscan.Count=createLabel(varscan.ResultPanel)
varscan.Count.Caption="Found:"
varscan.Count.Caption=translate("Found:")
varscan.Count.Align=alTop
varscan.Results=createListBox(varscan.ResultPanel)
@ -1950,7 +1954,7 @@ function miJavaVariableScanClick(sender)
local mi
mi=createMenuItem(varscan.Results.PopupMenu)
mi.Caption="Find what accesses this value"
mi.Caption=translate("Find what accesses this value")
mi.OnClick=miFindWhatAccessClick;
varscan.Results.PopupMenu.Items.add(mi)
@ -2016,20 +2020,20 @@ function miJavaDissectClick(sender)
javaForm.menu=createMainMenu(javaForm.form)
local searchmenu=createMenuItem(javaForm.menu)
searchmenu.caption="Search"
searchmenu.caption=translate("Search")
javaForm.menu.items.add(searchmenu)
local searchClass=createMenuItem(javaForm.menu)
searchClass.caption="Find Class"
searchClass.caption=translate("Find Class")
searchClass.Shortcut="Ctrl+F"
searchClass.OnClick=javaForm_searchClass
searchmenu.add(searchClass)
local searchAll=createMenuItem(javaForm.menu)
searchAll.caption="Find..."
searchAll.caption=translate("Find...")
searchAll.Shortcut="Ctrl+Alt+F"
searchAll.OnClick=javaForm_searchAll
searchmenu.add(searchAll)
@ -2042,7 +2046,7 @@ function miJavaDissectClick(sender)
javaForm.popupMenu=createPopupMenu(javaForm.treeview)
javaForm.miEditMethod=createMenuItem(javaForm.popupMenu)
javaForm.miEditMethod.Caption="Edit method"
javaForm.miEditMethod.Caption=translate("Edit method")
javaForm.miEditMethod.OnClick=miEditMethodClick
javaForm.popupMenu.Items.Add(javaForm.miEditMethod)
@ -2297,7 +2301,7 @@ function java_OpenProcessAfterwards()
mi=createMenuItem(miJavaTopMenuItem)
mi.Caption="Activate java features"
mi.Caption=translate("Activate java features")
mi.OnClick=miJavaActivateClick
mi.Enabled=usesjava
mi.Name="miActivate"
@ -2305,7 +2309,7 @@ function java_OpenProcessAfterwards()
miJavaTopMenuItem.Add(mi)
mi=createMenuItem(miJavaTopMenuItem)
mi.Caption="Dissect java classes"
mi.Caption=translate("Dissect java classes")
mi.Shortcut="Ctrl+Alt+J"
mi.OnClick=miJavaDissectClick
mi.Enabled=usesjava
@ -2313,7 +2317,7 @@ function java_OpenProcessAfterwards()
miJavaTopMenuItem.Add(mi)
mi=createMenuItem(miJavaTopMenuItem)
mi.Caption="Java variable scan"
mi.Caption=translate("Java variable scan")
mi.Shortcut="Ctrl+Alt+S"
mi.OnClick=miJavaVariableScanClick
mi.Enabled=usesjava
@ -2325,7 +2329,7 @@ function java_OpenProcessAfterwards()
miJavaTopMenuItem.Add(mi)
mi=createMenuItem(miJavaTopMenuItem)
mi.Caption="Debug child processes"
mi.Caption=translate("Debug child processes")
mi.OnClick=miJavaSetEnvironmentClick
mi.Enabled=getOpenedProcessID()~=0
mi.Name="miDebugChildren"
@ -2355,7 +2359,7 @@ function javaAA_USEJAVA(parameters, syntaxcheckonly)
if (syntaxcheckonly==false) and (javaInjectAgent()==0) then
return nil,"The java handler failed to initialize"
return nil,translate("The java handler failed to initialize")
end
return "" --return an empty string (removes it from the internal aa assemble list)
@ -2436,7 +2440,7 @@ function java_initialize()
java.settings={}
local cbAlwaysShowMenu=createCheckBox(java.settingsTab)
cbAlwaysShowMenu.Caption="Show java menu item even if the target process hasn't loaded jvm.dll (Used for the local setEnvironment option)"
cbAlwaysShowMenu.Caption=translate("Show java menu item even if the target process hasn't loaded jvm.dll (Used for the local setEnvironment option)")
cbAlwaysShowMenu.AnchorSideLeft.Control=java.settingsTab
cbAlwaysShowMenu.AnchorSideLeft.Side="asrLeft"

View File

@ -1,3 +1,7 @@
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'luascripts.po')
end
--Java class editor
@ -468,7 +472,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
if data~=nil then
if type(data.bytecount)=='function' then
error(data.operation..' is currently not implemented')
error(data.operation..translate(' is currently not implemented'))
end
result={}
@ -485,7 +489,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
if wide then
parameters=data.wideparameters
if parameters==nil then
error('wide can not be used with '..data.operation)
error(translate('wide can not be used with ')..data.operation)
end
table.insert(result, 0xc4)
else
@ -496,7 +500,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
if parameters~=nil then
if #userparameters~=#parameters then
error('Invalid amount of parameters provided for '..data.operation)
error(translate('Invalid amount of parameters provided for ')..data.operation)
end
@ -518,7 +522,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
end
if tonumber(result.parameters[i])==nil then
error("The label "..userparameters[i].."is not yet defined")
error(translate("The label ")..userparameters[i]..translate("is not yet defined"))
end
if (updatelabels~=nil) and (updatelabels==true) then
@ -554,7 +558,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
elseif parameters[i].paramtype=='u4' then
bytes=dwordToByteTable(tonumber(userparameters[i]) % 65536)
else
error('This instruction is currently not implemented')
error(translate('This instruction is currently not implemented'))
end
for j=1, #bytes do
@ -566,7 +570,7 @@ function singleLineBytecodeAssembler(address, instruction, labels, updatelabels)
result.bytesize=#result.bytes
else
error('unknown instruction:'..operation);
error(translate('unknown instruction:')..operation);
end
return result
@ -610,7 +614,7 @@ function javaclass_applyAssembleCommand(class, method, byteindex, instruction, i
end
if oldcode==nil then
error('You can only replace instructions on an instruction boundary')
error(translate('You can only replace instructions on an instruction boundary'))
end
offset=newcode.bytesize-oldcode.bytesize
@ -647,7 +651,7 @@ end
function javaclass_updateOffsets(class, method, startindex, offset)
print("si="..startindex.." offset="..offset)
print(translate("si=")..startindex..translate(" offset=")..offset)
local i,j
local codeattribute=javaclass_method_findCodeAttribute(method)
@ -890,7 +894,7 @@ function javaclasseditor_editMethod_insertLine(sender)
local byteindex=code[linenr+1].byteindex
local line=inputQuery('Insert line', 'Input the java assembly code you wish to insert at line '..linenr..'(byteindex '..byteindex..')','')
local line=inputQuery(translate('Insert line'), translate('Input the java assembly code you wish to insert at line ')..linenr..'(byteindex '..byteindex..')','')
if line~=nil then
--showMessage('Assembling '..line)
--assemble
@ -920,7 +924,7 @@ function javaclasseditor_editMethod_editLine(sender)
local originalcode=code[linenr+1].operation..' '..code[linenr+1].parameter
local line=inputQuery('Edit line', 'Input the java assembly code you wish to insert at line '..linenr..'(byteindex '..byteindex..')',originalcode)
local line=inputQuery(translate('Edit line'), translate('Input the java assembly code you wish to insert at line ')..linenr..'(byteindex '..byteindex..')',originalcode)
if line~=nil then
javaclass_applyAssembleCommand(classMethod.class, classMethod.method, byteindex, line, false)
@ -944,14 +948,14 @@ function javaclasseditor_editMethod_defineLabel(sender)
end
local byteindex=code[linenr+1].byteindex
local labelname=inputQuery('Define new label', 'Give a labelname for line '..linenr..'(byteindex '..byteindex..')','')
local labelname=inputQuery(translate('Define new label'), translate('Give a labelname for line ')..linenr..'(byteindex '..byteindex..')','')
if (labelname~=nil) and (labelname~='') then
local i
--check if it already exists
for i=1,#labels do
if labels[i].labelname==labelname then
error('There is already a label with this name')
error(translate('There is already a label with this name'))
end
end
@ -1013,9 +1017,9 @@ ca=codeattribute
java_write_u2(s, codeattribute.attributes_count)
java_writeAttributes(s, codeattribute.attributes, codeattribute.attributes_count)
print(string.format("old bsize=%d new bsize=%d", codeattribute.code_length, bytesize))
print(string.format(translate("old bsize=%d new bsize=%d"), codeattribute.code_length, bytesize))
print(string.format("old size=%d new size=%d", #codeattribute.info, #s.data))
print(string.format(translate("old size=%d new size=%d"), #codeattribute.info, #s.data))
codeattribute.info=s.data
@ -1055,15 +1059,15 @@ function javaclasseditor_editMethod(class, method, callbackfunction, callbackpar
method.editor.form.width=640
method.editor.form.height=480
method.editor.form.caption="Method: "..class.constant_pool[class.constant_pool[class.this_class].name_index].utf8.."."..class.constant_pool[method.name_index].utf8
method.editor.form.caption=translate("Method: ")..class.constant_pool[class.constant_pool[class.this_class].name_index].utf8.."."..class.constant_pool[method.name_index].utf8
method.editor.form.Position=poScreenCenter
method.editor.lblMaxStack=createLabel(method.editor.form)
method.editor.lblMaxLocals=createLabel(method.editor.form)
method.editor.lblMaxStack.caption="Max Stack"
method.editor.lblMaxLocals.caption="Max Locals"
method.editor.lblMaxStack.caption=translate("Max Stack")
method.editor.lblMaxLocals.caption=translate("Max Locals")
method.editor.edtMaxStack=createEdit(method.editor.form)
method.editor.edtMaxLocals=createEdit(method.editor.form)
@ -1101,7 +1105,7 @@ function javaclasseditor_editMethod(class, method, callbackfunction, callbackpar
method.editor.btnApplyChanges=createButton(method.editor.form)
method.editor.btnApplyChanges.AutoSize=true
method.editor.btnApplyChanges.Caption="Save changes"
method.editor.btnApplyChanges.Caption=translate("Save changes")
method.editor.btnApplyChanges.OnClick=btnApplyChangesClick
method.editor.btnApplyChanges.Tag=classMethodRef
@ -1125,11 +1129,11 @@ function javaclasseditor_editMethod(class, method, callbackfunction, callbackpar
local lcInstruction=columns.add()
lcIndex.Caption="Index"
lcByteIndex.Caption="ByteIndex"
lcLabel.Caption="Label"
lcException.Caption="Exception"
lcInstruction.Caption="Instruction"
lcIndex.Caption=translate("Index")
lcByteIndex.Caption=translate("ByteIndex")
lcLabel.Caption=translate("Label")
lcException.Caption=translate("Exception")
lcInstruction.Caption=translate("Instruction")
lcByteIndex.width=100
@ -1159,19 +1163,19 @@ function javaclasseditor_editMethod(class, method, callbackfunction, callbackpar
method.editor.pmEdit.Tag=classMethodRef
local miInsertLine=createMenuItem(method.editor.pmEdit)
miInsertLine.caption="Insert line"
miInsertLine.caption=translate("Insert line")
miInsertLine.onClick=javaclasseditor_editMethod_insertLine
miInsertLine.Shortcut="Ctrl+I"
miInsertLine.Tag=classMethodRef
local miEditLine=createMenuItem(method.editor.pmEdit)
miEditLine.caption="Edit line"
miEditLine.caption=translate("Edit line")
miEditLine.onClick=javaclasseditor_editMethod_editLine
miEditLine.Shortcut="Ctrl+E"
miEditLine.Tag=classMethodRef
local miDefineLine=createMenuItem(method.editor.pmEdit)
miDefineLine.caption="Define label"
miDefineLine.caption=translate("Define label")
miDefineLine.onClick=javaclasseditor_editMethod_defineLabel
miDefineLine.Shortcut="Ctrl+L"
miDefineLine.Tag=classMethodRef

View File

@ -1,3 +1,7 @@
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'luascripts.po')
end
require([[autorun\javaClassEditor]])
--parser for .class files and java bytecode
@ -217,7 +221,7 @@ function java_parseConstantPool(s, count)
if java_parseConstantPoolTag[tag]~=nil then
result[i]=java_parseConstantPoolTag[tag](s)
else
error("Invalid constant pool tag encountered: "..s.index.." (tag="..tag..") (i="..i..")")
error(translate("Invalid constant pool tag encountered: ")..s.index..translate(" (tag=")..tag..") (i="..i..")")
end
end
@ -377,7 +381,7 @@ function java_parseClass(data)
result.magic=java_read_u4(s)
if (result.magic~=0xcafebabe) then
error("Not a valid classfile")
error(translate("Not a valid classfile"))
end
result.minor_version=java_read_u2(s)

View File

@ -1,3 +1,7 @@
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'luascripts.po')
end
MONOCMD_INITMONO=0
MONOCMD_OBJECT_GETCLASS=1
MONOCMD_ENUMDOMAINS=2
@ -165,7 +169,7 @@ function LaunchMonoDataCollector()
end
if injectDLL(getCheatEngineDir()..[[\autorun\dlls\]]..dllname)==false then
print("Failure injecting the MonoDatacollector dll")
print(translate("Failure injecting the MonoDatacollector dll"))
return 0
end
@ -246,7 +250,7 @@ function mono_structureNameLookupCallback(address)
local always=monoSettings.Value["AlwaysUseForDissect"]
local r
if (always==nil) or (always=="") then
r=messageDialog("Do you wish to let the mono extention figure out the name and start address? If it's not a proper object this may crash the target.", mtConfirmation, mbYes, mbNo, mbYesToAll, mbNoToAll)
r=messageDialog(translate("Do you wish to let the mono extention figure out the name and start address? If it's not a proper object this may crash the target."), mtConfirmation, mbYes, mbNo, mbYesToAll, mbNoToAll)
else
if (always=="1") then
r=mrYes
@ -666,11 +670,11 @@ function mono_class_findInstancesOfClass(domain, klass, OnScanDone, ProgressBar)
fl.initialize()
local r=createForm(false)
r.caption='Instances of '..mono_class_getName(klass)
r.caption=translate('Instances of ')..mono_class_getName(klass)
local lb=createListBox(r)
local w=createLabel(r)
w.Caption='Warning: These are just guesses. Validate them yourself'
w.Caption=translate('Warning: These are just guesses. Validate them yourself')
w.Align=alTop
lb.align=alClient
lb.OnDblClick=function(sender)
@ -846,7 +850,7 @@ function mono_object_findRealStartOfObject(address, maxsize)
end
if address==nil then
error("address==nil")
error(translate("address==nil"))
end
local currentaddress=bAnd(address, 0xfffffffffffffffc)
@ -1347,14 +1351,14 @@ function mono_invoke_method_dialog(domain, method)
mifinfo.mif.Caption='Invoke '..classname..mono_method_getName(method)
mifinfo.mif.Caption=translate('Invoke ')..classname..mono_method_getName(method)
mifinfo.lblInstanceAddress=createLabel(mifinfo.mif)
mifinfo.lblInstanceAddress.Caption='Instance address'
mifinfo.lblInstanceAddress.Caption=translate('Instance address')
mifinfo.cbInstance=createComboBox(mifinfo.mif)
--start a scan to fill the combobox with results
mifinfo.cbInstance.Items.add('<Please wait...>')
mifinfo.cbInstance.Items.add(translate('<Please wait...>'))
mono_class_findInstancesOfClass(nil,c,function(m)
--print("Scan done")
@ -1384,7 +1388,7 @@ function mono_invoke_method_dialog(domain, method)
]]
mifinfo.gbParams=createGroupBox(mifinfo.mif)
mifinfo.gbParams.Caption='Parameters'
mifinfo.gbParams.Caption=translate('Parameters')
mifinfo.gbParams.ChildSizing.ControlsPerLine=2
@ -1410,8 +1414,8 @@ function mono_invoke_method_dialog(domain, method)
mifinfo.pnlButtons.AutoSize=true
mifinfo.btnOk.caption='OK'
mifinfo.btnCancel.caption='Cancel'
mifinfo.btnOk.caption=translate('OK')
mifinfo.btnCancel.caption=translate('Cancel')
mifinfo.btnCancel.Cancel=true
@ -1480,7 +1484,7 @@ function mono_invoke_method_dialog(domain, method)
end
if instance==nil then
messageDialog(mifinfo.cbInstance.Text..' is not a valid address', mtError, mbOK)
messageDialog(mifinfo.cbInstance.Text..translate(' is not a valid address'), mtError, mbOK)
return
end
@ -1498,7 +1502,7 @@ function mono_invoke_method_dialog(domain, method)
end
if args[i].value==nil then
messageDialog('parameter '..i..': "'..mifinfo.parameters[i].edtVarText.Text..'" is not a valid value', mtError, mbOK)
messageDialog(translate('parameter ')..i..': "'..mifinfo.parameters[i].edtVarText.Text..translate('" is not a valid value'), mtError, mbOK)
return
end
end
@ -1661,7 +1665,7 @@ function monoform_miGetILCodeClick(sender)
if (node~=nil) and (node.Level==4) and (node.Parent.Text=='methods') then
local r,s=mono_getILCodeFromMethod(node.Data)
if r~=nil then
print(string.format("ILCode from %x to %x", r,r+s))
print(string.format(translate("ILCode from %x to %x"), r,r+s))
end
end
end
@ -1741,7 +1745,7 @@ function monoform_AddStaticClass(domain, image, class)
local prefix, rootmr, mr
prefix = ''
rootmr=addresslist_createMemoryRecord(addrs)
rootmr.Description = "Resolve "..classname
rootmr.Description = translate("Resolve ")..classname
rootmr.Type = vtAutoAssembler
local symclassname = classname:gsub("([^A-Za-z0-9%.,_$`<>%[%]])", "")
@ -1774,7 +1778,7 @@ function monoform_AddStaticClass(domain, image, class)
local fieldName = fields[i].name:gsub("([^A-Za-z0-9%.,_$`<>%[%]])", "")
local offset = fields[i].offset
if fieldName==nil or fieldName:len()==0 then
fieldName = string.format("Offset %x", offset)
fieldName = string.format(translate("Offset %x"), offset)
end
mr=addresslist_createMemoryRecord(addrs)
mr.Description=prefix..fieldName
@ -1814,7 +1818,7 @@ function monoform_AddStaticClassField(domain, image, class, fieldclass, field)
local fieldname = fields[i].name
local offset = fields[i].offset
if fieldname==nil or fieldname:len()==0 then
fieldname = string.format("Offset %x", offset)
fieldname = string.format(translate("Offset %x"), offset)
end
local addrs = getAddressList()
@ -1824,7 +1828,7 @@ function monoform_AddStaticClassField(domain, image, class, fieldclass, field)
local rootmr, mr
rootmr=addresslist_createMemoryRecord(addrs)
rootmr.Description = "Resolve "..classname.."."..fieldname
rootmr.Description = translate("Resolve ")..classname.."."..fieldname
rootmr.Type = vtAutoAssembler
local symclassname = classname:gsub("[^A-Za-z0-9._]", "")
@ -1994,7 +1998,7 @@ function monoform_EnumFields(node, static)
local fields=mono_class_enumFields(class)
for i=1, #fields do
if fields[i].isStatic == static and not fields[i].isConst then
local n=node.add(string.format("%x : %s (type: %s)", fields[i].offset, fields[i].name, fields[i].typename))
local n=node.add(string.format(translate("%x : %s (type: %s)"), fields[i].offset, fields[i].name, fields[i].typename))
n.Data=fields[i].field
end
end
@ -2158,7 +2162,7 @@ end
function monoform_miExpandAllClick(sender)
if messageDialog("Are you sure you wish to expand the whole tree? This can take a while and Cheat Engine may look like it has crashed (It has not)", mtConfirmation, mbYes, mbNo)==mrYes then
if messageDialog(translate("Are you sure you wish to expand the whole tree? This can take a while and Cheat Engine may look like it has crashed (It has not)"), mtConfirmation, mbYes, mbNo)==mrYes then
monoForm.TV.beginUpdate()
monoForm.autoExpanding=true --special feature where a base object can contain extra lua variables
monoForm.TV.fullExpand()
@ -2208,7 +2212,7 @@ end
function miMonoActivateClick(sender)
if LaunchMonoDataCollector()==0 then
showMessage("Failure to launch")
showMessage(translate("Failure to launch"))
end
end
@ -2245,17 +2249,17 @@ function mono_OpenProcessMT(t)
if (mfm) then
local mi
miMonoTopMenuItem=createMenuItem(mfm)
miMonoTopMenuItem.Caption="Mono"
miMonoTopMenuItem.Caption=translate("Mono")
mfm.Items.insert(mfm.Items.Count-1, miMonoTopMenuItem) --add it before help
mi=createMenuItem(miMonoTopMenuItem)
mi.Caption="Activate mono features"
mi.Caption=translate("Activate mono features")
mi.OnClick=miMonoActivateClick
mi.Name='miMonoActivate'
miMonoTopMenuItem.Add(mi)
mi=createMenuItem(miMonoTopMenuItem)
mi.Caption="Dissect mono"
mi.Caption=translate("Dissect mono")
mi.Shortcut="Ctrl+Alt+M"
mi.OnClick=miMonoDissectClick
mi.Name='miMonoDissect'
@ -2354,7 +2358,7 @@ function monoAA_USEMONO(parameters, syntaxcheckonly)
--you'd then call it using usemono(00400500) for example
if (syntaxcheckonly==false) and (LaunchMonoDataCollector()==0) then
return nil,"The mono handler failed to initialize"
return nil,translate("The mono handler failed to initialize")
end
return "" --return an empty string (removes it from the internal aa assemble list)
@ -2389,13 +2393,13 @@ function monoAA_FINDMONOMETHOD(parameters, syntaxcheckonly)
classname=string.sub(fullmethodnamestring, c+1, e-1)
methodname=string.sub(fullmethodnamestring, e+1, #fullmethodnamestring)
else
return nil,"Invalid parameters (Methodname could not be determined)"
return nil,translate("Invalid parameters (Methodname could not be determined)")
end
else
return nil,"Invalid parameters (Classname could not be determined)"
return nil,translate("Invalid parameters (Classname could not be determined)")
end
else
return nil,"Invalid parameters (name could not be determined)"
return nil,translate("Invalid parameters (name could not be determined)")
end
@ -2412,18 +2416,18 @@ function monoAA_FINDMONOMETHOD(parameters, syntaxcheckonly)
end
if (monopipe==nil) or (monopipe.Connected==false) then
return nil,"The mono handler failed to initialize"
return nil,translate("The mono handler failed to initialize")
end
local method=mono_findMethod(namespace, classname, methodname)
if (method==0) then
return nil,fullmethodnamestring.." could not be found"
return nil,fullmethodnamestring..translate(" could not be found")
end
methodaddress=mono_compile_method(method)
if (methodaddress==0) then
return nil,fullmethodnamestring.." could not be jitted"
return nil,fullmethodnamestring..translate(" could not be jitted")
end
@ -2439,7 +2443,7 @@ function monoform_getStructMap()
local structmap={}
local n=getStructureCount()
if n==nil then
showMessage("Sorry this feature does not work yet. getStructureCount needs patching first.")
showMessage(translate("Sorry this feature does not work yet. getStructureCount needs patching first."))
return nil
end
local fillChildStruct = function (struct, structmap)
@ -2475,7 +2479,7 @@ function mono_purgeDuplicateGlobalStructures()
local name
local s
for name, s in pairs(slist) do
print("Removing "..name)
print(translate("Removing ")..name)
structure_removeFromGlobalStructureList(s)
end
end
@ -2555,15 +2559,15 @@ function mono_reloadGlobalStructures(imagename)
end
end
for fqclass, caddr in pairs(classmap) do
print("Reloading Structure "..fqclass)
print(translate("Reloading Structure ")..fqclass)
monoform_exportStruct(caddr, fqclass, true, false, smap, false, true)
end
for fqclass, caddr in pairs(arraymap) do
print("Reloading Structure "..fqclass)
print(translate("Reloading Structure ")..fqclass)
monoform_exportArrayStruct(nil, caddr, fqclass, true, false, smap, false, true)
end
for fqclass, caddr in pairs(staticmap) do
print("Reloading Structure "..fqclass)
print(translate("Reloading Structure ")..fqclass)
monoform_exportStruct(caddr, fqclass, true, true, smap, false, true)
end
end
@ -2817,12 +2821,12 @@ function monoAA_GETMONOSTRUCT(parameters, syntaxcheckonly)
local class=mono_findClass(namespace, classname)
if (class==nil) or (class==0) then
return nil,"The class "..namespace..":"..classname.." could not be found"
return nil,translate("The class ")..namespace..":"..classname..translate(" could not be found")
end
local fields=mono_class_enumFields(class)
if (fields==nil) or (#fields==0) then
return nil,namespace..":"..classname.." has no fields"
return nil,namespace..":"..classname..translate(" has no fields")
end

View File

@ -1,5 +1,5 @@
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'SaveSessions.po')
loadPOFile(getTranslationFolder()..'luascripts.po')
end

View File

@ -3,7 +3,7 @@
--For the translators:
if getTranslationFolder()~='' then
loadPOFile(getTranslationFolder()..'VersionCheck.po')
loadPOFile(getTranslationFolder()..'luascripts.po')
end
vsettings=getSettings("VersionCheck")

View File

@ -0,0 +1,462 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: versioncheck-U2CVICNEL
msgid "Unable to check version (Invalid content, not enough lines)"
msgstr ""
#: versioncheck-U2CVIC
msgid "Unable to check version (Invalid content)"
msgstr ""
#: versioncheck-CFNV
msgid "Check for new version"
msgstr ""
#: versioncheck-NCA
msgid "Cheat Engine %s is available at www.cheatengine.org. Go there now?"
msgstr ""
#: versioncheck-UP2D
msgid "You are up to date. The latest version is %s"
msgstr ""
#: versioncheck-WTF
msgid "Unable to check version (Can't connect)"
msgstr ""
#: savesession-OaPF
msgid "Open a process first"
msgstr ""
#: savesession-CESF
msgid "Cheat Engine Scan files"
msgstr ""
#: savesession-OaPFDaS
msgid "Open a process first and do a scan"
msgstr ""
#: savesession-SSS
msgid "Save scan session"
msgstr ""
#: savesession-LSS
msgid "Load scan session"
msgstr ""
#: monoscript-FITM
msgid "Failure injecting the MonoDatacollector dll"
msgstr ""
#: monoscript-DYWTL
msgid "Do you wish to let the mono extention figure out the name and start address? If it's not a proper object this may crash the target."
msgstr ""
#: monoscript-IO
msgid "Instances of "
msgstr ""
#: monoscript-WTAJG
msgid "Warning: These are just guesses. Validate them yourself"
msgstr ""
#: monoscript-AN
msgid "address==nil"
msgstr ""
#: monoscript-Invoke
msgid "Invoke "
msgstr ""
#: monoscript-IA
msgid "Instance address"
msgstr ""
#: monoscript-PW
msgid "<Please wait...>"
msgstr ""
#: monoscript-Parameters
msgid "Parameters"
msgstr ""
#: monoscript-OK
msgid "OK"
msgstr ""
#: monoscript-Cancel
msgid "Cancel"
msgstr ""
#: monoscript-Parameter
msgid "parameter "
msgstr ""
#: monoscript-INAVA
msgid "\" is not a valid value"
msgstr ""
#: monoscript-IFT
msgid "ILCode from %x to %x"
msgstr ""
#: monoscript-OX
msgid "Offset %x"
msgstr ""
#: monoscript-Resolve
msgid "Resolve "
msgstr ""
#: monoscript-XSTS
msgid "\"%x : %s (type: %s)\""
msgstr ""
#: monoscript-AYSYWTE
msgid "Are you sure you wish to expand the whole tree? This can take a while and Cheat Engine may look like it has crashed (It has not)"
msgstr ""
#: monoscript-FTL
msgid "Failure to launch"
msgstr ""
#: monoscript-Mono
msgid "Mono"
msgstr ""
#: monoscript-AMF
msgid "Activate mono features"
msgstr ""
#: monoscript-DM
msgid "Dissect mono"
msgstr ""
#: monoscript-TMHFTI
msgid "The mono handler failed to initialize"
msgstr ""
#: monoscript-IPMN
msgid "Invalid parameters (Methodname could not be determined)"
msgstr ""
#: monoscript-IPCN
msgid "Invalid parameters (Classname could not be determined)"
msgstr ""
#: monoscript-IPN
msgid "Invalid parameters (name could not be determined)"
msgstr ""
#: monoscript-CNBF
msgid " could not be found"
msgstr ""
#: monoscript-CNBJ
msgid " could not be jitted"
msgstr ""
#: monoscript-STFDNWY
msgid "Sorry this feature does not work yet. getStructureCount needs patching first."
msgstr ""
#: monoscript-Removing
msgid "Removing "
msgstr ""
#: monoscript-RS
msgid "Reloading Structure "
msgstr ""
#: monoscript-TC
msgid "The class "
msgstr ""
#: monoscript-HNF
msgid " has no fields"
msgstr ""
#: java-AAF
msgid "Auto assembler failed:"
msgstr ""
#: java-JEST
msgid "Java:eventserver terminated"
msgstr ""
#: java-JD
msgid "Java:Disconnected"
msgstr ""
#: java-JUER
msgid "Java:Unexpected event received"
msgstr ""
#: java-JEHT
msgid "Java:Event handler terminating"
msgstr ""
#: java-IJS
msgid "Invalid java signature"
msgstr ""
#: java-ARTANS
msgid "Array return types are not supported"
msgstr ""
#: java-PCDNM
msgid "Parameter count does not match"
msgstr ""
#: java-SWNS
msgid "Scantype was not set"
msgstr ""
#: java-Class
msgid "Class"
msgstr ""
#: java-Method
msgid "Method"
msgstr ""
#: java-Position
msgid "Position"
msgstr ""
#: java-MI
msgid "More info %s.%s(%d)"
msgstr ""
#: java-TDMATGV
msgid "The following methods accessed the given variable"
msgstr ""
#: java-results
msgid "results"
msgstr ""
#: java-OWWTJAILAS
msgid "java_find_what_writes only works when the jvmti agent is launched at start"
msgstr ""
#: java-Generic
msgid " Generic="
msgstr ""
#: java-SC
msgid "superclass="
msgstr ""
#: java-II
msgid "---Implemented interfaces---"
msgstr ""
#: java-Fields
msgid "-Fields---'"
msgstr ""
#: java-Methods
msgid "---Methods---"
msgstr ""
#: java-SFC
msgid "Search for class..."
msgstr ""
#: java-SF
msgid "Search for..."
msgstr ""
#: java-NewS
msgid "New Scan"
msgstr ""
#: java-FS
msgid "First Scan"
msgstr ""
#: java-JVScanner
msgid "Java Variable Scanner"
msgstr ""
#: java-Value
msgid "Value"
msgstr ""
#: java-NextS
msgid "Next Scan"
msgstr ""
#: java-Found
msgid "Found:"
msgstr ""
#: java-FWATV
msgid "Find what accesses this value"
msgstr ""
#: java-Search
msgid "Search"
msgstr ""
#: java-FC
msgid "Find Class"
msgstr ""
#: java-Finddotdotdot
msgid "Find..."
msgstr ""
#: java-EM
msgid "Edit method"
msgstr ""
#: java-AJF
msgid "Activate java features"
msgstr ""
#: java-DJC
msgid "Dissect java classes"
msgstr ""
#: java-JVScan
msgid "Java variable scan"
msgstr ""
#: java-DCP
msgid "Debug child processes"
msgstr ""
#: java-JHDTI
msgid "The java handler failed to initialize"
msgstr ""
#: java-SJMIEITTP
msgid "Show java menu item even if the target process hasn't loaded jvm.dll (Used for the local setEnvironment option)"
msgstr ""
#: javaclass-ICPTE
msgid "Invalid constant pool tag encountered: "
msgstr ""
#: javaclass-Tag
msgid " (tag="
msgstr ""
#: javaclass-NAVC
msgid "Not a valid classfile"
msgstr ""
#: javaclasseditor-ICNI
msgid " is currently not implemented"
msgstr ""
#: javaclasseditor-WCNBUW
msgid "wide can not be used with "
msgstr ""
#: javaclasseditor-IAOPPF
msgid "Invalid amount of parameters provided for "
msgstr ""
#: javaclasseditor-TL
msgid "The label "
msgstr ""
#: javaclasseditor-INYD
msgid "is not yet defined"
msgstr ""
#: javaclasseditor-TIICNI
msgid "This instruction is currently not implemented"
msgstr ""
#: javaclasseditor-UI
msgid "unknown instruction:"
msgstr ""
#: javaclasseditor-YCORI
msgid "You can only replace instructions on an instruction boundary"
msgstr ""
#: javaclasseditor-StartIndex
msgid "si="
msgstr ""
#: javaclasseditor-Offset
msgid " offset="
msgstr ""
#: javaclasseditor-IL
msgid "Insert line"
msgstr ""
#: javaclasseditor-ITJAC
msgid "Input the java assembly code you wish to insert at line "
msgstr ""
#: javaclasseditor-EL
msgid "Edit line"
msgstr ""
#: javaclasseditor-DNL
msgid "Define new label"
msgstr ""
#: javaclasseditor-GALFL
msgid "Give a labelname for line "
msgstr ""
#: javaclasseditor-TIAALWTN
msgid "There is already a label with this name"
msgstr ""
#: javaclasseditor-OBSNBS
msgid "old bsize=%d new bsize=%d"
msgstr ""
#: javaclasseditor-OSNS
msgid "old size=%d new size=%d"
msgstr ""
#: javaclasseditor-Method
msgid "Method: "
msgstr ""
#: javaclasseditor-MS
msgid "Max Stack"
msgstr ""
#: javaclasseditor-ML
msgid "Max Locals"
msgstr ""
#: javaclasseditor-SC
msgid "Save changes"
msgstr ""
#: javaclasseditor-Index
msgid "Index"
msgstr ""
#: javaclasseditor-BI
msgid "ByteIndex"
msgstr ""
#: javaclasseditor-Label
msgid "Label"
msgstr ""
#: javaclasseditor-Exception
msgid "Exception"
msgstr ""
#: javaclasseditor-Instruction
msgid "Instruction"
msgstr ""
#: javaclasseditor-DL
msgid "Define label"
msgstr ""