Developing Externalize extension
#21
Posted 01 October 2006 - 08:37 AM
Fixed bugs described in previous posts and added the ability to pass a file containing regular expressions used to exclude strings to externalize in JS files.
The file is not mandatory, if not passed a default set is used that removes escape sequences and single chars surronded by whitespaces.
Goofy I think only you and me use Externalize
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#22
Posted 01 October 2006 - 09:21 AM
The useless characters and signs did not appear in the list. Fine. Some little things now :
1. I think it should be "on line 32" instead of "at line 32" (just a detail, sorry for annoying you)
2. The xml parser should :
- Not localize numbers in lines like
- still localize lines like
Dear Davide
Please consider that indirectly you are giving great help to developers. Last night I Externalized another extension (#55) and sent it to the author. I generally receive enthusiastic feedback and heaps of thanks that YOU deserve !
What you MUST do NOW :
1. Post a message and link on this Moz'ine forum
http://forums.mozillazine.org/viewforum.php?f=19
with a short explanation
2. Submit your extension on Moz addons.
I know your arguments, here are my answers :
- But Goofy this extension is under development,I cannot make it public before it is perfect!
- Oh yes you can! I am testing new submitted extensions every day and i can tell you half of them are badly working, very uncomplete or just silly. Externalize is working now, is very advanced now, and a smart process.
- But Goofy, I have serious work to do, and few free time to manage this extension and its release process
- Consider the time you have already spent on it (because of my insistence ) : it is nothing to spend 30 minutes to release it as official. I am sure you are too modest, you are not a bonsai programer : your work deserves public recognition
- OK, Goofy, I shall do that
- Good Davide, now you are reasonable
Now just say OK
Attached Files
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#23
Posted 01 October 2006 - 09:44 AM
1. I think it should be "on line 32" instead of "at line 32" (just a detail, sorry for annoying you)
Oh yes, I think both forms are legal but "on line 32" sounds well.
2. The xml parser should :
- Not localize numbers in lines like
- still localize lines like
You are right, maybe must be defined an exclusion list based on value.
Now JS has an regular expression oriented exclusion list that can be shared by xml.
Please consider that indirectly you are giving great help to developers. Last night I Externalized another extension (#55) and sent it to the author. I generally receive enthusiastic feedback and heaps of thanks that YOU deserve !
I'm not sure
What you MUST do NOW :
1. Post a message and link on this Moz'ine forum
http://forums.mozillazine.org/viewforum.php?f=19
with a short explanation
I think MozillaZine guys are not interested to this work, but I can try, the discussion is located here.
2. Submit your extension on Moz addons.
This requires too much work, I must create an homepage and a serious deployment process.
Considering the low user feedback this can be a waste time.
I know your arguments, here are my answers :
Oh oh, you know me too much well
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#24
Posted 01 October 2006 - 02:07 PM
No! You aren't alone !
I am trying, from some day, to understand precisely how it works ...but I never will be a great tester as JB
Bye bye
#26
Posted 01 October 2006 - 02:21 PM
No dear friend there is nothing difficult in its use/test, I should have written a proper howto guide, sorry for being lazy...
You are lazy? You aren't right!!!
I am lazy and I read slowly you wiki page
#27
Posted 01 October 2006 - 08:50 PM
Thank you very much
#28
Posted 02 October 2006 - 06:28 AM
Now xml and js share the exclusion values list.
The default regular expression has been updated to match string containing only digits.
This means that now values containing only digits are skipped for DTD and properties files.
I've modified some Externalize label to better describe the behaviour.
You can find new build here
I have added Externalize to WTS
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#29
Posted 02 October 2006 - 07:32 AM
(very minor) the localized description line in english should mention js files as well.
@Pedro : now the interface (in english) is more stable, maybe you can make a set of screenshots (if you have time) to match the "ten easy steps" wiki section (?). You have just to register on the wiki then use "Upload files" in the left-hand menu. You can add images wherever you want and save : it is a wiki, feel free to use it
Thanks.
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#30
Posted 02 October 2006 - 09:12 AM
If it's on time I will do it this night
I send you a PM if I find some problem with the wiki, ok?
Bye bye
#31
Posted 02 October 2006 - 11:07 AM
Sure Jean Bernard
If it's on time I will do it this night
I send you a PM if I find some problem with the wiki, ok?
Bye bye
Just fine, thanks. There is no hurry
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#32
Posted 02 October 2006 - 10:37 PM
I copy for you some bits of our exchanges with Pedro (who stuffed the wiki page with nice screenshots ), he is also testing the extension now.
we agree below on :
1. The items listed for js file should be UN-checked by default
2. The report counter is disabled for js files
[snip]
Tell me what you think and we will report to Dafi.
see you soon
- jean-bernard
I think your point of view is right! I was becaming crazy to uncheck all the items... and this files are really small
Another thing...
In my sistem, parsing the .js file nothing is displayed in the dialog box : Entities created 0 ; Tags/Attributes blank: 0 ; Tags/Attributes ignored: 0
The same for you?
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#33
Posted 03 October 2006 - 06:21 AM
hello Davide
I copy for you some bits of our exchanges with Pedro (who stuffed the wiki page with nice screenshots ), he is also testing the extension now.
Thanks to Pedro to create the screenshots (wow they are impressive) and to test Externalize.
we agree below on :
1. The items listed for js file should be UN-checked by default
Well I can add two buttons:
1. uncheck all
2. check all
so you can choose what to do.
Should be useful a third button? Invert selection (so unchecked became checked and checked became unchecked) please tell me what do you think about Invert button/
2. The report counter is disabled for js files
Oh yes, but this is a minor bug
I'm working to fix an annoying behaviour: group together equals strings.
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#34
Posted 03 October 2006 - 07:10 AM
1. uncheck all
2. check all
Very good
It will be largely sufficient, no need of a 3rd button, thanks !
yes of course . let's say that considering people will check the very items they want to localize, it is not necessary
I'm working to fix an annoying behaviour: group together equals strings
ah, you mean when there are 3 or 4 times the same string in a js, and it is unnecessary to write 3-4 times the same codeline to localize it ?
------something else
Pedro is currently testing the localization of measureit extension and got problems with the .js file strings. I tested too with similar failure.
I suspect the very place in the file where the variables are defined is not satisfactory because their value is "undefined" when testing the extension.
To help you see with your expert eagle eyes, I attach here the extension. the problem is in the measureitOverlay.js file (also aincluded : measureitOverlayOriginal.js obviously the original unchanged file)
(Basic use : displays a scale to measure anything in px. )
- The tooltip messages for the customized toolbar button (Measure it on / measure it off) are displaying OK (on lines 23 and 33)
- The other messages that produce undefined error are :
"H" (for height) variable on line 289
"W" (for Width) variable on line 292
"Click to remove this" variable on line 185
(I have tried to set the variable substitution lines at some other places without success.)
Sorry for annoying you once again. Pedro is as convinced as I am that you are really performing a great useful job here.
Attached Files
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#35
Posted 04 October 2006 - 07:32 PM
ah, you mean when there are 3 or 4 times the same string in a js, and it is unnecessary to write 3-4 times the same codeline to localize it ?
Exactly.
------something else
[SUPER-MEGA-CUT]
Dafi debug mode enabled, please wait some other days, actually I'm very busy
Sorry for annoying you once again. Pedro is as convinced as I am that you are really performing a great useful job here.
You don't annoy me
Please wait some days so I can investigate the problem, the problem actually is out of sight.
On WTS I've uploaded a version with select/unselect buttons and an extra button that allows to change the generated name.
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#36
Posted 04 October 2006 - 07:50 PM
I download it immediately
#38
Posted 05 October 2006 - 01:47 PM
The problem is the drag&drop measureit code.
I've made a simple and innocent modification to measureit downloaded from addon.mozilla.org.
Into measureitOverlay.js I've added on top the following line that write a debug message on javascript console
Components.classes["@mozilla.org/consoleservice;1"]
.getService(Components.interfaces.nsIConsoleService)
.logStringMessage("test");
This generates the same error generated by bundle code.
Actually I can't test but probably adding a <stringbundle/> into xul file can work.
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
#39
Posted 06 October 2006 - 07:32 PM
i have tried to define the stringbundle in the xul file
with the old way :
<stringbundleset id="stringbundleset">
<stringbundle id="extname-strings" src="chrome://extname/locale/extname.properties"/>
</stringbundleset>
and
var message = document.getElementById('extname-strings').getString("PropName");
... but without success. I am not qualified enough to debug. Sorry.
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#40
Posted 07 October 2006 - 08:25 AM
i have tried to define the stringbundle in the xul file
with the old way :
<stringbundleset id="stringbundleset">
<stringbundle id="extname-strings" src="chrome://extname/locale/extname.properties"/>
</stringbundleset>
and
var message = document.getElementById('extname-strings').getString("PropName");
... but without success. I am not qualified enough to debug. Sorry.
I'm sorry but problem doesn't depend by Externalize, IMHO author must be contacted
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users