Extend update intervals with 1 hour and 2 hours.
authorMax Lapan <max.lapan@gmail.com>
Fri, 19 Mar 2010 11:44:10 +0000 (14:44 +0300)
committerMax Lapan <max.lapan@gmail.com>
Fri, 19 Mar 2010 11:44:10 +0000 (14:44 +0300)
settings.cpp
yandex-traffic-widget_ru.qm
yandex-traffic-widget_ru.ts

index fd78526..4a7cac3 100644 (file)
@@ -109,11 +109,13 @@ QStringList Settings::updateIntervals () const
     QStringList res;
 
     res.append (tr ("Never"));
-    res.append (tr ("1 min"));
-    res.append (tr ("2 min"));
-    res.append (tr ("5 min"));
-    res.append (tr ("15 min"));
-    res.append (tr ("30 min"));
+    res.append (tr ("1 minute"));
+    res.append (tr ("2 minutes"));
+    res.append (tr ("5 minutes"));
+    res.append (tr ("15 minutes"));
+    res.append (tr ("30 minutes"));
+    res.append (tr ("1 hour"));
+    res.append (tr ("2 hours"));
 
     return res;
 }
@@ -121,7 +123,7 @@ QStringList Settings::updateIntervals () const
 
 int Settings::intervalIndex2Minutes (int index) const
 {
-    int int2min[] = { -1, 1, 2, 5, 15, 30 };
+    int int2min[] = { -1, 1, 2, 5, 15, 30, 60, 120 };
 
     if (index < 0 || sizeof (int2min) / sizeof (int2min[0]) <= (unsigned int)index)
         return -1;
@@ -145,6 +147,10 @@ int Settings::minutes2IntervalIndex (int minutes) const
             return 4;
         case 30:
             return 5;
+        case 60:
+            return 6;
+        case 120:
+            return 7;
         default:
             return 0;
     }
index e3e7c86..a2ffec0 100644 (file)
Binary files a/yandex-traffic-widget_ru.qm and b/yandex-traffic-widget_ru.qm differ
index 62bdc8e..d61114f 100644 (file)
     </message>
     <message>
         <source>1 min</source>
-        <translation>1 мин</translation>
+        <translation type="obsolete">1 мин</translation>
     </message>
     <message>
         <source>2 min</source>
-        <translation>2 мин</translation>
+        <translation type="obsolete">2 мин</translation>
     </message>
     <message>
         <source>5 min</source>
-        <translation>5 мин</translation>
+        <translation type="obsolete">5 мин</translation>
     </message>
     <message>
         <source>15 min</source>
-        <translation>15 мин</translation>
+        <translation type="obsolete">15 мин</translation>
     </message>
     <message>
         <source>30 min</source>
-        <translation>30 мин</translation>
+        <translation type="obsolete">30 мин</translation>
     </message>
     <message>
         <source>System</source>
         <source>Russian</source>
         <translation>Русский</translation>
     </message>
+    <message>
+        <source>1 minute</source>
+        <translation>1 минута</translation>
+    </message>
+    <message>
+        <source>2 minutes</source>
+        <translation>2 минуты</translation>
+    </message>
+    <message>
+        <source>5 minutes</source>
+        <translation>5 минут</translation>
+    </message>
+    <message>
+        <source>15 minutes</source>
+        <translation>15 минут</translation>
+    </message>
+    <message>
+        <source>30 minutes</source>
+        <translation>30 минут</translation>
+    </message>
+    <message>
+        <source>1 hour</source>
+        <translation>1 час</translation>
+    </message>
+    <message>
+        <source>2 hours</source>
+        <translation>2 часа</translation>
+    </message>
 </context>
 <context>
     <name>SettingsDialog</name>