# HG changeset patch # User gibus # Date 1344607949 -7200 # Node ID 2fdb7d095d5c6eb668c8cbabcf64a90ae8afb7c9 # Parent a69421197502ac53abb6d94ced05c1450ac07d64 Added import from XML file, including text, comments and attachments. diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/bg/LC_MESSAGES/django.mo Binary file src/cm/locale/bg/LC_MESSAGES/django.mo has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/bg/LC_MESSAGES/django.po --- a/src/cm/locale/bg/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/bg/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -152,6 +152,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "Текстът %(link_to_text)s е добавен" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "Текст %(link_to_text)s внесени от %(creator)s" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -439,6 +443,20 @@ msgstr "" #: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "Импортиране cо-ментира текст" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "Импортиране на текст, с възможност за коментари и прикачени файлове, който е бил преди, изнесени във формат XML от co-ment" + +#: templates/site/dashboard.html:50 msgid "Invite user" msgstr "Покани потребител" @@ -1651,6 +1669,26 @@ msgid "You should specify a file to upload." msgstr "Необходимо е да изберете файл за качване." +#: views/create.py:49 +msgid "Upload XML file" +msgstr "Качване на XML файл" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "Качи изнесеното преди XML файл от вашия компютър" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "Внесеното файла трябва да бъде един XML файл, генериран от co-ment, при износ на текст и коментари." + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "Не co_ment_text_node възел в XML." + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "Не %(tag)s възел в XML." + #: views/create.py:46 msgid "The title of your text" msgstr "Заглавие на вашия текст" @@ -1660,6 +1698,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "Текстът \"%(text_title)s\" е създаден" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "Текстът \"%(text_title)s\" е внесено" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/en/LC_MESSAGES/django.po --- a/src/cm/locale/en/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/en/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -150,6 +150,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -432,6 +436,20 @@ msgstr "" #: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "" + +#: templates/site/dashboard.html:50 msgid "Invite user" msgstr "" @@ -1594,6 +1612,26 @@ msgid "You should specify a file to upload." msgstr "" +#: views/create.py:49 +msgid "Upload XML file" +msgstr "" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "" + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "" + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "" + #: views/create.py:46 msgid "The title of your text" msgstr "" @@ -1603,6 +1641,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/es/LC_MESSAGES/django.mo Binary file src/cm/locale/es/LC_MESSAGES/django.mo has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/es/LC_MESSAGES/django.po --- a/src/cm/locale/es/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/es/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -151,6 +151,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "Texto %(link_to_text)s añadido por %(creator)s" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "El texto de %(link_to_text)s importado por %(creator)s" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -438,6 +442,20 @@ "format, Word doc.)" #: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "Importar un texto co-mentado" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "Importar un texto, posiblemente con comentarios y archivos adjuntos, lo que ha sido previamente exportadas en formato XML a partir de interfaz de co-ment" + +#: templates/site/dashboard.html:50 msgid "Invite user" msgstr "Invitar a un usuario" @@ -1737,6 +1755,26 @@ msgid "You should specify a file to upload." msgstr "Debería especificar un archivo que subir." +#: views/create.py:49 +msgid "Upload XML file" +msgstr "Subir archivo XML" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "Subir un archivo XML exportado previamente desde el ordenador" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "El archivo importado debe ser un archivo XML generado por la co-ment cuando se exporta un texto y comentarios." + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "Ningún nodo co_ment_text se encuentra en XML." + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "Ningún nodo %(tag)s se encuentra en XML." + #: views/create.py:46 msgid "The title of your text" msgstr "El título de su texto" @@ -1746,6 +1784,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "El texto \"%(text_title)s\" ha sido creado" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "El texto \"%(text_title)s\" ha sido importado" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/fr/LC_MESSAGES/django.mo Binary file src/cm/locale/fr/LC_MESSAGES/django.mo has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/fr/LC_MESSAGES/django.po --- a/src/cm/locale/fr/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/fr/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -157,6 +157,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "Le texte %(link_to_text)s a été ajouté par %(creator)s" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "Le texte %(link_to_text)s a été importé par %(creator)s" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -445,6 +449,20 @@ "Open Format, document Word)" #: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "Importer un texte co-menté" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "Importer un texte, éventuellement avec des commentaires et des pièces jointes, ce qui a été préalablement exportés au format XML à partir de l'interface de co-ment" + +#: templates/site/dashboard.html:50 msgid "Invite user" msgstr "Inviter un utilisateur" @@ -1746,6 +1764,26 @@ msgid "You should specify a file to upload." msgstr "Vous devez fournir un fichier à charger sur le site." +#: views/create.py:49 +msgid "Upload XML file" +msgstr "Importer un fichier XML" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "Télécharger un fichier précédemment exporté XML à partir de votre ordinateur" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "Le fichier importé doit être un fichier XML généré par co-ment lors de l'exportation d'un texte et des commentaires." + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "Impossible de trouver un noeud co_ment_text dans le XML." + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "Impossible de trouver un noeud %(tag)s dans le XML." + #: views/create.py:46 msgid "The title of your text" msgstr "Le titre de votre texte" @@ -1755,6 +1793,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "Le texte \"%(text_title)s\" a été créé" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "Le texte \"%(text_title)s\" a été importé" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/no/LC_MESSAGES/django.mo Binary file src/cm/locale/no/LC_MESSAGES/django.mo has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/no/LC_MESSAGES/django.po --- a/src/cm/locale/no/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/no/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -153,6 +153,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "Tekst %(link_to_text)s lagt til av %(creator)s" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "Tekst %(link_to_text)s importert av %(creator)s" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -440,6 +444,20 @@ "Microsoft Word)" #: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "Importere en co-mentert tekst" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "Importere en tekst, eventuelt med kommentarer og vedlegg, som tidligere har vært eksportert i XML-format fra co-ment grensesnitt" + +#: templates/site/dashboard.html:50 msgid "Invite user" msgstr "Inviter bruker" @@ -1626,6 +1644,26 @@ msgid "You should specify a file to upload." msgstr "Du må angi en fil til å laste opp" +#: views/create.py:49 +msgid "Upload XML file" +msgstr "Last opp XML-fil" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "Last opp en tidligere eksportert XML-fil fra din datamaskin" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "Den importerte filen bør være en XML-fil generert av co-ment når du eksporterer en tekst og kommentarer." + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "Ingen co_ment_text node funnet i XML." + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "Ingen %(tag)s node funnet i XML." + #: views/create.py:46 msgid "The title of your text" msgstr "Overskriften for din tekst" @@ -1635,6 +1673,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "Teksten %(text_title)s har blitt opprettet" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "Teksten %(text_title)s har blitt importert" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/pt_BR/LC_MESSAGES/django.mo Binary file src/cm/locale/pt_BR/LC_MESSAGES/django.mo has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/locale/pt_BR/LC_MESSAGES/django.po --- a/src/cm/locale/pt_BR/LC_MESSAGES/django.po Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/locale/pt_BR/LC_MESSAGES/django.po Fri Aug 10 16:12:29 2012 +0200 @@ -147,6 +147,10 @@ msgid "Text %(link_to_text)s added by %(creator)s" msgstr "Texto %(link_to_text)s adicionado" +#: models.py:763 +msgid "Text %(link_to_text)s imported by %(creator)s" +msgstr "Texto %(link_to_text)s importados por %(creator)s" + #: models.py:759 #, python-format msgid "Text %(link_to_text)s removed" @@ -424,6 +428,20 @@ msgid "Upload a text" msgstr "Carregar um texto" +#: templates/site/dashboard.html:50 +#: templates/site/text_create_import.html:4 +#: templates/site/text_create_import.html:30 +#: templates/site/text_create_content.html:32 +#: templates/site/text_create_upload.html:30 +#: templates/site/text_list.html:44 +#: templates/site/layout/header.html:12 +msgid "Import a co-mented text" +msgstr "Importar um texto co-mentado" + +#: templates/site/dashboard.html:50 +msgid "Import a text, possibly with comments and attachments, which has been previously exported in XML format from co-ment interface" +msgstr "Importar um texto, possivelmente com comentários e anexos, que tenha sido previamente exportados em formato XML a partir da interface de co-ment" + #: templates/site/dashboard.html:49 msgid "" "Upload a document from your computer (Text document, Open Format document, " @@ -1641,6 +1659,26 @@ msgid "You should specify a file to upload." msgstr "Favor especificar o arquivo a ser carregado." +#: views/create.py:49 +msgid "Upload XML file" +msgstr "Carregar de arquivo XML" + +#: views/create.py:50 +msgid "Upload a previously exported XML file from your computer" +msgstr "Carregar um arquivo XML exportado anteriormente de seu computador" + +#: views/create.py:65 +msgid "The imported file should be an XML file generated by co-ment when exporting a text and comments." +msgstr "O arquivo importado deve ser um arquivo XML gerado pelo co-ment ao exportar um texto e comentários." + +#: views/create.py:71 +msgid "No co_ment_text node found in XML." +msgstr "Nenhum nó co_ment_text encontrada no XML." + +#: views/create.py:76 +msgid "No %(tag)s node found in XML." +msgstr "Nenhum nó %(tag)s encontrada no XML." + #: views/create.py:46 msgid "The title of your text" msgstr "O título do seu texto" @@ -1650,6 +1688,10 @@ msgid "Text \"%(text_title)s\" has been created" msgstr "O texto \"%(text_title)s\" foi criado" +#: views/create.py:244 +msgid "Text \"%(text_title)s\" has been imported" +msgstr "O texto \"%(text_title)s\" foi importado" + #: views/feeds.py:25 #, python-format msgid "%(workspace_name)s's public feed" diff -r a69421197502 -r 2fdb7d095d5c src/cm/media/img/sop_import.png Binary file src/cm/media/img/sop_import.png has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/media/img/sop_import_small.png Binary file src/cm/media/img/sop_import_small.png has changed diff -r a69421197502 -r 2fdb7d095d5c src/cm/models.py --- a/src/cm/models.py Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/models.py Fri Aug 10 16:12:29 2012 +0200 @@ -735,12 +735,13 @@ VIEWABLE_ACTIVITIES = { 'view_comments' : ['comment_created', 'comment_removed'], 'view_users' : ['user_created', 'user_activated', 'user_refused', 'user_enabled', 'user_approved', 'user_suspended'], - 'view_texts' : ['text_created', 'text_removed', 'text_edited', 'text_edited_new_version'], + 'view_texts' : ['text_created', 'text_imported', 'text_removed', 'text_edited', 'text_edited_new_version'], } ACTIVITIES_TYPES = reduce(list.__add__, VIEWABLE_ACTIVITIES.values()) IMGS = { 'text_created' : u'page_add_small.png', + 'text_imported' : u'sop_import_small.png', 'text_removed' : u'page_delete_small.png', 'text_edited' : u'page_save_small.png', 'text_edited_new_version' : u'page_save_small.png', @@ -759,6 +760,7 @@ 'text_edited' : ugettext_lazy(u'Text %(link_to_text)s edited by %(creator)s'), 'text_edited_new_version' : ugettext_lazy(u'Text %(link_to_text)s edited (new version created) by %(creator)s'), 'text_created' : ugettext_lazy(u'Text %(link_to_text)s added by %(creator)s'), + 'text_imported' : ugettext_lazy(u'Text %(link_to_text)s imported by %(creator)s'), 'text_removed' : ugettext_lazy(u'Text %(link_to_text)s removed'), 'comment_created' : ugettext_lazy(u'Comment %(link_to_comment)s added on text %(link_to_text)s by %(creator)s'), 'comment_removed' : ugettext_lazy(u'Comment %(link_to_comment)s removed from text %(link_to_text)s'), diff -r a69421197502 -r 2fdb7d095d5c src/cm/templates/site/dashboard.html --- a/src/cm/templates/site/dashboard.html Thu Aug 09 16:55:25 2012 +0200 +++ b/src/cm/templates/site/dashboard.html Fri Aug 10 16:12:29 2012 +0200 @@ -47,6 +47,7 @@