damned-lies r1211 - in trunk: . media/css stats templates



Author: claudep
Date: Tue Dec  9 20:13:59 2008
New Revision: 1211
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1211&view=rev

Log:
2008-12-09  Claude Paroz  <claude 2xlibre net>

	* media/css/rtl.css: Improved RTL display.
	* stats/models.py: get_lang() was not fully translated.
	* templates/release_detail.html:
	* templates/stats_show.html: graphs alignment depends on language
	direction.

Modified:
   trunk/ChangeLog
   trunk/media/css/rtl.css
   trunk/stats/models.py
   trunk/templates/release_detail.html
   trunk/templates/stats_show.html

Modified: trunk/media/css/rtl.css
==============================================================================
--- trunk/media/css/rtl.css	(original)
+++ trunk/media/css/rtl.css	Tue Dec  9 20:13:59 2008
@@ -1,10 +1,14 @@
+body {
+    direction: rtl;
+}
+
 .stats th { 
     text-align: right; 
     padding-right: 2px;
     padding-left: 2px; 
 }
 
-.stats td { 
+.stats td {
     padding-right: 2px;
     padding-left: 2px;
 }
@@ -28,3 +32,9 @@
   margin-left: auto;
   margin-right: auto;
 }
+
+img.people {
+  float: right;
+  margin-right: -85px;
+}
+

Modified: trunk/stats/models.py
==============================================================================
--- trunk/stats/models.py	(original)
+++ trunk/stats/models.py	Tue Dec  9 20:13:59 2008
@@ -870,7 +870,7 @@
     def get_lang(self):
         if self.language:
             return _("%(lang_name)s (%(lang_locale)s)") % { 
-                'lang_name': self.language.name,
+                'lang_name': _(self.language.name),
                 'lang_locale': self.language.locale
             }
         else:

Modified: trunk/templates/release_detail.html
==============================================================================
--- trunk/templates/release_detail.html	(original)
+++ trunk/templates/release_detail.html	Tue Dec  9 20:13:59 2008
@@ -30,9 +30,9 @@
   
   <td style="width: 108px; text-align: center;"><div class="graph">
       <div class="translated" style="width: {{ lstats.doc_percent }}px;"></div>
-      <div class="fuzzy" style="left:{{ lstats.doc_percent }}px; width:{{ lstats.doc_percentfuzzy }}px;"></div>
+      <div class="fuzzy" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ lstats.doc_percent }}px; width:{{ lstats.doc_percentfuzzy }}px;"></div>
       {% with lstats.doc_percent|add:lstats.doc_percentfuzzy as upos %}
-      <div class="untranslated" style="left:{{ upos }}px; width: {{ lstats.doc_percentuntrans }}px;"></div>
+      <div class="untranslated" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ upos }}px; width: {{ lstats.doc_percentuntrans }}px;"></div>
       {% endwith %}
      </div>
    </td>
@@ -40,9 +40,9 @@
   <td>{{ lstats.ui_percent }}% ({{ lstats.ui_trans }}/{{ lstats.ui_fuzzy }}/{{ lstats.ui_untrans }})</td>
   <td style="width: 108px; text-align: center;"><div class="graph">
       <div class="translated" style="width: {{ lstats.ui_percent }}px;"></div>
-      <div class="fuzzy" style="left:{{ lstats.ui_percent }}px; width:{{ lstats.ui_percentfuzzy }}px;"></div>
+      <div class="fuzzy" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ lstats.ui_percent }}px; width:{{ lstats.ui_percentfuzzy }}px;"></div>
       {% with lstats.ui_percent|add:lstats.ui_percentfuzzy as upos %}
-      <div class="untranslated" style="left:{{ upos }}px; width: {{ lstats.ui_percentuntrans }}px;"></div>
+      <div class="untranslated" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ upos }}px; width: {{ lstats.ui_percentuntrans }}px;"></div>
       {% endwith %}
      </div>
    </td>

Modified: trunk/templates/stats_show.html
==============================================================================
--- trunk/templates/stats_show.html	(original)
+++ trunk/templates/stats_show.html	Tue Dec  9 20:13:59 2008
@@ -45,8 +45,8 @@
       {% endif %}
       <td style="width: 108px; text-align: center;"><div class="graph">
         <div class="translated" style="width: {{ line.tr_percentage }}px;"></div>
-        <div class="fuzzy" style="left:{{ line.tr_percentage }}px; width:{{ line.fu_percentage }}px;"></div>
-        <div class="untranslated" style="left:{{ line.tr_percentage|add:line.fu_percentage }}px; width: {{ line.un_percentage }}px;"></div>
+        <div class="fuzzy" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ line.tr_percentage }}px; width:{{ line.fu_percentage }}px;"></div>
+        <div class="untranslated" style="{{ LANGUAGE_BIDI|yesno:"right,left" }}:{{ line.tr_percentage|add:line.fu_percentage }}px; width: {{ line.un_percentage }}px;"></div>
         </div>
       </td>
       </tr>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]