aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-08-26 02:14:56 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2012-08-26 02:17:28 +0200
commitad66d6d5e9b1e8c8fa2f29197a72ead63f83fbc8 (patch)
tree82382db077664e8b3c3cabd9c1423c6667ef80e7
parent8e090d8f67c9a4a641b3e3750d8ebe76e2cd9465 (diff)
downloadnextcloud-server-ad66d6d5e9b1e8c8fa2f29197a72ead63f83fbc8.tar.gz
nextcloud-server-ad66d6d5e9b1e8c8fa2f29197a72ead63f83fbc8.zip
translation support for pdfviewer
-rw-r--r--apps/files_pdfviewer/js/viewer.js15
-rw-r--r--apps/files_pdfviewer/l10n/.gitkeep0
-rw-r--r--l10n/.tx/config8
-rw-r--r--l10n/templates/files_pdfviewer.pot42
4 files changed, 61 insertions, 4 deletions
diff --git a/apps/files_pdfviewer/js/viewer.js b/apps/files_pdfviewer/js/viewer.js
index 29db2ea7f24..4f9cc1a0d40 100644
--- a/apps/files_pdfviewer/js/viewer.js
+++ b/apps/files_pdfviewer/js/viewer.js
@@ -18,9 +18,18 @@ function showPDFviewer(dir,filename){
function im(path) { return OC.filePath('files_pdfviewer','js','pdfjs/web/images/'+path); }
showPDFviewer.oldcode = $("#controls").html();
$("#controls").empty();
- $("#controls").html('<button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;"><img src="'+im('go-up.svg')+'" align="top" height="10"/>Previous</button><button id="next" onclick="PDFView.page++;" oncontextmenu="return false;"><img src="'+im('go-down.svg')+'" align="top" height="10"/>Next</button><div class="separator"></div><input style="width:25px;" type="number" id="pageNumber" onchange="PDFView.page = this.value;" value="1" size="4" min="1" /><span>/</span><span id="numPages">--</span><div class="separator"></div><button id="zoomOut" title="Zoom Out" onclick="PDFView.zoomOut();" oncontextmenu="return false;"><img src="'+im('zoom-out.svg')+'" align="top" height="10"/></button><button id="zoomIn" title="Zoom In" onclick="PDFView.zoomIn();" oncontextmenu="return false;"><img src="'+im('zoom-in.svg')+
- '" align="top" height="10"/></button><div class="separator"></div><select id="scaleSelect" onchange="PDFView.parseScale(this.value);" oncontextmenu="return false;"><option id="customScaleOption" value="custom"></option><option value="0.5">50%</option><option value="0.75">75%</option><option value="1">100%</option><option value="1.25" selected="selected">125%</option><option value="1.5">150%</option><option value="2">200%</option><option id="pageWidthOption" value="page-width">Page Width</option><option id="pageFitOption" value="page-fit">Page Fit</option></select><div class="separator"></div><button id="print" onclick="window.print();" oncontextmenu="return false;"><img src="'+im('document-print.svg')+'" align="top" height="10"/>Print</button><button id="download" title="Download" onclick="PDFView.download();" oncontextmenu="return false;">'+
- '<img src="'+im('download.svg')+'" align="top" height="10"/>Download</button><button id="close" title="Close viewer" onclick="hidePDFviewer();" oncontextmenu="return false;">x</button><span id="info">--</span></div>');
+ $("#controls").html(
+ '<button id="previous" onclick="PDFView.page--;" oncontextmenu="return false;"><img src="'+im('go-up.svg')+'" align="top" height="10"/>'+t('files_odfviewer','Previous')+'</button>'+
+ '<button id="next" onclick="PDFView.page++;" oncontextmenu="return false;"><img src="'+im('go-down.svg')+'" align="top" height="10"/>'+t('files_odfviewer','Next')+'</button>'+
+ '<div class="separator"></div><input style="width:25px;" type="number" id="pageNumber" onchange="PDFView.page = this.value;" value="1" size="4" min="1" /><span>/</span><span id="numPages">--</span><div class="separator"></div>'+
+ '<button id="zoomOut" title="Zoom Out" onclick="PDFView.zoomOut();" oncontextmenu="return false;"><img src="'+im('zoom-out.svg')+'" align="top" height="10"/></button>'+
+ '<button id="zoomIn" title="Zoom In" onclick="PDFView.zoomIn();" oncontextmenu="return false;"><img src="'+im('zoom-in.svg')+ '" align="top" height="10"/></button>'+
+ '<div class="separator"></div><select id="scaleSelect" onchange="PDFView.parseScale(this.value);" oncontextmenu="return false;"><option id="customScaleOption" value="custom"></option>'+
+ '<option value="0.5">50%</option><option value="0.75">75%</option><option value="1">100%</option><option value="1.25" selected="selected">125%</option><option value="1.5">150%</option><option value="2">200%</option>'+
+ '<option id="pageWidthOption" value="page-width">'+t('files_odfviewer', 'Page Width')+'</option><option id="pageFitOption" value="page-fit">'+t('files_odfviewer', 'Page Fit')+'</option></select>'+
+ '<div class="separator"></div><button id="print" onclick="window.print();" oncontextmenu="return false;"><img src="'+im('document-print.svg')+'" align="top" height="10"/>'+t('files_odfviewer', 'Print')+'</button>'+
+ '<button id="download" title="Download" onclick="PDFView.download();" oncontextmenu="return false;">'+
+ '<img src="'+im('download.svg')+'" align="top" height="10"/>'+t('files_odfviewer', 'Download')+'</button><button id="close" title="Close viewer" onclick="hidePDFviewer();" oncontextmenu="return false;">x</button><span id="info">--</span></div>');
var oldcontent = $("#content").html();
$("#content").html(oldcontent+'<div id="loading">Loading... 0%</div><div id="viewer"></div>');
showPDFviewer.lastTitle = document.title;
diff --git a/apps/files_pdfviewer/l10n/.gitkeep b/apps/files_pdfviewer/l10n/.gitkeep
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/apps/files_pdfviewer/l10n/.gitkeep
diff --git a/l10n/.tx/config b/l10n/.tx/config
index 325eb151d67..79a2a733f80 100644
--- a/l10n/.tx/config
+++ b/l10n/.tx/config
@@ -120,9 +120,15 @@ source_file = templates/impress.pot
source_lang = en
type = PO
-[owncloud.impress]
+[owncloud.files_odfviewer]
file_filter = <lang>/files_odfviewer.po
source_file = templates/files_odfviewer.pot
source_lang = en
type = PO
+[owncloud.files_pdfviewer]
+file_filter = <lang>/files_pdfviewer.po
+source_file = templates/files_pdfviewer.pot
+source_lang = en
+type = PO
+
diff --git a/l10n/templates/files_pdfviewer.pot b/l10n/templates/files_pdfviewer.pot
new file mode 100644
index 00000000000..2d3ec3d324e
--- /dev/null
+++ b/l10n/templates/files_pdfviewer.pot
@@ -0,0 +1,42 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-08-26 02:12+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: js/viewer.js:22
+msgid "Previous"
+msgstr ""
+
+#: js/viewer.js:23
+msgid "Next"
+msgstr ""
+
+#: js/viewer.js:29
+msgid "Page Width"
+msgstr ""
+
+#: js/viewer.js:29
+msgid "Page Fit"
+msgstr ""
+
+#: js/viewer.js:30
+msgid "Print"
+msgstr ""
+
+#: js/viewer.js:32
+msgid "Download"
+msgstr ""