Merge branch 'develop' of github.com:ether/etherpad-lite into develop

This commit is contained in:
John McLear 2015-05-19 16:44:57 +01:00
commit 41d24a8c8f
23 changed files with 409 additions and 69 deletions

View file

@ -206,7 +206,7 @@ This hook is called before the content of a node is collected by the usual metho
E.g. if you need to apply an attribute to newly inserted characters, E.g. if you need to apply an attribute to newly inserted characters,
call cc.doAttrib(state, "attributeName") which results in an attribute attributeName=true. call cc.doAttrib(state, "attributeName") which results in an attribute attributeName=true.
If you want to specify also a value, call cc.doAttrib(state, "attributeName:value") If you want to specify also a value, call cc.doAttrib(state, "attributeName::value")
which results in an attribute attributeName=value. which results in an attribute attributeName=value.

View file

@ -90,6 +90,10 @@
Abiword is needed to advanced import/export features of pads*/ Abiword is needed to advanced import/export features of pads*/
"abiword" : null, "abiword" : null,
/* This is the path to the Tidy executable. Setting it to null, disables Tidy.
Tidy is used to improve the quality of exported pads*/
"tidyHtml" : null,
/* Allow import of file types other than the supported types: txt, doc, docx, rtf, odt, html & htm */ /* Allow import of file types other than the supported types: txt, doc, docx, rtf, odt, html & htm */
"allowUnknownFileEnds" : true, "allowUnknownFileEnds" : true,

View file

@ -94,6 +94,9 @@
"timeslider.exportCurrent": "Экспартаваць актуальную вэрсію як:", "timeslider.exportCurrent": "Экспартаваць актуальную вэрсію як:",
"timeslider.version": "Вэрсія {{version}}", "timeslider.version": "Вэрсія {{version}}",
"timeslider.saved": "Захавана {{day}}.{{month}}.{{year}}", "timeslider.saved": "Захавана {{day}}.{{month}}.{{year}}",
"timeslider.playPause": "Прайграць / спыніць зьмест дакумэнту",
"timeslider.backRevision": "Вярнуць рэдагаваньне гэтага дакумэнту",
"timeslider.forwardRevision": "Перайсьці да наступнага рэдагаваньня гэтага дакумэнту",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "студзень", "timeslider.month.january": "студзень",
"timeslider.month.february": "люты", "timeslider.month.february": "люты",

View file

@ -96,6 +96,9 @@
"timeslider.exportCurrent": "Exportiere diese Version als:", "timeslider.exportCurrent": "Exportiere diese Version als:",
"timeslider.version": "Version {{version}}", "timeslider.version": "Version {{version}}",
"timeslider.saved": "gespeichert am {{day}}. {{month}} {{year}}", "timeslider.saved": "gespeichert am {{day}}. {{month}} {{year}}",
"timeslider.playPause": "Padinhalte abspielen/pausieren",
"timeslider.backRevision": "Eine Version in diesem Pad zurück gehen",
"timeslider.forwardRevision": "Eine Version in diesem Pad vorwärts gehen",
"timeslider.dateformat": "{{day}}.{{month}}.{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}.{{month}}.{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "Januar", "timeslider.month.january": "Januar",
"timeslider.month.february": "Februar", "timeslider.month.february": "Februar",

View file

@ -36,7 +36,7 @@
"pad.colorpicker.save": "Guardar", "pad.colorpicker.save": "Guardar",
"pad.colorpicker.cancel": "Cancelar", "pad.colorpicker.cancel": "Cancelar",
"pad.loading": "Cargando...", "pad.loading": "Cargando...",
"pad.noCookie": "La cookie no se pudo encontrar. ¡Por favor, habilita las cookies en tu navegador!", "pad.noCookie": "La cookie no se pudo encontrar. ¡Habilita las cookies en tu navegador!",
"pad.passwordRequired": "Necesitas una contraseña para acceder a este pad", "pad.passwordRequired": "Necesitas una contraseña para acceder a este pad",
"pad.permissionDenied": "No tienes permiso para acceder a este pad", "pad.permissionDenied": "No tienes permiso para acceder a este pad",
"pad.wrongPassword": "La contraseña era incorrecta", "pad.wrongPassword": "La contraseña era incorrecta",
@ -102,6 +102,9 @@
"timeslider.exportCurrent": "Exportar la versión actual como:", "timeslider.exportCurrent": "Exportar la versión actual como:",
"timeslider.version": "Versión {{version}}", "timeslider.version": "Versión {{version}}",
"timeslider.saved": "Guardado el {{day}} de {{month}} de {{year}}", "timeslider.saved": "Guardado el {{day}} de {{month}} de {{year}}",
"timeslider.playPause": "Reproducir/pausar los contenidos del pad",
"timeslider.backRevision": "Ir a la revisión anterior en este pad",
"timeslider.forwardRevision": "Ir a la revisión posterior en este pad",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "enero", "timeslider.month.january": "enero",
"timeslider.month.february": "febrero", "timeslider.month.february": "febrero",
@ -128,7 +131,7 @@
"pad.impexp.importing": "Importando...", "pad.impexp.importing": "Importando...",
"pad.impexp.confirmimport": "Al importar un archivo se borrará el contenido actual del pad. ¿Estás seguro de que quieres continuar?", "pad.impexp.confirmimport": "Al importar un archivo se borrará el contenido actual del pad. ¿Estás seguro de que quieres continuar?",
"pad.impexp.convertFailed": "No pudimos importar este archivo. Inténtalo con un formato diferente o copia y pega manualmente.", "pad.impexp.convertFailed": "No pudimos importar este archivo. Inténtalo con un formato diferente o copia y pega manualmente.",
"pad.impexp.padHasData": "No hemos podido importar este archivo porque esta almohadilla ya ha tenido cambios, por favor, importa a una nueva almohadilla", "pad.impexp.padHasData": "No hemos podido importar este archivo porque este pad ya ha tenido cambios. Importa a un nuevo pad.",
"pad.impexp.uploadFailed": "El envío falló. Intentalo de nuevo.", "pad.impexp.uploadFailed": "El envío falló. Intentalo de nuevo.",
"pad.impexp.importfailed": "Fallo al importar", "pad.impexp.importfailed": "Fallo al importar",
"pad.impexp.copypaste": "Intenta copiar y pegar", "pad.impexp.copypaste": "Intenta copiar y pegar",

