Changeset 25123 in vbox
- Timestamp:
- Dec 1, 2009 9:26:49 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r23588 r25123 344 344 AssertMsg (pm, ("Icon for VM state %d must be defined", s)); 345 345 return pm ? *pm : QPixmap(); 346 } 347 348 static inline QString yearsToString (uint32_t cVal) 349 { 350 return tr("%n year(s)", "", cVal); 351 } 352 353 static inline QString monthsToString (uint32_t cVal) 354 { 355 return tr("%n month(s)", "", cVal); 356 } 357 358 static inline QString daysToString (uint32_t cVal) 359 { 360 return tr("%n day(s)", "", cVal); 361 } 362 363 static inline QString hoursToString (uint32_t cVal) 364 { 365 return tr("%n hours(s)", "", cVal); 366 } 367 368 static inline QString minutesToString (uint32_t cVal) 369 { 370 return tr("%n minute(s)", "", cVal); 371 } 372 373 static inline QString secondsToString (uint32_t cVal) 374 { 375 return tr("%n seconds(s)", "", cVal); 346 376 } 347 377 -
trunk/src/VBox/Frontends/VirtualBox/nls/VirtualBox_en.ts
r25121 r25123 3 3 <TS version="2.0" language="en"> 4 4 <context> 5 <name>VBox ProgressDialog</name>5 <name>VBoxGlobal</name> 6 6 <message numerus="yes"> 7 <location filename="../src/VBoxProgressDialog.cpp" line="211"/> 7 <location filename="../include/VBoxGlobal.h" line="350"/> 8 <source>%n year(s)</source> 9 <translation> 10 <numerusform>%n year</numerusform> 11 <numerusform>%n years</numerusform> 12 </translation> 13 </message> 14 <message numerus="yes"> 15 <location filename="../include/VBoxGlobal.h" line="355"/> 16 <source>%n month(s)</source> 17 <translation> 18 <numerusform>%n month</numerusform> 19 <numerusform>%n months</numerusform> 20 </translation> 21 </message> 22 <message numerus="yes"> 23 <location filename="../include/VBoxGlobal.h" line="360"/> 8 24 <source>%n day(s)</source> 9 25 <translation> … … 13 29 </message> 14 30 <message numerus="yes"> 15 <location filename="../ src/VBoxProgressDialog.cpp" line="212"/>16 <source>%n hour (s)</source>31 <location filename="../include/VBoxGlobal.h" line="365"/> 32 <source>%n hours(s)</source> 17 33 <translation> 18 34 <numerusform>%n hour</numerusform> … … 21 37 </message> 22 38 <message numerus="yes"> 23 <location filename="../ src/VBoxProgressDialog.cpp" line="213"/>39 <location filename="../include/VBoxGlobal.h" line="370"/> 24 40 <source>%n minute(s)</source> 25 41 <translation> … … 29 45 </message> 30 46 <message numerus="yes"> 31 <location filename="../ src/VBoxProgressDialog.cpp" line="214"/>32 <source>%n second (s)</source>47 <location filename="../include/VBoxGlobal.h" line="375"/> 48 <source>%n seconds(s)</source> 33 49 <translation> 34 50 <numerusform>%n second</numerusform> 35 51 <numerusform>%n seconds</numerusform> 36 </translation>37 </message>38 </context>39 <context>40 <name>VBoxSnapshotsWgt</name>41 <message numerus="yes">42 <location filename="../src/VBoxSnapshotsWgt.cpp" line="189"/>43 <source> (%n day(s) ago)</source>44 <translation>45 <numerusform> (%n day ago)</numerusform>46 <numerusform> (%n days ago)</numerusform>47 </translation>48 </message>49 <message numerus="yes">50 <location filename="../src/VBoxSnapshotsWgt.cpp" line="194"/>51 <source> (%n hour(s) ago)</source>52 <translation>53 <numerusform> (%n hour ago)</numerusform>54 <numerusform> (%n hours ago)</numerusform>55 </translation>56 </message>57 <message numerus="yes">58 <location filename="../src/VBoxSnapshotsWgt.cpp" line="199"/>59 <source> (%n minute(s) ago)</source>60 <translation>61 <numerusform> (%n minute ago)</numerusform>62 <numerusform> (%n minutes ago)</numerusform>63 </translation>64 </message>65 <message numerus="yes">66 <location filename="../src/VBoxSnapshotsWgt.cpp" line="204"/>67 <source> (%n second(s) ago)</source>68 <translation>69 <numerusform> (%n second ago)</numerusform>70 <numerusform> (%n seconds ago)</numerusform>71 52 </translation> 72 53 </message> -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProgressDialog.cpp
r25120 r25123 209 209 int seconds = time.addDays (-days).time().second(); 210 210 211 QString strDays = tr ("%n day(s)", "",days);212 QString strHours = tr ("%n hour(s)", "",hours);213 QString strMinutes = tr ("%n minute(s)", "",minutes);214 QString strSeconds = tr ("%n second(s)", "",seconds);211 QString strDays = VBoxGlobal::daysToString(days); 212 QString strHours = VBoxGlobal::hoursToString(hours); 213 QString strMinutes = VBoxGlobal::minutesToString(minutes); 214 QString strSeconds = VBoxGlobal::secondsToString(seconds); 215 215 216 216 QString strTwoComp = tr ("%1, %2 remaining"); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSnapshotsWgt.cpp
r25116 r25123 187 187 else if (mTimestamp.secsTo (QDateTime::currentDateTime()) > 60 * 60 * 24) 188 188 { 189 age = VBoxSnapshotsWgt::tr (" (% n day(s) ago)", "", mTimestamp.secsTo (QDateTime::currentDateTime()) / 60 / 60 / 24);189 age = VBoxSnapshotsWgt::tr (" (%1 ago)").arg(VBoxGlobal::daysToString(mTimestamp.secsTo (QDateTime::currentDateTime()) / 60 / 60 / 24)); 190 190 ageFormat = AgeInDays; 191 191 } 192 192 else if (mTimestamp.secsTo (QDateTime::currentDateTime()) > 60 * 60) 193 193 { 194 age = VBoxSnapshotsWgt::tr (" (% n hour(s) ago)", "", mTimestamp.secsTo (QDateTime::currentDateTime()) / 60 / 60);194 age = VBoxSnapshotsWgt::tr (" (%1 ago)").arg(VBoxGlobal::hoursToString(mTimestamp.secsTo (QDateTime::currentDateTime()) / 60 / 60)); 195 195 ageFormat = AgeInHours; 196 196 } 197 197 else if (mTimestamp.secsTo (QDateTime::currentDateTime()) > 60) 198 198 { 199 age = VBoxSnapshotsWgt::tr (" (% n minute(s) ago)", "", mTimestamp.secsTo (QDateTime::currentDateTime()) / 60);199 age = VBoxSnapshotsWgt::tr (" (%1 ago)").arg(VBoxGlobal::minutesToString(mTimestamp.secsTo (QDateTime::currentDateTime()) / 60)); 200 200 ageFormat = AgeInMinutes; 201 201 } 202 202 else 203 203 { 204 age = VBoxSnapshotsWgt::tr (" (% n second(s) ago)", "", mTimestamp.secsTo (QDateTime::currentDateTime()));204 age = VBoxSnapshotsWgt::tr (" (%1 ago)").arg(VBoxGlobal::secondsToString(mTimestamp.secsTo (QDateTime::currentDateTime()))); 205 205 ageFormat = AgeInSeconds; 206 206 }
Note:
See TracChangeset
for help on using the changeset viewer.