From 16eeed22c245fe2afa66c4af34d28f3f84b2047d Mon Sep 17 00:00:00 2001 From: Stefano Date: Sun, 10 Nov 2013 21:51:17 +0100 Subject: [PATCH 1/5] Italian translation --- knowledge/locale/it_IT/django.mo | Bin 0 -> 5390 bytes knowledge/locale/it_IT/django.po | 313 +++++++++++++++++++++++++++++++ 2 files changed, 313 insertions(+) create mode 100644 knowledge/locale/it_IT/django.mo create mode 100644 knowledge/locale/it_IT/django.po diff --git a/knowledge/locale/it_IT/django.mo b/knowledge/locale/it_IT/django.mo new file mode 100644 index 0000000000000000000000000000000000000000..614a6b904329ace0cc056fefa436e0d4cf2af104 GIT binary patch literal 5390 zcmchaU5H#)9l%d)Z0%O9rj6ep$C$WTvoqOE6Prvv$Yzt&g?y}=wXxvW**j-uPILF3 z$vOAVcK1O3c*yw2cPSc20;YLgZNSlqW=DO?##|6Myobn za`!j)-1G7OzW@AY%jRbkSA+XK+&4BUbr!yG7k{|^vRSF`!dKw)@LR7}>I?8QcPsT} z_&dmu%I{I?&2SBFgI|JU@HzMfcm*DVSK)o|E(T@Y{ZP)`3f~X+Kv};4?}r6siFy+9 zPd&w-H^NI0k<_!*_+_|*=O4hG@Fn zs23ss)UT@Nm#XLM@BzmE2oJ%(K@AV0w5HJY`dxtUfM0~~gWrH}hgYlTU&Et3 zzYISM_hTeE|0_`J@J%TC{t$}(SKzzhi%`zH4rTryD*g$IeP4mH?(c9F-)?5HIQ(;O zQtI3AL7a9GJ`X<+Cpk>^`yPA?{1KdlKZmHO{#@~|@KZeB%_O!~O(^Ge;da=A8h#b- zhA+Se;SDJJY{EHWpZlQ1%>z*6+y>?RaVYERa0-4Jiv6C3;WlN1@GOW)Cb@` zcm$q@vi~J0cKKTM{GE#5ug0%byb9mOykEjucpbhMZpX4EU%6Y$la^CNuoOc7tx|gBYchlDX`+Fen zR1a~Bo^nZC$tCuZxqGV zX_8owxRDsaRb|dU4CRu%kV}_;`}UR?m1{4z_)CrH>N;=r<3-H%ipg@@)VbHG&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kh@s*b^I zWzk>@EHWq=<7I*Hey>Ap, YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-09-07 09:14+0900\n" +"PO-Revision-Date: 2013-11-10 21:49+0100\n" +"Last-Translator: Linda \n" +"Language-Team: ITALIANO \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Poedit 1.5.7\n" + +#: forms.py:46 models.py:12 +msgid "Internal" +msgstr "Interno" + +#: models.py:10 +msgid "Public" +msgstr "Pubblico" + +#: models.py:11 +msgid "Private" +msgstr "Privato" + +#: models.py:17 +msgid "Inherit" +msgstr "Ereditato" + +#: models.py:33 +msgid "Category" +msgstr "Categoria" + +#: models.py:34 templates/django_knowledge/sidebar.html:18 +msgid "Categories" +msgstr "Categorie" + +#: models.py:49 +msgid "Alert" +msgstr "Avviso" + +#: models.py:50 +msgid "Check this if you want to be alerted when a new response is added." +msgstr "" +"Spunta questa casella se desideri essere avvisato quando una nuova risposta " +"sarà disponibile" + +#: models.py:55 +msgid "Name" +msgstr "Nome" + +#: models.py:56 +msgid "Enter your first and last name." +msgstr "Inserisci il tuo nome e cognome." + +#: models.py:58 +msgid "Email" +msgstr "Email" + +#: models.py:59 +msgid "Enter a valid email address." +msgstr "inserisci un indirizzo email valido." + +#: models.py:146 models.py:165 +msgid "Question" +msgstr "Domanda" + +#: models.py:147 +msgid "Enter your question or suggestion." +msgstr "Inserisci la tua domanda o il tuo suggerimento." + +#: models.py:149 +msgid "Description" +msgstr "Descrizione" + +#: models.py:150 +msgid "Please offer details. Markdown enabled." +msgstr "Per favore aggiungi dettagli. Puoi usare la sintassi Markdown." + +#: models.py:153 models.py:256 +msgid "Status" +msgstr "Status" + +#: models.py:166 +msgid "Questions" +msgstr "Domande" + +#: models.py:253 models.py:265 +msgid "Response" +msgstr "Risposta" + +#: models.py:254 +msgid "Please enter your response. Markdown enabled." +msgstr "Per favore inserisci la tua risposta. Puoi usare la sintassi Markdown." + +#: models.py:266 +msgid "Responses" +msgstr "Risposte" + +#: templates/django_knowledge/ask.html:5 templates/django_knowledge/ask.html:9 +#: templates/django_knowledge/list.html:42 +msgid "Ask a Question" +msgstr "Poni una domanda" + +#: templates/django_knowledge/ask.html:15 +msgid "Please log in to ask a question." +msgstr "Per favore accedi per porre la tua domanda." + +#: templates/django_knowledge/form.html:9 +msgid "required" +msgstr "richiesto" + +#: templates/django_knowledge/index.html:5 +msgid "Support" +msgstr "Assistenza" + +#: templates/django_knowledge/index.html:10 +#, python-format +msgid "Top %(count)s Questions" +msgstr "Le %(count)s domande più lette." + +#: templates/django_knowledge/inner.html:13 +msgid "Start typing your question here." +msgstr "Inserisci qui la tua domanda." + +#: templates/django_knowledge/list.html:20 +msgid "No results found." +msgstr "Nessun risultato trovato." + +#: templates/django_knowledge/list.html:28 +msgid "previous" +msgstr "precedente" + +#: templates/django_knowledge/list.html:31 +#, python-format +msgid "page %(number)s of %(page)s" +msgstr "pagina %(number)s di %(page)s" + +#: templates/django_knowledge/list.html:34 +msgid "next" +msgstr "prossima" + +#: templates/django_knowledge/question_list.html:5 +msgid "no responses" +msgstr "Non sono presenti risposte" + +#: templates/django_knowledge/question_list.html:5 +msgid "accepted" +msgstr "accettata" + +#: templates/django_knowledge/question_list.html:5 +#: templates/django_knowledge/thread.html:19 +#: templates/django_knowledge/thread.html:44 +msgid "staff" +msgstr "staff" + +#: templates/django_knowledge/sidebar.html:5 +msgid "My Questions" +msgstr "Le mie domande" + +#: templates/django_knowledge/sidebar.html:29 +msgid "Navigate" +msgstr "Naviga" + +#: templates/django_knowledge/sidebar.html:33 +msgid "Ask a question or give suggestion." +msgstr "Poni una domanda o fornisci un suggerimento." + +#: templates/django_knowledge/sidebar.html:34 +msgid "Return to homepage." +msgstr "Ritorna all'home page." + +#: templates/django_knowledge/thread.html:20 +#: templates/django_knowledge/thread.html:45 +msgid "user" +msgstr "utente" + +#: templates/django_knowledge/thread.html:41 +msgid "accepted answer" +msgstr "risposta accettata." + +#: templates/django_knowledge/thread.html:42 +msgid "poster" +msgstr "autore" + +#: templates/django_knowledge/thread.html:56 +msgid "No responses yet." +msgstr "Ancora nessuna risposta." + +#: templates/django_knowledge/thread.html:69 +msgid "This question has been closed." +msgstr "Questa domanda è stata chiusa." + +#: templates/django_knowledge/thread.html:71 +msgid "Please log in to respond." +msgstr "Per favore accedi per rispondere." + +#: templates/django_knowledge/welcome.html:4 +msgid "Welcome to our Support Center." +msgstr "Benvenuti nel nostro centro assistenza." + +#: templates/django_knowledge/welcome.html:5 +msgid "Search for answers to your questions below, or ask your own." +msgstr "Cerca risposte alle tue domande qui sotto, o poni le tue richieste." + +#: templates/django_knowledge/emails/message.html:6 +#: templates/django_knowledge/emails/message.txt:4 +#, python-format +msgid "Hello %(name)s," +msgstr "Benvenuto %(name)s, " + +#: templates/django_knowledge/emails/message.html:9 +#, python-format +msgid "" +"\n" +" We just wanted to let you know that a new response has been added to " +"the question \"%(title)s\". You can visit it here: %(domain)s%(url)s.\n" +" " +msgstr "" +"\n" +"volevamo informati che una nuova risposta è stata aggiunta alla domanda " +"\"%(title)s\". Puoi leggerla qui: %(domain)s" +"%(url)s.\n" +" " + +#: templates/django_knowledge/emails/message.html:17 +#: templates/django_knowledge/emails/message.txt:13 +msgid "" +"You are receiving these messages because you checked the 'alert' box when " +"you originally posted." +msgstr "" +"Ricevi questo messaggio in quanto hai spuntato la casella 'avviso' quando " +"hai originariamente posto la domanda." + +#: templates/django_knowledge/emails/message.html:21 +#, python-format +msgid "" +"\n" +" We just wanted to let you know that a new question has been added: " +"\"%(title)s\". You can visit it here: " +"%(domain)s%(url)s\n" +" " +msgstr "" +"\n" +"Volevamo informarti che una nuova domanda è stata posta: \"%(title)s\". Puoi " +"leggerla qui: %(domain)s%(url)s\n" +" " + +#: templates/django_knowledge/emails/message.html:29 +#: templates/django_knowledge/emails/message.txt:23 +msgid "You are receiving these messages because you are a staff member." +msgstr "Ricevi questo messaggio in quanto membro dello staff." + +#: templates/django_knowledge/emails/message.html:32 +#, python-format +msgid "" +"Thank you,\n" +" %(name)s team" +msgstr "" +"Grazie.\n" +"%(name)s" + +#: templates/django_knowledge/emails/message.txt:7 +#, python-format +msgid "" +"\n" +" We just wanted to let you know that a new response has been added to the " +"question \"%(title)s\". You can visit it here: %(domain)s%(url)s\n" +" " +msgstr "" +"\n" +"Volevamo informati che una nuova risposta è stata aggiunta alla domanda " +"\"%(title)s\". Puoi leggerla qui: %(domain)s%(url)s\n" +" " + +#: templates/django_knowledge/emails/message.txt:17 +#, python-format +msgid "" +"\n" +" We just wanted to let you know that a new question has been added: " +"\"%(title)s\". You can visit it here: %(domain)s%(url)s\n" +" " +msgstr "" +"\n" +"Volevamo informarti che una nuova domanda è stata posta: \"%(title)s\". Puoi " +"leggerla qui: %(domain)s%(url)s\n" +" " + +#: templates/django_knowledge/emails/message.txt:26 +#, python-format +msgid "" +"Thank you,\n" +"%(name)s team" +msgstr "" +"Grazie,\n" +"%(name)s" + +#: templates/django_knowledge/emails/subject.txt:1 +#, python-format +msgid "New response on \"%(title)s\" on %(name)s." +msgstr "Nuova risposta di %(name)s riguardo \"%(title)s\"." + +#: templates/django_knowledge/emails/subject.txt:1 +#, python-format +msgid "New question \"%(title)s\" on %(name)s." +msgstr "Nuova domanda di %(name)s riguardo \"%(title)s\"." From 6a099b275ebcc08d4b5b4a85f29ea891ed02001f Mon Sep 17 00:00:00 2001 From: Stefano Date: Sun, 10 Nov 2013 23:55:27 +0100 Subject: [PATCH 2/5] Making Search button translatable --- knowledge/templates/django_knowledge/inner.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge/templates/django_knowledge/inner.html b/knowledge/templates/django_knowledge/inner.html index e3bc724..920344c 100644 --- a/knowledge/templates/django_knowledge/inner.html +++ b/knowledge/templates/django_knowledge/inner.html @@ -11,7 +11,7 @@ From 4698c7ad7ba90d1d912b988e1b8e96bfc5b2700d Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 11 Nov 2013 00:07:28 +0100 Subject: [PATCH 3/5] Added support for django 1.5 in signals --- knowledge/signals.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/knowledge/signals.py b/knowledge/signals.py index 2e00a35..2df7de6 100644 --- a/knowledge/signals.py +++ b/knowledge/signals.py @@ -1,6 +1,6 @@ from knowledge.utils import get_module from knowledge import settings - +from django.contrib.auth import get_user_model def send_alerts(target_dict, response=None, question=None, **kwargs): """ @@ -48,7 +48,6 @@ def knowledge_post_save(sender, instance, created, **kwargs): and shuttles them to the predefined module. """ from knowledge.models import Question, Response - from django.contrib.auth.models import User func = get_module(settings.ALERTS_FUNCTION_PATH) @@ -64,7 +63,7 @@ def knowledge_post_save(sender, instance, created, **kwargs): for i in instances if i.alert]) elif isinstance(instance, Question): - staffers = User.objects.filter(is_staff=True) + staffers = get_user_model().objects.filter(is_staff=True) out_dict = dict([[user.email, user] for user in staffers if user.has_perm('change_question')]) From eec31cef8420dc5997d750b81ce5798d0a1ab5dc Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 11 Nov 2013 00:25:54 +0100 Subject: [PATCH 4/5] supports users defined by email only (no username) --- knowledge/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/knowledge/models.py b/knowledge/models.py index 1e58676..8552109 100644 --- a/knowledge/models.py +++ b/knowledge/models.py @@ -85,7 +85,7 @@ def get_name(self): """ name = (self.name or (self.user and ( u'{0} {1}'.format(self.user.first_name, self.user.last_name).strip()\ - or self.user.username + or self.user.username or self.user.email.split('@')[0] ))) return name.strip() or _("Anonymous") From 8dffaaf78b6e72ac67a290a01d666f418d93b34a Mon Sep 17 00:00:00 2001 From: Stefano Date: Mon, 11 Nov 2013 00:30:25 +0100 Subject: [PATCH 5/5] bugfix --- knowledge/models.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/knowledge/models.py b/knowledge/models.py index 8552109..63f837c 100644 --- a/knowledge/models.py +++ b/knowledge/models.py @@ -83,10 +83,13 @@ def get_name(self): Get local name, then self.user's first/last, and finally their username if all else fails. """ - name = (self.name or (self.user and ( - u'{0} {1}'.format(self.user.first_name, self.user.last_name).strip()\ - or self.user.username or self.user.email.split('@')[0] - ))) + try: + name = (self.name or (self.user and ( + u'{0} {1}'.format(self.user.first_name, self.user.last_name).strip()\ + or self.user.username + ))) + except: + name = self.user.email.split('@')[0] return name.strip() or _("Anonymous") get_email = lambda s: s.email or (s.user and s.user.email)