Commit 9d8d33ace54afd73c734f934f9901f89561c7eb5
1 parent
52fa90f7
Exists in
staging
and in
42 other branches
ActionItem130: i18n of the context help
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1386 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
18 additions
and
15 deletions
Show diff stats
app/views/layouts/application.rhtml
| ... | ... | @@ -40,7 +40,7 @@ |
| 40 | 40 | " controller_"+ @controller.controller_name() + |
| 41 | 41 | " action_"+ @controller.controller_name() +"_"+ @controller.action_name() |
| 42 | 42 | %>' onload='noosfero_init();' |
| 43 | - help=<%= _('Pass the mouse over page elements to get help on them').inspect %> > | |
| 43 | + help=<%= _('Pass the mouse over page elements to get help on them. Click the question mark icon on the top-right corner to deactivate this help window.').inspect %> > | |
| 44 | 44 | <script type="text/javascript"> |
| 45 | 45 | /* Adds a class to "msie" to the body element if a Microsoft browser is |
| 46 | 46 | * detected. This is needed to workaround several of their limitations. |
| ... | ... | @@ -155,11 +155,12 @@ |
| 155 | 155 | </div> |
| 156 | 156 | <%= javascript_include_tag 'show-mouse-help' %> |
| 157 | 157 | <%= javascript_include_tag 'noosfero-show-help' %> |
| 158 | + <%= javascript_tag('noosferoHelpInit(%s, %s)' % [ _('Do you want to activate the automatic help mode?').inspect, _('If needed, you can activate the automatic help mode by clicking the question mark symbol in the top-right corner').inspect ]) %> | |
| 158 | 159 | |
| 159 | 160 | <div id="better-browser-promotion" style="display:none"> |
| 160 | 161 | <h3><%= |
| 161 | - _('Hey! Your web browser is really old!') +'</h3><p/>'+ | |
| 162 | - _('This great website will be not so good on that. | |
| 162 | + _('Your web browser is obsolete!') +'</h3><p/>'+ | |
| 163 | + _('This website will not look as good as it could. | |
| 163 | 164 | Don\'t you want to use Firefox? That is a great web browser, free, |
| 164 | 165 | and made by people of all the world parts.') |
| 165 | 166 | %><p/> | ... | ... |
public/javascripts/noosfero-show-help.js
| ... | ... | @@ -13,18 +13,20 @@ function mouseHelpOnOff() { |
| 13 | 13 | document.cookie = "mouseHelpTurnOn="+ pageHelp.info.updateBox + expires +"; path=/"; |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | -if ( document.cookie.indexOf("mouseHelpTurnOn=") > -1 ) { | |
| 17 | - if ( document.cookie.indexOf("mouseHelpTurnOn=true") > -1 ) { | |
| 18 | - mouseHelpOnOff(); | |
| 19 | - } | |
| 20 | -} else { | |
| 21 | - var date = new Date(); | |
| 22 | - date.setTime( date.getTime() + ( 60*24*60*60*1000 ) ); | |
| 23 | - var expires = "; expires=" + date.toGMTString(); | |
| 24 | - document.cookie = "mouseHelpTurnOn=false" + expires +"; path=/"; | |
| 25 | - if ( confirm("Olá, você gostaria de ativar o modo de ajuda automática do Noosfero?") ) { | |
| 26 | - mouseHelpOnOff(); | |
| 16 | +function noosferoHelpInit(confirm_msg, rejected_msg) { | |
| 17 | + if ( document.cookie.indexOf("mouseHelpTurnOn=") > -1 ) { | |
| 18 | + if ( document.cookie.indexOf("mouseHelpTurnOn=true") > -1 ) { | |
| 19 | + mouseHelpOnOff(); | |
| 20 | + } | |
| 27 | 21 | } else { |
| 28 | - alert("Caso precise, basta clicar no icone de ajuda no canto superior direito da página.") | |
| 22 | + var date = new Date(); | |
| 23 | + date.setTime( date.getTime() + ( 60*24*60*60*1000 ) ); | |
| 24 | + var expires = "; expires=" + date.toGMTString(); | |
| 25 | + document.cookie = "mouseHelpTurnOn=false" + expires +"; path=/"; | |
| 26 | + if ( confirm(confirm_msg) ) { | |
| 27 | + mouseHelpOnOff(); | |
| 28 | + } else { | |
| 29 | + alert(rejected_msg) | |
| 30 | + } | |
| 29 | 31 | } |
| 30 | 32 | } | ... | ... |