From 51e23a3c7e266d2f4332dc6d7ada54812d814ef1 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 22 Sep 2012 20:55:08 -0700 Subject: [PATCH] Remove the period from the catalog name since gettext seems to not like it --- aegisub/Makefile.inc.in | 1 + aegisub/configure.in | 8 ++++++++ aegisub/po/Makefile | 4 ++-- aegisub/src/aegisublocale.cpp | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/aegisub/Makefile.inc.in b/aegisub/Makefile.inc.in index 959ed8a67..15d33626f 100644 --- a/aegisub/Makefile.inc.in +++ b/aegisub/Makefile.inc.in @@ -37,6 +37,7 @@ LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibili # STRINGS ######### AEGISUB_COMMAND = @AEGISUB_COMMAND@ +AEGISUB_CATALOG = @AEGISUB_CATALOG@ BUILD_DATE = @BUILD_DATE@ PACKAGE_TARNAME = aegisub-@BUILD_GIT_VERSION_STRING@ PACKAGE_DEBUG = @PACKAGE_DEBUG@ diff --git a/aegisub/configure.in b/aegisub/configure.in index 99b2a316b..709b55171 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -68,6 +68,14 @@ AS_IF([test x$build_darwin = xyes], AC_SUBST(AEGISUB_COMMAND) AC_DEFINE_UNQUOTED([AEGISUB_COMMAND], ["${AEGISUB_COMMAND}"], [Name of the Aegisub executable]) +# Name of gettext catalog. +# On OS X everything goes in an app bundle so no point in versioning the executable +AS_IF([test x$build_darwin = xyes], + [AEGISUB_CATALOG="aegisub"], + [AEGISUB_CATALOG="aegisub-30"]) +AC_SUBST(AEGISUB_CATALOG) +AC_DEFINE_UNQUOTED([AEGISUB_CATALOG], ["${AEGISUB_CATALOG}"], [Name of the Aegisub gettext catalog]) + # Handle location of desktop files: http://freedesktop.org/wiki/Specifications/desktop-entry-spec AC_ARG_WITH(desktop-dir, AS_HELP_STRING([--with-desktop-dir=PATH],[desktop file locations [PREFIX/share/applications]])) diff --git a/aegisub/po/Makefile b/aegisub/po/Makefile index b3af95010..72605e5db 100644 --- a/aegisub/po/Makefile +++ b/aegisub/po/Makefile @@ -38,8 +38,8 @@ all: $(MO) install: @$(BIN_MKDIR) -p $(addsuffix /LC_MESSAGES/, $(addprefix $(DESTDIR)$(P_LOCALE)/, $(basename $(PO)))) @for i in $(basename $(PO)); do \ - echo $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_COMMAND).mo; \ - $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_COMMAND).mo; \ + echo $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_CATALOG).mo; \ + $(BIN_INSTALL) $$i.mo $(DESTDIR)$(P_LOCALE)/$$i/LC_MESSAGES/$(AEGISUB_CATALOG).mo; \ done diff --git a/aegisub/src/aegisublocale.cpp b/aegisub/src/aegisublocale.cpp index 0e826ad12..e348e3052 100644 --- a/aegisub/src/aegisublocale.cpp +++ b/aegisub/src/aegisublocale.cpp @@ -97,7 +97,7 @@ void AegisubLocale::Init(int language) { locale->AddCatalogLookupPathPrefix(StandardPaths::DecodePath("?data/locale/")); locale->AddCatalog("aegisub"); #else - locale->AddCatalog(AEGISUB_COMMAND); + locale->AddCatalog(AEGISUB_CATALOG); #endif locale->AddCatalog("wxstd"); @@ -213,7 +213,7 @@ wxArrayInt AegisubLocale::GetAvailableLanguages() { // If the locale file doesn't exist then don't list it as an option. wxString locDir = wxStandardPaths::Get().GetLocalizedResourcesDir(langs[i], wxStandardPathsBase::ResourceCat_Messages); - wxFileName file(wxString::Format("%s/%s.mo", locDir, AEGISUB_COMMAND)); + wxFileName file(wxString::Format("%s/%s.mo", locDir, AEGISUB_CATALOG)); if (lang && file.FileExists()) final.Add(lang->Language); } #endif