]> git.parisson.com Git - telemeta.git/commitdiff
fix JS locales except title ans description in home
authoryomguy <yomguy@parisson.com>
Thu, 28 Apr 2011 08:59:34 +0000 (10:59 +0200)
committeryomguy <yomguy@parisson.com>
Thu, 28 Apr 2011 08:59:34 +0000 (10:59 +0200)
12 files changed:
conf/examples/django/urls.py
telemeta/htdocs/js/locale.js
telemeta/htdocs/timeside/src/divmarker.js
telemeta/htdocs/timeside/src/player.js
telemeta/locale/fr/LC_MESSAGES/django.mo
telemeta/locale/fr/LC_MESSAGES/django.po
telemeta/locale/fr/LC_MESSAGES/djangojs.mo
telemeta/locale/fr/LC_MESSAGES/djangojs.po
telemeta/templates/telemeta_default/base.html
telemeta/templates/telemeta_default/collection_detail.html
telemeta/templates/telemeta_default/home.html
telemeta/templates/telemeta_default/mediaitem_detail.html

index 55f5df59cff412883d6aa8320d5bcfef64d31826..50f7e990a7eee8cbf86bcfd1eca6f315cb45423a 100644 (file)
@@ -5,6 +5,10 @@ from django.conf.urls.defaults import *
 from django.contrib import admin
 admin.autodiscover()
 
+js_info_dict = {
+    'packages': ('telemeta',),
+}
+
 urlpatterns = patterns('',
     # Example:
     # (r'^sandbox/', include('sandbox.foo.urls')),
@@ -15,7 +19,12 @@ urlpatterns = patterns('',
 
     # Uncomment the next line to enable the admin:
     (r'^djangoadmin/', include(admin.site.urls)),
+    
+    # Telemeta
     (r'^', include('telemeta.urls')),
+    
     # Languages
-    (r'^i18n/', include('django.conf.urls.i18n')),
+    (r'^i18n/', include('django.conf.urls.i18n')),    
+    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),
+
 )
index fdba86d0dd939092a52669a156b01509408b2605..8c1486a13219e4cd194b7492889ae1ef8d96b4a9 100644 (file)
@@ -1,15 +1,13 @@
-/* 
- * javascript file to handle translations between django and javascript
- */
-function gettrans(str){
-    var loc = localeStrings; //instantiate once for faster lookup
-    return str in loc ? loc[str] : str;
-}
 var localeStrings = {
     'title': gettext('title'),
     'description': gettext('description'),
     'delete the marker permanently?': gettext('delete the marker permanently?'),
-    'marker added to selected playlist': gettext('marker added to selected playlist'),
-    'item added to selected playlist': gettext('item added to selected playlist'),
-    'collection added to selected playlist': gettext('collection added to selected playlist')
+    'marker added to the selected playlist': gettext('marker added to the selected playlist'),
+    'item added to the selected playlist': gettext('item added to the selected playlist'),
+    'collection added to the selected playlist': gettext('collection added to the selected playlist')
 };
+
+function gettrans(str){
+    var loc = localeStrings; //instantiate once for faster lookup
+    return str in loc ? loc[str] : str;
+}
index 1751d17df50236429fc09e671718b4f126a8e71b..58a82bf46da0877838a3431656f4d82edae65ded 100644 (file)
@@ -249,7 +249,7 @@ var MarkerMapDiv = TimesideArray.extend({
         })
 
         e_addplaylistButton.unbind('click').bind('click',function(evtObj_){
-            playlistUtils.showPopupAddToPlaylist(evtObj_,'marker',""+marker.id,'marker added to selected playlist');
+            playlistUtils.showPopupAddToPlaylist(evtObj_,'marker',""+marker.id,gettrans('marker added to the selected playlist'));
             return false;
         });
 