View file

@ -98,6 +98,9 @@
"timeslider.exportCurrent": "برون‌ریزی نگارش کنونی به عنوان:", "timeslider.exportCurrent": "برون‌ریزی نگارش کنونی به عنوان:",
"timeslider.version": "نگارش {{version}}", "timeslider.version": "نگارش {{version}}",
"timeslider.saved": "{{month}} {{day}}، {{year}} ذخیره شد", "timeslider.saved": "{{month}} {{day}}، {{year}} ذخیره شد",
"timeslider.playPause": "اجرای مجدد/متوقف کردن پخش",
"timeslider.backRevision": "رفتن به نسخهٔ پیشین در این دفترچه",
"timeslider.forwardRevision": "رفتن به نسخهٔ بعدی در این دفترچه",
"timeslider.dateformat": "{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{month}}/{{day}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "ژانویه", "timeslider.month.january": "ژانویه",
"timeslider.month.february": "فوریه", "timeslider.month.february": "فوریه",

View file

@ -109,6 +109,9 @@
"timeslider.exportCurrent": "Exporter la version actuelle sous :", "timeslider.exportCurrent": "Exporter la version actuelle sous :",
"timeslider.version": "Version {{version}}", "timeslider.version": "Version {{version}}",
"timeslider.saved": "Enregistré le {{day}} {{month}} {{year}}", "timeslider.saved": "Enregistré le {{day}} {{month}} {{year}}",
"timeslider.playPause": "Lecture / Pause des contenus du bloc",
"timeslider.backRevision": "Reculer dune révision dans ce bloc",
"timeslider.forwardRevision": "Avancer dune révision dans ce bloc",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "janvier", "timeslider.month.january": "janvier",
"timeslider.month.february": "février", "timeslider.month.february": "février",

View file

@ -93,6 +93,9 @@
"timeslider.exportCurrent": "Exportar a versión actual en formato:", "timeslider.exportCurrent": "Exportar a versión actual en formato:",
"timeslider.version": "Versión {{version}}", "timeslider.version": "Versión {{version}}",
"timeslider.saved": "Gardado o {{day}} de {{month}} de {{year}}", "timeslider.saved": "Gardado o {{day}} de {{month}} de {{year}}",
"timeslider.playPause": "Reproducir/pausar os contidos do pad",
"timeslider.backRevision": "Ir á revisión anterior neste pad",
"timeslider.forwardRevision": "Ir á revisión posterior neste pad",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "xaneiro", "timeslider.month.january": "xaneiro",
"timeslider.month.february": "febreiro", "timeslider.month.february": "febreiro",

View file

@ -95,6 +95,9 @@
"timeslider.exportCurrent": "ייצוא הגרסה הנוכחית בתור:", "timeslider.exportCurrent": "ייצוא הגרסה הנוכחית בתור:",
"timeslider.version": "גרסה {{version}}", "timeslider.version": "גרסה {{version}}",
"timeslider.saved": "נשמרה ב־{{day}} ב{{month}} {{year}}", "timeslider.saved": "נשמרה ב־{{day}} ב{{month}} {{year}}",
"timeslider.playPause": "לנגן / לעצור את תוכן הפנקס",
"timeslider.backRevision": "לחזור לגרסה של הפנקס הזה",
"timeslider.forwardRevision": "ללכת לגרסה חדשה יותר בפנקס הזה",
"timeslider.dateformat": "{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "ינואר", "timeslider.month.january": "ינואר",
"timeslider.month.february": "פברואר", "timeslider.month.february": "פברואר",

View file

@ -93,6 +93,9 @@
"timeslider.exportCurrent": "現在の版をエクスポートする形式:", "timeslider.exportCurrent": "現在の版をエクスポートする形式:",
"timeslider.version": "バージョン {{version}}", "timeslider.version": "バージョン {{version}}",
"timeslider.saved": "| {{year}}年{{month}}{{day}}日に保存", "timeslider.saved": "| {{year}}年{{month}}{{day}}日に保存",
"timeslider.playPause": "パッドの過去の内容を再生/一時停止",
"timeslider.backRevision": "前の版に戻る",
"timeslider.forwardRevision": "次の版に進む",
"timeslider.dateformat": "{{year}}年{{month}}月{{day}}日 {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{year}}年{{month}}月{{day}}日 {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "1月", "timeslider.month.january": "1月",
"timeslider.month.february": "2月", "timeslider.month.february": "2月",

View file

