This commit is contained in:
2020-12-10 18:03:00 +00:00
parent a3756f93ac
commit acae28ffc4
7 changed files with 20 additions and 32 deletions

View File

@@ -1,5 +1,7 @@
Grab bag stuff that didn't fit into official TODO
todo: Look for english text at server and client source code and change it all to translation keys
todo: Users / Contacts lists not reportable from main UI
not using regular DataList for user lists and contact lists?
currently not reportable as a list easily since not a GZDataList but could probably rectify that even without switching to datalist

View File

@@ -5,30 +5,7 @@
MISC ITEMS THAT CAME UP
todo: CURRENTLY - translation code not working, possibly regex fucked, play with it
also it needs to fetch any thing it doesn't already have so it needs to prepare for that by compiling all the keys, attempting to cache them first then doing the rest
todo: Client all LT: error and message processing:
convention is always capitalized LT: followed by a unbroken string of text
It should *replace* the LT:string with the translation but keep the entire rest of the string
so instead of how it currently splits and expects one lt in the string instead it should use a regex (I know)
and get antying that is LT:toendoftextcharacts, translate it, then replace it in the string
This should be centralized and then can be used by error processor as well as extension error processor etc
basically the error to human string code should handle all this
Test with headoffice bulk delete
{"data":[
{"created":"2020-12-09T20:11:53.832772Z","statusText":"Processing job \"Bulk operation: DELETE on HeadOffice (2 specified) - BulkCoreBizObjectOperation:Delete\"","jobId":"3297acfa-cc30-403a-a6aa-f816a93213c9"},{"created":"2020-12-09T20:11:53.855505Z","statusText":"Bulk job Delete started...","jobId":"3297acfa-cc30-403a-a6aa-f816a93213c9"},
{"created":"2020-12-09T20:11:53.898064Z","statusText":"Error processing item 9: LT:Errors\r\nLT:ErrorAPI2208 ,LT:Customer\r\n","jobId":"3297acfa-cc30-403a-a6aa-f816a93213c9"},
{"created":"2020-12-09T20:11:53.905044Z","statusText":"Error processing item 4: LT:Errors\r\nLT:ErrorAPI2208 ,LT:Customer\r\n","jobId":"3297acfa-cc30-403a-a6aa-f816a93213c9"},
{"created":"2020-12-09T20:11:53.910072Z","statusText":"Bulk job Delete processed 2 of 2 with 2 failures","jobId":"3297acfa-cc30-403a-a6aa-f816a93213c9"}]}
AREAS_TO_CHANGE:
gzform.js line 688 LT:
translation.js
const regex = /\bLT:[a-zA-Z]*\b/g;
const found = stringtosearch.match(regex);
found=array of strings
todo: Job logs should all process the status text through a LT: translator as the changes above will cause them to log as LT and no longer with english