aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.c
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-01-04 22:51:02 +1000
committerGravatar axel <axel@liljencrantz.se>2006-01-04 22:51:02 +1000
commitec43c635cc65145dc4c36b4b284b86119534533e (patch)
treef563bf720ab28d1269a0be9805a3fef4dbd6e05d /env.c
parent26de6ba26b71f06c15ee7e8a54a7b52e0437047d (diff)
Add i18n through gettext, as well as a Swedish translation
darcs-hash:20060104125102-ac50b-5bf026578a69bd94f7a7a3c8dee0ebccd95e5c24.gz
Diffstat (limited to 'env.c')
-rw-r--r--env.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/env.c b/env.c
index 13a0dc82..dc60cb8e 100644
--- a/env.c
+++ b/env.c
@@ -41,6 +41,7 @@
#include "env_universal.h"
#include "input_common.h"
#include "event.h"
+#include "translate.h"
/**
Command used to start fishd
@@ -190,7 +191,7 @@ static void start_fishd()
if( !pw )
{
- debug( 0, L"Could not get user information" );
+ debug( 0, _( L"Could not get user information" ) );
return;
}
@@ -417,7 +418,7 @@ void env_init()
free( uname );
}
- env_universal_init( env_get( L"FISHD_SOKET_DIR"),
+ env_universal_init( env_get( L"FISHD_SOCKET_DIR"),
env_get( L"USER" ),
&start_fishd,
&universal_callback );
@@ -499,6 +500,11 @@ void env_set( const wchar_t *key,
if( wcscmp(key, L"LANG" )==0 )
{
fish_setlocale(LC_ALL,val);
+ /* Make change known to gettext. */
+ {
+ extern int _nl_msg_cat_cntr;
+ ++_nl_msg_cat_cntr;
+ }
}
if( wcscmp( key, L"umask" ) == 0)
@@ -754,7 +760,7 @@ wchar_t *env_get( const wchar_t *key )
wchar_t *next = history_get( i-add_current );
if( !next )
{
- debug( 1, L"No history at idx %d\n", i );
+ debug( 1, _( L"No history at idx %d\n" ), i );
break;
}
@@ -914,7 +920,7 @@ void env_pop()
else
{
debug( 0,
- L"Tried to pop empty environment stack." );
+ _( L"Tried to pop empty environment stack." ) );
sanity_lose();
}
}