summaryrefslogtreecommitdiff
path: root/src/pulse/sample.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-02-03 21:56:52 +0100
committerLennart Poettering <lennart@poettering.net>2009-02-03 21:56:52 +0100
commitb51ed381162b43e55c665dbdb61e2ce4a796a4df (patch)
treeb5602d48f492b6dc81a2617744a81acfb974b2f7 /src/pulse/sample.c
parent543115ae1726e853624a6214ad58187f6d84c95a (diff)
add a bit of missing i18n
Diffstat (limited to 'src/pulse/sample.c')
-rw-r--r--src/pulse/sample.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index a6c773453..5528a591a 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
@@ -151,22 +151,25 @@ char *pa_sample_spec_snprint(char *s, size_t l, const pa_sample_spec *spec) {
if (!pa_sample_spec_valid(spec))
pa_snprintf(s, l, _("(invalid)"));
else
- pa_snprintf(s, l, "%s %uch %uHz", pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
+ pa_snprintf(s, l, _("%s %uch %uHz"), pa_sample_format_to_string(spec->format), spec->channels, spec->rate);
return s;
}
char* pa_bytes_snprint(char *s, size_t l, unsigned v) {
pa_assert(s);
+ pa_assert(l > 0);
+
+ pa_init_i18n();
if (v >= ((unsigned) 1024)*1024*1024)
- pa_snprintf(s, l, "%0.1f GiB", ((double) v)/1024/1024/1024);
+ pa_snprintf(s, l, _("%0.1f GiB"), ((double) v)/1024/1024/1024);
else if (v >= ((unsigned) 1024)*1024)
- pa_snprintf(s, l, "%0.1f MiB", ((double) v)/1024/1024);
+ pa_snprintf(s, l, _("%0.1f MiB"), ((double) v)/1024/1024);
else if (v >= (unsigned) 1024)
- pa_snprintf(s, l, "%0.1f KiB", ((double) v)/1024);
+ pa_snprintf(s, l, _("%0.1f KiB"), ((double) v)/1024);
else
- pa_snprintf(s, l, "%u B", (unsigned) v);
+ pa_snprintf(s, l, _("%u B"), (unsigned) v);
return s;
}