# HG changeset patch # User ymh # Date 1378876823 -7200 # Node ID 09a086a49b71604d35e562184fceef440193f343 # Parent 8433e12362e0c4e3ed3164cf3113b44359b7da77 use strict mode for p4l.js add title + addedtitle + lang for isbn and issn diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/en/LC_MESSAGES/django.mo Binary file src/p4l/locale/en/LC_MESSAGES/django.mo has changed diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/en/LC_MESSAGES/django.po --- a/src/p4l/locale/en/LC_MESSAGES/django.po Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/locale/en/LC_MESSAGES/django.po Wed Sep 11 07:20:23 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-10 10:40-0500\n" +"POT-Creation-Date: 2013-09-11 00:12-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -294,46 +294,43 @@ #: templates/p4l/translations.html:5 msgid "Update" -msgstr "" +msgstr "Update" #: templates/p4l/translations.html:6 msgid "Add a new subject" msgstr "Add a new subject" #: templates/p4l/translations.html:7 -#, fuzzy msgid "Add a new theme" -msgstr "Add a new subject" +msgstr "Add a new theme" #: templates/p4l/translations.html:8 -#, fuzzy msgid "Add a new country" -msgstr "Add a new subject" +msgstr "Add a new country" #: templates/p4l/translations.html:9 -#, fuzzy msgid "Add a new language" -msgstr "Add a new subject" +msgstr "Add a new language" #: templates/p4l/translations.html:10 -#, fuzzy msgid "Add a new project" -msgstr "Add a new subject" +msgstr "Add a new project" #: templates/p4l/translations.html:11 -#, fuzzy msgid "Add a new organization" -msgstr "Add a new subject" +msgstr "Add a new organization" #: templates/p4l/translations.html:12 -#, fuzzy msgid "Modify the language" -msgstr "other languages" +msgstr "Modify the language" #: templates/p4l/translations.html:13 -#, fuzzy msgid "Modify the record type" -msgstr "record type" +msgstr "Modify the record type" + +#: templates/p4l/translations.html:14 +msgid "title" +msgstr "title" #: templates/registration/login.html:8 msgid "Sorry, that's not a valid username or password." diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/es/LC_MESSAGES/django.mo Binary file src/p4l/locale/es/LC_MESSAGES/django.mo has changed diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/es/LC_MESSAGES/django.po --- a/src/p4l/locale/es/LC_MESSAGES/django.po Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/locale/es/LC_MESSAGES/django.po Wed Sep 11 07:20:23 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-10 10:40-0500\n" +"POT-Creation-Date: 2013-09-11 00:12-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -295,46 +295,43 @@ #: templates/p4l/translations.html:5 msgid "Update" -msgstr "" +msgstr "Update" #: templates/p4l/translations.html:6 msgid "Add a new subject" msgstr "Add a new subject" #: templates/p4l/translations.html:7 -#, fuzzy msgid "Add a new theme" -msgstr "Add a new subject" +msgstr "Add a new theme" #: templates/p4l/translations.html:8 -#, fuzzy msgid "Add a new country" -msgstr "Add a new subject" +msgstr "Add a new country" #: templates/p4l/translations.html:9 -#, fuzzy msgid "Add a new language" -msgstr "Add a new subject" +msgstr "Add a new language" #: templates/p4l/translations.html:10 -#, fuzzy msgid "Add a new project" -msgstr "Add a new subject" +msgstr "Add a new project" #: templates/p4l/translations.html:11 -#, fuzzy msgid "Add a new organization" -msgstr "Add a new subject" +msgstr "Add a new organization" #: templates/p4l/translations.html:12 -#, fuzzy msgid "Modify the language" -msgstr "other languages" +msgstr "Modify the language" #: templates/p4l/translations.html:13 -#, fuzzy msgid "Modify the record type" -msgstr "record type" +msgstr "Modify the record type" + +#: templates/p4l/translations.html:14 +msgid "title" +msgstr "title" #: templates/registration/login.html:8 msgid "Sorry, that's not a valid username or password." diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/fr/LC_MESSAGES/django.mo Binary file src/p4l/locale/fr/LC_MESSAGES/django.mo has changed diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/locale/fr/LC_MESSAGES/django.po --- a/src/p4l/locale/fr/LC_MESSAGES/django.po Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/locale/fr/LC_MESSAGES/django.po Wed Sep 11 07:20:23 2013 +0200 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-09-10 10:40-0500\n" +"POT-Creation-Date: 2013-09-11 00:12-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,9 +17,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: admin.py:10 -#: forms.py:36 -#: templates/p4l/p4l_record_view.html:51 +#: admin.py:10 forms.py:36 templates/p4l/p4l_record_view.html:51 msgid "language" msgstr "langue" @@ -39,22 +37,20 @@ msgid "Search" msgstr "Chercher" -#: semantictree/forms/widgets.py:43 -#: semantictree/forms/widgets.py:80 +#: semantictree/forms/widgets.py:43 semantictree/forms/widgets.py:80 msgid "" "\"data-url\", \"data-query\", \"data-root-query\", \"data-childs-query\" and " "\"data-child-count-query\" must be set in CharField configuration" -msgstr "\"data-url\", \"data-query\", \"data-root-query\", \"data-childs-query\" et " +msgstr "" +"\"data-url\", \"data-query\", \"data-root-query\", \"data-childs-query\" et " "\"data-child-count-query\" doivent être renseignés dans la configuration " "CharField" -#: semantictree/forms/widgets.py:44 -#: semantictree/forms/widgets.py:81 +#: semantictree/forms/widgets.py:44 semantictree/forms/widgets.py:81 msgid "Browse" msgstr "Parcourir" -#: semantictree/forms/widgets.py:49 -#: semantictree/forms/widgets.py:86 +#: semantictree/forms/widgets.py:49 semantictree/forms/widgets.py:86 msgid "or" msgstr "ou" @@ -62,19 +58,16 @@ msgid "logout" msgstr "deconnection" -#: templates/p4l/p4l_base.html:37 -#: templates/registration/login.html:4 +#: templates/p4l/p4l_base.html:37 templates/registration/login.html:4 #: templates/registration/login.html:27 msgid "login" msgstr "connection" -#: templates/p4l/p4l_home.html:6 -#: templates/p4l/p4l_home.html.py:10 +#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:10 msgid "Record List" msgstr "Liste notice" -#: templates/p4l/p4l_home.html:6 -#: templates/p4l/p4l_home.html.py:29 +#: templates/p4l/p4l_home.html:6 templates/p4l/p4l_home.html.py:29 #: templates/p4l/p4l_home.html:66 msgid "Page" msgstr "Page" @@ -83,23 +76,19 @@ msgid "Title" msgstr "Titre" -#: templates/p4l/p4l_home.html:26 -#: templates/p4l/p4l_home.html.py:63 +#: templates/p4l/p4l_home.html:26 templates/p4l/p4l_home.html.py:63 msgid "Previous" msgstr "Préc." -#: templates/p4l/p4l_home.html:29 -#: templates/p4l/p4l_home.html.py:66 +#: templates/p4l/p4l_home.html:29 templates/p4l/p4l_home.html.py:66 msgid "on" msgstr "sur" -#: templates/p4l/p4l_home.html:32 -#: templates/p4l/p4l_home.html.py:69 +#: templates/p4l/p4l_home.html:32 templates/p4l/p4l_home.html.py:69 msgid "Next" msgstr "Suiv." -#: templates/p4l/p4l_home.html:39 -#: templates/p4l/p4l_record_view.html:59 +#: templates/p4l/p4l_home.html:39 templates/p4l/p4l_record_view.html:59 msgid "titles" msgstr "titres" @@ -341,17 +330,18 @@ msgid "Modify the record type" msgstr "Modifier le type de notice" +#: templates/p4l/translations.html:14 +msgid "title" +msgstr "titre" + #: templates/registration/login.html:8 msgid "Sorry, that's not a valid username or password." msgstr "Désolé, utilisateur ou mot de passe invalide" -#: templates/registration/login.html:14 -#: templates/registration/login.html:16 +#: templates/registration/login.html:14 templates/registration/login.html:16 msgid "Username" msgstr "Utilisateur" -#: templates/registration/login.html:20 -#: templates/registration/login.html:22 +#: templates/registration/login.html:20 templates/registration/login.html:22 msgid "Password" msgstr "Mot de passe" - diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/js/p4l.js --- a/src/p4l/static/p4l/js/p4l.js Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/static/p4l/js/p4l.js Wed Sep 11 07:20:23 2013 +0200 @@ -1,4 +1,4 @@ -//"use strict"; +"use strict"; // initialize the app var app = angular.module("recordApp", ['ngResource', 'ngRoute', 'pascalprecht.translate']) @@ -130,7 +130,7 @@ }, link: function($scope, $element, $attrs) { // Get queries attributes from $scope listname and context query dict - attr_dict = context.query_dicts[$scope.listname]; + var attr_dict = context.query_dicts[$scope.listname]; for (var k in attr_dict){ if (attr_dict.hasOwnProperty(k)) { $scope[k] = attr_dict[k]; @@ -167,50 +167,50 @@ } }); -app.directive('simpleSemUri', function(RecordModel, context, $timeout){ - return { - restrict: 'E', - replace: true, - transclude: true, - scope: { - listname:"@", - val:"=", - placeholder:"@", - }, - templateUrl: function(tElement, tAttrs) { - return context.urls.base_static+'p4l/templates/simpleSemanticUriForm.html'; - }, - link: function($scope, $element, $attrs) { - // Get queries attributes from $scope listname and context query dict - attr_dict = context.query_dicts[$scope.listname]; - for (var k in attr_dict){ - if (attr_dict.hasOwnProperty(k)) { - $scope[k] = attr_dict[k]; - } - } - // initalize autocomplete and browse thesaurus events - // We have to timeout because init_browse needs the real ids and not {{ $id }} - // NB : scope.apply generates bug - $timeout(function(){ - init_autocomplete(); - init_browse(); - }, 0); - }, - controller: function($scope, $element, $attrs, $transclude, RecordModel){ - $scope.record = RecordModel.record; - $scope.uriLabels = RecordModel.uriLabels; - $scope.addUriText = ''; - - $scope.updateVal = function() { - $scope.val = $scope.addUriText; - }; - - $scope.updateUriLabelDict = function(k,v) { - $scope.uriLabels[k] = v; - }; - } - } - }); +app.directive('simpleSemUri', function(RecordModel, context, $timeout) { + return { + restrict: 'E', + replace: true, + transclude: true, + scope: { + listname:"@", + val:"=", + placeholder:"@", + }, + templateUrl: function(tElement, tAttrs) { + return context.urls.base_static+'p4l/templates/simpleSemanticUriForm.html'; + }, + link: function($scope, $element, $attrs) { + // Get queries attributes from $scope listname and context query dict + var attr_dict = context.query_dicts[$scope.listname]; + for (var k in attr_dict){ + if (attr_dict.hasOwnProperty(k)) { + $scope[k] = attr_dict[k]; + } + } + // initalize autocomplete and browse thesaurus events + // We have to timeout because init_browse needs the real ids and not {{ $id }} + // NB : scope.apply generates bug + $timeout(function(){ + init_autocomplete(); + init_browse(); + }, 0); + }, + controller: function($scope, $element, $attrs, $transclude, RecordModel) { + $scope.record = RecordModel.record; + $scope.uriLabels = RecordModel.uriLabels; + $scope.addUriText = ''; + + $scope.updateVal = function() { + $scope.val = $scope.addUriText; + }; + + $scope.updateUriLabelDict = function(k,v) { + $scope.uriLabels[k] = v; + }; + } + }; +}); app.controller("RecordCtrl", function($scope, RecordModel, context){ diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/isbnDisp.html --- a/src/p4l/static/p4l/templates/isbnDisp.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/static/p4l/templates/isbnDisp.html Wed Sep 11 07:20:23 2013 +0200 @@ -1,1 +1,1 @@ -
{{'isbn'|translate}} : {{obj.isbn}}
\ No newline at end of file +
{{obj.isbn}} ({{ obj.lang }})
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/isbnForm.html --- a/src/p4l/static/p4l/templates/isbnForm.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/static/p4l/templates/isbnForm.html Wed Sep 11 07:20:23 2013 +0200 @@ -1,5 +1,6 @@
+
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/issnDisp.html --- a/src/p4l/static/p4l/templates/issnDisp.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/static/p4l/templates/issnDisp.html Wed Sep 11 07:20:23 2013 +0200 @@ -1,1 +1,1 @@ -
{{'issn'|translate}} : {{obj.issn}}
\ No newline at end of file +
{{obj.issn}} ({{ obj.lang }})
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/issnForm.html --- a/src/p4l/static/p4l/templates/issnForm.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/static/p4l/templates/issnForm.html Wed Sep 11 07:20:23 2013 +0200 @@ -1,5 +1,6 @@
+
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/titleDisp.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/static/p4l/templates/titleDisp.html Wed Sep 11 07:20:23 2013 +0200 @@ -0,0 +1,1 @@ +
{{'title'|translate}} : {{obj.title}} ({{ obj.lang }})
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/static/p4l/templates/titleForm.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/p4l/static/p4l/templates/titleForm.html Wed Sep 11 07:20:23 2013 +0200 @@ -0,0 +1,6 @@ +
+
+ + +
+
\ No newline at end of file diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/templates/p4l/record_update_form.html --- a/src/p4l/templates/p4l/record_update_form.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/templates/p4l/record_update_form.html Wed Sep 11 07:20:23 2013 +0200 @@ -86,7 +86,6 @@ {{ 'language' | translate }} - {{ 'other languages' | translate }} @@ -94,18 +93,15 @@ {{ 'titles' | translate }} - #todo - + {{ 'abstracts' | translate }} - #todo - + #todo {{ 'added titles' | translate }} - #todo - + {{ 'titles main document' | translate }} diff -r 8433e12362e0 -r 09a086a49b71 src/p4l/templates/p4l/translations.html --- a/src/p4l/templates/p4l/translations.html Tue Sep 10 17:51:25 2013 +0200 +++ b/src/p4l/templates/p4l/translations.html Wed Sep 11 07:20:23 2013 +0200 @@ -10,4 +10,5 @@ {% trans 'Add a new project' %} {% trans 'Add a new organization' %} {% trans 'Modify the language' %} -{% trans 'Modify the record type' %} \ No newline at end of file +{% trans 'Modify the record type' %} +{% trans 'title' %} \ No newline at end of file