@ -92,6 +92,9 @@
"timeslider.exportCurrent": "Donn de neußte Väsjohn äxpotteere alß:", "timeslider.exportCurrent": "Donn de neußte Väsjohn äxpotteere alß:",
"timeslider.version": "Väsjohn {{version}}", "timeslider.version": "Väsjohn {{version}}",
"timeslider.saved": "Faßjehallde aam {{day}}. {{month}} {{year}}", "timeslider.saved": "Faßjehallde aam {{day}}. {{month}} {{year}}",
"timeslider.playPause": "Donn der Enhalld vum Päd afschpelle udder aanhallde",
"timeslider.backRevision": "Jangk ein Väsjohn retuhr en dämm Pahdt",
"timeslider.forwardRevision": "Jangg en Väsjohn vörwääz en heh däm Pahdt.",
"timeslider.dateformat": "aam {{day}}. {{month}} {{year}} öm {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "aam {{day}}. {{month}} {{year}} öm {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "Jannewaa", "timeslider.month.january": "Jannewaa",
"timeslider.month.february": "Fääbrowaa", "timeslider.month.february": "Fääbrowaa",

77
src/locales/ku-latn.json Normal file
View file

@ -0,0 +1,77 @@
{
"@metadata": {
"authors": [
"Bikarhêner",
"Dilyaramude",
"George Animal",
"Gomada"
]
},
"index.newPad": "Bloknota nû",
"index.createOpenPad": "Yan Padekê li gel navê biafirîne/veke:",
"pad.toolbar.bold.title": "Stûr (Ctrl-B)",
"pad.toolbar.italic.title": "Xwar (Ctrl-I)",
"pad.toolbar.underline.title": "Binxet (Ctrl-U)",
"pad.toolbar.strikethrough.title": "Serxêzkirî (Ctrl+5)",
"pad.toolbar.ol.title": "Lîsteya rêzkirî (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Lîsteya tevlîhev (Ctrl+Shift+L)",
"pad.toolbar.undo.title": "Vegerîne (Ctrl-Z)",
"pad.toolbar.redo.title": "Dîsa bike (Ctrl-Y)",
"pad.toolbar.clearAuthorship.title": "Rengên nivîskariyê jê bibe (Ctrl+Shift+C)",
"pad.toolbar.savedRevision.title": "Sererastkirinê tomar bike",
"pad.toolbar.settings.title": "Eyar",
"pad.colorpicker.save": "Tomar bike",
"pad.colorpicker.cancel": "Beta bike",
"pad.loading": "Tê barkirin...",
"pad.settings.padSettings": "Eyarên bloknotê",
"pad.settings.myView": "Dîmena min",
"pad.settings.stickychat": "Di ekranê de hertim çet bike",
"pad.settings.chatandusers": "Çeta û Bikarhênera Nîşan bide",
"pad.settings.colorcheck": "Rengên nivîskarîye",
"pad.settings.linenocheck": "Hejmarên rêze",
"pad.settings.rtlcheck": "Bila naverok ji raste ber bi çepe be xwendin?",
"pad.settings.fontType": "Tîpa nivîsê:",
"pad.settings.language": "Ziman:",
"pad.importExport.importSuccessful": "Biserketî!",
"pad.importExport.exportetherpad": "Etherpad",
"pad.importExport.exporthtml": "HTML",
"pad.importExport.exportword": "Microsoft Word",
"pad.importExport.exportpdf": "PDF",
"pad.modals.connected": "Hate girêdan.",
"pad.modals.reconnecting": "Ji bloknota te re dîsa tê girêdan...",
"pad.modals.userdup": "Di pencereyek din de vebû",
"pad.modals.userdup.advice": "Ji bo di vê pencereye de bikarbînîy dîsa giredanek çeke.",
"pad.modals.unauth": "Desthilatdar nîne",
"pad.modals.deleted": "Hate jêbirin.",
"pad.modals.deleted.explanation": "Ev bloknot hatiye rakirin.",
"pad.modals.disconnected": "Pêwendîya te qut bû.",
"pad.modals.disconnected.explanation": "Pêwendîya rajeker qut bû",
"pad.share": "Vê bloknotê parve bike",
"pad.share.link": "Girêdan",
"pad.chat": "Çet",
"pad.chat.title": "Ji bo vê bloknotê çet veke.",
"pad.chat.loadmessages": "Peyamên bêhtir barbike",
"timeslider.toolbar.returnbutton": "Vegere bloknotê",
"timeslider.toolbar.authors": "Nivîser:",
"timeslider.toolbar.authorsList": "Nivîser Tine",
"timeslider.version": "Guhertoya {{version}}",
"timeslider.saved": "Di dîroka {{day}} {{month}} {{year}} de hate tomarkirin",
"timeslider.month.january": "rêbendan",
"timeslider.month.february": "reşemî",
"timeslider.month.march": "adar",
"timeslider.month.april": "avrêl",
"timeslider.month.may": "gulan",
"timeslider.month.june": "pûşper",
"timeslider.month.july": "tîrmeh",
"timeslider.month.august": "gelawêj",
"timeslider.month.september": "rezber",
"timeslider.month.october": "kewçêr",
"timeslider.month.november": "sermawez",
"timeslider.month.december": "berfanbar",
"pad.userlist.entername": "Navê xwe têkeve",
"pad.userlist.unnamed": "nenavkirî",
"pad.userlist.guest": "Mêvan",
"pad.userlist.deny": "Red bike",
"pad.userlist.approve": "Bipejirîne",
"pad.impexp.copypaste": "Ji kerema xwe re jê bigre û pê ve deyne (Ctrl+c, Ctrl+v)"
}

View file

@ -93,6 +93,9 @@
"timeslider.exportCurrent": "Извези ја тековната верзија како:", "timeslider.exportCurrent": "Извези ја тековната верзија како:",
"timeslider.version": "Верзија {{version}}", "timeslider.version": "Верзија {{version}}",
"timeslider.saved": "Зачувано на {{day}} {{month}} {{year}} г.", "timeslider.saved": "Зачувано на {{day}} {{month}} {{year}} г.",
"timeslider.playPause": "Пушти/запри содржина на тетратката",
"timeslider.backRevision": "Назад за една преработка на тетратката",
"timeslider.forwardRevision": "Напред за една преработка на тетратката",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "јануари", "timeslider.month.january": "јануари",
"timeslider.month.february": "февруари", "timeslider.month.february": "февруари",

View file

@ -33,6 +33,7 @@
"pad.settings.padSettings": "Tetapan Pad", "pad.settings.padSettings": "Tetapan Pad",
"pad.settings.myView": "Paparan Saya", "pad.settings.myView": "Paparan Saya",
"pad.settings.stickychat": "Sentiasa bersembang pada skrin", "pad.settings.stickychat": "Sentiasa bersembang pada skrin",
"pad.settings.chatandusers": "Paparkan Ruang Sembang dan Pengguna-Pengguna",
"pad.settings.colorcheck": "Warna pengarang", "pad.settings.colorcheck": "Warna pengarang",
"pad.settings.linenocheck": "Nombor baris", "pad.settings.linenocheck": "Nombor baris",
"pad.settings.rtlcheck": "Membaca dari kanan ke kiri?", "pad.settings.rtlcheck": "Membaca dari kanan ke kiri?",
@ -91,6 +92,9 @@
"timeslider.exportCurrent": "Eksport versi semasa sebagai:", "timeslider.exportCurrent": "Eksport versi semasa sebagai:",
"timeslider.version": "Versi {{version}}", "timeslider.version": "Versi {{version}}",
"timeslider.saved": "Disimpan pada {{day}} {{month}} {{year}}", "timeslider.saved": "Disimpan pada {{day}} {{month}} {{year}}",
"timeslider.playPause": "Mainkan / Pausekan Kandungan Pad",
"timeslider.backRevision": "Undur satu semakan di Pad ini",
"timeslider.forwardRevision": "Maju satu semakan dalam Pad ini",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "Januari", "timeslider.month.january": "Januari",
"timeslider.month.february": "Februari", "timeslider.month.february": "Februari",
@ -106,6 +110,7 @@
"timeslider.month.december": "Disember", "timeslider.month.december": "Disember",
"timeslider.unnamedauthors": "{{num}} orang {[plural(num) other: pengarang]} awanama", "timeslider.unnamedauthors": "{{num}} orang {[plural(num) other: pengarang]} awanama",
"pad.savedrevs.marked": "Semakan ini telah ditandai sebagai semakan tersimpan", "pad.savedrevs.marked": "Semakan ini telah ditandai sebagai semakan tersimpan",
"pad.savedrevs.timeslider": "Anda boleh melihat semakan yang tersimpan dengan melawat gelangsar masa",
"pad.userlist.entername": "Taipkan nama anda", "pad.userlist.entername": "Taipkan nama anda",
"pad.userlist.unnamed": "tanpa nama", "pad.userlist.unnamed": "tanpa nama",
"pad.userlist.guest": "Tetamu", "pad.userlist.guest": "Tetamu",

View file

@ -2,37 +2,40 @@
"@metadata": { "@metadata": {
"authors": [ "authors": [
"Laaknor", "Laaknor",
"Cocu" "Cocu",
"Chameleon222"
] ]
}, },
"index.newPad": "Ny Pad", "index.newPad": "Ny blokk",
"index.createOpenPad": "eller opprette/åpne en ny Pad med dette navnet:", "index.createOpenPad": "eller opprette/åpne en ny blokk med dette navnet:",
"pad.toolbar.bold.title": "Fet (Ctrl-B)", "pad.toolbar.bold.title": "Fet (Ctrl+B)",
"pad.toolbar.italic.title": "Kursiv (Ctrl-I)", "pad.toolbar.italic.title": "Kursiv (Ctrl+I)",
"pad.toolbar.underline.title": "Understreking (Ctrl-U)", "pad.toolbar.underline.title": "Understreking (Ctrl+U)",
"pad.toolbar.strikethrough.title": "Gjennomstreking (Ctrl+5)", "pad.toolbar.strikethrough.title": "Gjennomstreking (Ctrl+5)",
"pad.toolbar.ol.title": "Nummerert liste (Ctrl+Shift+N)", "pad.toolbar.ol.title": "Nummerert liste (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Punktliste (Ctrl+Shift+L)", "pad.toolbar.ul.title": "Punktliste (Ctrl+Shift+L)",
"pad.toolbar.indent.title": "Innrykk (TAB)", "pad.toolbar.indent.title": "Innrykk (TAB)",
"pad.toolbar.unindent.title": "Rykk ut (Shift+TAB)", "pad.toolbar.unindent.title": "Rykk ut (Shift+TAB)",
"pad.toolbar.undo.title": "Angre (Ctrl-Z)", "pad.toolbar.undo.title": "Angre (Ctrl+Z)",
"pad.toolbar.redo.title": "Gjør omigjen (Ctrl-Y)", "pad.toolbar.redo.title": "Gjør omigjen (Ctrl+Y)",
"pad.toolbar.clearAuthorship.title": "Fjern forfatterfarger (Ctrl+Shift+C)", "pad.toolbar.clearAuthorship.title": "Fjern forfatterfarger (Ctrl+Shift+C)",
"pad.toolbar.import_export.title": "Importer/eksporter fra/til forskjellige filformater", "pad.toolbar.import_export.title": "Importer/eksporter fra/til forskjellige filformater",
"pad.toolbar.timeslider.title": "Tidslinje", "pad.toolbar.timeslider.title": "Tidslinje",
"pad.toolbar.savedRevision.title": "Lagre revisjoner", "pad.toolbar.savedRevision.title": "Lagre revisjoner",
"pad.toolbar.settings.title": "Innstillinger", "pad.toolbar.settings.title": "Innstillinger",
"pad.toolbar.embed.title": "Bygg inn denne padden", "pad.toolbar.embed.title": "Del og sett inn denne blokken",
"pad.toolbar.showusers.title": "Vis brukerne av denne padden", "pad.toolbar.showusers.title": "Vis brukerne av denne blokken",
"pad.colorpicker.save": "Lagre", "pad.colorpicker.save": "Lagre",
"pad.colorpicker.cancel": "Avbryt", "pad.colorpicker.cancel": "Avbryt",
"pad.loading": "Laster inn...", "pad.loading": "Laster...",
"pad.passwordRequired": "Du trenger et passord for å få tilgang til denne padden", "pad.noCookie": "Kunne ikke finne informasjonskapselen. Vennligst tillat informasjonskapsler (cookies) i din webleser!",
"pad.permissionDenied": "Du har ikke tilgang til denne padden", "pad.passwordRequired": "Du trenger et passord for å få tilgang til denne blokken",
"pad.permissionDenied": "Du har ikke tilgang til denne blokken",
"pad.wrongPassword": "Feil passord", "pad.wrongPassword": "Feil passord",
"pad.settings.padSettings": "Padinnstillinger", "pad.settings.padSettings": "Blokkinnstillinger",
"pad.settings.myView": "Min visning", "pad.settings.myView": "Min visning",
"pad.settings.stickychat": "Chat alltid synlig", "pad.settings.stickychat": "Chat alltid synlig",
"pad.settings.chatandusers": "Vis chat og brukere",
"pad.settings.colorcheck": "Forfatterfarger", "pad.settings.colorcheck": "Forfatterfarger",
"pad.settings.linenocheck": "Linjenummer", "pad.settings.linenocheck": "Linjenummer",
"pad.settings.rtlcheck": "Les innhold fra høyre til venstre?", "pad.settings.rtlcheck": "Les innhold fra høyre til venstre?",
@ -44,7 +47,8 @@
"pad.importExport.import_export": "Importer/eksporter", "pad.importExport.import_export": "Importer/eksporter",
"pad.importExport.import": "Last opp tekstfil eller dokument", "pad.importExport.import": "Last opp tekstfil eller dokument",
"pad.importExport.importSuccessful": "Vellykket!", "pad.importExport.importSuccessful": "Vellykket!",
"pad.importExport.export": "Eksporter padden som:", "pad.importExport.export": "Eksporter blokken som:",
"pad.importExport.exportetherpad": "Etherpad",
"pad.importExport.exporthtml": "HTML", "pad.importExport.exporthtml": "HTML",
"pad.importExport.exportplain": "Ren tekst", "pad.importExport.exportplain": "Ren tekst",
"pad.importExport.exportword": "Microsoft Word", "pad.importExport.exportword": "Microsoft Word",
@ -52,10 +56,10 @@
"pad.importExport.exportopen": "ODF (Open Document Format)", "pad.importExport.exportopen": "ODF (Open Document Format)",
"pad.importExport.abiword.innerHTML": "Du kan bare importere fra ren tekst eller HTML-formater. For mer avanserte importfunksjoner, <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">installer abiword</a>.", "pad.importExport.abiword.innerHTML": "Du kan bare importere fra ren tekst eller HTML-formater. For mer avanserte importfunksjoner, <a href=\"https://github.com/ether/etherpad-lite/wiki/How-to-enable-importing-and-exporting-different-file-formats-in-Ubuntu-or-OpenSuse-or-SLES-with-AbiWord\">installer abiword</a>.",
"pad.modals.connected": "Tilkoblet.", "pad.modals.connected": "Tilkoblet.",
"pad.modals.reconnecting": "Kobler til din pad på nytt...", "pad.modals.reconnecting": "Kobler til din blokk på nytt...",
"pad.modals.forcereconnect": "Tving gjenoppkobling", "pad.modals.forcereconnect": "Tving gjenoppkobling",
"pad.modals.userdup": "Åpnet i nytt vindu", "pad.modals.userdup": "Åpnet i nytt vindu",
"pad.modals.userdup.explanation": "Denne padden ser ut til å være åpnet i mer enn et nettleservindu på denne maskinen.", "pad.modals.userdup.explanation": "Denne blokken ser ut til å være åpnet i mer enn et nettleservindu på denne maskinen.",
"pad.modals.userdup.advice": "Koble til igjen for å bruke dette vinduet i stedenfor.", "pad.modals.userdup.advice": "Koble til igjen for å bruke dette vinduet i stedenfor.",
"pad.modals.unauth": "Ikke tillatt", "pad.modals.unauth": "Ikke tillatt",
"pad.modals.unauth.explanation": "Dine rettigheter har blitt endret mens du så på denne siden. Prøv å koble til på nytt", "pad.modals.unauth.explanation": "Dine rettigheter har blitt endret mens du så på denne siden. Prøv å koble til på nytt",
@ -71,26 +75,29 @@
"pad.modals.corruptPad.explanation": "Blokken du forsøker å få tilgang til er skadet.", "pad.modals.corruptPad.explanation": "Blokken du forsøker å få tilgang til er skadet.",
"pad.modals.corruptPad.cause": "Dette kan komme av feil serverkonfigurasjon eller en annen uventet adferd. Vennligst kontakt serviceadministratoren hvis du anser dette å være feil.", "pad.modals.corruptPad.cause": "Dette kan komme av feil serverkonfigurasjon eller en annen uventet adferd. Vennligst kontakt serviceadministratoren hvis du anser dette å være feil.",
"pad.modals.deleted": "Slettet.", "pad.modals.deleted": "Slettet.",
"pad.modals.deleted.explanation": "Denne padden har blitt fjernet", "pad.modals.deleted.explanation": "Denne blokken har blitt fjernet",
"pad.modals.disconnected": "Du har blitt frakoblet.", "pad.modals.disconnected": "Du har blitt frakoblet.",
"pad.modals.disconnected.explanation": "Mistet tilkobling til serveren.", "pad.modals.disconnected.explanation": "Mistet tilkobling til serveren.",
"pad.modals.disconnected.cause": "Serveren kan være utilgjengelig. Vennligst si i fra til oss hvis dette fortsetter å skje", "pad.modals.disconnected.cause": "Serveren kan være utilgjengelig. Vennligst si i fra til oss hvis dette fortsetter å skje.",
"pad.share": "Del denne padden", "pad.share": "Del denne blokken",
"pad.share.readonly": "Skrivebeskyttet", "pad.share.readonly": "Skrivebeskyttet",
"pad.share.link": "Lenke", "pad.share.link": "Lenke",
"pad.share.emebdcode": "URL for innbygging", "pad.share.emebdcode": "URL for innbygging",
"pad.chat": "Chat", "pad.chat": "Chat",
"pad.chat.title": "Åpne chatten for denne padden.", "pad.chat.title": "Åpne chatten for denne blokken.",
"pad.chat.loadmessages": "Last flere beskjeder", "pad.chat.loadmessages": "Last flere beskjeder",
"timeslider.pageTitle": "{{appTitle}} Tidslinje", "timeslider.pageTitle": "{{appTitle}} Tidslinje",
"timeslider.toolbar.returnbutton": "Gå tilbake til pad", "timeslider.toolbar.returnbutton": "Gå tilbake til blokk",
"timeslider.toolbar.authors": "Forfattere:", "timeslider.toolbar.authors": "Forfattere:",
"timeslider.toolbar.authorsList": "Ingen forfattere", "timeslider.toolbar.authorsList": "Ingen forfattere",
"timeslider.toolbar.exportlink.title": "Eksporter", "timeslider.toolbar.exportlink.title": "Eksporter",
"timeslider.exportCurrent": "Eksporter nåværende versjon som:", "timeslider.exportCurrent": "Eksporter nåværende versjon som:",
"timeslider.version": "Versjon {{version}}", "timeslider.version": "Versjon {{version}}",
"timeslider.saved": "Lagret {{day}} {{month}} {{year}}", "timeslider.saved": "Lagret {{day}}. {{month}} {{year}}",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.playPause": "Spill av/Pause blokkinnholdet",
"timeslider.backRevision": "Gå tilbake en revisjon i denne blokken",
"timeslider.forwardRevision": "Gå fremover en revisjon i denne blokken",
"timeslider.dateformat": "{{day}}. {{month}} {{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "januar", "timeslider.month.january": "januar",
"timeslider.month.february": "februar", "timeslider.month.february": "februar",
"timeslider.month.march": "mars", "timeslider.month.march": "mars",
@ -105,6 +112,7 @@
"timeslider.month.december": "desember", "timeslider.month.december": "desember",
"timeslider.unnamedauthors": "{{num}} navnløse {[plural(num) one: forfatter, other: forfattere ]}", "timeslider.unnamedauthors": "{{num}} navnløse {[plural(num) one: forfatter, other: forfattere ]}",
"pad.savedrevs.marked": "Denne revisjonen er nå markert som en lagret revisjon", "pad.savedrevs.marked": "Denne revisjonen er nå markert som en lagret revisjon",
"pad.savedrevs.timeslider": "Du kan se lagrede revisjoner med tidslinjen",
"pad.userlist.entername": "Skriv inn ditt navn", "pad.userlist.entername": "Skriv inn ditt navn",
"pad.userlist.unnamed": "navnløs", "pad.userlist.unnamed": "navnløs",
"pad.userlist.guest": "Gjest", "pad.userlist.guest": "Gjest",
@ -113,8 +121,9 @@
"pad.editbar.clearcolors": "Fjern forfatterfarger på hele dokumentet?", "pad.editbar.clearcolors": "Fjern forfatterfarger på hele dokumentet?",
"pad.impexp.importbutton": "Importer nå", "pad.impexp.importbutton": "Importer nå",
"pad.impexp.importing": "Importerer...", "pad.impexp.importing": "Importerer...",
"pad.impexp.confirmimport": "Importering av en fil vil overskrive den nåværende teksten på padden. Er du sikker på at du vil fortsette?", "pad.impexp.confirmimport": "Importering av en fil vil overskrive den nåværende teksten på blokken. Er du sikker på at du vil fortsette?",
"pad.impexp.convertFailed": "Vi greide ikke å importere denne filen. Bruk et annet dokumentformat eller kopier og lim inn teksten manuelt", "pad.impexp.convertFailed": "Vi greide ikke å importere denne filen. Bruk et annet dokumentformat eller kopier og lim inn teksten manuelt",
"pad.impexp.padHasData": "Vi kunne ikke importere denne filen fordi blokken allerede hadde endringer. Importer til en ny blokk.",
"pad.impexp.uploadFailed": "Opplastning feilet. Prøv igjen", "pad.impexp.uploadFailed": "Opplastning feilet. Prøv igjen",
"pad.impexp.importfailed": "Import feilet", "pad.impexp.importfailed": "Import feilet",
"pad.impexp.copypaste": "Vennligst kopier og lim inn", "pad.impexp.copypaste": "Vennligst kopier og lim inn",

View file

@ -8,6 +8,10 @@
"index.createOpenPad": "يا په همدې نوم يوه نوې ليکچه جوړول/پرانيستل:", "index.createOpenPad": "يا په همدې نوم يوه نوې ليکچه جوړول/پرانيستل:",
"pad.toolbar.bold.title": "زغرد (Ctrl-B)", "pad.toolbar.bold.title": "زغرد (Ctrl-B)",
"pad.toolbar.italic.title": "رېوند (Ctrl-I)", "pad.toolbar.italic.title": "رېوند (Ctrl-I)",
"pad.toolbar.underline.title": "لرکرښن (Ctrl+U)",
"pad.toolbar.strikethrough.title": "کرښکاږلی (Ctrl+5)",
"pad.toolbar.ol.title": "ترتيب شوی لړليک (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "ناترتيب شوی لړليک (Ctrl+Shift+L)",
"pad.toolbar.undo.title": "ناکړل (Ctrl-Z)", "pad.toolbar.undo.title": "ناکړل (Ctrl-Z)",
"pad.toolbar.redo.title": "بياکړل (Ctrl-Y)", "pad.toolbar.redo.title": "بياکړل (Ctrl-Y)",
"pad.toolbar.clearAuthorship.title": "د ليکوالۍ رنگونه سپينول (Ctrl+Shift+C)", "pad.toolbar.clearAuthorship.title": "د ليکوالۍ رنگونه سپينول (Ctrl+Shift+C)",
@ -20,13 +24,17 @@
"pad.wrongPassword": "پټنوم مو سم نه و", "pad.wrongPassword": "پټنوم مو سم نه و",
"pad.settings.padSettings": "د ليکچې امستنې", "pad.settings.padSettings": "د ليکچې امستنې",
"pad.settings.myView": "زما کتنه", "pad.settings.myView": "زما کتنه",
"pad.settings.stickychat": "تل په پردې بانډار کول",
"pad.settings.chatandusers": "کارنان او بانډار ښکاره کول",
"pad.settings.colorcheck": "د ليکوالۍ رنگونه", "pad.settings.colorcheck": "د ليکوالۍ رنگونه",
"pad.settings.linenocheck": "د کرښو شمېرې",
"pad.settings.fontType": "ليکبڼې ډول:", "pad.settings.fontType": "ليکبڼې ډول:",
"pad.settings.fontType.normal": "نورمال", "pad.settings.fontType.normal": "نورمال",
"pad.settings.fontType.monospaced": "مونوسپېس", "pad.settings.fontType.monospaced": "مونوسپېس",
"pad.settings.globalView": "نړېواله ښکارېدنه", "pad.settings.globalView": "نړېواله ښکارېدنه",
"pad.settings.language": "ژبه:", "pad.settings.language": "ژبه:",
"pad.importExport.importSuccessful": "بريالی شو!", "pad.importExport.importSuccessful": "بريالی شو!",
"pad.importExport.exportetherpad": "اېترپډ",
"pad.importExport.exporthtml": "اچ ټي ام اېل", "pad.importExport.exporthtml": "اچ ټي ام اېل",
"pad.importExport.exportplain": "ساده متن", "pad.importExport.exportplain": "ساده متن",
"pad.importExport.exportword": "مايکروسافټ ورډ", "pad.importExport.exportword": "مايکروسافټ ورډ",
@ -66,5 +74,7 @@
"pad.userlist.guest": "مېلمه", "pad.userlist.guest": "مېلمه",
"pad.userlist.deny": "ردول", "pad.userlist.deny": "ردول",
"pad.userlist.approve": "منل", "pad.userlist.approve": "منل",
"pad.impexp.importbutton": "اوس واردول",
"pad.impexp.importing": "په واردولو کې دی...",
"pad.impexp.copypaste": "لطفاً لمېسل لېښل ترسره کړئ" "pad.impexp.copypaste": "لطفاً لمېسل لېښل ترسره کړئ"
} }

