From 4ccf51b3d35fa41be16fbc39d327efae0d6025f2 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Fri, 14 Jan 2011 13:29:55 -0600 Subject: [PATCH 01/10] fix real time aspect name changing --- public/javascripts/aspect-edit.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index cdd390979..7ffa6ad64 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -113,9 +113,10 @@ var AspectEdit = { }, changeName: function() { - var $this = $(this); - var id = $this.closest(".aspect").attr("data-guid"); - var link = "/aspects/" + id; + var $this = $(this), + id = $this.closest(".aspect").attr("data-guid"), + link = "/aspects/" + id; + $this.keypress(function(e) { if (e.which == 13) { @@ -133,9 +134,11 @@ var AspectEdit = { } }); } + + //update all other aspect links $this.keyup(function(e) { - $("#aspect_nav a[href='" + link + "']").text($this.text()); + $("#aspect_nav li[data-guid='" + id + "'] a").text($this.text()); }); }); }, From aba03ed5b0801ca38cdaccc9046f4c6436d1d75b Mon Sep 17 00:00:00 2001 From: zhitomirskiyi Date: Fri, 14 Jan 2011 11:46:38 -0800 Subject: [PATCH 02/10] added the locales for timeago --- app/views/layouts/application.html.haml | 2 ++ .../timeago_locale/jquery.timeago.cz.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.da.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.de.js | 19 +++++++++++ .../timeago_locale/jquery.timeago.el.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.es.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.fr.js | 17 ++++++++++ .../timeago_locale/jquery.timeago.he.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.hu.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.id.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.it.js | 16 +++++++++ .../timeago_locale/jquery.timeago.ja.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.ko.js | 16 +++++++++ .../timeago_locale/jquery.timeago.nl.js | 16 +++++++++ .../timeago_locale/jquery.timeago.pl.js | 31 +++++++++++++++++ .../timeago_locale/jquery.timeago.pt-PT.js | 16 +++++++++ .../timeago_locale/jquery.timeago.ro.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.ru.js | 34 +++++++++++++++++++ .../timeago_locale/jquery.timeago.sv.js | 18 ++++++++++ .../timeago_locale/jquery.timeago.zh-CN.js | 19 +++++++++++ 20 files changed, 366 insertions(+) create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.cz.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.da.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.de.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.el.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.es.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.fr.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.he.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.hu.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.id.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.it.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.ja.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.ko.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.nl.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.pl.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.pt-PT.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.ro.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.ru.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.sv.js create mode 100644 public/javascripts/vendor/timeago_locale/jquery.timeago.zh-CN.js diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index ee7628b76..11e12af88 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -33,6 +33,8 @@ - unless @landing_page = include_javascripts :main + - if ["cz", "da", "de", "el", "es", "fr", "he", "hu", "id", "it", "ja", "ko", "nl", "pl", "pt", "ro", "ru", "sv", "zh-CN"].include?(I18n.locale.to_s) + = javascript_include_tag "vendor/timeago_locale/jquery.timeago.#{I18n.locale.to_s}.js" - if current_user = include_javascripts :flash_socket #unless modern_browser? diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.cz.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.cz.js new file mode 100644 index 000000000..0ed965013 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.cz.js @@ -0,0 +1,18 @@ +// Czech +jQuery.timeago.settings.strings = { + prefixAgo: "před", + prefixFromNow: null, + suffixAgo: null, + suffixFromNow: null, + seconds: "méně než minutou", + minute: "minutou", + minutes: "%d minutami", + hour: "hodinou", + hours: "%d hodinami", + day: "1 dnem", + days: "%d dny", + month: "1 měsícem", + months: "%d měsíci", + year: "1 rokem", + years: "%d roky" +}; diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.da.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.da.js new file mode 100644 index 000000000..ff50e873f --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.da.js @@ -0,0 +1,18 @@ +// Danish +jQuery.timeago.settings.strings = { + prefixAgo: "for", + prefixFromNow: "om", + suffixAgo: "siden", + suffixFromNow: "", + seconds: "mindre end et minut", + minute: "ca. et minut", + minutes: "%d minutter", + hour: "ca. en time", + hours: "ca. %d timer", + day: "en dag", + days: "%d dage", + month: "ca. en måned", + months: "%d måneder", + year: "ca. et år", + years: "%d år" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.de.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.de.js new file mode 100644 index 000000000..b4573e826 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.de.js @@ -0,0 +1,19 @@ +// German +jQuery.timeago.settings.strings = { + prefixAgo: "vor", + prefixFromNow: "in", + suffixAgo: "", + suffixFromNow: "", + seconds: "wenigen Sekunden", + minute: "etwa einer Minute", + minutes: "%d Minuten", + hour: "etwa einer Stunde", + hours: "%d Stunden", + day: "etwa einem Tag", + days: "%d Tagen", + month: "etwa einem Monat", + months: "%d Monaten", + year: "etwa einem Jahr", + years: "%d Jahren" +}; + diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.el.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.el.js new file mode 100644 index 000000000..61aaafe49 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.el.js @@ -0,0 +1,18 @@ +// Greek +jQuery.timeago.settings.strings = { + prefixAgo: "πριν", + prefixFromNow: "σε", + suffixAgo: "", + suffixFromNow: "", + seconds: "λιγότερο από ένα λεπτό", + minute: "περίπου ένα λεπτό", + minutes: "%d λεπτά", + hour: "περίπου μία ώρα", + hours: "περίπου %d ώρες", + day: "μία μέρα", + days: "%d μέρες", + month: "περίπου ένα μήνα", + months: "%d μήνες", + year: "περίπου ένα χρόνο", + years: "%d χρόνια" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.es.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.es.js new file mode 100644 index 000000000..00c6d0a6c --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.es.js @@ -0,0 +1,18 @@ +// Spanish +jQuery.timeago.settings.strings = { + prefixAgo: "hace", + prefixFromNow: "dentro de", + suffixAgo: "", + suffixFromNow: "", + seconds: "menos de un minuto", + minute: "un minuto", + minutes: "unos %d minutos", + hour: "una hora", + hours: "%d horas", + day: "un día", + days: "%d días", + month: "un mes", + months: "%d meses", + year: "un año", + years: "%d años" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.fr.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.fr.js new file mode 100644 index 000000000..502834230 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.fr.js @@ -0,0 +1,17 @@ +// French +jQuery.timeago.settings.strings = { + // environ ~= about, it's optional + prefixAgo: "il y a", + prefixFromNow: "d'ici", + seconds: "moins d'une minute", + minute: "environ une minute", + minutes: "environ %d minutes", + hour: "environ une heure", + hours: "environ %d heures", + day: "environ un jour", + days: "environ %d jours", + month: "environ un mois", + months: "environ %d mois", + year: "un an", + years: "%d ans" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.he.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.he.js new file mode 100644 index 000000000..9d5b6c6b0 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.he.js @@ -0,0 +1,18 @@ +// Hebrew +jQuery.timeago.settings.strings = { + prefixAgo: "לפני", + prefixFromNow: "מעכשיו", + suffixAgo: "", + suffixFromNow: "", + seconds: "פחות מדקה", + minute: "דקה", + minutes: "%d דקות", + hour: "שעה", + hours: "%d שעות", + day: "יום", + days: "%d ימים", + month: "חודש", + months: "%d חודשים", + year: "שנה", + years: "%d שנים" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.hu.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.hu.js new file mode 100644 index 000000000..3079c22b7 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.hu.js @@ -0,0 +1,18 @@ +// Hungarian +jQuery.timeago.settings.strings = { + prefixAgo: null, + prefixFromNow: null, + suffixAgo: null, + suffixFromNow: null, + seconds: "kevesebb mint egy perce", + minute: "körülbelül egy perce", + minutes: "%d perce", + hour: "körülbelül egy órája", + hours: "körülbelül %d órája", + day: "körülbelül egy napja", + days: "%d napja", + month: "körülbelül egy hónapja", + months: "%d hónapja", + year: "körülbelül egy éve", + years: "%d éve" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.id.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.id.js new file mode 100644 index 000000000..72c390971 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.id.js @@ -0,0 +1,18 @@ +// Indonesian +jQuery.timeago.settings.strings = { + prefixAgo: null, + prefixFromNow: null, + suffixAgo: "yang lalu", + suffixFromNow: "dari sekarang", + seconds: "kurang dari semenit", + minute: "sekitar satu menit", + minutes: "%d menit", + hour: "sekitar sejam", + hours: "sekitar %d jam", + day: "sehari", + days: "%d hari", + month: "sekitar sebulan", + months: "%d tahun", + year: "sekitar setahun", + years: "%d tahun" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.it.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.it.js new file mode 100644 index 000000000..6308dd30c --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.it.js @@ -0,0 +1,16 @@ +// Italian +jQuery.timeago.settings.strings = { + suffixAgo: "fa", + suffixFromNow: "da ora", + seconds: "meno di un minuto", + minute: "circa un minuto", + minutes: "%d minuti", + hour: "circa un'ora", + hours: "circa %d ore", + day: "un giorno", + days: "%d giorni", + month: "circa un mese", + months: "%d mesi", + year: "circa un anno", + years: "%d anni" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.ja.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.ja.js new file mode 100644 index 000000000..cf7fd19fc --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.ja.js @@ -0,0 +1,18 @@ +// Japanese +jQuery.timeago.settings.strings = { + prefixAgo: "", + prefixFromNow: "今から", + suffixAgo: "前", + suffixFromNow: "後", + seconds: "ほんの数秒", + minute: "約一分", + minutes: "%d 分", + hour: "大体一時間", + hours: "大体 %d 時間位", + day: "一日", + days: "%d 日ほど", + month: "大体一ヶ月", + months: "%d ヶ月ほど", + year: "丁度一年(虎舞流w)", + years: "%d 年" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.ko.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.ko.js new file mode 100644 index 000000000..5c50ba7d5 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.ko.js @@ -0,0 +1,16 @@ +// Korean +jQuery.timeago.settings.strings = { + suffixAgo: "전", + suffixFromNow: "후", + seconds: "1분 이내", + minute: "1분", + minutes: "%d분", + hour: "1시간", + hours: "%d시간", + day: "하루", + days: "%d일", + month: "한달", + months: "%d달", + year: "1년", + years: "%d년" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.nl.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.nl.js new file mode 100644 index 000000000..ca41bc5b7 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.nl.js @@ -0,0 +1,16 @@ +// Dutch +jQuery.timeago.settings.strings = { + suffixAgo: "geleden", + suffixFromNow: "vanaf nu", + seconds: "iets minder dan een minute", + minute: "ongeveer een minuut", + minutes: "%d minuten", + hour: "ongeveer een uur", + hours: "ongeveer %d uren", + day: "een dag", + days: "%d dagen", + month: "ongeveer een maand", + months: "%d maanden", + year: "ongeveer een jaar", + years: "%d jaar" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.pl.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.pl.js new file mode 100644 index 000000000..21d26fc1c --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.pl.js @@ -0,0 +1,31 @@ +// Polish +(function() { + function numpf(n, s, t) { + // s - 2-4, 22-24, 32-34 ... + // t - 5-21, 25-31, ... + var n10 = n % 10; + if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) { + return s; + } else { + return t; + } + } + + jQuery.timeago.settings.strings = { + prefixAgo: null, + prefixFromNow: "za", + suffixAgo: "temu", + suffixFromNow: null, + seconds: "mniej niż minutę", + minute: "minutę", + minutes: function(value) { return numpf(value, "%d minuty", "%d minut"); }, + hour: "godzinę", + hours: function(value) { return numpf(value, "%d godziny", "%d godzin"); }, + day: "dzień", + days: "%d dni", + month: "miesiąc", + months: function(value) { return numpf(value, "%d miesiące", "%d miesięcy"); }, + year: "rok", + years: function(value) { return numpf(value, "%d lata", "%d lat"); } + }; +})(); \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.pt-PT.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.pt-PT.js new file mode 100644 index 000000000..416333c65 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.pt-PT.js @@ -0,0 +1,16 @@ +// Portuguese +jQuery.timeago.settings.strings = { + suffixAgo: "atrás", + suffixFromNow: "a partir de agora", + seconds: "menos de um minuto", + minute: "cerca de um minuto", + minutes: "%d minutos", + hour: "cerca de uma hora", + hours: "cerca de %d horas", + day: "um dia", + days: "%d dias", + month: "cerca de um mês", + months: "%d meses", + year: "cerca de um ano", + years: "%d anos" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.ro.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.ro.js new file mode 100644 index 000000000..7d3773907 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.ro.js @@ -0,0 +1,18 @@ +// Romanian +$.timeago.settings.strings = { + prefixAgo: "acum", + prefixFromNow: "in timp de", + suffixAgo: "", + suffixFromNow: "", + seconds: "mai putin de un minut", + minute: "un minut", + minutes: "%d minute", + hour: "o ora", + hours: "%d ore", + day: "o zi", + days: "%d zile", + month: "o luna", + months: "%d luni", + year: "un an", + years: "%d ani" +}; diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.ru.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.ru.js new file mode 100644 index 000000000..a8177dd33 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.ru.js @@ -0,0 +1,34 @@ +// Russian +(function() { + function numpf(n, f, s, t) { + // f - 1, 21, 31, ... + // s - 2-4, 22-24, 32-34 ... + // t - 5-20, 25-30, ... + var n10 = n % 10; + if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) { + return f; + } else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) { + return s; + } else { + return t; + } + } + + jQuery.timeago.settings.strings = { + prefixAgo: null, + prefixFromNow: "через", + suffixAgo: "назад", + suffixFromNow: null, + seconds: "меньше минуты", + minute: "минуту", + minutes: function(value) { return numpf(value, "%d минута", "%d минуты", "%d минут"); }, + hour: "час", + hours: function(value) { return numpf(value, "%d час", "%d часа", "%d часов"); }, + day: "день", + days: function(value) { return numpf(value, "%d день", "%d дня", "%d дней"); }, + month: "месяц", + months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); }, + year: "год", + years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); } + }; +})(); \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.sv.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.sv.js new file mode 100644 index 000000000..b5c394717 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.sv.js @@ -0,0 +1,18 @@ +// Swedish +jQuery.timeago.settings.strings = { + prefixAgo: "för", + prefixFromNow: "om", + suffixAgo: "sedan", + suffixFromNow: "", + seconds: "mindre än en minut", + minute: "ungefär en minut", + minutes: "%d minuter", + hour: "ungefär en timme", + hours: "ungefär %d timmar", + day: "en dag", + days: "%d dagar", + month: "ungefär en månad", + months: "%d månader", + year: "ungefär ett år", + years: "%d år" +}; \ No newline at end of file diff --git a/public/javascripts/vendor/timeago_locale/jquery.timeago.zh-CN.js b/public/javascripts/vendor/timeago_locale/jquery.timeago.zh-CN.js new file mode 100644 index 000000000..5487d95b2 --- /dev/null +++ b/public/javascripts/vendor/timeago_locale/jquery.timeago.zh-CN.js @@ -0,0 +1,19 @@ +// Simplified Chinese +jQuery.timeago.settings.strings = { + prefixAgo: null, + prefixFromNow: "从现在开始", + suffixAgo: "之前", + suffixFromNow: null, + seconds: "不到 1 分钟", + minute: "大约 1 分钟", + minutes: "%d 分钟", + hour: "大约 1 小时", + hours: "大约 %d 小时", + day: "1 天", + days: "%d 天", + month: "大约 1 个月", + months: "%d 月", + year: "大约 1 年", + years: "%d 年", + numbers: [] +} \ No newline at end of file From d4f30ded1bf182077953fe2cd5c313f09ce723a4 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Fri, 14 Jan 2011 14:54:44 -0600 Subject: [PATCH 03/10] Diaspora.js 2.0, added an official widget, don't use native alerts anymore --- config/assets.yml | 3 + public/javascripts/aspect-edit.js | 44 ++-- public/javascripts/contact-list.js | 2 +- public/javascripts/diaspora.js | 36 ++- public/javascripts/photo-show.js | 4 +- public/javascripts/stream.js | 4 +- public/javascripts/vendor/Mustache.js | 332 ++++++++++++++++++++++++++ public/javascripts/widgets/alert.js | 34 +++ spec/javascripts/aspect-edit-spec.js | 4 +- spec/javascripts/diaspora-spec.js | 65 +++-- spec/javascripts/support/jasmine.yml | 1 + 11 files changed, 463 insertions(+), 66 deletions(-) create mode 100644 public/javascripts/vendor/Mustache.js create mode 100644 public/javascripts/widgets/alert.js diff --git a/config/assets.yml b/config/assets.yml index 1442e4c54..86ea18512 100644 --- a/config/assets.yml +++ b/config/assets.yml @@ -14,9 +14,12 @@ javascripts: - public/javascripts/vendor/jquery.infinitescroll.min.js - public/javascripts/vendor/timeago.js - public/javascripts/vendor/fileuploader.js + - public/javascripts/vendor/Mustache.js - public/javascripts/view.js - public/javascripts/stream.js - public/javascripts/application.js + - public/javascripts/diaspora.js + - public/javascripts/widgets/alert.js mobile: - public/javascripts/vendor/jquery144.min.js diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 7ffa6ad64..5a57c0334 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -93,7 +93,7 @@ var AspectEdit = { var person_id = person.attr('data-guid'); if( $(".person[data-guid='"+ person_id +"']").length == 1) { - AspectEdit.alertUser("You cannot remove the person from the last aspect"); + Diaspora.widgets.alert.alert("Error removing aspect", "You cannot remove the person from the last aspect"); } else { if (!person.hasClass('request')) { @@ -118,27 +118,27 @@ var AspectEdit = { link = "/aspects/" + id; - $this.keypress(function(e) { - if (e.which == 13) { - e.preventDefault(); - $this.blur(); - - //save changes - $.ajax({ - type: "PUT", - url: link, - data: { - "aspect": { - "name" : $this.text() - } - } - }); - } - + $this.keyup(function(e) { + e.preventDefault(); //update all other aspect links - $this.keyup(function(e) { - $("#aspect_nav li[data-guid='" + id + "'] a").text($this.text()); + $("#aspect_nav li[data-guid='" + id + "'] a").text($this.text()); + + if(e.keyCode === 13) { + $this.trigger("blur"); + } + }); + + $this.blur(function() { + //save changes + $.ajax({ + type: "PUT", + url: link, + data: { + "aspect": { + "name" : $this.text() + } + } }); }); }, @@ -165,10 +165,6 @@ var AspectEdit = { AspectEdit.deletePersonFromAspect(person); } } - }, - - alertUser: function(message) { - alert(message); } }; diff --git a/public/javascripts/contact-list.js b/public/javascripts/contact-list.js index c8a7e20fd..315c4cd31 100644 --- a/public/javascripts/contact-list.js +++ b/public/javascripts/contact-list.js @@ -46,7 +46,7 @@ $(document).ready(function() { }); $('.added').live('ajax:failure', function(data, html, xhr) { - alert("#{t('.cannot_remove')}"); + Diaspora.widgets.alert.alert("#{t('.cannot_remove')}"); $(this).fadeTo(200,1); }); diff --git a/public/javascripts/diaspora.js b/public/javascripts/diaspora.js index dc454466f..698791b40 100644 --- a/public/javascripts/diaspora.js +++ b/public/javascripts/diaspora.js @@ -4,20 +4,30 @@ */ var Diaspora = Diaspora || {}; -Diaspora.widgets = Diaspora.widgets || { - pageWidgets: {}, - - add: function(widgetId, widget) { - this.pageWidgets[widgetId] = widget; - }, - remove: function(widgetId) { - delete this.pageWidgets[widgetId]; - }, +Diaspora.widgetCollection = function() { + this.ready = false; + this.collection = {}; +}; - init: function() { - for (var widgetId in this.pageWidgets) { - this.pageWidgets[widgetId].start(); +Diaspora.widgetCollection.prototype.add = function(widgetId, widget) { + this[widgetId] = this.collection[widgetId] = new widget(); + if(this.ready) { + this.collection[widgetId].start(); + } + }; + +Diaspora.widgetCollection.prototype.remove = function(widgetId) { + delete this.collection[widgetId]; +}; + +Diaspora.widgetCollection.prototype.init = function() { + this.ready = true; + for(var widgetId in this.collection) { + this.collection[widgetId].start(); } } -}; \ No newline at end of file + +Diaspora.widgets = Diaspora.widgets || new Diaspora.widgetCollection(); + +$(Diaspora.widgets.init); \ No newline at end of file diff --git a/public/javascripts/photo-show.js b/public/javascripts/photo-show.js index 1c2541278..765598f03 100644 --- a/public/javascripts/photo-show.js +++ b/public/javascripts/photo-show.js @@ -19,7 +19,7 @@ $(document).ready(function() { }); $('.edit_photo').bind('ajax:failure', function(data, json, xhr) { - alert('Failed to delete photo. Are you sure you own this?'); + Diaspora.widgets.alert.alert("Failed to delete photo.", "Are you sure you own this?"); $("#show_photo").find("img").fadeTo(200,1); $("#photo_spinner").hide(); }); @@ -47,7 +47,7 @@ $(document).ready(function() { $('.make_profile_photo').bind('ajax:failure', function(data, json, xhr) { var person_id = $(this).closest(".photo_options").attr('data-actor_person'); - alert("Failed to update profile photo!"); + Diaspora.widgets.alert.alert("Failed to update profile photo!"); $("img[data-person_id='" + person_id + "']").fadeTo(200, 1); }); diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index 53499d2cc..ea9a754ed 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -142,7 +142,7 @@ var Stream = { }); $(".new_status_message").bind('ajax:failure', function(data, html, xhr) { - alert('failed to post message!'); + Diaspora.widgets.alert.alert('Failed to post message!'); }); $(".new_comment").live('ajax:success', function(data, json, xhr) { @@ -150,7 +150,7 @@ var Stream = { WebSocketReceiver.processComment(json.post_id, json.comment_id, json.html, false); }); $(".new_comment").live('ajax:failure', function(data, html, xhr) { - alert('failed to post message!'); + Diaspora.widgets.alert.alert('Failed to post message!'); }); $(".stream").find(".delete").live('ajax:success', function(data, html, xhr) { diff --git a/public/javascripts/vendor/Mustache.js b/public/javascripts/vendor/Mustache.js new file mode 100644 index 000000000..1b6b85c81 --- /dev/null +++ b/public/javascripts/vendor/Mustache.js @@ -0,0 +1,332 @@ +/* + mustache.js — Logic-less templates in JavaScript + + See http://mustache.github.com/ for more info. + */ +(function() { + var Mustache = function() { + var Renderer = function() { + }; + + Renderer.prototype = { + otag: "{{", + ctag: "}}", + pragmas: {}, + buffer: [], + pragmas_implemented: { + "IMPLICIT-ITERATOR": true + }, + context: {}, + + render: function(template, context, partials, in_recursion) { + // reset buffer & set context + if (!in_recursion) { + this.context = context; + this.buffer = []; // TODO: make this non-lazy + } + + // fail fast + if (!this.includes("", template)) { + if (in_recursion) { + return template; + } else { + this.send(template); + return; + } + } + + template = this.render_pragmas(template); + var html = this.render_section(template, context, partials); + if (in_recursion) { + return this.render_tags(html, context, partials, in_recursion); + } + + this.render_tags(html, context, partials, in_recursion); + }, + + /* + Sends parsed lines + */ + send: function(line) { + if (line != "") { + this.buffer.push(line); + } + }, + + /* + Looks for %PRAGMAS + */ + render_pragmas: function(template) { + // no pragmas + if (!this.includes("%", template)) { + return template; + } + + var that = this; + var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + + this.ctag); + return template.replace(regex, function(match, pragma, options) { + if (!that.pragmas_implemented[pragma]) { + throw({message: + "This implementation of mustache doesn't understand the '" + + pragma + "' pragma"}); + } + that.pragmas[pragma] = {}; + if (options) { + var opts = options.split("="); + that.pragmas[pragma][opts[0]] = opts[1]; + } + return ""; + // ignore unknown pragmas silently + }); + }, + + /* + Tries to find a partial in the curent scope and render it + */ + render_partial: function(name, context, partials) { + name = this.trim(name); + if (!partials || partials[name] === undefined) { + throw({message: "unknown_partial '" + name + "'"}); + } + if (typeof(context[name]) != "object") { + return this.render(partials[name], context, partials, true); + } + return this.render(partials[name], context[name], partials, true); + }, + + /* + Renders inverted (^) and normal (#) sections + */ + render_section: function(template, context, partials) { + if (!this.includes("#", template) && !this.includes("^", template)) { + return template; + } + + var that = this; + // CSW - Added "+?" so it finds the tighest bound, not the widest + var regex = new RegExp(this.otag + "(\\^|\\#)\\s*(.+)\\s*" + this.ctag + + "\n*([\\s\\S]+?)" + this.otag + "\\/\\s*\\2\\s*" + this.ctag + + "\\s*", "mg"); + + // for each {{#foo}}{{/foo}} section do... + return template.replace(regex, function(match, type, name, content) { + var value = that.find(name, context); + if (type == "^") { // inverted section + if (!value || that.is_array(value) && value.length === 0) { + // false or empty list, render it + return that.render(content, context, partials, true); + } else { + return ""; + } + } else if (type == "#") { // normal section + if (that.is_array(value)) { // Enumerable, Let's loop! + return that.map(value, + function(row) { + return that.render(content, that.create_context(row), + partials, true); + }).join(""); + } else if (that.is_object(value)) { // Object, Use it as subcontext! + return that.render(content, that.create_context(value), + partials, true); + } else if (typeof value === "function") { + // higher order section + return value.call(context, content, function(text) { + return that.render(text, context, partials, true); + }); + } else if (value) { // boolean section + return that.render(content, context, partials, true); + } else { + return ""; + } + } + }); + }, + + /* + Replace {{foo}} and friends with values from our view + */ + render_tags: function(template, context, partials, in_recursion) { + // tit for tat + var that = this; + + var new_regex = function() { + return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" + + that.ctag + "+", "g"); + }; + + var regex = new_regex(); + var tag_replace_callback = function(match, operator, name) { + switch (operator) { + case "!": // ignore comments + return ""; + case "=": // set new delimiters, rebuild the replace regexp + that.set_delimiters(name); + regex = new_regex(); + return ""; + case ">": // render partial + return that.render_partial(name, context, partials); + case "{": // the triple mustache is unescaped + return that.find(name, context); + default: // escape the value + return that.escape(that.find(name, context)); + } + }; + var lines = template.split("\n"); + for (var i = 0; i < lines.length; i++) { + lines[i] = lines[i].replace(regex, tag_replace_callback, this); + if (!in_recursion) { + this.send(lines[i]); + } + } + + if (in_recursion) { + return lines.join("\n"); + } + }, + + set_delimiters: function(delimiters) { + var dels = delimiters.split(" "); + this.otag = this.escape_regex(dels[0]); + this.ctag = this.escape_regex(dels[1]); + }, + + escape_regex: function(text) { + // thank you Simon Willison + if (!arguments.callee.sRE) { + var specials = [ + '/', '.', '*', '+', '?', '|', + '(', ')', '[', ']', '{', '}', '\\' + ]; + arguments.callee.sRE = new RegExp( + '(\\' + specials.join('|\\') + ')', 'g' + ); + } + return text.replace(arguments.callee.sRE, '\\$1'); + }, + + /* + find `name` in current `context`. That is find me a value + from the view object + */ + find: function(name, context) { + name = this.trim(name); + + // Checks whether a value is thruthy or false or 0 + function is_kinda_truthy(bool) { + return bool === false || bool === 0 || bool; + } + + var value; + if (is_kinda_truthy(context[name])) { + value = context[name]; + } else if (is_kinda_truthy(this.context[name])) { + value = this.context[name]; + } + + if (typeof value === "function") { + return value.apply(context); + } + if (value !== undefined) { + return value; + } + // silently ignore unkown variables + return ""; + }, + + // Utility methods + + /* includes tag */ + includes: function(needle, haystack) { + return haystack.indexOf(this.otag + needle) != -1; + }, + + /* + Does away with nasty characters + */ + escape: function(s) { + s = String(s === null ? "" : s); + return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) { + switch (s) { + case "&": return "&"; + case "\\": return "\\\\"; + case '"': return '"'; + case "'": return '''; + case "<": return "<"; + case ">": return ">"; + default: return s; + } + }); + }, + + // by @langalex, support for arrays of strings + create_context: function(_context) { + if (this.is_object(_context)) { + return _context; + } else { + var iterator = "."; + if (this.pragmas["IMPLICIT-ITERATOR"]) { + iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; + } + var ctx = {}; + ctx[iterator] = _context; + return ctx; + } + }, + + is_object: function(a) { + return a && typeof a == "object"; + }, + + is_array: function(a) { + return Object.prototype.toString.call(a) === '[object Array]'; + }, + + /* + Gets rid of leading and trailing whitespace + */ + trim: function(s) { + return s.replace(/^\s*|\s*$/g, ""); + }, + + /* + Why, why, why? Because IE. Cry, cry cry. + */ + map: function(array, fn) { + if (typeof array.map == "function") { + return array.map(fn); + } else { + var r = []; + var l = array.length; + for (var i = 0; i < l; i++) { + r.push(fn(array[i])); + } + return r; + } + } + }; + + return({ + name: "mustache.js", + version: "0.3.1-dev", + + /* + Turns a template and view into HTML + */ + to_html: function(template, view, partials, send_fun) { + var renderer = new Renderer(); + if (send_fun) { + renderer.send = send_fun; + } + renderer.render(template, view, partials); + if (!send_fun) { + return renderer.buffer.join("\n"); + } + } + }); + }(); + + $.mustache = function(template, view, partials, send_fun) { + return Mustache.to_html(template, view, partials, send_fun); + }; +})(); \ No newline at end of file diff --git a/public/javascripts/widgets/alert.js b/public/javascripts/widgets/alert.js new file mode 100644 index 000000000..cafb71366 --- /dev/null +++ b/public/javascripts/widgets/alert.js @@ -0,0 +1,34 @@ +Diaspora.widgets.add("alert", function() { + this.start = function() { + $(document).bind("close.facebox", function() { + if ($("#diaspora_alert").length) { + $("#diaspora_alert").detach(); + } + }); + }; + + this.faceboxTemplate = '
' + + '
' + + '
' + + '

' + + '{{title}}' + + '

' + + '
' + + '{{content}}' + + '
' + + '
'; + + + this.alert = function(title, content) { + var template = $.mustache(this.faceboxTemplate, { + title: title, + content: content + }); + + $(template).appendTo(document.body); + + $.facebox({ + div: "#diaspora_alert" + }); + } +}); \ No newline at end of file diff --git a/spec/javascripts/aspect-edit-spec.js b/spec/javascripts/aspect-edit-spec.js index 21b0316ae..698385e2a 100644 --- a/spec/javascripts/aspect-edit-spec.js +++ b/spec/javascripts/aspect-edit-spec.js @@ -215,9 +215,9 @@ describe("AspectEdit", function() { spyOn($, 'ajax'); }); it("doesn't let you remove the person from the last aspect they're in", function() { - spyOn(AspectEdit, 'alertUser'); + spyOn(Diaspora.widgets.alert, 'alert'); AspectEdit.deletePersonFromAspect($('li.person')); - expect(AspectEdit.alertUser).toHaveBeenCalled(); + expect(Diaspora.widgets.alert.alert).toHaveBeenCalled(); expect($.ajax).not.toHaveBeenCalled(); }); }); diff --git a/spec/javascripts/diaspora-spec.js b/spec/javascripts/diaspora-spec.js index fc64b2f37..9ef9bc06a 100644 --- a/spec/javascripts/diaspora-spec.js +++ b/spec/javascripts/diaspora-spec.js @@ -4,30 +4,51 @@ */ describe("Diaspora", function() { - describe("widgets", function() { - beforeEach(function() { - Diaspora.widgets.pageWidgets = {}; - }); - describe("add", function() { - it("adds a widget to the list of pageWidgets", function() { - expect(Diaspora.widgets.pageWidgets["nameOfWidget"]).not.toBeDefined(); - Diaspora.widgets.add("nameOfWidget", {}); - expect(Diaspora.widgets.pageWidgets["nameOfWidget"]).toBeDefined(); + describe("widgetCollection", function() { + describe("prototype", function() { + beforeEach(function() { + window.widgets = new Diaspora.widgetCollection(); }); - }); - describe("remove", function() { - it("removes a widget from the list of pageWidgets", function() { - Diaspora.widgets.add("nameOfWidget", {}); - expect(Diaspora.widgets.pageWidgets["nameOfWidget"]).toBeDefined(); - Diaspora.widgets.remove("nameOfWidget"); - expect(Diaspora.widgets.pageWidgets["nameOfWidget"]).not.toBeDefined(); + + describe("add", function() { + it("adds a widget to the collection", function() { + expect(window.widgets.collection["nameOfWidget"]).not.toBeDefined(); + window.widgets.add("nameOfWidget", function() { }); + expect(window.widgets.collection["nameOfWidget"]).toBeDefined(); + }); + + it("sets a shortcut by referencing the object on Diaspora.widgetCollection", function() { + expect(window.widgets.sup).toBeFalsy(); + window.widgets.add("sup", function() { }); + expect(window.widgets.sup).toEqual(window.widgets.collection.sup); + }); + }); + + describe("remove", function() { + it("removes a widget from the collection", function() { + window.widgets.add("nameOfWidget", function() { }); + expect(window.widgets.collection["nameOfWidget"]).toBeDefined(); + window.widgets.remove("nameOfWidget"); + expect(window.widgets.collection["nameOfWidget"]).not.toBeDefined(); + }); + }); + + describe("init", function() { + it("calls the start method on all of the widgets present", function() { + window.widgets.add("nameOfWidget", function() { + this.start = function() { } + }); + + spyOn(window.widgets.collection["nameOfWidget"], "start"); + window.widgets.init(); + expect(window.widgets.collection["nameOfWidget"].start).toHaveBeenCalled(); + }); + it("changes the ready property to true", function() { + expect(window.widgets.ready).toBeFalsy(); + window.widgets.init(); + expect(window.widgets.ready).toBeTruthy(); + }); }); - }); - describe("init", function() { - Diaspora.widgets.add("nameOfWidget", {start:$.noop}); - spyOn(Diaspora.widgets.pageWidgets["nameOfWidget"], "start"); - Diaspora.widgets.init(); - expect(Diaspora.widgets.pageWidgets["nameOfWidget"].start).toHaveBeenCalled(); }); }); }); diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index 4ac051fee..ed55edf14 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -19,6 +19,7 @@ src_files: - public/javascripts/vendor/timeago.js - public/javascripts/vendor/facebox.js - public/javascripts/diaspora.js + - public/javascripts/widgets/alert.js - public/javascripts/mobile.js - public/javascripts/aspect-edit.js - public/javascripts/aspect-contacts.js From 8103e66ea3dd7d3863a38ab43695581938fc2734 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Fri, 14 Jan 2011 14:57:26 -0600 Subject: [PATCH 04/10] didn't mean to commit some changes in aspect-edit.js --- public/javascripts/aspect-edit.js | 37 ++++++++++++++----------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index 5a57c0334..1edba3310 100644 --- a/public/javascripts/aspect-edit.js +++ b/public/javascripts/aspect-edit.js @@ -93,7 +93,7 @@ var AspectEdit = { var person_id = person.attr('data-guid'); if( $(".person[data-guid='"+ person_id +"']").length == 1) { - Diaspora.widgets.alert.alert("Error removing aspect", "You cannot remove the person from the last aspect"); + Diaspora.widgets.alert.alert("Error removing contact", "You cannot remove the person from the last aspect"); } else { if (!person.hasClass('request')) { @@ -118,28 +118,25 @@ var AspectEdit = { link = "/aspects/" + id; - $this.keyup(function(e) { - e.preventDefault(); + $this.keyup(function() { + if (e.which == 13) { + e.preventDefault(); + $this.blur(); + + //save changes + $.ajax({ + type: "PUT", + url: link, + data: { + "aspect": { + "name" : $this.text() + } + } + }); + } //update all other aspect links $("#aspect_nav li[data-guid='" + id + "'] a").text($this.text()); - - if(e.keyCode === 13) { - $this.trigger("blur"); - } - }); - - $this.blur(function() { - //save changes - $.ajax({ - type: "PUT", - url: link, - data: { - "aspect": { - "name" : $this.text() - } - } - }); }); }, From 4e40c193421abd95f04dd7f3323ca5bb591b9e48 Mon Sep 17 00:00:00 2001 From: Dan Hansen Date: Fri, 14 Jan 2011 15:13:09 -0600 Subject: [PATCH 05/10] some fixes for the alert widget --- public/javascripts/diaspora.js | 4 +++- public/javascripts/widgets/alert.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/javascripts/diaspora.js b/public/javascripts/diaspora.js index 698791b40..b2e5d76b0 100644 --- a/public/javascripts/diaspora.js +++ b/public/javascripts/diaspora.js @@ -30,4 +30,6 @@ Diaspora.widgetCollection.prototype.init = function() { Diaspora.widgets = Diaspora.widgets || new Diaspora.widgetCollection(); -$(Diaspora.widgets.init); \ No newline at end of file +$(document).ready(function() { + Diaspora.widgets.init(); +}); \ No newline at end of file diff --git a/public/javascripts/widgets/alert.js b/public/javascripts/widgets/alert.js index cafb71366..b12b8dc3f 100644 --- a/public/javascripts/widgets/alert.js +++ b/public/javascripts/widgets/alert.js @@ -1,13 +1,15 @@ Diaspora.widgets.add("alert", function() { this.start = function() { + console.log("called2"); $(document).bind("close.facebox", function() { + console.log("called"); if ($("#diaspora_alert").length) { $("#diaspora_alert").detach(); } }); }; - this.faceboxTemplate = '
' + + this.faceboxTemplate = '
' + '
' + '
' + '

' + From bc8821fdc5ae3ca2034d517d7f3e01c160b3e8bd Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 14 Jan 2011 14:28:03 -0800 Subject: [PATCH 06/10] Revert "some fixes for the alert widget" This reverts commit 4e40c193421abd95f04dd7f3323ca5bb591b9e48. --- public/javascripts/diaspora.js | 4 +--- public/javascripts/widgets/alert.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/public/javascripts/diaspora.js b/public/javascripts/diaspora.js index b2e5d76b0..698791b40 100644 --- a/public/javascripts/diaspora.js +++ b/public/javascripts/diaspora.js @@ -30,6 +30,4 @@ Diaspora.widgetCollection.prototype.init = function() { Diaspora.widgets = Diaspora.widgets || new Diaspora.widgetCollection(); -$(document).ready(function() { - Diaspora.widgets.init(); -}); \ No newline at end of file +$(Diaspora.widgets.init); \ No newline at end of file diff --git a/public/javascripts/widgets/alert.js b/public/javascripts/widgets/alert.js index b12b8dc3f..cafb71366 100644 --- a/public/javascripts/widgets/alert.js +++ b/public/javascripts/widgets/alert.js @@ -1,15 +1,13 @@ Diaspora.widgets.add("alert", function() { this.start = function() { - console.log("called2"); $(document).bind("close.facebox", function() { - console.log("called"); if ($("#diaspora_alert").length) { $("#diaspora_alert").detach(); } }); }; - this.faceboxTemplate = '
' + + this.faceboxTemplate = '
' + '
' + '
' + '

' + From e2fdad02f10b77fee4db819b69e90bebf7b747c3 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 14 Jan 2011 22:12:31 -0800 Subject: [PATCH 07/10] css fixes, incl. timeago style fix on stream_element --- app/views/shared/_author_info.html.haml | 2 +- app/views/shared/_stream_element.haml | 2 +- public/stylesheets/sass/application.sass | 20 +++++++++++++++++--- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/app/views/shared/_author_info.html.haml b/app/views/shared/_author_info.html.haml index ec7e11457..7205012c5 100644 --- a/app/views/shared/_author_info.html.haml +++ b/app/views/shared/_author_info.html.haml @@ -1,4 +1,4 @@ -#author_info +#author_info.show = person_image_link(person) .from %h4 diff --git a/app/views/shared/_stream_element.haml b/app/views/shared/_stream_element.haml index f0cc61278..05f394bd9 100644 --- a/app/views/shared/_stream_element.haml +++ b/app/views/shared/_stream_element.haml @@ -31,7 +31,7 @@ = render 'status_messages/status_message', :post => post, :photos => photos .info - %span.time= link_to(how_long_ago(post), status_message_path(post)) + %span.timeago= link_to(how_long_ago(post), status_message_path(post)) = link_to t('comments.new_comment.comment').downcase, '#', :class => 'focus_comment_textarea' = render "comments/comments", :post_id => post.id, :comment_hashes => comments, :condensed => true, :commenting_disabled => defined?(@commenting_disabled) diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b2170036f..e410b2820 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -292,9 +292,18 @@ header .from :padding 0 - h3 + h3, + h4 :display inline-block + &.show + a + :margin + :right 1em + h4 + :margin 0 + :padding 0 + .stream_element :position relative :word-wrap break-word @@ -374,14 +383,19 @@ header :color #22AAE0 &:active :color #005D9C -.time +.time, +.timeago a :color #bbb :font :weight bold :margin :right 5px - :font-size small + :font + :size smaller + :text + :decoration none + :border none .right .reshare_pane .reshare_button a.inactive :color #ccc From 8b7bfd540d6c6263ceaec0e75186e4bd60b81db3 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sat, 15 Jan 2011 10:04:39 -0800 Subject: [PATCH 08/10] Expose gem upgrade failures on CI. Build will break. Next checkin will fix it. :) --- ci.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci.sh b/ci.sh index 24cee60ac..8ac750595 100755 --- a/ci.sh +++ b/ci.sh @@ -4,6 +4,7 @@ echo "************************************************************************** echo "* ruby 1.8.7 REE build *" && echo "*************************************************************************************************" && echo "" && +rm -f Gemfile.lock && source /usr/local/rvm/scripts/rvm && rvm use ree@diaspora --create && bundle install && From fb136d22d09c9f46584ebe0f6da1da336c9fc45d Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sat, 15 Jan 2011 10:44:24 -0800 Subject: [PATCH 09/10] Fix 1.8 build by rolling back aws gem. Fix 1.9 build by rolling back mongo_mapper to a previous ref. Prevent this from happening (as much) in the future by locking down versions in the Gemfile. --- Gemfile | 36 +++++++++---------- Gemfile.lock | 98 +++++++++++++++++++++++++++------------------------- 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 9acf76ca2..ae73ac253 100644 --- a/Gemfile +++ b/Gemfile @@ -3,13 +3,13 @@ source 'http://rubygems.org' gem 'rails', '3.0.3' gem 'bundler', '>= 1.0.0' -gem 'chef', :require => false +gem 'chef', '0.9.12', :require => false gem 'nokogiri', '1.4.3.1' #Security gem 'devise', '1.1.3' -gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper' +gem 'devise-mongo_mapper', :git => 'git://github.com/collectiveidea/devise-mongo_mapper', :ref => 'fa2f20310e0988295adc' gem 'devise_invitable','0.3.5' #Authentication @@ -17,38 +17,38 @@ gem 'omniauth', '0.1.6' gem 'twitter', :git => 'git://github.com/jnunemaker/twitter.git', :ref => 'ef122bbb280e229ed343' #Mongo -gem 'mongo_mapper', :branch => 'rails3', :git => 'git://github.com/jnunemaker/mongomapper.git' +gem 'mongo_mapper', :branch => 'rails3', :git => 'git://github.com/jnunemaker/mongomapper.git', :ref => '108510cc9b96bfbcf7f0' gem 'bson_ext', '1.1' gem 'bson', '1.1' #Views -gem 'haml' +gem 'haml', '3.0.25' gem 'will_paginate', '3.0.pre2' #Uncatagorized -gem 'roxml', :git => 'git://github.com/Empact/roxml.git' -gem 'addressable', :require => 'addressable/uri' -gem 'json' -gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.git' +gem 'roxml', :git => 'git://github.com/Empact/roxml.git', :ref => '7ea9a9ffd2338aaef5b0' +gem 'addressable', '2.2.2', :require => 'addressable/uri' +gem 'json', '1.4.6' +gem 'http_accept_language', :git => 'git://github.com/iain/http_accept_language.git', :ref => '0b78aa7849fc90cf9e12' -gem 'thin', :require => false +gem 'thin', '1.2.7', :require => false #Websocket -gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket' +gem 'em-websocket', :git => 'git://github.com/igrigorik/em-websocket', :ref => 'e278f5a1c4db60be7485' #File uploading gem 'carrierwave', :git => 'git://github.com/rsofaer/carrierwave.git' , :branch => 'master' #Untested mongomapper branch -gem 'mini_magick' -gem 'aws' -gem 'fastercsv', :require => false -gem 'jammit' -gem 'rest-client' +gem 'mini_magick', '3.2' +gem 'aws', '2.3.32' # upgrade to 2.4 breaks 1.8 >.< +gem 'fastercsv', '1.5.4', :require => false +gem 'jammit', '0.5.4' +gem 'rest-client', '1.6.1' #Backups -gem 'cloudfiles', :require => false +gem 'cloudfiles', '1.4.10', :require => false #Queue -gem 'resque' -gem 'SystemTimer' unless RUBY_VERSION.include? '1.9' +gem 'resque', '1.10.0' +gem 'SystemTimer', '1.2.1' unless RUBY_VERSION.include? '1.9' group :test, :development do gem 'factory_girl_rails' diff --git a/Gemfile.lock b/Gemfile.lock index 1f1ba635a..2afb12f6c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,7 @@ GIT remote: git://github.com/Empact/roxml.git revision: 7ea9a9ffd2338aaef5b04cb792060ae8c98f346a + ref: 7ea9a9ffd2338aaef5b0 specs: roxml (3.1.6) activesupport (>= 2.3.0) @@ -9,6 +10,7 @@ GIT GIT remote: git://github.com/collectiveidea/devise-mongo_mapper revision: fa2f20310e0988295adc192255d3b1cedee1b412 + ref: fa2f20310e0988295adc specs: devise-mongo_mapper (0.0.1) devise (~> 1.1.0) @@ -16,12 +18,14 @@ GIT GIT remote: git://github.com/iain/http_accept_language.git revision: 0b78aa7849fc90cf9e12586af162fa4c408a795d + ref: 0b78aa7849fc90cf9e12 specs: http_accept_language (1.0.1) GIT remote: git://github.com/igrigorik/em-websocket revision: e278f5a1c4db60be7485859520a069e08bfe1247 + ref: e278f5a1c4db60be7485 specs: em-websocket (0.2.0) addressable (>= 2.1.1) @@ -29,7 +33,8 @@ GIT GIT remote: git://github.com/jnunemaker/mongomapper.git - revision: de8f8f3171f687f8d65b87ba7c7d3b1cb6e3bbe6 + revision: 108510cc9b96bfbcf7f095ec037bce30cb6aa2c9 + ref: 108510cc9b96bfbcf7f0 branch: rails3 specs: mongo_mapper (0.8.6) @@ -101,13 +106,13 @@ GEM activesupport (= 3.0.3) activesupport (3.0.3) addressable (2.2.2) - arel (2.0.6) + arel (2.0.7) aws (2.3.32) activesupport http_connection uuidtools xml-simple - bcrypt-ruby (2.1.2) + bcrypt-ruby (2.1.4) bson (1.1) bson_ext (1.1) builder (2.1.2) @@ -134,7 +139,7 @@ GEM ohai (>= 0.5.7) rest-client (>= 1.0.4, < 1.7.0) uuidtools - childprocess (0.1.4) + childprocess (0.1.6) ffi (~> 0.6.3) closure-compiler (0.3.3) cloudfiles (1.4.10) @@ -150,7 +155,7 @@ GEM term-ansicolor (~> 1.0.5) cucumber-rails (0.3.2) cucumber (>= 0.8.0) - culerity (0.2.13) + culerity (0.2.14) daemons (1.1.0) database_cleaner (0.5.2) devise (1.1.3) @@ -163,24 +168,23 @@ GEM abstract (>= 1.0.0) eventmachine (0.12.10) extlib (0.9.15) - factory_girl (1.3.2) - factory_girl_rails (1.0) + factory_girl (1.3.3) + factory_girl_rails (1.0.1) factory_girl (~> 1.3) - rails (>= 3.0.0.beta4) - faraday (0.5.3) + railties (>= 3.0.0) + faraday (0.5.4) addressable (~> 2.2.2) - multipart-post (~> 1.0.1) + multipart-post (~> 1.1.0) rack (>= 1.1.0, < 2) faraday_middleware (0.3.1) faraday (~> 0.5.3) - fastercsv (1.5.3) + fastercsv (1.5.4) fastthread (1.0.7) ffi (0.6.3) rake (>= 0.8.7) gem_plugin (0.2.3) - gherkin (2.3.2) + gherkin (2.3.3) json (~> 1.4.6) - term-ansicolor (~> 1.0.5) haml (3.0.25) hashie (0.4.0) highline (1.6.1) @@ -195,13 +199,13 @@ GEM configuration (>= 0.0.5) rake (>= 0.8.1) linecache (0.43) - mail (2.2.12) + mail (2.2.14) activesupport (>= 2.3.6) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.16) - mini_magick (3.1) + mini_magick (3.2) subexec (~> 0.0.4) mixlib-authentication (1.1.4) mixlib-log @@ -220,7 +224,7 @@ GEM gem_plugin (>= 0.2.3) multi_json (0.0.5) multi_xml (0.2.0) - multipart-post (1.0.1) + multipart-post (1.1.0) net-ldap (0.1.1) nokogiri (1.4.3.1) oa-basic (0.1.6) @@ -247,7 +251,7 @@ GEM rack-openid (~> 1.2.0) ruby-openid-apps-discovery oauth (0.4.4) - oauth2 (0.1.0) + oauth2 (0.1.1) faraday (~> 0.5.0) multi_json (~> 0.0.4) ohai (0.5.8) @@ -273,7 +277,7 @@ GEM rack-openid (1.2.0) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-test (0.5.6) + rack-test (0.5.7) rack (>= 1.0) rails (3.0.3) actionmailer (= 3.0.3) @@ -299,20 +303,20 @@ GEM vegas (~> 0.1.2) rest-client (1.6.1) mime-types (>= 1.16) - rspec (2.3.0) - rspec-core (~> 2.3.0) - rspec-expectations (~> 2.3.0) - rspec-mocks (~> 2.3.0) - rspec-core (2.3.1) - rspec-expectations (2.3.0) + rspec (2.4.0) + rspec-core (~> 2.4.0) + rspec-expectations (~> 2.4.0) + rspec-mocks (~> 2.4.0) + rspec-core (2.4.0) + rspec-expectations (2.4.0) diff-lcs (~> 1.1.2) rspec-instafail (0.1.5) - rspec-mocks (2.3.0) - rspec-rails (2.3.1) + rspec-mocks (2.4.0) + rspec-rails (2.4.1) actionpack (~> 3.0) activesupport (~> 3.0) railties (~> 3.0) - rspec (~> 2.3.0) + rspec (~> 2.4.0) ruby-debug (0.10.4) columnize (>= 0.1) ruby-debug-base (~> 0.10.4.0) @@ -326,15 +330,15 @@ GEM selenium-client (1.2.18) selenium-rc (2.2.4) selenium-client (>= 1.2.18) - selenium-webdriver (0.1.1) - childprocess (= 0.1.4) + selenium-webdriver (0.1.2) + childprocess (~> 0.1.5) ffi (~> 0.6.3) json_pure rubyzip simple_oauth (0.1.3) - sinatra (1.1.0) + sinatra (1.1.2) rack (~> 1.1) - tilt (~> 1.1) + tilt (~> 1.2) subexec (0.0.4) systemu (1.2.0) term-ansicolor (1.0.5) @@ -343,16 +347,16 @@ GEM eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.14.6) - tilt (1.1) + tilt (1.2.1) treetop (1.4.9) polyglot (>= 0.3.1) - tzinfo (0.3.23) + tzinfo (0.3.24) uuidtools (2.1.1) vegas (0.1.8) rack (>= 1.0.0) warden (0.10.7) rack (>= 1.0.0) - webmock (1.6.1) + webmock (1.6.2) addressable (>= 2.2.2) crack (>= 0.1.7) will_paginate (3.0.pre2) @@ -363,16 +367,16 @@ PLATFORMS ruby DEPENDENCIES - SystemTimer - addressable - aws + SystemTimer (= 1.2.1) + addressable (= 2.2.2) + aws (= 2.3.32) bson (= 1.1) bson_ext (= 1.1) bundler (>= 1.0.0) capybara (~> 0.3.9) carrierwave! - chef - cloudfiles + chef (= 0.9.12) + cloudfiles (= 1.4.10) cucumber-rails (= 0.3.2) database_cleaner (= 0.5.2) devise (= 1.1.3) @@ -380,28 +384,28 @@ DEPENDENCIES devise_invitable (= 0.3.5) em-websocket! factory_girl_rails - fastercsv - haml + fastercsv (= 1.5.4) + haml (= 3.0.25) http_accept_language! - jammit + jammit (= 0.5.4) jasmine! - json + json (= 1.4.6) launchy - mini_magick + mini_magick (= 3.2) mocha mongo_mapper! mongrel nokogiri (= 1.4.3.1) omniauth (= 0.1.6) rails (= 3.0.3) - resque - rest-client + resque (= 1.10.0) + rest-client (= 1.6.1) roxml! rspec (>= 2.0.0) rspec-instafail rspec-rails (>= 2.0.0) ruby-debug - thin + thin (= 1.2.7) twitter! webmock will_paginate (= 3.0.pre2) From f17ba7b4eb3dc5a8a1ded32dcaf1f2f62e5c75b5 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Sun, 16 Jan 2011 19:52:11 +0100 Subject: [PATCH 10/10] updated locales --- config/locales/diaspora/ar.yml | 1 + config/locales/diaspora/ca.yml | 1 + config/locales/diaspora/cs.yml | 1 + config/locales/diaspora/cy.yml | 1 + config/locales/diaspora/da.yml | 1 + config/locales/diaspora/de.yml | 1 + config/locales/diaspora/el.yml | 33 +++++++++++++++-------------- config/locales/diaspora/en_shaw.yml | 19 +++++++++-------- config/locales/diaspora/eo.yml | 1 + config/locales/diaspora/es-CL.yml | 1 + config/locales/diaspora/es.yml | 1 + config/locales/diaspora/fi.yml | 3 ++- config/locales/diaspora/fr.yml | 11 +++++----- config/locales/diaspora/ga.yml | 1 + config/locales/diaspora/gl-ES.yml | 1 + config/locales/diaspora/he.yml | 33 +++++++++++++++-------------- config/locales/diaspora/hu.yml | 5 +++-- config/locales/diaspora/id.yml | 1 + config/locales/diaspora/it.yml | 1 + config/locales/diaspora/lt.yml | 1 + config/locales/diaspora/mk.yml | 1 + config/locales/diaspora/nb.yml | 1 + config/locales/diaspora/nl.yml | 15 +++++++------ config/locales/diaspora/pl.yml | 1 + config/locales/diaspora/pt-BR.yml | 1 + config/locales/diaspora/pt-PT.yml | 1 + config/locales/diaspora/ro.yml | 1 + config/locales/diaspora/ru.yml | 1 + config/locales/diaspora/sk.yml | 1 + config/locales/diaspora/sl.yml | 1 + config/locales/diaspora/sv.yml | 1 + config/locales/diaspora/tr.yml | 1 + 32 files changed, 88 insertions(+), 56 deletions(-) diff --git a/config/locales/diaspora/ar.yml b/config/locales/diaspora/ar.yml index 9dbcf2ac4..d0ccf7af8 100644 --- a/config/locales/diaspora/ar.yml +++ b/config/locales/diaspora/ar.yml @@ -60,6 +60,7 @@ ar: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/ca.yml b/config/locales/diaspora/ca.yml index a213a5a9a..4f35a502b 100644 --- a/config/locales/diaspora/ca.yml +++ b/config/locales/diaspora/ca.yml @@ -60,6 +60,7 @@ ca: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/cs.yml b/config/locales/diaspora/cs.yml index 7ec40ebda..ada31a318 100644 --- a/config/locales/diaspora/cs.yml +++ b/config/locales/diaspora/cs.yml @@ -60,6 +60,7 @@ cs: add_existing: "Přidat existující kontakt" confirm_remove_aspect: "Opravdu chcete odstranit tento aspekt?" remove_aspect: "Odstranit tento aspekt" + rename: "přejmenovat" rename_aspect: "Přejmenovat aspekt" helper: are_you_sure: "Opravdu chcete odstranit tento aspekt?" diff --git a/config/locales/diaspora/cy.yml b/config/locales/diaspora/cy.yml index f087f61dd..ea690a640 100644 --- a/config/locales/diaspora/cy.yml +++ b/config/locales/diaspora/cy.yml @@ -60,6 +60,7 @@ cy: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/da.yml b/config/locales/diaspora/da.yml index 1881ebaa0..cd41a79a3 100644 --- a/config/locales/diaspora/da.yml +++ b/config/locales/diaspora/da.yml @@ -60,6 +60,7 @@ da: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Er du sikker på at du vil fjerne dette aspekt?" diff --git a/config/locales/diaspora/de.yml b/config/locales/diaspora/de.yml index ceb704b20..b46aa909b 100644 --- a/config/locales/diaspora/de.yml +++ b/config/locales/diaspora/de.yml @@ -60,6 +60,7 @@ de: add_existing: "Ein bereits bestehendes Konto hinzufügen" confirm_remove_aspect: "Bist du dir sicher, dass du diesen Aspekt löschen möchtest?" remove_aspect: "Aspekt löschen" + rename: "umbenennen" rename_aspect: "Aspekt umbenennen" helper: are_you_sure: "Möchtest du diesen Aspekt wirklich löschen?" diff --git a/config/locales/diaspora/el.yml b/config/locales/diaspora/el.yml index df590b8d8..282d76fbb 100644 --- a/config/locales/diaspora/el.yml +++ b/config/locales/diaspora/el.yml @@ -4,11 +4,11 @@ el: - _aspect: "Aspect" - _aspects: "Aspects" + _aspect: "Πτυχή" + _aspects: "Πτυχές" _comments: "Σχόλια" - _contact: "Contact" - _contacts: "Contacts" + _contact: "Επαφή" + _contacts: "Επαφές" _home: "Αρχική" _photos: "φωτογραφίες" _services: "Υπηρεσίες" @@ -57,17 +57,18 @@ el: destroy: success: "Ο χρήστης %{name} αφαιρέθηκε επιτυχώς." edit: - add_existing: "Add an existing contact" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - remove_aspect: "Delete this aspect" - rename_aspect: "Rename aspect" + add_existing: "Προσθέστε μια υπάρχουσα επαφή" + confirm_remove_aspect: "Είστε σίγουρος/η πως θέλετε να διαγράψετε αυτή την πτυχή;" + remove_aspect: "Διαγραφή αυτής της πτυχής" + rename: "μετονομασία" + rename_aspect: "Μετονομασία πτυχής" helper: are_you_sure: "Είστε σίγουρος/η πως θέλετε να διαγράψετε αυτή την πτυχή;" aspect_not_empty: "Η πτυχή δεν είναι άδεια" remove: "αφαίρεση" index: handle_explanation: "Αυτό είναι το αναγνωριστικό σας στο Diaspora. Όπως και με μια διεύθυνση ηλεκτρονικού ταχυδρομείου, μπορείτε να το δώσετε σε άλλους για να μπορέσουν να σας βρουν." - no_contacts: "No contacts" + no_contacts: "Καμία επαφή" manage: add_a_new_aspect: "Προσθέστε μια νέα πτυχή" add_a_new_contact: "Προσθήκη νέας επαφής" @@ -178,7 +179,7 @@ el: next: "επόμενο" no_new_notifications: "καμία νέα ειδοποίηση" notifications: - also_commented: "also commented on" + also_commented: "επίσης σχολίασε στο" comment_on_post: "σχολίασε τη" deleted: "διαγράφηκε" index: @@ -188,13 +189,13 @@ el: request_accepted: "δέχτηκε το αίτημα σας για διαμοιρασμό. " notifier: also_commented: - commented: "has also commented on %{post_author}'s post:" - sign_in: "Sign in to view it." - subject: "%{name} has also commented." + commented: "σχολίασε επίσης τη δημοσίευση του χρήστη %{post_author} :" + sign_in: "Συνδεθείτε για να το δείτε." + subject: "Ο χρήστης %{name} επίσης σχολίασε." comment_on_post: - commented: "has commented on your post!" - sign_in: "Sign in to view it." - subject: "%{name} has commented on your post." + commented: "σχολίασε τη δημισίευση σας!" + sign_in: "Συνδεθείτε για να το δείτε." + subject: "Ο χρήστης %{name} σχολίασε τη δημοσίευση σας." diaspora: "ρομπότ για τα email του δικτύου Diaspora" hello: "Γειά σου %{name}!" love: "αγάπη," diff --git a/config/locales/diaspora/en_shaw.yml b/config/locales/diaspora/en_shaw.yml index dd1aede17..4ebd06c19 100644 --- a/config/locales/diaspora/en_shaw.yml +++ b/config/locales/diaspora/en_shaw.yml @@ -4,11 +4,11 @@ en_shaw: - _aspect: "Aspect" - _aspects: "Aspects" + _aspect: "𐑨𐑕𐑐𐑧𐑒𐑑" + _aspects: "𐑨𐑕𐑐𐑧𐑒𐑑𐑕" _comments: "𐑒𐑪𐑥𐑩𐑯𐑑𐑕" - _contact: "Contact" - _contacts: "Contacts" + _contact: "𐑒𐑪𐑯𐑑𐑨𐑒𐑑" + _contacts: "𐑒𐑪𐑯𐑑𐑨𐑒𐑑𐑕" _home: "Home" _photos: "𐑓𐑴𐑑𐑴𐑟" _services: "Services" @@ -57,17 +57,18 @@ en_shaw: destroy: success: "%{name} 𐑢𐑪𐑟 𐑕𐑩𐑒𐑕𐑧𐑕𐑓𐑫𐑤𐑦 𐑮𐑦𐑥𐑵𐑝𐑛." edit: - add_existing: "Add an existing contact" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - remove_aspect: "Delete this aspect" - rename_aspect: "Rename aspect" + add_existing: "𐑨𐑛 𐑩𐑯 𐑧𐑜𐑟𐑦𐑕𐑑𐑦𐑙 𐑒𐑪𐑯𐑑𐑨𐑒𐑑" + confirm_remove_aspect: "𐑸 𐑿 𐑖𐑻 𐑿 𐑢𐑳𐑯𐑑 𐑑 𐑛𐑦𐑤𐑰𐑑 𐑞𐑦𐑕 𐑨𐑕𐑐𐑧𐑒𐑑?" + remove_aspect: "𐑛𐑦𐑤𐑰𐑑 𐑞𐑦𐑕 𐑨𐑕𐑐𐑧𐑒𐑑" + rename: "𐑮𐑦𐑯𐑱𐑥" + rename_aspect: "𐑮𐑦𐑯𐑱𐑥 𐑨𐑕𐑐𐑧𐑒𐑑" helper: are_you_sure: "𐑸 𐑿 𐑖𐑻 𐑿 𐑢𐑳𐑯𐑑 𐑑 𐑛𐑦𐑤𐑰𐑑 𐑞𐑦𐑕 𐑨𐑕𐑐𐑧𐑒𐑑?" aspect_not_empty: "𐑨𐑕𐑐𐑧𐑒𐑑 𐑯𐑪𐑑 𐑧𐑥𐑐𐑑𐑦" remove: "𐑮𐑦𐑥𐑵𐑝" index: handle_explanation: "𐑞𐑦𐑕 𐑦𐑟 𐑿𐑼 ·𐑛𐑦𐑨𐑕𐑐𐑹𐑩 𐑣𐑨𐑯𐑛𐑩𐑤. 𐑤𐑲𐑒 𐑩𐑯 𐑦-𐑥𐑱𐑤 𐑩𐑛𐑮𐑧𐑕, 𐑿 𐑒 𐑜𐑦𐑝 𐑞𐑦𐑕 𐑑 𐑐𐑰𐑐𐑩𐑤 𐑑 𐑮𐑰𐑗 𐑿." - no_contacts: "No contacts" + no_contacts: "𐑯𐑴 𐑒𐑪𐑯𐑑𐑨𐑒𐑑𐑕" manage: add_a_new_aspect: "𐑨𐑛 𐑯𐑿 𐑨𐑕𐑐𐑧𐑒𐑑" add_a_new_contact: "𐑨𐑛 𐑩 𐑯𐑿 𐑒𐑪𐑯𐑑𐑨𐑒𐑑" diff --git a/config/locales/diaspora/eo.yml b/config/locales/diaspora/eo.yml index 1629598a0..81ad8ac4f 100644 --- a/config/locales/diaspora/eo.yml +++ b/config/locales/diaspora/eo.yml @@ -60,6 +60,7 @@ eo: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/es-CL.yml b/config/locales/diaspora/es-CL.yml index 17db0dd2e..7ce6e5b4d 100644 --- a/config/locales/diaspora/es-CL.yml +++ b/config/locales/diaspora/es-CL.yml @@ -60,6 +60,7 @@ es-CL: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "¿Estás seguro que quieres eliminar este aspecto?" diff --git a/config/locales/diaspora/es.yml b/config/locales/diaspora/es.yml index a135416c4..7f18a331a 100644 --- a/config/locales/diaspora/es.yml +++ b/config/locales/diaspora/es.yml @@ -60,6 +60,7 @@ es: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "¿Estás seguro de que quieres eliminar este aspecto?" diff --git a/config/locales/diaspora/fi.yml b/config/locales/diaspora/fi.yml index 29d13fab3..934ad89d2 100644 --- a/config/locales/diaspora/fi.yml +++ b/config/locales/diaspora/fi.yml @@ -5,7 +5,7 @@ fi: _aspect: "Näkymä" - _aspects: "Näkymät" + _aspects: "Näkymää" _comments: "Kommentit" _contact: "Kontakti" _contacts: "Kontaktit" @@ -60,6 +60,7 @@ fi: add_existing: "Lisää olemassa oleva kontakti" confirm_remove_aspect: "Oletko varma että haluat poistaa tämän näkymän?" remove_aspect: "Poista näkymä" + rename: "nimeä uudelleen" rename_aspect: "Nimeä näkymä uudelleen" helper: are_you_sure: "Haluatko varmasti poistaa tämän näkymän?" diff --git a/config/locales/diaspora/fr.yml b/config/locales/diaspora/fr.yml index 4f6c666c3..120a974d5 100644 --- a/config/locales/diaspora/fr.yml +++ b/config/locales/diaspora/fr.yml @@ -57,17 +57,18 @@ fr: destroy: success: "%{name} a été supprimé avec succès." edit: - add_existing: "Add an existing contact" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - remove_aspect: "Delete this aspect" - rename_aspect: "Rename aspect" + add_existing: "Ajouter un contact existant" + confirm_remove_aspect: "Voulez-vous vraiment supprimer cet aspect ?" + remove_aspect: "Supprimer cet aspect" + rename: "renommer" + rename_aspect: "Renommer l'aspect" helper: are_you_sure: "Voulez-vous vraiment supprimer cet aspect ?" aspect_not_empty: "L’aspect n’est pas vide" remove: "supprimer" index: handle_explanation: "Ceci est votre handle diaspora. Comme une adresse de courrier électronique, vous pouvez le communiquer à d'autres personnes pour leur permettre de vous joindre." - no_contacts: "No contacts" + no_contacts: "Aucun contact" manage: add_a_new_aspect: "Ajouter un nouvel aspect" add_a_new_contact: "Ajouter un nouveau contact" diff --git a/config/locales/diaspora/ga.yml b/config/locales/diaspora/ga.yml index 076085f50..689b423f8 100644 --- a/config/locales/diaspora/ga.yml +++ b/config/locales/diaspora/ga.yml @@ -60,6 +60,7 @@ ga: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/gl-ES.yml b/config/locales/diaspora/gl-ES.yml index 937102cf0..8d4e823c9 100644 --- a/config/locales/diaspora/gl-ES.yml +++ b/config/locales/diaspora/gl-ES.yml @@ -60,6 +60,7 @@ gl-ES: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/he.yml b/config/locales/diaspora/he.yml index 9d98ea778..b93415f45 100644 --- a/config/locales/diaspora/he.yml +++ b/config/locales/diaspora/he.yml @@ -4,11 +4,11 @@ he: - _aspect: "Aspect" - _aspects: "Aspects" + _aspect: "היבט" + _aspects: "היבטים" _comments: "תגובות" - _contact: "Contact" - _contacts: "Contacts" + _contact: "איש קשר" + _contacts: "אנשי קשר" _home: "בית" _photos: "תמונות" _services: "שירותים" @@ -57,17 +57,18 @@ he: destroy: success: "%{name} הוסר בהצלחה." edit: - add_existing: "Add an existing contact" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - remove_aspect: "Delete this aspect" - rename_aspect: "Rename aspect" + add_existing: "הוספת איש קשר קיים" + confirm_remove_aspect: "האם אכן ברצונך למחוק את ההיבט?" + remove_aspect: "מחיקת היבט זה" + rename: "שינוי שם" + rename_aspect: "שינוי שם ההיבט" helper: are_you_sure: "האם אכן ברצונך למחוק היבט זה?" aspect_not_empty: "ההיבט אינו ריק" remove: "הסרה" index: handle_explanation: "זהו שם המשתמש שלך בדיאספורה. כמו כתובת דואר אלקטרוני, ניתן לחלוק אותו עם אנשים כדי שיגיעו אליך." - no_contacts: "No contacts" + no_contacts: "אין אנשי קשר" manage: add_a_new_aspect: "הוספת היבט חדש" add_a_new_contact: "הוספת איש קשר חדש" @@ -178,7 +179,7 @@ he: next: "הבאה" no_new_notifications: "אין התרעות חדשות" notifications: - also_commented: "also commented on" + also_commented: "גם כן הגיב/ה על" comment_on_post: "הגיב/ה על ה" deleted: "נמחקה" index: @@ -188,13 +189,13 @@ he: request_accepted: "קיבל/ה את בקשת השיתוף שלך." notifier: also_commented: - commented: "has also commented on %{post_author}'s post:" - sign_in: "Sign in to view it." - subject: "%{name} has also commented." + commented: "גם כן הגיב/ה על הרשומה של %{post_author}:" + sign_in: "יש להיכנס כדי לצפות בזה." + subject: "%{name} גם כן הגיב/ה." comment_on_post: - commented: "has commented on your post!" - sign_in: "Sign in to view it." - subject: "%{name} has commented on your post." + commented: "הגיב/ה על הרשומה שלך!" + sign_in: "יש להיכנס כדי לצפות בזה." + subject: "%{name} הגיב/ה על הרשומה שלך." diaspora: "רובוט הדוא״ל של דיאספורה" hello: "שלום %{name}!" love: "באהבה," diff --git a/config/locales/diaspora/hu.yml b/config/locales/diaspora/hu.yml index 67043823a..76286823e 100644 --- a/config/locales/diaspora/hu.yml +++ b/config/locales/diaspora/hu.yml @@ -60,6 +60,7 @@ hu: add_existing: "Létező kapcsolat hozzáadása" confirm_remove_aspect: "Biztos, hogy törölni akarod a csoportot?" remove_aspect: "Csoport törlése" + rename: "átnevezés" rename_aspect: "Csoport átnevezése" helper: are_you_sure: "Biztos, hogy törlöd a csoportot?" @@ -134,8 +135,8 @@ hu: share_what_you_want: "Oszd meg amit akarsz, azzal akivel akarod!" simplicity: "Egyszerűség" simplicity_explanation: "A Diaspora könnyűvé és érthetővé teszi a megosztást - és ez a biztonságra is vonatkozik. Nem kell hosszú beállító oldalakon átvergődnöd, hogy biztonságban tudd a profilodat." - tagline_first_half: "Ossz meg amit akarsz," - tagline_second_half: "azzal akivel akarod." + tagline_first_half: "Megoszthatod," + tagline_second_half: "akivel akarod." invitations: check_token: not_found: "Meghívó token nem található" diff --git a/config/locales/diaspora/id.yml b/config/locales/diaspora/id.yml index c7ef80f82..e1ef730c1 100644 --- a/config/locales/diaspora/id.yml +++ b/config/locales/diaspora/id.yml @@ -60,6 +60,7 @@ id: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/it.yml b/config/locales/diaspora/it.yml index db47ddbde..4968318d5 100644 --- a/config/locales/diaspora/it.yml +++ b/config/locales/diaspora/it.yml @@ -60,6 +60,7 @@ it: add_existing: "Aggiungi un contatto esistente" confirm_remove_aspect: "Sei sicuro di voler eliminare questo aspetto?" remove_aspect: "Elimina questo aspetto" + rename: "rename" rename_aspect: "Rinomina aspetto" helper: are_you_sure: "Sei sicuro di voler eliminare questo aspetto?" diff --git a/config/locales/diaspora/lt.yml b/config/locales/diaspora/lt.yml index adb9cc266..b0e02c6f1 100644 --- a/config/locales/diaspora/lt.yml +++ b/config/locales/diaspora/lt.yml @@ -60,6 +60,7 @@ lt: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/mk.yml b/config/locales/diaspora/mk.yml index 716cc31ec..fcc87c6d0 100644 --- a/config/locales/diaspora/mk.yml +++ b/config/locales/diaspora/mk.yml @@ -60,6 +60,7 @@ mk: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/nb.yml b/config/locales/diaspora/nb.yml index 440026cb7..180ae3dbc 100644 --- a/config/locales/diaspora/nb.yml +++ b/config/locales/diaspora/nb.yml @@ -60,6 +60,7 @@ nb: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/nl.yml b/config/locales/diaspora/nl.yml index 7c0c75b1b..7d6acd69e 100644 --- a/config/locales/diaspora/nl.yml +++ b/config/locales/diaspora/nl.yml @@ -5,10 +5,10 @@ nl: _aspect: "Aspect" - _aspects: "Aspects" + _aspects: "Aspecten" _comments: "Reacties" _contact: "Contact" - _contacts: "Contacts" + _contacts: "Contacten" _home: "Home" _photos: "foto's" _services: "Services" @@ -57,17 +57,18 @@ nl: destroy: success: "%{name} is met succes verwijderd." edit: - add_existing: "Add an existing contact" - confirm_remove_aspect: "Are you sure you want to delete this aspect?" - remove_aspect: "Delete this aspect" - rename_aspect: "Rename aspect" + add_existing: "Voeg een bestaand contact toe" + confirm_remove_aspect: "Weet je zeker dat je dit aspect wilt verwijderen?" + remove_aspect: "Verwijder dit aspect" + rename: "hernoem" + rename_aspect: "Hernoem aspect" helper: are_you_sure: "Weet je zeker dat je dit aspect wilt verwijderen?" aspect_not_empty: "Aspect niet leeg" remove: "verwijderen" index: handle_explanation: "Dit is jouw Diaspora handle. Deze kun je aan mensen geven zodat ze je kunnen bereiken, net als een e-mailadres." - no_contacts: "No contacts" + no_contacts: "Geen contacten" manage: add_a_new_aspect: "Voeg een nieuw aspect toe" add_a_new_contact: "Voeg contact toe" diff --git a/config/locales/diaspora/pl.yml b/config/locales/diaspora/pl.yml index 858de548e..cc82a31bb 100644 --- a/config/locales/diaspora/pl.yml +++ b/config/locales/diaspora/pl.yml @@ -60,6 +60,7 @@ pl: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/pt-BR.yml b/config/locales/diaspora/pt-BR.yml index 80ffe2e85..6b46e3a46 100644 --- a/config/locales/diaspora/pt-BR.yml +++ b/config/locales/diaspora/pt-BR.yml @@ -60,6 +60,7 @@ pt-BR: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/pt-PT.yml b/config/locales/diaspora/pt-PT.yml index 32fa14f29..ca0166268 100644 --- a/config/locales/diaspora/pt-PT.yml +++ b/config/locales/diaspora/pt-PT.yml @@ -60,6 +60,7 @@ pt-PT: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/ro.yml b/config/locales/diaspora/ro.yml index dce5eb4e3..20232e0c9 100644 --- a/config/locales/diaspora/ro.yml +++ b/config/locales/diaspora/ro.yml @@ -60,6 +60,7 @@ ro: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/ru.yml b/config/locales/diaspora/ru.yml index ee3538e6a..b01bd99f1 100644 --- a/config/locales/diaspora/ru.yml +++ b/config/locales/diaspora/ru.yml @@ -60,6 +60,7 @@ ru: add_existing: "Добавить существующий контакт" confirm_remove_aspect: "Вы уверены, что хотите удалить этот аспект?" remove_aspect: "Удалить этот аспект" + rename: "rename" rename_aspect: "Переименовать аспект" helper: are_you_sure: "Вы уверены в том, что хотите удалить этот аспект?" diff --git a/config/locales/diaspora/sk.yml b/config/locales/diaspora/sk.yml index 17bbf322b..afe731f78 100644 --- a/config/locales/diaspora/sk.yml +++ b/config/locales/diaspora/sk.yml @@ -60,6 +60,7 @@ sk: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?" diff --git a/config/locales/diaspora/sl.yml b/config/locales/diaspora/sl.yml index 3f3c0a1d1..e072e9084 100644 --- a/config/locales/diaspora/sl.yml +++ b/config/locales/diaspora/sl.yml @@ -60,6 +60,7 @@ sl: add_existing: "Dodaj obstoječ kontakt" confirm_remove_aspect: "Ste prepričani, da bi radi izbrisali ta vidik?" remove_aspect: "Izbriši ta vidik" + rename: "rename" rename_aspect: "Preimenuj vidik" helper: are_you_sure: "Ste prepričani, da želite izbrisati skupino?" diff --git a/config/locales/diaspora/sv.yml b/config/locales/diaspora/sv.yml index 6a89ceea5..a1277414e 100644 --- a/config/locales/diaspora/sv.yml +++ b/config/locales/diaspora/sv.yml @@ -60,6 +60,7 @@ sv: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Är du säker på att du vill tabort den här sidan?" diff --git a/config/locales/diaspora/tr.yml b/config/locales/diaspora/tr.yml index ab9914cc5..94ebfacf7 100644 --- a/config/locales/diaspora/tr.yml +++ b/config/locales/diaspora/tr.yml @@ -60,6 +60,7 @@ tr: add_existing: "Add an existing contact" confirm_remove_aspect: "Are you sure you want to delete this aspect?" remove_aspect: "Delete this aspect" + rename: "rename" rename_aspect: "Rename aspect" helper: are_you_sure: "Are you sure you want to delete this aspect?"