fixed bug in parseIni

pull/1297/head
Iván Eixarch 2012-12-19 18:52:32 +01:00 committed by Marcel Klehr
parent bc0d9c854b
commit 9d459687af
17 changed files with 32 additions and 20 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"nl":{"index.newPad":"Nieuw pad","index.createOpenPad":"Maak of open pad met de naam:","pad.toolbar.bold.title":"Vet (Ctrl-B)","pad.toolbar.italic.title":"Cursief (Ctrl-I)","pad.toolbar.underline.title":"Onderstrepen (Ctrl-U)","pad.toolbar.strikethrough.title":"Doorhalen","pad.toolbar.ol.title":"Geordende lijst","pad.toolbar.ul.title":"Ongeordende lijst","pad.toolbar.indent.title":"Inspringen","pad.toolbar.unindent.title":"Inspringing verkleinen","pad.toolbar.undo.title":"Ongedaan maken (Ctrl-Z)","pad.toolbar.redo.title":"Opnieuw uitvoeren (Ctrl-Y)","pad.toolbar.clearAuthorship.title":"Kleuren auteurs wissen","pad.toolbar.import_export.title":"Naar/van andere opmaak exporteren/importeren","pad.toolbar.timeslider.title":"Tijdlijn","pad.toolbar.savedRevision.title":"Opgeslagen versies","pad.toolbar.settings.title":"Instellingen","pad.toolbar.embed.title":"Pad insluiten","pad.toolbar.showusers.title":"Gebruikers van dit pad weergeven","pad.colorpicker.save":"Opslaan","pad.colorpicker.cancel":"Annuleren","pad.loading":"Bezig met laden…","pad.settings.padSettings":"Padinstellingen","pad.settings.myView":"Mijn overzicht","pad.settings.stickychat":"Chat altijd zichtbaar","pad.settings.colorcheck":"Kleuren auteurs","pad.settings.linenocheck":"Regelnummers","pad.settings.fontType":"Lettertype:","pad.settings.fontType.normal":"Normaal","pad.settings.fontType.monospaced":"Monospace","pad.settings.globalView":"Globaal overzicht","pad.settings.language":"Taal:","pad.importExport.import_export":"Importeren/exporteren","pad.importExport.import":"Upload een tekstbestand of document","pad.importExport.successful":"Afgerond","pad.importExport.export":"Huidige pad exporteren als","pad.importExport.exporthtml":"HTML","pad.importExport.exportplain":"Tekst zonder opmaak","pad.importExport.exportword":"Microsoft Word","pad.importExport.exportpdf":"PDF","pad.importExport.exportopen":"ODF (Open Document Format)","pad.importExport.exportdokuwiki":"DokuWiki","pad.importExport.abiword.innerHTML":"U kunt alleen importeren vanuit platte tekst of een HTML-opmaak. <a href","pad.modals.connected":"Verbonden.","pad.modals.reconnecting":"Opnieuw verbinding maken met uw pad...","pad.modals.forcereconnect":"Opnieuw verbinden","pad.modals.uderdup":"In een ander venster geopend","pad.modals.userdup.explanation":"Dit pad is meer dan één keer geopend in een browservenster op deze computer.","pad.modals.userdup.advice":"Maak opnieuw verbinding als u dit venster wilt gebruiken.","pad.modals.unauth":"Niet toegestaan","pad.modals.unauth.explanation":"Uw rechten zijn gewijzigd terwijl u de pagina aan het bekijken was. Probeer opnieuw te verbinden.","pad.modals.looping":"Verbinding verbroken.","pad.modals.looping.explanation":"Er is een probleem opgetreden tijdens de communicatie met de synchronisatieserver.","pad.modals.looping.cause":"Mogelijk gebruikt de server een niet compatibele firewall of proxy server.","pad.modals.initsocketfail":"Server is niet bereikbaar.","pad.modals.initsocketfail.explanation":"Het was niet mogelijk te verbinden met de synchronisatieserver.","pad.modals.initsocketfail.cause":"Mogelijk komt dit door uw browser of internetverbinding.","pad.modals.slowcommit":"Verbinding verbroken.","pad.modals.slowcommit.explanation":"De server reageert niet.","pad.modals.slowcommit.cause":"Dit komt mogelijk door netwerkproblemen.","pad.modals.deleted":"Verwijderd.","pad.modals.deleted.explanation":"Dit pad is verwijderd.","pad.modals.disconnected":"Uw verbinding is verbroken.","pad.modals.disconnected.explanation":"De verbinding met de server is verbroken","pad.modals.disconnected.cause":"De server is mogelijk niet beschikbaar. Stel alstublieft de beheerder op de hoogte.","pad.share":"Pad delen","pad.share.readonly":"Alleen-lezen","pad.share.link":"Verwijzing","pad.share.emebdcode":"URL insluiten","pad.chat":"Chatten","pad.chat.title":"Chat voor dit pad opnenen","timeslider.pageTitle":"Tijdlijn voor {{appTitle}}","timeslider.toolbar.returnbutton":"Terug naar pad","timeslider.toolbar.authors":"Auteurs:","timeslider.toolbar.authorsList":"Geen auteurs","timeslider.exportCurrent":"Huidige versie exporteren als:","timeslider.version":"Versie {{version}}","timeslider.saved":"Opgeslagen op {{day}} {{month}} {{year}}","timeslider.dateformat":"{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}","timeslider.month.january":"januari","timeslider.month.february":"februari","timeslider.month.march":"maart","timeslider.month.april":"april","timeslider.month.may":"mei","timeslider.month.june":"juni","timeslider.month.july":"juli","timeslider.month.august":"augustus","timeslider.month.september":"september","timeslider.month.october":"oktober","timeslider.month.november":"november","timeslider.month.december":"december"}}
{"nl":{"index.newPad":"Nieuw pad","index.createOpenPad":"Maak of open pad met de naam:","pad.toolbar.bold.title":"Vet (Ctrl-B)","pad.toolbar.italic.title":"Cursief (Ctrl-I)","pad.toolbar.underline.title":"Onderstrepen (Ctrl-U)","pad.toolbar.strikethrough.title":"Doorhalen","pad.toolbar.ol.title":"Geordende lijst","pad.toolbar.ul.title":"Ongeordende lijst","pad.toolbar.indent.title":"Inspringen","pad.toolbar.unindent.title":"Inspringing verkleinen","pad.toolbar.undo.title":"Ongedaan maken (Ctrl-Z)","pad.toolbar.redo.title":"Opnieuw uitvoeren (Ctrl-Y)","pad.toolbar.clearAuthorship.title":"Kleuren auteurs wissen","pad.toolbar.import_export.title":"Naar/van andere opmaak exporteren/importeren","pad.toolbar.timeslider.title":"Tijdlijn","pad.toolbar.savedRevision.title":"Opgeslagen versies","pad.toolbar.settings.title":"Instellingen","pad.toolbar.embed.title":"Pad insluiten","pad.toolbar.showusers.title":"Gebruikers van dit pad weergeven","pad.colorpicker.save":"Opslaan","pad.colorpicker.cancel":"Annuleren","pad.loading":"Bezig met laden…","pad.settings.padSettings":"Padinstellingen","pad.settings.myView":"Mijn overzicht","pad.settings.stickychat":"Chat altijd zichtbaar","pad.settings.colorcheck":"Kleuren auteurs","pad.settings.linenocheck":"Regelnummers","pad.settings.fontType":"Lettertype:","pad.settings.fontType.normal":"Normaal","pad.settings.fontType.monospaced":"Monospace","pad.settings.globalView":"Globaal overzicht","pad.settings.language":"Taal:","pad.importExport.import_export":"Importeren/exporteren","pad.importExport.import":"Upload een tekstbestand of document","pad.importExport.successful":"Afgerond","pad.importExport.export":"Huidige pad exporteren als","pad.importExport.exporthtml":"HTML","pad.importExport.exportplain":"Tekst zonder opmaak","pad.importExport.exportword":"Microsoft Word","pad.importExport.exportpdf":"PDF","pad.importExport.exportopen":"ODF (Open Document Format)","pad.importExport.exportdokuwiki":"DokuWiki","pad.importExport.abiword.innerHTML":"U kunt alleen importeren vanuit platte tekst of een HTML-opmaak. <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>Installeer abiword</a> om meer geavanceerde importmogelijkheden te krijgen.","pad.modals.connected":"Verbonden.","pad.modals.reconnecting":"Opnieuw verbinding maken met uw pad...","pad.modals.forcereconnect":"Opnieuw verbinden","pad.modals.uderdup":"In een ander venster geopend","pad.modals.userdup.explanation":"Dit pad is meer dan één keer geopend in een browservenster op deze computer.","pad.modals.userdup.advice":"Maak opnieuw verbinding als u dit venster wilt gebruiken.","pad.modals.unauth":"Niet toegestaan","pad.modals.unauth.explanation":"Uw rechten zijn gewijzigd terwijl u de pagina aan het bekijken was. Probeer opnieuw te verbinden.","pad.modals.looping":"Verbinding verbroken.","pad.modals.looping.explanation":"Er is een probleem opgetreden tijdens de communicatie met de synchronisatieserver.","pad.modals.looping.cause":"Mogelijk gebruikt de server een niet compatibele firewall of proxy server.","pad.modals.initsocketfail":"Server is niet bereikbaar.","pad.modals.initsocketfail.explanation":"Het was niet mogelijk te verbinden met de synchronisatieserver.","pad.modals.initsocketfail.cause":"Mogelijk komt dit door uw browser of internetverbinding.","pad.modals.slowcommit":"Verbinding verbroken.","pad.modals.slowcommit.explanation":"De server reageert niet.","pad.modals.slowcommit.cause":"Dit komt mogelijk door netwerkproblemen.","pad.modals.deleted":"Verwijderd.","pad.modals.deleted.explanation":"Dit pad is verwijderd.","pad.modals.disconnected":"Uw verbinding is verbroken.","pad.modals.disconnected.explanation":"De verbinding met de server is verbroken","pad.modals.disconnected.cause":"De server is mogelijk niet beschikbaar. Stel alstublieft de beheerder op de hoogte.","pad.share":"Pad delen","pad.share.readonly":"Alleen-lezen","pad.share.link":"Verwijzing","pad.share.emebdcode":"URL insluiten","pad.chat":"Chatten","pad.chat.title":"Chat voor dit pad opnenen","timeslider.pageTitle":"Tijdlijn voor {{appTitle}}","timeslider.toolbar.returnbutton":"Terug naar pad","timeslider.toolbar.authors":"Auteurs:","timeslider.toolbar.authorsList":"Geen auteurs","timeslider.exportCurrent":"Huidige versie exporteren als:","timeslider.version":"Versie {{version}}","timeslider.saved":"Opgeslagen op {{day}} {{month}} {{year}}","timeslider.dateformat":"{{year}}-{{month}}-{{day}} {{hours}}:{{minutes}}:{{seconds}}","timeslider.month.january":"januari","timeslider.month.february":"februari","timeslider.month.march":"maart","timeslider.month.april":"april","timeslider.month.may":"mei","timeslider.month.june":"juni","timeslider.month.july":"juli","timeslider.month.august":"augustus","timeslider.month.september":"september","timeslider.month.october":"oktober","timeslider.month.november":"november","timeslider.month.december":"december"}}

