aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/js.js7
-rw-r--r--search/js/result.js2
2 files changed, 8 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js
index b3cefa83bee..03b496b2635 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -585,6 +585,13 @@ OC.search.customResults={};
OC.search.currentResult=-1;
OC.search.lastQuery='';
OC.search.lastResults={};
+//translations for result type ids, can be extended by apps
+OC.search.resultTypes={
+ file: t('core','File'),
+ folder: t('core','Folder'),
+ image: t('core','Image'),
+ audio: t('core','Audio')
+};
OC.addStyle.loaded=[];
OC.addScript.loaded=[];
diff --git a/search/js/result.js b/search/js/result.js
index b300f90f4c2..04e999c62ee 100644
--- a/search/js/result.js
+++ b/search/js/result.js
@@ -64,7 +64,7 @@ OC.search.showResults=function(results){
row.data('index',index);
if (i === 0){
- var typeName = typeid.charAt(0).toUpperCase() + typeid.slice(1);
+ var typeName = OC.search.resultTypes[typeid];
row.children('td.type').text(t('lib', typeName));
}
row.find('td.result div.name').text(type[i].name);