summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorMaciej Bendkowski2012-08-08 11:36:37 (EDT)
committer Malgorzata Janczarska2012-08-08 11:37:26 (EDT)
commit90fc40cbb9c592843b3b8da79fc4d0c026cdaf65 (patch)
tree474e21b30e2922ba932255ea42b0022c4c8b1f16
parent8b93694fdcaae4440590e3dcb1ddff3c52f6200a (diff)
downloadorg.eclipse.orion.client-90fc40cbb9c592843b3b8da79fc4d0c026cdaf65.zip
org.eclipse.orion.client-90fc40cbb9c592843b3b8da79fc4d0c026cdaf65.tar.gz
org.eclipse.orion.client-90fc40cbb9c592843b3b8da79fc4d0c026cdaf65.tar.bz2
Bug 381929 -"Search" unexternalized
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/commonHTMLFragments.js2
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/search/nls/root/messages.js2
-rw-r--r--bundles/org.eclipse.orion.client.core/web/orion/searchClient.js8
3 files changed, 7 insertions, 5 deletions
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/commonHTMLFragments.js b/bundles/org.eclipse.orion.client.core/web/orion/commonHTMLFragments.js
index 133d9cf..2344b2d 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/commonHTMLFragments.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/commonHTMLFragments.js
@@ -32,7 +32,7 @@ define(['i18n!orion/nls/messages', 'require'],
'<div class="layoutRight">' + //$NON-NLS-0$
'<div id="globalActions" class="spacingLeft layoutLeft"></div>' + //$NON-NLS-0$
'<div id="relatedLinks" class="spacingLeft layoutLeft" style="padding-top:1px;"></div>' + //$NON-NLS-0$
- '<input type="text" id="search" placeholder="Search" title="'+messages['Type a keyword or wild card to search in root']+'" class="layoutLeft spacingLeft searchbox" role="search">' + //$NON-NLS-2$ //$NON-NLS-0$
+ '<input type="text" id="search" placeholder="'+messages['Search']+'" title="'+messages['Type a keyword or wild card to search in root']+'" class="layoutLeft spacingLeft searchbox" role="search">' + //$NON-NLS-2$ //$NON-NLS-0$
// '<div id="userInfo" style= "display:none;" class="layoutLeft primaryNav"></div>' + //$NON-NLS-0$
'<div id="userMenu" class="spacingLeft layoutLeft"></div>' + //$NON-NLS-0$
'</div>' + //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/search/nls/root/messages.js b/bundles/org.eclipse.orion.client.core/web/orion/search/nls/root/messages.js
index 252f383..826fb50 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/search/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/search/nls/root/messages.js
@@ -32,7 +32,7 @@ define({
" matches": " matches",
"Replaced ": "Replaced ",
"Nothing replaced": "Nothing replaced",
- "Search ": "Search ",
+ "Search ${0}": "Search ${0}",
"Type a keyword or wild card to search in ": "Type a keyword or wild card to search in ",
"Search failed.": "Search failed.",
"No matches found for ": "No matches found for ",
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js b/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
index fa92f96..a97e920 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/searchClient.js
@@ -118,10 +118,12 @@ function(messages, require, dojo, dijit, mAuth, mUtil, mSearchUtils, mSearchCraw
}
if(searchInputDom && searchInputDom.placeholder){
searchInputDom.value = "";
- if(locationName.length > 23){
- searchInputDom.placeholder = messages["Search "] + locationName.substring(0, 20) + "..."; //$NON-NLS-1$
+ var placeHolder = dojo.string.substitute(messages["Search ${0}"], [locationName]);
+
+ if(placeHolder.length > 30){
+ searchInputDom.placeholder = placeHolder.substring(0, 27) + "..."; //$NON-NLS-1$
} else {
- searchInputDom.placeholder = messages['Search '] + locationName;
+ searchInputDom.placeholder = dojo.string.substitute(messages["Search ${0}"], [locationName]);
}
}
if(searchInputDom && searchInputDom.title){