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

#61 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 22 October 2006 - 09:14 AM

QUOTE(Goofy @ Oct 22 2006, 10:02) [snapback]20624[/snapback]

smile.gif This week I reached my 62nd extension localized with the precious help of this extension. Just to let you know how efficient and useful it is.

Sound good for my ears tongue.gif
When we (you) reach 100 extension we can organize a party like this.
Obviously this is a joke biggrin.gif biggrin.gif biggrin.gif

QUOTE(Goofy @ Oct 22 2006, 10:02) [snapback]20624[/snapback]

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.

Bad news, may you send me more info so I try to reproduce the problem.
I can't live knowing my friend Goofy encounters similar bugs when he works wink.gif

QUOTE(Goofy @ Oct 22 2006, 10:02) [snapback]20624[/snapback]

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

I'll add these enough simple modification as soon as possibile, please apologize me for late in fix these problems.

QUOTE

Thank you again, dear Davide, for the very kind and smart work you have done smile.gif !

My pleasure, I'm happy when people use my bonsai apps smile.gif
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith

#62 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 23 October 2006 - 06:34 PM

QUOTE("dafi")
may you send me more info so I try to reproduce the problem.


As a sample to give a look, here are 2 files, the dtd is obviously the output result for the xul one.
(Some entities are same with same entity names)

Thanks for your patience smile.gif

[EDIT] ouch my bad. I realize now that the problem (as in zipped files) occurs because I set the max char to 30 and the strings where <30.
I just tested again with char max set to 20 only and all entities have appended numbers so there are no more similar entities, though strings are similar 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

#63 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 29 October 2006 - 04:09 PM

smile.gif hello Davide. I don't know what stupid mistake I am probably doing and i would like you to giev a look.

I am currently "extenalizing" an extension which includes accesskeys and though I duly listed "accesskey" in my attrb.txt file, the process seems to ignore accesskey.

here I attach my txt file, and one original xul file + its externalize version skipping the ak sad.gif
I am (almost) sure the accesskeys were detected in previous versions...

Thanks for any clue you could give 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

#64 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts

Posted 29 October 2006 - 04:16 PM

It is quite off topic, but I havent caption in my attrs.txt file... is my old file? ops.gif
Are you sure that I am a translator? Have you seen my english?
Goofy's corrections © inside. The dog with the glasses has come back.

#65 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 29 October 2006 - 04:32 PM

QUOTE(Goofy @ Oct 29 2006, 17:09) [snapback]20988[/snapback]

smile.gif hello Davide. I don't know what stupid mistake I am probably doing and i would like you to giev a look.

I am currently "extenalizing" an extension which includes accesskeys and though I duly listed "accesskey" in my attrb.txt file, the process seems to ignore accesskey.

here I attach my txt file, and one original xul file + its externalize version skipping the ak sad.gif
I am (almost) sure the accesskeys were detected in previous versions...

Thanks for any clue you could give smile.gif

I'm investigating...

QUOTE(Pedro @ Oct 29 2006, 17:16) [snapback]20989[/snapback]

It is quite off topic, but I havent caption in my attrs.txt file... is my file old? ops.gif

Consider actually don't exist official files, so it's possibile you have a different (not necessary old) file
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith

#66 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts

Posted 29 October 2006 - 04:45 PM

Thanks Davide wink.gif

I try and I have the same result of Jean Bernard tongue.gif

I am now externalizing an extension called Hyperbookmark, and I notice that the entity with only one letter aren't processed... may this help you in your investigation?
Are you sure that I am a translator? Have you seen my english?
Goofy's corrections © inside. The dog with the glasses has come back.

#67 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 29 October 2006 - 04:45 PM

QUOTE(Goofy @ Oct 29 2006, 17:09) [snapback]20988[/snapback]

smile.gif hello Davide. I don't know what stupid mistake I am probably doing and i would like you to giev a look.

I am currently "extenalizing" an extension which includes accesskeys and though I duly listed "accesskey" in my attrb.txt file, the process seems to ignore accesskey.

here I attach my txt file, and one original xul file + its externalize version skipping the ak sad.gif
I am (almost) sure the accesskeys were detected in previous versions...

Thanks for any clue you could give smile.gif

Found the problem sad.gif
The new "Regular Expressions used to exclude values" skips the string like "u" or "T".
To verify this simply create a file containing the string "nonenone" and use it and all value are generated.
This is a very invasive bug sad.gif
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith

#68 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 29 October 2006 - 04:47 PM

Thanks Davide smile.gif

QUOTE("Luca")
It is quite off topic, but I havent caption in my attrs.txt file... is my file old old file?


Davide is right, this is just one of the files I am currently using, adapting it to the extension I am dealing with (add/remove items as you wish). As an example, today I encountered "tooltipText" blink.gif so I added it (ah dev have their fancies and whims laugh.gif )
Think Global, Make Locales!


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

#69 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts

Posted 29 October 2006 - 04:59 PM

Thanks Jean Bernard... now the matter is clearer wink.gif
Are you sure that I am a translator? Have you seen my english?
Goofy's corrections © inside. The dog with the glasses has come back.

#70 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 29 October 2006 - 05:12 PM

QUOTE(Goofy @ Oct 29 2006, 17:09) [snapback]20988[/snapback]

smile.gif hello Davide. I don't know what stupid mistake I am probably doing and i would like you to giev a look.

I am currently "extenalizing" an extension which includes accesskeys and though I duly listed "accesskey" in my attrb.txt file, the process seems to ignore accesskey.

