MCPcopy Index your code
hub / github.com/git/git / git_setup_gettext

Function git_setup_gettext

gettext.c:107–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105int git_gettext_enabled = 0;
106
107void git_setup_gettext(void)
108{
109 const char *podir = getenv(GIT_TEXT_DOMAIN_DIR_ENVIRONMENT);
110 char *p = NULL;
111
112 if (!podir)
113 podir = p = system_path(GIT_LOCALE_PATH);
114
115 if (!is_directory(podir)) {
116 free(p);
117 return;
118 }
119
120 bindtextdomain("git", podir);
121 setlocale(LC_MESSAGES, "");
122 setlocale(LC_TIME, "");
123 init_gettext_charset("git");
124 textdomain("git");
125
126 git_gettext_enabled = 1;
127
128 free(p);
129}
130
131/* return the number of columns of string 's' in current locale */
132int gettext_width(const char *s)

Callers 2

init_gitFunction · 0.70
cmd__regexFunction · 0.50

Calls 3

system_pathFunction · 0.85
is_directoryFunction · 0.85
init_gettext_charsetFunction · 0.85

Tested by 1

cmd__regexFunction · 0.40