Skip to content

Commit

Permalink
Fixing path for gettext context
Browse files Browse the repository at this point in the history
  • Loading branch information
jrie committed Feb 9, 2017
1 parent 4774b91 commit 779bcb9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion kiss-front-jessie.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ int main(int argc, char *argv[]) {
setlocale(LC_ALL, "");
// TODO: Setup the bindtextdomain to look in "/usr/share/locale" instead of current folder
// NOTE: Translations have to set at bindtextdomain path + "de_DE/LC_MESSAGES/KISSebook.mo" for german translation
bindtextdomain("KISSebook", "");
char *localPath = malloc(2048 * sizeof(char));
getcwd(localPath, 2048);

bindtextdomain("KISSebook", localPath);
textdomain("KISSebook");
free(localPath);

char homePath[512];
sprintf(homePath, "%s/.kissebook", getenv("HOME"));
Expand Down
6 changes: 5 additions & 1 deletion kiss-front.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,12 @@ int main(int argc, char *argv[]) {
setlocale(LC_ALL, "");
// TODO: Setup the bindtextdomain to look in "/usr/share/locale" instead of current folder
// NOTE: Translations have to set at bindtextdomain path + "de_DE/LC_MESSAGES/KISSebook.mo" for german translation
bindtextdomain("KISSebook", "");
char *localPath = malloc(2048 * sizeof(char));
getcwd(localPath, 2048);

bindtextdomain("KISSebook", localPath);
textdomain("KISSebook");
free(localPath);

char homePath[512];
sprintf(homePath, "%s/.kissebook", getenv("HOME"));
Expand Down

0 comments on commit 779bcb9

Please sign in to comment.