Jump to content


Important Announcement!

Please read this post about our new Privacy Policy


Photo
- - - - -

Developing Externalize extension


  • Please log in to reply
87 replies to this topic

#21 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 01 October 2006 - 08:37 AM

You can find a new build here.
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 sad.gif
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#22 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 01 October 2006 - 09:21 AM

smile.gif yes successful first test (see attachment with original js file / modded file / output properties one)

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
CODE
label value="30"

- still localize lines like
CODE
label value="30 seconds"
(it does it well already)


QUOTE
Goofy I think only you and me use Externalize

Dear Davide smile.gif
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.mozill...wforum.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 dry.gif ) : 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 smile.gif
- OK, Goofy, I shall do that
- Good Davide, now you are reasonable biggrin.gif



Now just say OK wink.gif

Attached Files


Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#23 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 01 October 2006 - 09:44 AM

QUOTE(Goofy @ Oct 1 2006, 10:21) View Post

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.

QUOTE(Goofy @ Oct 1 2006, 10:21) View Post

2. The xml parser should :
- Not localize numbers in lines like
CODE
label value="30"

- still localize lines like
CODE
label value="30 seconds"
(it does it well already)

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.

QUOTE

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 blink.gif

QUOTE

What you MUST do NOW :
1. Post a message and link on this Moz'ine forum
http://forums.mozill...wforum.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.

QUOTE

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.

QUOTE

I know your arguments, here are my answers :

Oh oh, you know me too much well surprise.gif

Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#24 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts
  • Gender:Male
  • Location:Ferrara - Italia


  • Extension Developer: No
  • Translation Credits to Luca Pedrazzi - www.extenzilla.org

Posted 01 October 2006 - 02:07 PM

QUOTE(dafi @ Oct 1 2006, 09:37) View Post
Goofy I think only you and me use Externalize sad.gif



No! You aren't alone tongue.gif !

I am trying, from some day, to understand precisely how it works wink.gif ...but I never will be a great tester as JB ops.gif

Bye bye
Are you sure that I am a translator? Have you seen my english? IPB Image
IPB Image IPB Image IPB Image
Goofy's corrections © inside. The dog with the glasses has come back.

#25 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 01 October 2006 - 02:14 PM

No dear friend there is nothing difficult in its use/test, I should have written a proper howto guide, sorry for being lazy...
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#26 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts
  • Gender:Male
  • Location:Ferrara - Italia


  • Extension Developer: No
  • Translation Credits to Luca Pedrazzi - www.extenzilla.org

Posted 01 October 2006 - 02:21 PM

QUOTE(Goofy @ Oct 1 2006, 15:14) View Post

No dear friend there is nothing difficult in its use/test, I should have written a proper howto guide, sorry for being lazy...

laugh.gif laugh.gif laugh.gif

You are lazy? mellow.gif You aren't right!!! biggrin.gif

I am lazy and I read slowly you wiki page tongue.gif
Are you sure that I am a translator? Have you seen my english? IPB Image
IPB Image IPB Image IPB Image
Goofy's corrections © inside. The dog with the glasses has come back.

#27 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts
  • Gender:Male
  • Location:Ferrara - Italia


  • Extension Developer: No
  • Translation Credits to Luca Pedrazzi - www.extenzilla.org

Posted 01 October 2006 - 08:50 PM

Great job JeanBernard: your new improvements on the wiki page are understandable for me too laugh.gif

Thank you very much biggrin.gif
Are you sure that I am a translator? Have you seen my english? IPB Image
IPB Image IPB Image IPB Image
Goofy's corrections © inside. The dog with the glasses has come back.

#28 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 02 October 2006 - 06:28 AM

Another little fix.

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


Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#29 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 02 October 2006 - 07:32 AM

