修复粘贴场地可能报错,补充缺失的文本

This commit is contained in:
MrZ626
2021-05-13 23:26:41 +08:00
parent 5eeab94368
commit 8d0bfce39f
8 changed files with 10 additions and 1 deletions

View File

@@ -114,7 +114,9 @@ function DATA.pasteBoard(str,page)--Paste [str] data to [page] board
local _,__ local _,__
--Decode --Decode
str=str:sub(str:find("%S"),str:find(".%s-$")) if not str:find("%S")then return end
str=str:sub((str:find("%S"))):reverse()
str=str:sub((str:find("%S"))):reverse()
_,str=pcall(data.decode,'string','base64',str) _,str=pcall(data.decode,'string','base64',str)
if not _ then return end if not _ then return end
_,str=pcall(data.decompress,'string','zlib',str) _,str=pcall(data.decompress,'string','zlib',str)

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exported successfully", exportSuccess="Exported successfully",
importSuccess="Imported successfully", importSuccess="Imported successfully",
dataCorrupted="Data corrupted", dataCorrupted="Data corrupted",
pasteWrongPlace="Paste at wrong place?",
noFile="File not found", noFile="File not found",
VKTchW="Touch Weight", VKTchW="Touch Weight",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exporté avec succès", exportSuccess="Exporté avec succès",
importSuccess="Importé avec succès", importSuccess="Importé avec succès",
dataCorrupted="Données corrompues", dataCorrupted="Données corrompues",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found", -- noFile="File not found",
VKTchW="Poids du toucher", VKTchW="Poids du toucher",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exportado com sucesso", exportSuccess="Exportado com sucesso",
importSuccess="Importado com sucesso", importSuccess="Importado com sucesso",
dataCorrupted="Data corrompida", dataCorrupted="Data corrompida",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found", -- noFile="File not found",
VKTchW="Peso de toque", VKTchW="Peso de toque",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exportado con éxito", exportSuccess="Exportado con éxito",
importSuccess="Importado con éxito", importSuccess="Importado con éxito",
dataCorrupted="Los datos están corruptos.", dataCorrupted="Los datos están corruptos.",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found", -- noFile="File not found",
VKTchW="Sens. al tacto", VKTchW="Sens. al tacto",

View File

@@ -47,6 +47,7 @@ return{
exportSuccess="~Out~", exportSuccess="~Out~",
importSuccess="~In~", importSuccess="~In~",
dataCorrupted="XXXXX", dataCorrupted="XXXXX",
pasteWrongPlace="_?X.",
-- noFile="File not found", -- noFile="File not found",
VKTchW="Tch↓", VKTchW="Tch↓",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="导出成功", exportSuccess="导出成功",
importSuccess="导入成功", importSuccess="导入成功",
dataCorrupted="数据损坏", dataCorrupted="数据损坏",
pasteWrongPlace="提醒:可能粘贴错地方了",
noFile="找不到文件", noFile="找不到文件",
VKTchW="触摸点权重", VKTchW="触摸点权重",

View File

@@ -229,6 +229,7 @@ function scene.keyDown(key)
if DATA.pasteBoard(str,page)then if DATA.pasteBoard(str,page)then
LOG.print(text.importSuccess,COLOR.G) LOG.print(text.importSuccess,COLOR.G)
else else
print(text.dataCorrupted)
LOG.print(text.dataCorrupted,COLOR.R) LOG.print(text.dataCorrupted,COLOR.R)
end end
elseif key=="pageup"then elseif key=="pageup"then