Another mini-howto available for translation
Started by
Goofy
, Jun 04 2007 08:08 AM
14 replies to this topic
#3
Posted 06 June 2007 - 04:37 PM
QUOTE(Goofy @ Jun 4 2007, 09:08) [snapback]29595[/snapback]
See here
How to resize a xul pref dialog according to every language
Sorry Jean-Bernard, but this way resolve window size problem is no good. Try attached files (change with original) and you will see proper solution. Now all locales will be matched to window size, user can change place, size window and these parameters will be remembered by Tb.
Attached Files
Teo
#5
Posted 06 June 2007 - 06:28 PM
QUOTE(Goofy @ Jun 6 2007, 17:53) [snapback]29704[/snapback]
Very good! You MUST publish a little howto to provide help to developers. Please do it as soon as possible.
Goofy,
All is in the XUL and MDC tutorials. That's all. If developer have problems, I can help him.
Edit: I have 500 posts!
Teo
#6
Posted 06 June 2007 - 06:41 PM
QUOTE(teo @ Jun 6 2007, 19:28) [snapback]29705[/snapback]
Goofy,
All is in the XUL and MDC tutorials. That's all.
All is in the XUL and MDC tutorials. That's all.
I suppose yes, but please give a link/reference! Most of the time the MDC or MKB tutorials are a bit complicated and technical, not so easy to find in the dev jungle, it would be more efficient to give a simple explanation with example and a couple of screenshots (with of course the link to the official MDC reference).
So I insist, you MUST give us a short howto (some lines should be enough)
QUOTE
If developer have problems, I can help him.
We know how your help is precious to many. Carry on!
QUOTE
Edit: I have 500 posts!
That's a good beginning
Think Global, Make Locales!
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#7
Posted 06 June 2007 - 09:03 PM
QUOTE(Goofy @ Jun 6 2007, 19:41) [snapback]29707[/snapback]
I suppose yes, but please give a link/reference! Most of the time the MDC or MKB tutorials are a bit complicated and technical, not so easy to find in the dev jungle, it would be more efficient to give a simple explanation with example and a couple of screenshots (with of course the link to the official MDC reference).
So I insist, you MUST give us a short howto (some lines should be enough)
We know how your help is precious to many. Carry on!
That's a good beginning
So I insist, you MUST give us a short howto (some lines should be enough)
We know how your help is precious to many. Carry on!
That's a good beginning
Goofy, as you wrote, tutorials are a bit complicated and technical. Sometimes I spent many time for read these texts and ask my friends about problems with XUL.
What I made with Attachment Extractor files?
First of all this options window is build on prefwindow. This kind of dialog window is special and some parameters such us 'script, 'stringbundle' MUST be placed on end of file. eg:
CODE
<prefwindow>
<prefpane/>
< script/>
<stringbundle/>
</prefwindow>
<prefpane/>
< script/>
<stringbundle/>
</prefwindow>
If you want to access elements inside <prefpane>, you should put script in the <prefpane> or write script into "onpaneload" of the <prefpane>. If any parameter will be between prefwindow and prefpane you can expect strange behavior.
1. Auto pane
Removed checkbox with label from caption. Checkbox with label embeded in caption don't resize window to content
Add flex="1' for prefpane - will be resize prefpane to content.
Removed separators
Removed '<box style="margin-left:20px">' - for what this strange construction. I used simply 'class="indent' instead.
2. Advanced pane
Add flex="1' for prefpane - will be resize prefpane to content.
Removed '<box style="margin-left:20px">'
Removed separators
3. Prefwindow owerflow
Removed 'style = "width:&attachmentextractor.settings.width;; height: 55em;"'
Moved stringbundleset to end of file
Added onload="sizeToContent();
Added 'persist="screenX screenY width height'
Teo
#8
Posted 06 June 2007 - 09:34 PM
Thanks for these precisions
Apart from the special modifications for auto pane and advanced pane, is it correct to say that
generally speaking
these additions :
are enough to make the prefwindow self-resize ?
(of course IF the stringbundle is at its place and IF there is no checkbox with label embedded as you mention).
Please tell me.
Apart from the special modifications for auto pane and advanced pane, is it correct to say that
generally speaking
these additions :
CODE
onload="sizeToContent();
persist="screenX screenY width height'
persist="screenX screenY width height'
are enough to make the prefwindow self-resize ?
(of course IF the stringbundle is at its place and IF there is no checkbox with label embedded as you mention).
Please tell me.
Think Global, Make Locales!
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#9
Posted 06 June 2007 - 11:27 PM
QUOTE(Goofy @ Jun 6 2007, 22:34) [snapback]29712[/snapback]
Thanks for these precisions
Apart from the special modifications for auto pane and advanced pane, is it correct to say that
generally speaking
these additions :
are enough to make the prefwindow self-resize ?
(of course IF the stringbundle is at its place and IF there is no checkbox with label embedded as you mention).
Please tell me.
Apart from the special modifications for auto pane and advanced pane, is it correct to say that
generally speaking
these additions :
CODE
onload="sizeToContent();
persist="screenX screenY width height'
persist="screenX screenY width height'
are enough to make the prefwindow self-resize ?
(of course IF the stringbundle is at its place and IF there is no checkbox with label embedded as you mention).
Please tell me.
No. Should be 'openWindow' or 'openDialog' with 'resizable" parameter in the .js file. Now is problem with options windows calling from Addons Manager on Windows platform. Addons Manager in Fx and Tb calling options windows without 'resizable'. I don't know why. I heard, was problem with this parameter, but when options dialog is opened from MR Tech Local Install or on *nix and Mac platforms all is OK.
Persist is only for remember named parameters. In this case place on the screen - screenX and screenY and for window size - width and height (if you open options window by Local Install or on the *nix and Mac platforms).
'sizeToContent' calling from .xul file is default parameter. You can insert this parameter inside .js file. In this case in the .xul file shouldn't be sizeToContent.
Teo
#10
Posted 07 June 2007 - 07:07 AM
I try to read all this, but I'm starting to feel dizzy.
#11
Posted 07 June 2007 - 07:45 AM
:)yes dear markh, I feel a little dizzy too. I was recently too self-confident because after years of merry dumbness I finally got a brain to insert in my head, but either something went wrong when plugging else I was cheated with second-hand Homer Simpson's brain, but the result is: I feel uncomfortable with understanding.
@teo
seriously, dear friend, I think :
1. Your solution is much better in terms of code correctness (though I cannot really give an authorized opinion here), precision, and has the advantage of leaving the "resize" problems in the hands of the developer, which is rational and safe for users.
2. Anyway, I find it too heavy to practice because of
_ too many conditions to fulfill
_ too many bits of code to modify in more than one file. I mean for example: if an extra function is to be implemented in the .js file I am not sure it is worth doing it for developers. Not all developers care about layout accessibility, unfortunately, as you perfectly know.
My aim was just providing a simple trick. If you think it is not good to provide an easy hack because things are much more complicated (and you are probably right) I will just withdraw my mini-tutorial. But if you agree, I would prefer to leave it with a visible link to this thread, mentioning that a more advanced information about code can be found here and that our xul wizard teo is always available to give hand to lost souls
@teo
seriously, dear friend, I think :
1. Your solution is much better in terms of code correctness (though I cannot really give an authorized opinion here), precision, and has the advantage of leaving the "resize" problems in the hands of the developer, which is rational and safe for users.
2. Anyway, I find it too heavy to practice because of
_ too many conditions to fulfill
_ too many bits of code to modify in more than one file. I mean for example: if an extra function is to be implemented in the .js file I am not sure it is worth doing it for developers. Not all developers care about layout accessibility, unfortunately, as you perfectly know.
My aim was just providing a simple trick. If you think it is not good to provide an easy hack because things are much more complicated (and you are probably right) I will just withdraw my mini-tutorial. But if you agree, I would prefer to leave it with a visible link to this thread, mentioning that a more advanced information about code can be found here and that our xul wizard teo is always available to give hand to lost souls
Think Global, Make Locales!
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#12
Posted 11 June 2007 - 01:27 AM
You are right Goofy - developer should write properly extension. All dialog windows should be displayed properly without any user intervention.
As I wrote - 'prefwindow' is very useful dialog window but developer have to know about issues this window. Andrew know many problems with 'prefwindow' (rewrote extension from 1 'prefwindow' with many 'prefpane' to 'prefwindow' which refer to an external overlay chrome URI, which will be loaded when the pane is selected - quiclkly load 1'prefpane' instead all) but not all. Changes which I made (not all - some changes I made for correction code and layout) matching content to window size without any user or translator intervention.
You are right - it's too heavy to practice but if you want I can list general rules - not all only general for 'prefwindow'.
As I wrote - 'prefwindow' is very useful dialog window but developer have to know about issues this window. Andrew know many problems with 'prefwindow' (rewrote extension from 1 'prefwindow' with many 'prefpane' to 'prefwindow' which refer to an external overlay chrome URI, which will be loaded when the pane is selected - quiclkly load 1'prefpane' instead all) but not all. Changes which I made (not all - some changes I made for correction code and layout) matching content to window size without any user or translator intervention.
You are right - it's too heavy to practice but if you want I can list general rules - not all only general for 'prefwindow'.
Teo
#13
Posted 11 June 2007 - 06:46 AM
QUOTE
if you want I can list general rules - not all only general for 'prefwindow'.
Of course I want. Every contribution is welcome, each time a developer can get tips and help.
Use what you prefer : babelwiki, tutorial, a dedicated thread in the Help forum... Take the time you need. Thanks in advance
Think Global, Make Locales!
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
Sometimes I am on irc://moznet/BabelZilla
but you can also drop a word in the shoutbox
#15
Posted 10 July 2010 - 11:24 PM
QUOTE (Goofy @ Jun 6 2007, 18:41) <{POST_SNAPBACK}>
I suppose yes, but please give a link/reference! Most of the time the MDC or MKB tutorials are a bit complicated and technical, not so easy to find in the dev jungle, it would be more efficient to give a simple explanation with example and a couple of screenshots (with of course the link to the official MDC reference).
So I insist, you MUST give us a short howto (some lines should be enough)
We know how your help is precious to many. Carry on!
That's a good beginning
So I insist, you MUST give us a short howto (some lines should be enough)
We know how your help is precious to many. Carry on!
That's a good beginning
Can you provide a link to the original post, with the link to the MDC documentation? I am trying to find a way to correctly resize my options dialog (it has 4 prefpanes!) and haven't found anything usable on MDC. I have downloaded the zip file you provided but its missing a lot of other files (such as js files).
thanks in advance,
Axel
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users