smile.gif Very good news again, thanks so much Davide!
(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 smile.gif
Thanks.
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#30 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts
  • Gender:Male
  • Location:Ferrara - Italia


  • Extension Developer: No
  • Translation Credits to Luca Pedrazzi - www.extenzilla.org

Posted 02 October 2006 - 09:12 AM

Sure Jean Bernard IPB Image

If it's on time I will do it this night IPB Image

I send you a PM if I find some problem with the wiki, ok? tongue.gif

Bye bye smile.gif
Are you sure that I am a translator? Have you seen my english? IPB Image
IPB Image IPB Image IPB Image
Goofy's corrections © inside. The dog with the glasses has come back.

#31 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 02 October 2006 - 11:07 AM

QUOTE(Pedro @ Oct 2 2006, 10:12) View Post

Sure Jean Bernard IPB Image

If it's on time I will do it this night IPB Image

I send you a PM if I find some problem with the wiki, ok? tongue.gif

Bye bye smile.gif


Just fine, thanks. There is no hurry smile.gif


Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#32 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 02 October 2006 - 10:37 PM

hello Davide smile.gif

I copy for you some bits of our exchanges with Pedro (who stuffed the wiki page with nice screenshots smile.gif ), 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


QUOTE
Message Forwarded From Pedro

[snip]
QUOTE
btw : I think that considering the great number of detected items in every js file and the limited number of those who deserve to be localized, the default setting for each item should be "UN-notched" (so that we have to notch only the few ones).
Tell me what you think and we will report to Dafi.

see you soon smile.gif
- 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 tongue.gif

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?

Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#33 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 03 October 2006 - 06:21 AM

QUOTE(Goofy @ Oct 2 2006, 23:37) View Post

hello Davide smile.gif

I copy for you some bits of our exchanges with Pedro (who stuffed the wiki page with nice screenshots smile.gif ), he is also testing the extension now.

Thanks to Pedro to create the screenshots (wow they are impressive) and to test Externalize.

QUOTE

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/

QUOTE

2. The report counter is disabled for js files

Oh yes, but this is a minor bug wink.gif

I'm working to fix an annoying behaviour: group together equals strings.


Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#34 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 03 October 2006 - 07:10 AM

QUOTE
Well I can add two buttons:
1. uncheck all
2. check all


Very good smile.gif
It will be largely sufficient, no need of a 3rd button, thanks ! smile.gif


QUOTE
Oh yes, but this is a minor bug

yes of course smile.gif. let's say that considering people will check the very items they want to localize, it is not necessary

QUOTE

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.smile.gif




Attached Files


Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#35 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 04 October 2006 - 07:32 PM

QUOTE(Goofy @ Oct 3 2006, 08:10) View Post

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.

QUOTE(Goofy @ Oct 3 2006, 08:10) View Post

------something else
[SUPER-MEGA-CUT]

Dafi debug mode enabled, please wait some other days, actually I'm very busy sad.gif

QUOTE

Sorry for annoying you once again. Pedro is as convinced as I am that you are really performing a great useful job here.smile.gif

You don't annoy me wink.gif
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.



Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#36 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts
  • Gender:Male
  • Location:Ferrara - Italia


  • Extension Developer: No
  • Translation Credits to Luca Pedrazzi - www.extenzilla.org

Posted 04 October 2006 - 07:50 PM

Thanks Davide biggrin.gif

I download it immediately tongue.gif
Are you sure that I am a translator? Have you seen my english? IPB Image
IPB Image IPB Image IPB Image
Goofy's corrections © inside. The dog with the glasses has come back.

#37 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 04 October 2006 - 07:54 PM

Grazie mille Davide biggrin.gif
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#38 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 05 October 2006 - 01:47 PM

About measureit.

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

CODE

        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.
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith

#39 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8,437 posts
  • Gender:Male
  • Location:GoofyLand


  • Translator for French (fr)
  • Extension Developer: Yes
  • Extensions: BabelZillaMenu-BabelZilla Glossary-OpenTran...
  • Translation Credits to Goofy
  • My OS Gnu/Linux

Posted 06 October 2006 - 07:32 PM

QUOTE
probably adding a <stringbundle/> into xul file can work

sad.gif i have tried to define the stringbundle in the xul file
with the old way :

CODE

<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. dry.gif I am not qualified enough to debug. Sorry.
Think Global, Make Locales!


Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox

#40 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts
  • Gender:Male
  • Location:Palermo (Italy)


  • Translator for [No translator]
  • Extension Developer: Yes
  • Extensions: Some bonsai extensions

Posted 07 October 2006 - 08:25 AM

QUOTE(Goofy @ Oct 6 2006, 20:32) View Post

sad.gif i have tried to define the stringbundle in the xul file
with the old way :

CODE

<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. dry.gif I am not qualified enough to debug. Sorry.

I'm sorry but problem doesn't depend by Externalize, IMHO author must be contacted sad.gif
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sou.../viewsourcewith


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users