View File

@ -1 +1 @@
{"sv":{"index.newPad":"Nytt block","index.createOpenPad":"eller skapa/öppna ett block med namnet:","pad.toolbar.bold.title":"Fet (Ctrl-B)","pad.toolbar.italic.title":"Kursiv (Ctrl-I)","pad.toolbar.underline.title":"Understruken (Ctrl-U)","pad.toolbar.strikethrough.title":"Genomstruken","pad.toolbar.ol.title":"Numrerad lista","pad.toolbar.ul.title":"Ta bort numrerad lista","pad.toolbar.indent.title":"Öka indrag","pad.toolbar.unindent.title":"Minska indrag","pad.toolbar.undo.title":"Ångra (Ctrl-Z)","pad.toolbar.redo.title":"Gör om (Ctrl-Y)","pad.toolbar.clearAuthorship.title":"Rensa färger för författarskap","pad.toolbar.import_export.title":"Importera/exportera från/till olika filformat","pad.toolbar.timeslider.title":"Tidsreglage","pad.toolbar.savedRevision.title":"Sparade revisioner","pad.toolbar.settings.title":"Inställningar","pad.toolbar.embed.title":"Bädda in detta block","pad.toolbar.showusers.title":"Visa användarna på detta block","pad.colorpicker.save":"Spara","pad.colorpicker.cancel":"Avbryt","pad.loading":"Läser in...","pad.settings.padSettings":"Blockinställningar","pad.settings.myView":"Min vy","pad.settings.stickychat":"Chatten alltid på skärmen","pad.settings.colorcheck":"Författarskapsfärger","pad.settings.linenocheck":"Radnummer","pad.settings.fontType":"Typsnitt:","pad.settings.fontType.normal":"Normal","pad.settings.fontType.monospaced":"Fast breddsteg","pad.settings.globalView":"Global vy","pad.settings.language":"Språk:","pad.importExport.import_export":"Importera/exportera","pad.importExport.import":"Ladda upp en textfil eller dokument","pad.importExport.successful":"Åtgärden slutfördes!","pad.importExport.export":"Export aktuellt block som:","pad.importExport.exporthtml":"HTML","pad.importExport.exportplain":"Oformaterad text","pad.importExport.exportword":"Microsoft Word","pad.importExport.exportpdf":"PDF","pad.importExport.exportopen":"ODF (Open Document Format)","pad.importExport.exportdokuwiki":"DokuWiki","pad.importExport.abiword.innerHTML":"Du kan endast importera från oformaterad text eller html-format. För mer avancerade importeringsfunktioner, var god <a href","pad.modals.connected":"Ansluten.","pad.modals.reconnecting":"Återansluter till ditt block...","pad.modals.forcereconnect":"Tvinga återanslutning","pad.modals.uderdup":"Öppnas i ett nytt fönster","pad.modals.userdup.explanation":"Detta block verkar vara öppet i mer än ett fönster på denna dator.","pad.modals.userdup.advice":"Återanslut för att använda detta fönster istället.","pad.modals.unauth":"Inte godkänd","pad.modals.unauth.explanation":"Din behörighet ändrades medan du visar denna sida. Försök att återansluta.","pad.modals.looping":"Frånkopplad.","pad.modals.looping.explanation":"Kommunikationsproblem med synkroniseringsservern har uppstått.","pad.modals.looping.cause":"Kanske du är ansluten via en inkompatibel brandvägg eller proxy.","pad.modals.initsocketfail":"Servern inte kan nås.","pad.modals.initsocketfail.explanation":"Det gick inte att ansluta till synkroniseringsservern.","pad.modals.initsocketfail.cause":"Detta är beror troligen på ett problem med din webbläsare eller din internetanslutning.","pad.modals.slowcommit":"Frånkopplad.","pad.modals.slowcommit.explanation":"Servern svarar inte.","pad.modals.slowcommit.cause":"Detta kan bero på problem med nätverksanslutningen.","pad.modals.deleted":"Raderad.","pad.modals.deleted.explanation":"Detta block har tagits bort.","pad.modals.disconnected":"Du har kopplats från.","pad.modals.disconnected.explanation":"Anslutningen till servern avbröts","pad.modals.disconnected.cause":"Servern kanske inte är tillgänglig. Var god meddela oss om detta fortsätter att hända.","pad.share":"Dela detta block","pad.share.readonly":"Skrivskyddad","pad.share.link":"Länk","pad.share.emebdcode":"Bädda in URL","pad.chat":"Chatt","pad.chat.title":"Öppna chatten för detta block.","timeslider.pageTitle":"Tidsreglage för {{appTitle}}","timeslider.toolbar.returnbutton":"Återvänd till blocket","timeslider.toolbar.authors":"Författare:","timeslider.toolbar.authorsList":"Ingen författare","timeslider.exportCurrent":"Exportera aktuell version som:","timeslider.version":"Version {{version}}","timeslider.saved":"Sparades den {{day}} {{month}} {{year}}","timeslider.dateformat":"{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}","timeslider.month.january":"januari","timeslider.month.february":"februari","timeslider.month.march":"mars","timeslider.month.april":"april","timeslider.month.may":"maj","timeslider.month.june":"juni","timeslider.month.july":"juli","timeslider.month.august":"augusti","timeslider.month.september":"september","timeslider.month.october":"oktober","timeslider.month.november":"november","timeslider.month.december":"december"}}
{"sv":{"index.newPad":"Nytt block","index.createOpenPad":"eller skapa/öppna ett block med namnet:","pad.toolbar.bold.title":"Fet (Ctrl-B)","pad.toolbar.italic.title":"Kursiv (Ctrl-I)","pad.toolbar.underline.title":"Understruken (Ctrl-U)","pad.toolbar.strikethrough.title":"Genomstruken","pad.toolbar.ol.title":"Numrerad lista","pad.toolbar.ul.title":"Ta bort numrerad lista","pad.toolbar.indent.title":"Öka indrag","pad.toolbar.unindent.title":"Minska indrag","pad.toolbar.undo.title":"Ångra (Ctrl-Z)","pad.toolbar.redo.title":"Gör om (Ctrl-Y)","pad.toolbar.clearAuthorship.title":"Rensa färger för författarskap","pad.toolbar.import_export.title":"Importera/exportera från/till olika filformat","pad.toolbar.timeslider.title":"Tidsreglage","pad.toolbar.savedRevision.title":"Sparade revisioner","pad.toolbar.settings.title":"Inställningar","pad.toolbar.embed.title":"Bädda in detta block","pad.toolbar.showusers.title":"Visa användarna på detta block","pad.colorpicker.save":"Spara","pad.colorpicker.cancel":"Avbryt","pad.loading":"Läser in...","pad.settings.padSettings":"Blockinställningar","pad.settings.myView":"Min vy","pad.settings.stickychat":"Chatten alltid på skärmen","pad.settings.colorcheck":"Författarskapsfärger","pad.settings.linenocheck":"Radnummer","pad.settings.fontType":"Typsnitt:","pad.settings.fontType.normal":"Normal","pad.settings.fontType.monospaced":"Fast breddsteg","pad.settings.globalView":"Global vy","pad.settings.language":"Språk:","pad.importExport.import_export":"Importera/exportera","pad.importExport.import":"Ladda upp en textfil eller dokument","pad.importExport.successful":"Åtgärden slutfördes!","pad.importExport.export":"Export aktuellt block som:","pad.importExport.exporthtml":"HTML","pad.importExport.exportplain":"Oformaterad text","pad.importExport.exportword":"Microsoft Word","pad.importExport.exportpdf":"PDF","pad.importExport.exportopen":"ODF (Open Document Format)","pad.importExport.exportdokuwiki":"DokuWiki","pad.importExport.abiword.innerHTML":"Du kan endast importera från oformaterad text eller html-format. För mer avancerade importeringsfunktioner, var god <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>installera abiword</a>.","pad.modals.connected":"Ansluten.","pad.modals.reconnecting":"Återansluter till ditt block...","pad.modals.forcereconnect":"Tvinga återanslutning","pad.modals.uderdup":"Öppnas i ett nytt fönster","pad.modals.userdup.explanation":"Detta block verkar vara öppet i mer än ett fönster på denna dator.","pad.modals.userdup.advice":"Återanslut för att använda detta fönster istället.","pad.modals.unauth":"Inte godkänd","pad.modals.unauth.explanation":"Din behörighet ändrades medan du visar denna sida. Försök att återansluta.","pad.modals.looping":"Frånkopplad.","pad.modals.looping.explanation":"Kommunikationsproblem med synkroniseringsservern har uppstått.","pad.modals.looping.cause":"Kanske du är ansluten via en inkompatibel brandvägg eller proxy.","pad.modals.initsocketfail":"Servern inte kan nås.","pad.modals.initsocketfail.explanation":"Det gick inte att ansluta till synkroniseringsservern.","pad.modals.initsocketfail.cause":"Detta är beror troligen på ett problem med din webbläsare eller din internetanslutning.","pad.modals.slowcommit":"Frånkopplad.","pad.modals.slowcommit.explanation":"Servern svarar inte.","pad.modals.slowcommit.cause":"Detta kan bero på problem med nätverksanslutningen.","pad.modals.deleted":"Raderad.","pad.modals.deleted.explanation":"Detta block har tagits bort.","pad.modals.disconnected":"Du har kopplats från.","pad.modals.disconnected.explanation":"Anslutningen till servern avbröts","pad.modals.disconnected.cause":"Servern kanske inte är tillgänglig. Var god meddela oss om detta fortsätter att hända.","pad.share":"Dela detta block","pad.share.readonly":"Skrivskyddad","pad.share.link":"Länk","pad.share.emebdcode":"Bädda in URL","pad.chat":"Chatt","pad.chat.title":"Öppna chatten för detta block.","timeslider.pageTitle":"Tidsreglage för {{appTitle}}","timeslider.toolbar.returnbutton":"Återvänd till blocket","timeslider.toolbar.authors":"Författare:","timeslider.toolbar.authorsList":"Ingen författare","timeslider.exportCurrent":"Exportera aktuell version som:","timeslider.version":"Version {{version}}","timeslider.saved":"Sparades den {{day}} {{month}} {{year}}","timeslider.dateformat":"{{day}}/{{month}}/{{year}} {{hours}}:{{minutes}}:{{seconds}}","timeslider.month.january":"januari","timeslider.month.february":"februari","timeslider.month.march":"mars","timeslider.month.april":"april","timeslider.month.may":"maj","timeslider.month.june":"juni","timeslider.month.july":"juli","timeslider.month.august":"augusti","timeslider.month.september":"september","timeslider.month.october":"oktober","timeslider.month.november":"november","timeslider.month.december":"december"}}

