]> source.dussan.org Git - nextcloud-server.git/commitdiff
translation support for pdfviewer
authorThomas Mueller <thomas.mueller@tmit.eu>
Sun, 26 Aug 2012 00:14:56 +0000 (02:14 +0200)
committerThomas Mueller <thomas.mueller@tmit.eu>
Sun, 26 Aug 2012 00:17:28 +0000 (02:17 +0200)
apps/files_pdfviewer/js/viewer.js
apps/files_pdfviewer/l10n/.gitkeep [new file with mode: 0644]
l10n/.tx/config
l10n/templates/files_pdfviewer.pot [new file with mode: 0644]

index 29db2ea7f2445ec32d459d429ab107f1db9bb37c..4f9cc1a0d4019ac29ad05ab24b5ed1c40e0011c8 100644 (file)
@@ -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 (file)
index 0000000..e69de29
index 325eb151d6753184780849e6c554f3c3b9519714..79a2a733f8087fdfefb223c35c2f3248b6f599d3 100644 (file)
@@ -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 (file)
index 0000000..2d3ec3d
--- /dev/null
@@ -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 ""