82
src/locales/ro.json Normal file
View file

@ -0,0 +1,82 @@
{
"@metadata": {
"authors": [
"Hedwig",
"ImGelu",
"Minisarm"
]
},
"index.newPad": "Pad nou",
"index.createOpenPad": "sau creează/deschide un Pad cu numele:",
"pad.toolbar.bold.title": "Aldin (Ctrl + B)",
"pad.toolbar.italic.title": "Cursiv (Ctrl + I)",
"pad.toolbar.underline.title": "Subliniază (Ctrl+U)",
"pad.toolbar.strikethrough.title": "Taie (Ctrl+5)",
"pad.toolbar.ol.title": "Listă ordonată (Ctrl+Shift+N)",
"pad.toolbar.ul.title": "Listă neordonată (Ctrl+Shift+L)",
"pad.toolbar.undo.title": "Anulează (Ctrl+Z)",
"pad.toolbar.savedRevision.title": "Salvează revizia",
"pad.toolbar.settings.title": "Setări",
"pad.colorpicker.save": "Salvează",
"pad.colorpicker.cancel": "Anulează",
"pad.loading": "Se încarcă...",
"pad.passwordRequired": "Ai nevoie de o parolă pentru a accesa acest pad",
"pad.permissionDenied": "Nu ai permisiunea să accesezi acest pad",
"pad.wrongPassword": "Parola ta este greșită",
"pad.settings.padSettings": "Setări pentru Pad",
"pad.settings.stickychat": "Chat-ul întotdeauna pe ecran",
"pad.settings.chatandusers": "Afișează Chat-ul și Utilizatorii",
"pad.settings.fontType": "Tipul fontului:",
"pad.settings.globalView": "Vedere generală",
"pad.settings.language": "Limbă:",
"pad.importExport.import": "Încarcă orice fișier text sau document",
"pad.importExport.importSuccessful": "Succes!",
"pad.importExport.export": "Exportă pad-ul curent ca:",
"pad.importExport.exportetherpad": "Etherpad",
"pad.importExport.exporthtml": "HTML",
"pad.importExport.exportplain": "Text brut",
"pad.importExport.exportword": "Microsoft Word",
"pad.importExport.exportpdf": "PDF",
"pad.importExport.exportopen": "ODF (Open Document Format)",
"pad.modals.connected": "Conectat.",
"pad.modals.reconnecting": "Se reconectează la pad-ul tău..",
"pad.modals.forcereconnect": "Forțează reconectarea",
"pad.modals.userdup.advice": "Reconectează pentru a folosi această fereastră în schimb",
"pad.modals.unauth": "Nu ești autorizat",
"pad.modals.initsocketfail": "Serverul nu este disponibil.",
"pad.modals.initsocketfail.explanation": "Nu s-a putut conecta la serverul de sincronizare.",
"pad.modals.slowcommit.explanation": "Serverul nu răspunde.",
"pad.modals.slowcommit.cause": "Aceasta poate fi cauzată de probleme cu conexiunea la rețea.",
"pad.modals.deleted": "Șters.",
"pad.modals.deleted.explanation": "Acest pad a fost șters.",
"pad.modals.disconnected": "Ai fost deconectat.",
"pad.share": "Distribuie acest pad",
"pad.share.readonly": "Doar în citire",
"pad.share.link": "Legătură",
"pad.share.emebdcode": "Încorporează URL-ul",
"pad.chat": "Chat",
"pad.chat.title": "Deschide chat-ul pentru acest pad.",
"pad.chat.loadmessages": "Încarcă mai multe mesaje",
"timeslider.toolbar.returnbutton": "Înapoi la pad",
"timeslider.toolbar.authors": "Aurori:",
"timeslider.toolbar.authorsList": "Niciun autor",
"timeslider.toolbar.exportlink.title": "Exportă",
"timeslider.exportCurrent": "Exportă versiunea curentă ca:",
"timeslider.version": "Versiunea {{version}}",
"timeslider.saved": "Salvat pe {{day}} {{month}} {{year}}",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "ianuarie",
"timeslider.month.february": "februarie",
"timeslider.month.march": "martie",
"timeslider.month.april": "aprilie",
"timeslider.month.may": "mai",
"timeslider.month.june": "iunie",
"timeslider.month.july": "iulie",
"timeslider.month.august": "august",
"timeslider.month.september": "septembrie",
"timeslider.month.october": "octombrie",
"timeslider.month.november": "noiembrie",
"timeslider.month.december": "decembrie",
"pad.userlist.entername": "Introdu numele tău",
"pad.userlist.unnamed": "fără nume"
}

