Commit fd6c8836be7b2f11b6e933bf829d14b4ca7e099d

Authored by 김태훈
1 parent ea536cd1d3
Exists in master and in 2 other branches fhd, fhd-demo

tr 추가

Showing 1 changed file with 13 additions and 12 deletions   Show diff stats
app/gui/oven_control/stringer.cpp
... ... @@ -63,11 +63,11 @@ QString Stringer::remainingTime(int msecs)
63 63 case RemainingTime:
64 64 msecs /= 1000;
65 65 if (msecs >= 3600)
66   - return QString("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0'));
  66 + return qApp->tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0'));
67 67 if (msecs >= 60)
68   - return QString("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0'));
  68 + return qApp->tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0'));
69 69  
70   - return QString("%1초").arg(msecs);
  70 + return qApp->tr("%1초").arg(msecs);
71 71 case FinishTime:
72 72 QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs);
73 73 switch (realTimeFormat())
... ... @@ -90,20 +90,20 @@ QString Stringer::remainingTime(int msecs, QString style)
90 90 msecs /= 1000;
91 91 if (msecs >= 3600)
92 92 {
93   - QString hour = heavySpan.arg(msecs / 3600) + lightSpan.arg("시간");
94   - QString min = heavySpan.arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')) + lightSpan.arg("분");
  93 + QString hour = heavySpan.arg(msecs / 3600) + lightSpan.arg(qApp->tr("시간"));
  94 + QString min = heavySpan.arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(qApp->tr("분"));
95 95  
96 96 return style + QString("%1 %2").arg(hour).arg(min);
97 97 }
98 98 if (msecs >= 60)
99 99 {
100   - QString min = heavySpan.arg(msecs / 60) + lightSpan.arg("분");
101   - QString sec = heavySpan.arg(msecs % 60, 2, 10, QLatin1Char('0')) + lightSpan.arg("초");
  100 + QString min = heavySpan.arg(msecs / 60) + lightSpan.arg(qApp->tr("분"));
  101 + QString sec = heavySpan.arg(msecs % 60, 2, 10, QLatin1Char('0')) + lightSpan.arg(qApp->tr("초"));
102 102  
103 103 return style + QString("%1 %2").arg(min).arg(sec);
104 104 }
105 105  
106   - return style + heavySpan.arg(msecs) + lightSpan.arg("초");
  106 + return style + heavySpan.arg(msecs) + lightSpan.arg(qApp->tr("초"));
107 107 case FinishTime:
108 108 QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs);
109 109 switch (realTimeFormat())
... ... @@ -125,11 +125,11 @@ QString Stringer::remainingTime(qint64 msecs)
125 125 case RemainingTime:
126 126 msecs /= 1000;
127 127 if (msecs >= 3600)
128   - return QString("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0'));
  128 + return qApp->tr("%1시간 %2분").arg(msecs / 3600).arg((msecs % 3600) / 60, 2, 10, QLatin1Char('0'));
129 129 if (msecs >= 60)
130   - return QString("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0'));
  130 + return qApp->tr("%1분 %2초").arg(msecs / 60).arg(msecs % 60, 2, 10, QLatin1Char('0'));
131 131  
132   - return QString("%1초").arg(msecs);
  132 + return qApp->tr("%1초").arg(msecs);
133 133 case FinishTime:
134 134 QDateTime dateTime = QDateTime::currentDateTime().addMSecs(msecs);
135 135 switch (realTimeFormat())
... ... @@ -217,7 +217,8 @@ QString Stringer::unusedTemperature(QString style)
217 217 }
218 218  
219 219  
220   -QString Stringer::DateTimeString(const QDateTime &dt_tm, datetime_string_type type){
  220 +QString Stringer::DateTimeString(const QDateTime &dt_tm, datetime_string_type type)
  221 +{
221 222 QString strTemp;
222 223 Define::config_item item = Config::getInstance()->getConfigValue(Define::config_time_type);
223 224 switch(item.d32){
... ...