Skip to content

Commit

Permalink
Add a warning for gettext < 0.20
Browse files Browse the repository at this point in the history
They do not recognize <developer_name>GnuCash Project</developer_name>
in gnucash.appdata (https://savannah.gnu.org/bugs/?50408)
  • Loading branch information
fellen committed Jan 31, 2020
1 parent e6b3c56 commit ec7e6c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -272,11 +272,12 @@ find_library (REGEX_LIBRARY NAMES regex)
if (ALLOW_OLD_GETTEXT)
find_package (Gettext REQUIRED)
else (ALLOW_OLD_GETTEXT)
find_package (Gettext 0.19.6)
find_package (Gettext 0.20)
if (NOT GETTEXT_FOUND)
message (FATAL_ERROR "Note the build can be configured with an older version of gettext by setting ALLOW_OLD_GETTEXT=ON but then some files will not be translated:
- gnucash.desktop (requires at least gettext 0.19)
- gnucash.appdata.xml (requires at least gettext 0.19.6)")
- gnucash.appdata.xml (requires at least gettext 0.19.6)
- tag developer_name from gnucash.appdata.xml (requires at least gettext 0.20)")
endif (NOT GETTEXT_FOUND)
endif (ALLOW_OLD_GETTEXT)

Expand All @@ -286,6 +287,9 @@ endif ()
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.19.6)
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.19.6 in order to handle translation of the gnucash.appdata file. The build will be configured with an untranslated gnucash.appdata file.")
endif ()
if (${GETTEXT_VERSION_STRING} VERSION_LESS 0.20)
message (WARNING "Got gettext version ${GETTEXT_VERSION_STRING}, however you need at least gettext version 0.20 in order to handle the translation of 'GnuCash Project' from the gnucash.appdata file. That message will be missing in gnucash.pot.")
endif ()

find_path (LIBINTL_INCLUDE_PATH NAMES libintl.h
PATHS /usr/include /opt/gnome/include)
Expand Down
2 changes: 1 addition & 1 deletion README.dependencies
Expand Up @@ -63,7 +63,7 @@ Libraries/Deps
guile 2.2.0 or 2.0.0 Must be built with regex
support enabled
libxml2 2.5.10
gettext 0.19.6 Can use older if you pass
gettext 0.20 Can use older if you pass
-DALLOW_OLD_GETTEXT to cmake;
doesn't include all file types
when building gnucash.pot.
Expand Down

0 comments on commit ec7e6c3

Please sign in to comment.