View file

@ -94,6 +94,9 @@
"timeslider.exportCurrent": "Exportera aktuell version som:", "timeslider.exportCurrent": "Exportera aktuell version som:",
"timeslider.version": "Version {{version}}", "timeslider.version": "Version {{version}}",
"timeslider.saved": "Sparades den {{day}} {{month}} {{year}}", "timeslider.saved": "Sparades den {{day}} {{month}} {{year}}",
"timeslider.playPause": "Spela upp/pausa blockets innehåll",
"timeslider.backRevision": "Gå tillbaka en version av detta block",
"timeslider.forwardRevision": "Gå framåt en version av detta block",
"timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}", "timeslider.dateformat": "{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}",
"timeslider.month.january": "januari", "timeslider.month.january": "januari",
"timeslider.month.february": "februari", "timeslider.month.february": "februari",

View file

@ -102,6 +102,9 @@
"timeslider.exportCurrent": "当前版本导出为:", "timeslider.exportCurrent": "当前版本导出为:",
"timeslider.version": "版本 {{version}}", "timeslider.version": "版本 {{version}}",
"timeslider.saved": "在{{year}}年{{month}}{{day}}日保存", "timeslider.saved": "在{{year}}年{{month}}{{day}}日保存",
"timeslider.playPause": "回放 / 暂停Pad内容",
"timeslider.backRevision": "返回此Pad的一次修订",
"timeslider.forwardRevision": "前往此Pad的一次修订",
"timeslider.dateformat": "{{year}}年{{month}}月{{day}}日 {{hours}}{{minutes}}{{seconds}}", "timeslider.dateformat": "{{year}}年{{month}}月{{day}}日 {{hours}}{{minutes}}{{seconds}}",
"timeslider.month.january": "1月", "timeslider.month.january": "1月",
"timeslider.month.february": "2月", "timeslider.month.february": "2月",

