Of course you are right : even manually I could not succeed
Developing Externalize extension
#42
Posted 07 October 2006 - 10:10 AM
don't break your head with this extension
I re-try to contact the author of the extension and ask him
Thanks a lot for your interest
#43
Posted 07 October 2006 - 07:30 PM
It detects also strings into " " in the comments (not a bug of course, only useless)
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#44
Posted 08 October 2006 - 07:29 AM
A little observation while testing Externalize .js parser on Platypus extension :
It detects also strings into " " in the comments (not a bug of course, only useless)
Oh Goofy, I know it and I consider it a bug.
Honestly I've tried to fix it but with poor results.
Please wait some time before this bug can be fixed
Open bugs and improvents (please add yours if I missed someone)
Higher priority
* generate unique name when same string is present more than once
* fix report counters for JS files
* xml externalization can show the same "choose strings" dialog used by JS
* skip strings into JS comments
Lower priority
* make the .txt files editable and customizable throughout the extension interface
* definition files can be downloaded from a well known repository (similar to an update system)
* externalize starts from a given directory and its subdirectory getting all files (e.g. xml, js)
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#45
Posted 08 October 2006 - 08:08 AM
After the automatic naming,
these variables of the js file
var platypusokayimoccasional23 = myoverlaystrings.GetStringFromName("platypusokayimoccasional23");
are supposed to be related with these properties variables :
platypusokayimoccasional71=Okay, I'm *occasionally* wrong.
I am not 100% sure I did not make a mistake when testing. Just wait, I test on another file. Note that there is no problem inside the js file itself : the name of the variable is unchanged in the same js where the variables are used.
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#46
Posted 08 October 2006 - 08:19 AM
See attached the testcase with the original file, the modified one and the properties one.
Attached Files
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#47
Posted 08 October 2006 - 08:21 AM
I confirm when testing on a very simple file with only two strings to localize (one is a copyright, the other a confirm message) : externalize changes the number appended to the variable name when writing in the .properties file.
See attached the testcase with the original file, the modified one and the properties one.
Ok now I try to fix it.
I've found another bug, too.
Some strings are not property replaced (always in JS).
stay tuned
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#48
Posted 08 October 2006 - 08:25 AM
Now I have changed the variable name using Externalize feature, so it is valid in the js file :
gives :
alert(avzcopyright);
but still unchanged in the properties :
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#49
Posted 08 October 2006 - 08:37 AM
--- another test with same file
Now I have changed the variable name using Externalize feature, so it is valid in the js file :
gives :
but still unchanged in the properties :
Now should be fixed [attachmentid=1851]
Attached Files
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#51
Posted 08 October 2006 - 09:00 AM
My heartbeat has stopped for some seconds, you are gone near to lost a bonsai programmer
Oh my mistake this time, everything is ok now !
Thanks so much for your wizzard flash debugging !
Good
I've found a strange bug I hope to fix it ASAP
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#52
Posted 08 October 2006 - 12:42 PM
- report fixed for JS
- remove duplicate elements
- when user changes generated name the element is automatically selected.
I suppose user changes name for elements he/she want to externalize
If this build passes Goofy hard tests then I upload on dafizilla
[attachmentid=1852]
Attached Files
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#53
Posted 10 October 2006 - 06:49 AM
Thanks for the new features! I used Externalize to localize Platypus, an extension with many xul and many js files, and it was working fine.
* Accurate report for the js string count
* Good detection of duplicate strings (listed like e.g "Platypus Help on lines 223, 257, 670")
* no problem to change the variable names
I suggest it is satisfactory and should be uploaded on dafzilla
--------about comments
If we have this kind of codelines :
//alert(itemiFrames.length);
var frame, iframe;
if (itemFrames.length > 0)
{
for (var i = 0; i< itemFrames.length; i++)
{
frame = itemFrames[i].contentDocument;
this.CheckFrames(frame, id); // recursion for frames
}
}
if (itemiFrames.length > 0)
{
for (var i = 0; i < itemiFrames.length; i++)
{
iframe = itemiFrames[i].contentDocument;
this.CheckFrames(iframe, id); // recursion for iframes
}
}
}
this.onToolsMenu=function() //open setting dialog!
{
var win=window.openDialog("chrome://batchdownload/content/config.xul",
"Batchdownload", "chrome,centerscreen",null);
win.focus();
I suppose it will not be difficult to declare :
if // is detected then skip this line and go to the next one
but then a line with an address including double slash will be skipped too with possible string on the same line being ignored... Unless some declaration tells :
- ignore double slash inside " " quotation marks.
...but I am sure you have already thought of all that before me and much more accurately.
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#54
Posted 10 October 2006 - 07:03 AM
* Accurate report for the js string count
* Good detection of duplicate strings (listed like e.g "Platypus Help on lines 223, 257, 670")
* no problem to change the variable names
I suggest it is satisfactory and should be uploaded on dafzilla
Very good news
Ok I upload on dafizilla ASAP.
If we have this kind of codelines :
[CUT]
I suppose it will not be difficult to declare :
if // is detected then skip this line and go to the next one
but then a line with an address including double slash will be skipped too with possible string on the same line being ignored... Unless some declaration tells :
- ignore double slash inside " " quotation marks.
...but I am sure you have already thought of all that before me and much more accurately.
Detect comments ins't difficult but there are two types of comment:
1. inline comment starting with //
2. multiple line comment starting with /* and ending with */
Detecting inline comment is easy, detecting multiple line is a bit more complicated due to my extraction strings algorithm.
I need to change algorithm and this is a bit invaside.
As you know I'm working to fix this problem that fortunately is affordable
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#55
Posted 10 October 2006 - 10:53 AM
* avoid entitizing of isolated numbers, considering they need not to be translated
This should be fixed in 0.0.41, may you confirm me?
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#56
Posted 10 October 2006 - 11:25 AM
On BabelWiki I read:
This should be fixed in 0.0.41, may you confirm me?
Oh yes I may
Sorry for being lazy : I should have updated the wiki page... but your are too fast with new builds evry now and then
@Pedro : if you have one moment left, would you please get another screenshot for step 8, considering the interface has changed (check all/uncheck all, rename...). thanks in advance
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#57
Posted 10 October 2006 - 12:58 PM
@Pedro : if you have one moment left, would you please get another screenshot for step 8, considering the interface has changed (check all/uncheck all, rename...). thanks in advance
Of course! I will do it this evening
#58
Posted 10 October 2006 - 08:46 PM
I have uploaded two images for step eight, if you want you can add some text between them... I am not the better man for doing that
A little question... how can I delete, from wiki database, not used images?
Bye bye
#59
Posted 10 October 2006 - 09:18 PM
(I have added some lines)
- You cannot delete wiki pages throughout the interface (I supose it is the same with uploaded files). In case of error you can just edit and save a previous version, see history tab).
To really delete something you must do it in the database I think. Don't worry for your old images, there is still room left on BabelWiki
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#60
Posted 22 October 2006 - 09:02 AM
I have noticed there are still sometimes double similar entities created with same name and same strings, I don't know why because generally there is the appending number that allows entity names to be different, but sometimes there is no such number.
In a distant future, it would be good to have this feature :
For xml files, the user should have the choice between
- automatic detecting and replacement (just as it works fine now)
- selection of items to be transferred just as it works fine for .js files now
Thank you again, dear Davide, for the very kind and smart work you have done !
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users