From f28fbb06fa8fa4ffb597cd5d31f1a648e4a53410 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Wed, 24 Jan 2018 10:08:55 +0100 Subject: [PATCH] make NM lettersearch lettes translatable via phrase "ABCDEFGHIJKLMNOPQRSTUVWXYZ" --- addressbook/inc/class.addressbook_ui.inc.php | 2 +- api/js/etemplate/et2_extension_nextmatch.js | 9 +++++---- api/lang/egw_de.lang | 2 +- api/lang/egw_en.lang | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/addressbook/inc/class.addressbook_ui.inc.php b/addressbook/inc/class.addressbook_ui.inc.php index 9c185af26a..f1bcaff710 100644 --- a/addressbook/inc/class.addressbook_ui.inc.php +++ b/addressbook/inc/class.addressbook_ui.inc.php @@ -1729,7 +1729,7 @@ window.egw_LAB.wait(function() { { $no_letter_search = array('adr_one_postalcode', 'adr_two_postalcode', 'contact_id', 'contact_created','contact_modified'); $query['col_filter'][] = (in_array($query['order'],$no_letter_search) ? 'org_name' : (substr($query['order'],0,1)=='#'?'':'egw_addressbook.').$query['order']).' '. - $GLOBALS['egw']->db->capabilities['case_insensitive_like'].' '.$GLOBALS['egw']->db->quote(strtolower($query['searchletter']).'%'); + $GLOBALS['egw']->db->capabilities['case_insensitive_like'].' '.$GLOBALS['egw']->db->quote($query['searchletter'].'%'); } $wildcard = '%'; $op = 'OR'; diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index cc76b18810..43ceaaf5c8 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -2564,13 +2564,14 @@ var et2_nextmatch_header_bar = (function(){ "use strict"; return et2_DOMWidget.e var row = jQuery(document.createElement("tr")).appendTo(tbody); // Capitals, A-Z - for(var i = 65; i <= 90; i++) { + var letters = this.egw().lang('ABCDEFGHIJKLMNOPQRSTUVWXYZ').split(''); + for(var i in letters) { var button = jQuery(document.createElement("td")) .addClass("lettersearch") .appendTo(row) - .attr("id", String.fromCharCode(i)) - .text(String.fromCharCode(i)); - if(String.fromCharCode(i) == current_letter) button.addClass("lettersearch_active"); + .attr("id", letters[i]) + .text(letters[i]); + if(letters[i] == current_letter) button.addClass("lettersearch_active"); } button = jQuery(document.createElement("td")) .addClass("lettersearch") diff --git a/api/lang/egw_de.lang b/api/lang/egw_de.lang index 1a43627202..d975136add 100644 --- a/api/lang/egw_de.lang +++ b/api/lang/egw_de.lang @@ -48,6 +48,7 @@ 80 (http) admin de 80 (http) a pattern to be searched for common de ein Muster nach dem gesucht werden soll a request to the egroupware server returned with an error common de Eine Anfrage an den EGroupware Server ergab einen Fehler +abcdefghijklmnopqrstuvwxyz common de ABCDEFGHIJKLMNOPQRSTUVWXYZ abort common de Abbrechen about common de Über about %1 common de Über %1 @@ -110,7 +111,6 @@ all operations save the template! common de alle Operation speichern das Templat all users common de Alle Benutzer allowed file type: %1 common de Erlaubter Dateityp: %1 allows to modify responsible users from devices not supporting them, by setting email address of a user as category. groupdav de Erlaubt verantwortliche Benutzer durch setzen einer E-Mail Adresse als Kategorie zu ändern, von Geräten die keine verantwortlichen Benutzer unterstützen. -alphabet common de a,ä,b,c,d,e,f,g,h,i,j,k,l,m,n,o,ö,p,q,r,s,t,u,ü,v,w,x,y,z alt common de Alt alternate style-sheet: common de Alternatives Style-sheet am common de Vormittag diff --git a/api/lang/egw_en.lang b/api/lang/egw_en.lang index ccd2af7bf7..5df424b75d 100644 --- a/api/lang/egw_en.lang +++ b/api/lang/egw_en.lang @@ -48,6 +48,7 @@ 80 (http) admin en 80 (http) a pattern to be searched for common en Pattern to be searched for a request to the egroupware server returned with an error common en A request to the EGroupware server returned with an error +abcdefghijklmnopqrstuvwxyz common en ABCDEFGHIJKLMNOPQRSTUVWXYZ abort common en Abort about common en About about %1 common en About %1 @@ -110,7 +111,6 @@ all operations save the template! common en All operations save the template! all users common en All users allowed file type: %1 common en Allowed file type: %1 allows to modify responsible users from devices not supporting them, by setting email address of a user as category. groupdav en Allows to modify responsible users from devices not supporting them, by setting EMail address of a user as category. -alphabet common en a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z alt common en Alt alternate style-sheet: common en Alternate style sheet: am common en am