summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-04-05 12:21:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-04-05 12:21:28 +0300
commitfe0167daef135089a32c64254c1a90dd2aa42172 (patch)
tree9c815b52bac698bce52f4774ac91e3545c64dee8 /src/ui
parent6000db343bb2c1b44bed9eb4b14a179f839f3aa7 (diff)
Added new language strings for media, feeds list
"about:feeds", inline downloads, and media player UI didn't have translations.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c2
-rw-r--r--src/ui/mediaui.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index ff89f5ec..e4dadeff 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -3222,7 +3222,7 @@ static void drawRun_DrawContext_(void *context, const iGmRun *run) {
3222 draw_Text(metaFont, 3222 draw_Text(metaFont,
3223 topRight_Rect(linkRect), 3223 topRight_Rect(linkRect),
3224 tmInlineContentMetadata_ColorId, 3224 tmInlineContentMetadata_ColorId,
3225 " \u2014 Fetching\u2026 (%.1f MB)", 3225 translateCStr_Lang(" \u2014 ${doc.fetching}\u2026 (%.1f ${mb})"),
3226 (float) bodySize_GmRequest(mr->req) / 1.0e6f); 3226 (float) bodySize_GmRequest(mr->req) / 1.0e6f);
3227 } 3227 }
3228 } 3228 }
diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c
index 2fad0cec..24b29cb0 100644
--- a/src/ui/mediaui.c
+++ b/src/ui/mediaui.c
@@ -27,6 +27,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
27#include "audio/player.h" 27#include "audio/player.h"
28#include "paint.h" 28#include "paint.h"
29#include "util.h" 29#include "util.h"
30#include "lang.h"
30 31
31#include <the_Foundation/path.h> 32#include <the_Foundation/path.h>
32 33
@@ -258,16 +259,17 @@ void draw_DownloadUI(const iDownloadUI *d, iPaint *p) {
258 draw_Text(uiLabel_FontId, 259 draw_Text(uiLabel_FontId,
259 init_I2(x, y2), 260 init_I2(x, y2),
260 isFinished ? uiTextAction_ColorId : uiTextDim_ColorId, 261 isFinished ? uiTextAction_ColorId : uiTextDim_ColorId,
261 isFinished ? "Download completed." 262 cstr_Lang(isFinished ? "media.download.complete" : "media.download.warnclose"));
262 : "Download will be cancelled if this tab is closed.");
263 const int x2 = right_Rect(rect); 263 const int x2 = right_Rect(rect);
264 drawSevenSegmentBytes_(init_I2(x2, y1), uiTextDim_ColorId, info.numBytes); 264 drawSevenSegmentBytes_(init_I2(x2, y1), uiTextDim_ColorId, info.numBytes);
265 const iInt2 pos = init_I2(x2, y2); 265 const iInt2 pos = init_I2(x2, y2);
266 if (bytesPerSecond > 0) { 266 if (bytesPerSecond > 0) {
267 drawAlign_Text(uiLabel_FontId, pos, uiTextDim_ColorId, right_Alignment, "%.3f MB/s", 267 drawAlign_Text(uiLabel_FontId, pos, uiTextDim_ColorId, right_Alignment,
268 translateCStr_Lang("%.3f ${mb.per.sec}"),
268 bytesPerSecond / 1.0e6); 269 bytesPerSecond / 1.0e6);
269 } 270 }
270 else { 271 else {
271 drawAlign_Text(uiLabel_FontId, pos, uiTextDim_ColorId, right_Alignment, "\u2014 MB/s"); 272 drawAlign_Text(uiLabel_FontId, pos, uiTextDim_ColorId, right_Alignment,
273 translateCStr_Lang("\u2014 ${mb.per.sec}"));
272 } 274 }
273} 275}