aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libdvbv5/dvb-sat.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-13 13:00:17 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-13 13:44:19 -0200
commitc34f9903eccba925d39076b37003f6b1ea9f6bc8 (patch)
tree7ccd1fdbc0dfbdafc7e5703808ac74a8e26c68a0 /lib/libdvbv5/dvb-sat.c
parent22a0ce24892a135b2f98472a56dd6e47ef32591a (diff)
dvb: add locale support for more files
Add locale support for the core DVB part of the library. Still missing the descriptor/table handler part of the library. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'lib/libdvbv5/dvb-sat.c')
-rw-r--r--lib/libdvbv5/dvb-sat.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/lib/libdvbv5/dvb-sat.c b/lib/libdvbv5/dvb-sat.c
index 010aebe0..473a24b7 100644
--- a/lib/libdvbv5/dvb-sat.c
+++ b/lib/libdvbv5/dvb-sat.c
@@ -26,6 +26,19 @@
#include "dvb-fe-priv.h"
#include <libdvbv5/dvb-v5-std.h>
+#include <config.h>
+
+#ifdef ENABLE_NLS
+# include "gettext.h"
+# include <libintl.h>
+# define _(string) dgettext(LIBDVBV5_DOMAIN, string)
+
+#else
+# define _(string) string
+#endif
+
+# define N_(string) string
+
static const struct dvb_sat_lnb lnb[] = {
{
.name = "Europe",
@@ -118,22 +131,22 @@ int dvb_print_lnb(int i)
return -1;
printf("%s\n\t%s\n", lnb[i].alias, lnb[i].name);
- printf("\t%d to %d MHz",
+ printf(_("\t%d to %d MHz"),
lnb[i].freqrange[0].low, lnb[i].freqrange[0].high);
if (lnb[i].freqrange[1].low)
- printf(" and %d to %d MHz",
+ printf(_(" and %d to %d MHz"),
lnb[i].freqrange[1].low, lnb[i].freqrange[1].high);
- printf("\n\t%s LO, ", lnb[i].highfreq ? "Dual" : "Single");
+ printf("\n\t%s LO, ", lnb[i].highfreq ? _("Dual") : _("Single"));
if (!lnb[i].highfreq) {
printf("IF = %d MHz\n", lnb[i].lowfreq);
return 0;
}
if (!lnb[i].rangeswitch) {
- printf("Bandstacking, LO POL_R %d MHZ, LO POL_L %d MHz\n",
+ printf(_("Bandstacking, LO POL_R %d MHZ, LO POL_L %d MHz\n"),
lnb[i].lowfreq, lnb[i].highfreq);
return 0;
}
- printf("IF = lowband %d MHz, highband %d MHz\n",
+ printf(_("IF = lowband %d MHz, highband %d MHz\n"),
lnb[i].lowfreq, lnb[i].highfreq);
return 0;
@@ -341,7 +354,7 @@ static int dvbsat_diseqc_set_input(struct dvb_v5_fe_parms_priv *parms,
pol_v, sat_number, t);
if (rc) {
- dvb_logerr("sending diseq failed");
+ dvb_logerr(_("sending diseq failed"));
return rc;
}
usleep((15 + parms->p.diseqc_wait) * 1000);
@@ -375,7 +388,7 @@ int dvb_sat_set_parms(struct dvb_v5_fe_parms *p)
dvb_fe_retrieve_parm(&parms->p, DTV_FREQUENCY, &freq);
if (!lnb) {
- dvb_logerr("Need a LNBf to work");
+ dvb_logerr(_("Need a LNBf to work"));
return -EINVAL;
}

Privacy Policy