View file

@ -28,6 +28,7 @@ var fs = require("fs");
var settings = require('../utils/Settings'); var settings = require('../utils/Settings');
var os = require('os'); var os = require('os');
var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks"); var hooks = require("ep_etherpad-lite/static/js/pluginfw/hooks");
var TidyHtml = require('../utils/TidyHtml');
//load abiword only if its enabled //load abiword only if its enabled
if(settings.abiword != null) if(settings.abiword != null)
@ -172,12 +173,19 @@ exports.doExport = function(req, res, padId, type)
fs.writeFile(srcFile, html, callback); fs.writeFile(srcFile, html, callback);
} }
}, },
//send the convert job to abiword
// Tidy up the exported HTML
function(callback) function(callback)
{ {
//ensure html can be collected by the garbage collector //ensure html can be collected by the garbage collector
html = null; html = null;
TidyHtml.tidy(srcFile, callback);
},
//send the convert job to abiword
function(callback)
{
destFile = tempDirectory + "/etherpad_export_" + randNum + "." + type; destFile = tempDirectory + "/etherpad_export_" + randNum + "." + type;
abiword.convertFile(srcFile, destFile, type, callback); abiword.convertFile(srcFile, destFile, type, callback);
}, },

View file

@ -152,6 +152,11 @@ exports.minify = true;
*/ */
exports.abiword = null; exports.abiword = null;
/**
* The path of the tidy executable
*/
exports.tidyHtml = null;
/** /**
* Should we support none natively supported file types on import? * Should we support none natively supported file types on import?
*/ */

