Remove the period from the catalog name since gettext seems to not like it

This commit is contained in:
Thomas Goyne 2012-09-22 20:55:08 -07:00
parent 39bf2ab5fd
commit 51e23a3c7e
4 changed files with 13 additions and 4 deletions

View File

@ -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@

View File

@ -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]]))

View File

@ -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

View File

@ -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