Bug 26070: Remove GoogleIndicTransliteration system preference
The Google Transliterate API was deprecated on May 26, 2011. This patch removes the feature and associated system preference. To test, apply the patch and run the database update process. - Go to Administration -> System preferences and search for 'GoogleIndicTransliteration.' There should be no results. - Search the Koha codebase for references to 'GoogleIndicTransliteration.' There should be no current references.. Signed-off-by: Amit Gupta <amit.gupta@informaticsglobal.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
9deaf86754
commit
9b9e8fd328
7 changed files with 8 additions and 49 deletions
|
@ -0,0 +1,8 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
# Remove from the systempreferences table
|
||||
$dbh->do("DELETE FROM systempreferences WHERE variable = 'GoogleIndicTransliteration'");
|
||||
|
||||
# Always end with this (adjust the bug info)
|
||||
NewVersion( $DBversion, 26070, "Remove references to deprecated Google Transliterate API");
|
||||
}
|
|
@ -206,7 +206,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
|
|||
('FRBRizeEditions','0','','If ON, Koha will query one or more ISBN web services for associated ISBNs and display an Editions tab on the details pages','YesNo'),
|
||||
('GDPR_Policy','','Enforced|Permissive|Disabled','General Data Protection Regulation - policy', 'Choice'),
|
||||
('gist','0','','Default Goods and Services tax rate NOT in %, but in numeric form (0.12 for 12%), set to 0 to disable GST','Integer'),
|
||||
('GoogleIndicTransliteration','0','','GoogleIndicTransliteration on the OPAC.','YesNo'),
|
||||
('GoogleJackets','0',NULL,'if ON, displays jacket covers from Google Books API','YesNo'),
|
||||
('GoogleOpenIDConnect', '0', NULL, 'if ON, allows the use of Google OpenID Connect for login', 'YesNo'),
|
||||
('GoogleOAuth2ClientID', '', NULL, 'Client ID for the web app registered with Google', 'Free'),
|
||||
|
|
|
@ -196,13 +196,6 @@ OPAC:
|
|||
yes: Show
|
||||
no: "Don't show"
|
||||
- a link to recent comments in the OPAC masthead.
|
||||
-
|
||||
- pref: GoogleIndicTransliteration
|
||||
default: 0
|
||||
choices:
|
||||
yes: Show
|
||||
no: "Don't show"
|
||||
- GoogleIndicTransliteration on the OPAC.
|
||||
-
|
||||
- pref: OpacHighlightedWords
|
||||
choices:
|
||||
|
|
|
@ -261,10 +261,6 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
|
|||
//]]>
|
||||
</script>
|
||||
[% END %]
|
||||
[% IF ( GoogleIndicTransliteration ) %]
|
||||
<script src="https://www.google.com/jsapi"></script>
|
||||
[% Asset.js("js/googleindictransliteration.js") | $raw %]
|
||||
[% END %]
|
||||
|
||||
[% IF Koha.Preference( 'OpacNewsLibrarySelect' ) %]
|
||||
<script>
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
// Load the Google Transliteration API
|
||||
google.load("elements", "1", {
|
||||
packages: "transliteration"
|
||||
});
|
||||
|
||||
function onLoad() {
|
||||
var options = {
|
||||
sourceLanguage: 'en',
|
||||
destinationLanguage: ['hi','kn','ml','ta','te'],
|
||||
shortcutKey: 'ctrl+g',
|
||||
transliterationEnabled: false
|
||||
};
|
||||
|
||||
// Create an instance on TransliterationControl with the required
|
||||
// options.
|
||||
var control =
|
||||
new google.elements.transliteration.TransliterationControl(options);
|
||||
|
||||
// Enable transliteration in the textfields with the given ids.
|
||||
var ids = [ "translControl1" ];
|
||||
control.makeTransliteratable(ids);
|
||||
|
||||
// Show the transliteration control which can be used to toggle between
|
||||
// English and Hindi and also choose other destination language.
|
||||
control.showControl('translControl');
|
||||
}
|
||||
google.setOnLoadCallback(onLoad);
|
|
@ -105,9 +105,4 @@ $template->param(
|
|||
daily_quote => $quote,
|
||||
);
|
||||
|
||||
# If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens
|
||||
if (C4::Context->preference('GoogleIndicTransliteration')) {
|
||||
$template->param('GoogleIndicTransliteration' => 1);
|
||||
}
|
||||
|
||||
output_html_with_http_headers $input, $cookie, $template->output;
|
||||
|
|
|
@ -1025,11 +1025,6 @@ $template->param(
|
|||
|
||||
my $content_type = ($format eq 'rss' or $format eq 'atom' or $format eq 'opensearchdescription') ? $format : 'html';
|
||||
|
||||
# If GoogleIndicTransliteration system preference is On Set parameter to load Google's javascript in OPAC search screens
|
||||
if (C4::Context->preference('GoogleIndicTransliteration')) {
|
||||
$template->param('GoogleIndicTransliteration' => 1);
|
||||
}
|
||||
|
||||
$template->{VARS}->{DidYouMean} =
|
||||
( defined C4::Context->preference('OPACdidyoumean')
|
||||
&& C4::Context->preference('OPACdidyoumean') =~ m/enable/ );
|
||||
|
|
Loading…
Reference in a new issue