View file

@ -0,0 +1,41 @@
/**
* Tidy up the HTML in a given file
*/
var log4js = require('log4js');
var settings = require('./Settings');
var spawn = require('child_process').spawn;
exports.tidy = function(srcFile, callback) {
var logger = log4js.getLogger('TidyHtml');
// Don't do anything if Tidy hasn't been enabled
if (!settings.tidyHtml) {
logger.debug('tidyHtml has not been configured yet, ignoring tidy request');
return callback(null);
}
var errMessage = '';
// Spawn a new tidy instance that cleans up the file inline
logger.debug('Tidying ' + srcFile);
var tidy = spawn(settings.tidyHtml, ['-modify', srcFile]);
// Keep track of any error messages
tidy.stderr.on('data', function (data) {
errMessage += data.toString();
});
// Wait until Tidy is done
tidy.on('close', function(code) {
// Tidy returns a 0 when no errors occur and a 1 exit code when
// the file could be tidied but a few warnings were generated
if (code === 0 || code === 1) {
logger.debug('Tidied ' + srcFile + ' successfully');
return callback(null);
} else {
logger.error('Failed to tidy ' + srcFile + '\n' + errMessage);
return callback('Tidy died with exit code ' + code);
}
});
};

View file

@ -0,0 +1,63 @@
var assert = require('assert')
fs = require('fs'),
path = require('path'),
TidyHtml = null,
Settings = null;
var npm = require("../../../../src/node_modules/npm/lib/npm.js");
describe('tidyHtml', function() {
before(function(done) {
npm.load({}, function(err) {
assert.ok(!err);
TidyHtml = require('../../../../src/node/utils/TidyHtml');
Settings = require('../../../../src/node/utils/Settings');
return done()
});
});
it('Tidies HTML', function(done) {
// If the user hasn't configured Tidy, we skip this tests as it's required for this test
if (!Settings.tidyHtml) {
this.skip();
}
// Try to tidy up a bad HTML file
var tmpDir = process.env.TEMP || "/tmp";
var tmpFile = path.join(tmpDir, 'tmp_' + (Math.floor(Math.random() * 1000000)) + '.html')
fs.writeFileSync(tmpFile, '<html><body><p>a paragraph</p><li>List without outer UL</li>trailing closing p</p></body></html>');
TidyHtml.tidy(tmpFile, function(err){
assert.ok(!err);
// Read the file again
var cleanedHtml = fs.readFileSync(tmpFile).toString();
var expectedHtml = [
'<title></title>',
'</head>',
'<body>',
'<p>a paragraph</p>',
'<ul>',
'<li>List without outer UL</li>',
'<li style="list-style: none">trailing closing p</li>',
'</ul>',
'</body>',
'</html>',
].join('\n');
assert.notStrictEqual(cleanedHtml.indexOf(expectedHtml), -1);
return done();
});
});
it('can deal with errors', function(done) {
// If the user hasn't configured Tidy, we skip this tests as it's required for this test
if (!Settings.tidyHtml) {
this.skip();
}
TidyHtml.tidy('/some/none/existing/file.html', function(err) {
assert.ok(err);
return done();
});
});
});