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/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/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/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?" diff --git a/public/javascripts/aspect-edit.js b/public/javascripts/aspect-edit.js index cdd390979..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) { - AspectEdit.alertUser("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')) { @@ -113,11 +113,12 @@ 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) { + + $this.keyup(function() { if (e.which == 13) { e.preventDefault(); $this.blur(); @@ -133,10 +134,9 @@ 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()); }); }, @@ -162,10 +162,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/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 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 = '