lyx_mirror/src/gettext.C
Lars Gullik Bjønnes 67ef45b7c8 get rid of turds, no.po update and remove some warnings
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1303 a592a061-630c-0410-9148-cb99ea01b6c8
2001-01-08 09:37:13 +00:00

36 lines
542 B
C

#include <config.h>
#include "LString.h"
#include "gettext.h"
#ifdef ENABLE_NLS
char const * _(char const * str)
{
// I'd rather have an Assert on str, we should not allow
// null pointers here. Lgb
// Assert(str);
if (str && str[0])
return gettext(str);
else
return "";
}
string const _(string const & str)
{
if (!str.empty()) {
int const s = str.length();
char * tmp = new char[s + 1];
str.copy(tmp, s);
tmp[s] = '\0';
string ret(gettext(tmp));
delete [] tmp;
return ret;
}
else
return string();
}
#endif