here I attach my txt file, and one original xul file + its externalize version skipping the ak sad.gif
I am (almost) sure the accesskeys were detected in previous versions...

Thanks for any clue you could give smile.gif

Try the file in attach with a modified regular expression.[attachmentid=1963]
This is simply a workaround (may not work) that skips string values with length greater that 2 chars instead of 1 char.

Attached Files

  • Attached File  re.txt   36bytes   31 downloads

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

#71 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 29 October 2006 - 05:30 PM

Thanks Davide, I will try tonight. smile.gif
Now I am skeptical about your answer : the problem is not to skip values > 2 chars, but to detect one-char values like "A" when accesskey="A".
But I am so ignorant about regexps that I probably misunderstood the whole trick (?)

Think Global, Make Locales!


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

#72 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 29 October 2006 - 09:02 PM

QUOTE
Thanks Davide, I will try tonight.

smile.gif
Done: it works fine with your workaround. Thanks!
Think Global, Make Locales!


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

#73 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 30 October 2006 - 07:04 AM

QUOTE(Goofy @ Oct 29 2006, 22:02) [snapback]21009[/snapback]

smile.gif
Done: it works fine with your workaround. Thanks!

Honestly I know this is only a workaround not a solution. sad.gif
It is the quickest way to continue to use Externalize without waiting for a new build.
Maybe a solution should allow to choose the technique for discarding values per tag.
For example

CODE

  Tag/Attribute         Discard value RegExpr
     accesskey               None
     label                  RE1, RE2

Imagine a UI to obtain a similar result.
Adding an UI to handle files is a priority and I'll add it ASAP (but not before December sad.gif )

Stay tuned tongue.gif

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

#74 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 30 October 2006 - 07:37 AM

QUOTE(dafi @ Oct 30 2006, 07:04) [snapback]21020[/snapback]


Maybe a solution should allow to choose the technique for discarding values per tag.
For example

CODE

  Tag/Attribute         Discard value RegExpr
     accesskey               None
     label                  RE1, RE2

Imagine a UI to obtain a similar result.
Adding an UI to handle files is a priority and I'll add it ASAP (but not before December sad.gif )

Stay tuned tongue.gif

surprise.gif I am impressed and not sure to understand how the per-tag regexp* will work unsure.gif , but I am ready for Goofytesting even if I must wait for Santa Claus smile.gif

*For one thing I don't know about regexp syntax (I have read tutorials but I have no mathematician brain- well I suspect I have no brain at all to tell the truth) but what makes things more complicated is that every file may need a specific choice, and also in the same file sometimes a string must be externalized or not.

For example, it often happens to have in the same file
value="Davide is Great" (-->must be translated in every possible language)
and
value="Codestuff" (--> must be left as it is to make the extension run smoothly)

So the workaround here should be to allow user to select step by step what must be externalized and what mustn't be


Think Global, Make Locales!


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

#75 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 11 November 2006 - 04:39 PM

@Pedro for information, I am currently trying to externalize Chipmark extension wink.gif
Think Global, Make Locales!


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

#76 Pedro

Pedro

    eXtenZilla IT Member

  • Members
  • 711 posts

Posted 11 November 2006 - 11:11 PM

QUOTE(Goofy @ Nov 11 2006, 16:39) [snapback]21619[/snapback]

@Pedro for information, I am currently trying to externalize Chipmark extension wink.gif


Thanks for the info Jean Bernard

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

#77 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 12 November 2006 - 12:37 AM

[Done] smile.gif
Think Global, Make Locales!


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

#78 dafi

dafi

    WTS Developer

  • WTS Developer
  • PipPipPip
  • 498 posts

Posted 21 January 2007 - 09:32 AM

Finally I've restart to develop and I've added to externalize the ability to select items to externalize also for XML files.

The version 0.0.5 is here.

Please install it on a clean profile, I've dramatically changed the code so some regression is possibile.
The update system is disabled because 0.0.5 is considered a beta

I wait for your hints...

please post here
- bug report
- regression report
- improvement request
- new features request

This new version contains the base code for version 1.0

PS
The line number isn't present for xml files, this is due to actual parsing algorithm so don't worry about it
Davide Ficano
Author of the ViewSourceWith extension
http://dafizilla.sourceforge.net/viewsourcewith

#79 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 21 January 2007 - 10:25 AM

Dear Davide it is just great ! biggrin.gif

apart from this little displaying annoyance for the extraction dialog
[attachmentid=2231]
(appears at first launch, it is fixed once it is manually resized)

I cannot find anything wrong with this version. It is very handy to manage possible automatic entity duplicate names and of course to tell precisely which string should be externalize or not smile.gif

rockon.gif

Attached Files


Think Global, Make Locales!


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

#80 Goofy

Goofy

    Advanced Member

  • Super Mod
  • 8437 posts

Posted 22 January 2007 - 12:20 AM

smile.gif Ooops I found a disturbing issue...

I have seen that the original strings are removed from one xul file BUT NOT replaced with the newly created entities. More surprising, the new entity is duly reported in the dtd file with the corresponding strings

Here I attach the original xul file, then the processed one (with missing values and labels!) and the resulting dtd.
[attachmentid=2237]
[edit] I think the issue occurs each time I change the entity name in the editing dialog before launching the process (I will check that)

[edit2] I checked and unfortunately it trims again some labels and values even if I did not change the entities' names dry.gif

[edit3] for information the same test file is correctly externalized with the previous version, so it is obviously an issue related to the new code part.

Attached Files


Think Global, Make Locales!


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