index 06adc848a01b300f018f203b0814607d69994751..2b49a5a9cc16f77a51c21a590e78bc5cc1df0101 100644 (file)
@@ -5,7 +5,7 @@ var Player = TimesideClass.extend({
     init: function(container, sound, soundDurationInMsec) {
         this._super();
         var player = this;
-
+        
         if (!container){
             this.debug('ERROR: container is null in initializing the player')
         }
index 82b3ed75ecd37e25a0ca5aeaae78537b9f998ff8..5b6de1b90835ec05208a60d1ed09b048bec9d684 100644 (file)
Binary files a/telemeta/locale/fr/LC_MESSAGES/django.mo and b/telemeta/locale/fr/LC_MESSAGES/django.mo differ
index 83d9ec52f51b209b25357834c0e10e9481ccfd1b..78c42dfb28310ab6c5cc04d632a161e26a23f4d0 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-27 18:20+0200\n"
+"POT-Creation-Date: 2011-04-27 21:03+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Olivier Guilyardi <olivier samalyse com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -451,7 +451,7 @@ msgid "Expiration_date"
 msgstr "Date d'expiration"
 
 #: templates/telemeta/registration/logged_out.html:4
-#: templates/telemeta_default/base.html:73
+#: templates/telemeta_default/base.html:74
 #: templates/telemeta_default/registration/logged_out.html:4
 #: templates/telemeta_default/registration/password_change_done.html:4
 #: templates/telemeta_default/registration/password_change_form.html:5
@@ -543,59 +543,59 @@ msgstr "Nom"
 msgid "E-mail"
 msgstr "E-mail"
 
-#: templates/telemeta_default/base.html:45
+#: templates/telemeta_default/base.html:46
 msgid "Welcome"
 msgstr "Bienvenue"
 
-#: templates/telemeta_default/base.html:51
+#: templates/telemeta_default/base.html:52
 msgid "Account"
 msgstr "Compte"
 
-#: templates/telemeta_default/base.html:52
-#: templates/telemeta_default/base.html:56
+#: templates/telemeta_default/base.html:53
+#: templates/telemeta_default/base.html:57
 msgid "Help"
 msgstr "Aide"
 
-#: templates/telemeta_default/base.html:53
+#: templates/telemeta_default/base.html:54
 msgid "Sign out"
 msgstr "Déconnexion"
 
-#: templates/telemeta_default/base.html:57
+#: templates/telemeta_default/base.html:58
 #: templates/telemeta_default/login.html:21
 msgid "Sign in"
 msgstr "Connexion"
 
-#: templates/telemeta_default/base.html:65
+#: templates/telemeta_default/base.html:66
 #: templates/telemeta_default/search_criteria.html:132
 msgid "Search"
 msgstr "Recherche"
 
-#: templates/telemeta_default/base.html:74
+#: templates/telemeta_default/base.html:75
 msgid "Collections"
 msgstr "Collections"
 
-#: templates/telemeta_default/base.html:75
+#: templates/telemeta_default/base.html:76
 msgid "Items"
 msgstr "Items"
 
-#: templates/telemeta_default/base.html:76
+#: templates/telemeta_default/base.html:77
 #: templates/telemeta_default/index.html:13
 msgid "Geo Navigator"
 msgstr "Géo-Navigateur"
 
-#: templates/telemeta_default/base.html:77
+#: templates/telemeta_default/base.html:78
 msgid "Advanced search"
 msgstr "Recherche avancée"
 
-#: templates/telemeta_default/base.html:79
+#: templates/telemeta_default/base.html:80
 msgid "Admin"
 msgstr "Admin"
 
-#: templates/telemeta_default/base.html:101
+#: templates/telemeta_default/base.html:102
 msgid "Powered by"
 msgstr "Propulsé par"
 
-#: templates/telemeta_default/base.html:102
+#: templates/telemeta_default/base.html:103
 msgid "By"
 msgstr "Par"
 
index c567c409859cc71daa1a767a65d93ffc0aa1a629..e00a38e78a5e83d54bf6488dc8d4d1d5e729eb57 100644 (file)
Binary files a/telemeta/locale/fr/LC_MESSAGES/djangojs.mo and b/telemeta/locale/fr/LC_MESSAGES/djangojs.mo differ
index 8b18239b27359b4087300767340c14c541b61fd5..2a3739c21ddca9e7e5f8dcc9e5537a103b301c21 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-27 17:57+0200\n"
+"POT-Creation-Date: 2011-04-28 10:54+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: Guillaume Pellerin <yomguy@parisson.com>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -18,7 +18,26 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n>1\n"
 
-#: htdocs/timeside/src/player.js:5
+#: htdocs/js/locale.js:2
+msgid "title"
+msgstr "titre"
+
+#: htdocs/js/locale.js:3
+msgid "description"
+msgstr "description"
+
+#: htdocs/js/locale.js:4
+msgid "delete the marker permanently?"
+msgstr "supprimer le marqueur définitivement ?"
+
+#: htdocs/js/locale.js:5
+msgid "marker added to the selected playlist"
+msgstr "marqueur ajouté à la liste de lecture"
+
+#: htdocs/js/locale.js:6
 msgid "item added to the selected playlist"
-msgstr "item ajouté à la liste de lecture sélectionnée"
+msgstr "item ajouté à la liste de lecture"
 
+#: htdocs/js/locale.js:7
+msgid "collection added to the selected playlist"
+msgstr "collection ajoutée à la liste de lecture"
index b9214cef708ec469ae0a48b7137a9adc580941bc..81db87eb157eb14cc2f1a25022d3925c22b8b664 100644 (file)
 <link rel="stylesheet"type="text/css" href="{% url telemeta-css "telemeta_ie6.css" %}" />
 <![endif]-->
 {% endblock %}
+<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
 <script src="{% url telemeta-js "jquery.js" %}" type="text/javascript"></script>
 <script src="{% url telemeta-js "locale.js" %}" type="text/javascript"></script>
 <script src="{% url telemeta-js "application.js" %}" type="text/javascript"></script>
-<script src="{% url django.views.i18n.javascript_catalog %}" type="text/javascript"></script>
 
 {% block extra_javascript %}{% endblock %}
 
index f852fd7b1ecf5356b5ccaf72a3628e92485dd49f..6b97485f60c3b0086ad5ee1d326a3a334d9f00e9 100644 (file)
@@ -20,7 +20,7 @@
         var anchor = jQuery('#_add_to_playlist');
         if(anchor.length){
         anchor.click(function(evtObj_){
-            p.showPopupAddToPlaylist(evtObj_,'collection','{{collection.public_id}}','Collection added to selected playlist');return false;
+            p.showPopupAddToPlaylist(evtObj_,'collection','{{collection.public_id}}',gettrans('collection added to the selected playlist'));return false;
         });
         }
         {% endif %}
index 6a5c1d4b7758568a892b4736989470bb3b767e08..6bd5b37f31d91c75c400b6cf49da52bfbcaae924 100644 (file)
@@ -68,7 +68,7 @@
   {% for playlist in playlists %}
   <!--<div>-->
   <!--<h2>{{ playlist.playlist.title }}</h2>-->
-  <table class="listing" style="width:90%;margin-top: 3em">
+  <table class="listing" style="width:95%;margin-top: 3em">
       <tr>
           <td style="border-bottom:1px solid #6A0307;color:#6A0307;font-size: 100%">{{ playlist.playlist.title }}</td>
           <td style="width:66ex; padding-right: 0; border-bottom:1px solid #6A0307; text-align:right">
@@ -81,7 +81,7 @@
   
   
   <!--</div>-->
-    <table class="listing" width="90%">
+    <table class="listing" width="95%">
         <tr>
             <th class="highlight">{% trans "Title" %}</th>
             <th>{% trans "Type" %}</th>
index b3c59b8fe3cb3ace715ce19a922fa082f612ecd4..7a151155c96b35fa4e51a658e7c02d2c3f153346 100644 (file)
@@ -34,7 +34,7 @@
         var anchor = jQuery('#_add_to_playlist');
         if(anchor.length){
             anchor.click(function(evtObj_){
-                p.showPopupAddToPlaylist(evtObj_,'item','{{item.public_id}}',gettext('item added to the selected playlist'));return false;
+                p.showPopupAddToPlaylist(evtObj_,'item','{{item.public_id}}',gettrans('item added to the selected playlist'));return false;
             });
         }
         {% endif %}