Index: src/nls-global.mk =================================================================== RCS file: /cvsroot/pgsql/src/nls-global.mk,v retrieving revision 1.10 diff -c -c -r1.10 nls-global.mk *** src/nls-global.mk 1 Jun 2004 03:32:28 -0000 1.10 --- src/nls-global.mk 15 Jun 2005 03:11:49 -0000 *************** *** 39,44 **** --- 39,45 ---- XGETTEXT += --foreign-user -ctranslator endif + CATALOG_NAME_VER=$(CATALOG_NAME).$(VERSION) all-po: $(MO_FILES) *************** *** 47,56 **** ifdef XGETTEXT ifeq ($(word 1,$(GETTEXT_FILES)),+) ! po/$(CATALOG_NAME).pot: $(word 2, $(GETTEXT_FILES)) $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $< else ! po/$(CATALOG_NAME).pot: $(GETTEXT_FILES) # Change to srcdir explicitly, don't rely on $^. That way we get # consistent #: file references in the po files. $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES) --- 48,57 ---- ifdef XGETTEXT ifeq ($(word 1,$(GETTEXT_FILES)),+) ! po/$(CATALOG_NAME_VER).pot: $(word 2, $(GETTEXT_FILES)) $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) -f $< else ! po/$(CATALOG_NAME_VER).pot: $(GETTEXT_FILES) # Change to srcdir explicitly, don't rely on $^. That way we get # consistent #: file references in the po files. $(XGETTEXT) -D $(srcdir) -n $(addprefix -k, $(GETTEXT_TRIGGERS)) $(GETTEXT_FILES) *************** *** 65,71 **** install-po: all-po installdirs-po ifneq (,$(LANGUAGES)) for lang in $(LANGUAGES); do \ ! $(INSTALL_DATA) po/$$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(CATALOG_NAME).mo || exit 1; \ done endif --- 66,72 ---- install-po: all-po installdirs-po ifneq (,$(LANGUAGES)) for lang in $(LANGUAGES); do \ ! $(INSTALL_DATA) po/$$lang.mo $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(CATALOG_NAME_VER).mo || exit 1; \ done endif *************** *** 73,85 **** $(mkinstalldirs) $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES) uninstall-po: ! rm -f $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES/$(CATALOG_NAME).mo) clean-po: rm -f $(MO_FILES) @rm -f $(addsuffix .old, $(PO_FILES)) ! rm -f po/$(CATALOG_NAME).pot maintainer-check-po: $(PO_FILES) --- 74,86 ---- $(mkinstalldirs) $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES) uninstall-po: ! rm -f $(foreach lang, $(LANGUAGES), $(DESTDIR)$(localedir)/$(lang)/LC_MESSAGES/$(CATALOG_NAME_VER).mo) clean-po: rm -f $(MO_FILES) @rm -f $(addsuffix .old, $(PO_FILES)) ! rm -f po/$(CATALOG_NAME_VER).pot maintainer-check-po: $(PO_FILES) *************** *** 88,97 **** done ! init-po: po/$(CATALOG_NAME).pot ! update-po: po/$(CATALOG_NAME).pot ifdef MSGMERGE @for lang in $(LANGUAGES); do \ echo "merging $$lang:"; \ --- 89,98 ---- done ! init-po: po/$(CATALOG_NAME_VER).pot ! update-po: po/$(CATALOG_NAME_VER).pot ifdef MSGMERGE @for lang in $(LANGUAGES); do \ echo "merging $$lang:"; \ Index: src/interfaces/libpq/fe-misc.c =================================================================== RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v retrieving revision 1.114 diff -c -c -r1.114 fe-misc.c *** src/interfaces/libpq/fe-misc.c 12 Jun 2005 00:00:21 -0000 1.114 --- src/interfaces/libpq/fe-misc.c 15 Jun 2005 03:11:52 -0000 *************** *** 1134,1140 **** { already_bound = 1; /* No relocatable lookup here because the binary could be anywhere */ ! bindtextdomain("libpq", getenv("PGLOCALEDIR") ? getenv("PGLOCALEDIR") : LOCALEDIR); } return dgettext("libpq", msgid); --- 1134,1140 ---- { already_bound = 1; /* No relocatable lookup here because the binary could be anywhere */ ! bindtextdomain("libpq" PG_VERSION, getenv("PGLOCALEDIR") ? getenv("PGLOCALEDIR") : LOCALEDIR); } return dgettext("libpq", msgid); Index: src/port/path.c =================================================================== RCS file: /cvsroot/pgsql/src/port/path.c,v retrieving revision 1.51 diff -c -c -r1.51 path.c *** src/port/path.c 26 Jan 2005 19:24:03 -0000 1.51 --- src/port/path.c 15 Jun 2005 03:11:53 -0000 *************** *** 507,513 **** void set_pglocale_pgservice(const char *argv0, const char *app) { ! char path[MAXPGPATH]; char my_exec_path[MAXPGPATH]; char env_path[MAXPGPATH + sizeof("PGSYSCONFDIR=")]; /* longer than * PGLOCALEDIR */ --- 507,514 ---- void set_pglocale_pgservice(const char *argv0, const char *app) { ! char path[MAXPGPATH], ! app_with_version[MAXPGPATH + sizeof(PG_VERSION) - 1]; char my_exec_path[MAXPGPATH]; char env_path[MAXPGPATH + sizeof("PGSYSCONFDIR=")]; /* longer than * PGLOCALEDIR */ *************** *** 521,527 **** #ifdef ENABLE_NLS get_locale_path(my_exec_path, path); ! bindtextdomain(app, path); textdomain(app); if (getenv("PGLOCALEDIR") == NULL) --- 522,530 ---- #ifdef ENABLE_NLS get_locale_path(my_exec_path, path); ! StrNCpy(app_with_version, app, MAXPGPATH + sizeof(PG_VERSION) - 1); ! strncat(app_with_version, PG_VERSION, MAXPGPATH + sizeof(PG_VERSION) - 2); ! bindtextdomain(app_with_version, path); textdomain(app); if (getenv("PGLOCALEDIR") == NULL)