Bugzilla – Attachment 3061 Details for
Bug 5689
System preference notifications are not translatable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-5689-System-preference-notifications-are.patch (text/plain), 4.93 KB, created by
Owen Leonard
on 2011-02-03 16:00:03 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-02-03 16:00:03 UTC
Size:
4.93 KB
patch
obsolete
>From d76a87518cd72b3aeeac45522ece0ef73d753366 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 3 Feb 2011 10:58:10 -0500 >Subject: [PATCH] Fix for Bug 5689 - System preference notifications are not translatable >Content-Type: text/plain; charset="utf-8" > >Defining strings in the template so that they can be translated. >--- > .../intranet-tmpl/prog/en/js/pages/preferences.js | 14 +++++++------- > .../prog/en/modules/admin/preferences.tmpl | 12 +++++++++--- > 2 files changed, 16 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >index cbf98b8..e7d84fd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/preferences.js >@@ -11,10 +11,10 @@ KOHA.Preferences = { > Save: function ( form ) { > data = $( form ).find( '.modified' ).serialize(); > if ( !data ) { >- humanMsg.displayAlert( 'Nothing to save' ); >+ humanMsg.displayAlert( MSG_NOTHING_TO_SAVE ); > return; > } >- KOHA.AJAX.MarkRunning( $( form ).find( '.save-all' ), _( 'Saving...' ) ); >+ KOHA.AJAX.MarkRunning( $( form ).find( '.save-all' ), _( MSG_SAVING ) ); > KOHA.AJAX.Submit( { > data: data, > url: '/cgi-bin/koha/svc/config/systempreferences/', >@@ -38,7 +38,7 @@ $( document ).ready( function () { > $( this ).addClass( 'modified' ); > var name_cell = $( this ).parents( '.name-row' ).find( '.name-cell' ); > if ( !name_cell.find( '.modified-warning' ).length ) >- name_cell.append( '<em class="modified-warning">(modified)</em>' ); >+ name_cell.append( '<em class="modified-warning">('+MSG_MODIFIED+')</em>' ); > KOHA.Preferences.Modified = true; > } > >@@ -54,7 +54,7 @@ $( document ).ready( function () { > > window.onbeforeunload = function () { > if ( KOHA.Preferences.Modified ) { >- return _( "You have made changes to system preferences." ); >+ return MSG_MADE_CHANGES; > } > } > >@@ -73,16 +73,16 @@ $( document ).ready( function () { > return false; > } ).nextAll( 'textarea, input[type=submit]' ).hide().css( { opacity: 0 } ); > >- $("h3").attr("class","expanded").attr("title",_("Click to expand this section")); >+ $("h3").attr("class","expanded").attr("title",MSG_CLICK_TO_EXPAND); > var collapsible = $(".collapsed,.expanded"); > > $(collapsible).toggle( > function () { >- $(this).addClass("collapsed").removeClass("expanded").attr("title",_("Click to expand this section")); >+ $(this).addClass("collapsed").removeClass("expanded").attr("title",MSG_CLICK_TO_EXPAND); > $(this).next("table").hide(); > }, > function () { >- $(this).addClass("expanded").removeClass("collapsed").attr("title",_("Click to collapse this section")); >+ $(this).addClass("expanded").removeClass("collapsed").attr("title",MSG_CLICK_TO_COLLAPSE); > $(this).next("table").show(); > } > ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl >index 3ae0281..06a0592 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences.tmpl >@@ -6,15 +6,21 @@ > <link rel="stylesheet" type="text/css" href="<!-- TMPL_VAR NAME="themelang"-->/css/humanmsg.css" /> > <script src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/humanmsg.js" type="text/javascript"></script> > <script src="<!-- TMPL_VAR NAME="themelang" -->/js/ajax.js" type="text/javascript"></script> >-<script src="<!-- TMPL_VAR NAME="themelang" -->/js/pages/preferences.js" type="text/javascript"></script> >-<script src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js" type="text/javascript"></script> > <script type="text/javascript"> >- //<![CDATA[ >+//<![CDATA[ > // This is here because of its dependence on template variables, everything else should go in js/pages/preferences.js - jpw > var to_highlight = "<!-- TMPL_VAR NAME="searchfield" ESCAPE="JS"-->"; > var search_jumped = <!-- TMPL_IF NAME="search_jumped" -->true<!-- TMPL_ELSE -->false<!-- /TMPL_IF -->; >+ var MSG_NOTHING_TO_SAVE = _("Nothing to save"); >+ var MSG_SAVING = _("Saving..."); >+ var MSG_MODIFIED = _("modified"); >+ var MSG_MADE_CHANGES = _("You have made changes to system preferences."); >+ var MSG_CLICK_TO_EXPAND = _("Click to expand this section"); >+ var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section"); > //]]> > </script> >+<script src="<!-- TMPL_VAR NAME="themelang" -->/js/pages/preferences.js" type="text/javascript"></script> >+<script src="<!-- TMPL_VAR NAME="themelang" -->/lib/jquery/plugins/jquery.highlight-3.js" type="text/javascript"></script> > </head> > <body> > <!-- TMPL_INCLUDE NAME="header.inc" --> >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5689
: 3061