File diff suppressed because one or more lines are too long

View File

@ -24,8 +24,14 @@ var parseIni = function (input) {
_.each (lines, function(line) {
line = line.trim();
if ((line.length > 0) && (line[0] != ';') && (line[0] != '[')) {
line = line.split('=', 2);
if (line.length == 2) result[line[0].trim()]=line[1].trim();
var equalpos = line.indexOf('=');
if (equalpos > -1) {
var key = line.substring(0,equalpos).trim()
, value = line.substring(equalpos+1).trim();
result[key]=value;
}
//line = line.split('=', 2);
//if (line.length == 2) result[line[0].trim()]=line[1].trim();
}
});
return result;
@ -126,6 +132,7 @@ var generateLocaleIndex = function () {
return result;
}
/* in i18n
var generateLocaleIndexJSON = function () {
if (_.isEmpty(locales)) getAllLocales();
var result = locales;
@ -135,6 +142,7 @@ var generateLocaleIndexJSON = function () {
});
return JSON.stringify(result);
}
*/
var root = path.resolve(__dirname+"/../locales");
@ -146,6 +154,10 @@ _.each(locales, function(translation, langcode) {
fs.writeFileSync(root+"/"+langcode+".json", translation, 'utf8');
});
console.log('escribiendo localeIndex.json');
fs.writeFileSync(root+"/localesIndex.json", generateLocaleIndexJSON(), 'utf8');
//console.log('escribiendo localeIndex.json');
//fs.writeFileSync(root+"/localesIndex.json", generateLocaleIndexJSON(), 'utf8');
//test new parseIni
//var root = path.resolve(__dirname+"/../locales/es.ini");
//console.log(parseIni(fs.readFileSync(root,'utf8')));