diff --git a/locale/templates/header.txt b/locale/templates/header.txt index d0e72a66da..23e2cbc0ff 100644 --- a/locale/templates/header.txt +++ b/locale/templates/header.txt @@ -1,5 +1,5 @@ # BOINC @TMPL_NAME@ localization template -# Copyright (C) 2016 University of California +# Copyright (C) @YEAR@ University of California # # This file is distributed under the same license as BOINC. # diff --git a/locale/update_templates.sh b/locale/update_templates.sh index ded42edff4..9be774fdd9 100755 --- a/locale/update_templates.sh +++ b/locale/update_templates.sh @@ -32,6 +32,7 @@ if test 0 -ne `git status -s -uno |wc -l`; then fi srcdir=`pwd` +YEAR=`date -u +"%Y"` DATE=`date -u +"%Y-%m-%d %H:%M %Z"` VERSION=`git rev-parse HEAD` HEADER_FILE="${srcdir}/locale/templates/header.txt" @@ -43,7 +44,7 @@ TMPL_NAME="manager" TMPL_FILE="${srcdir}/locale/templates/BOINC-Manager.pot" FILE_LIST="clientgui/*.cpp clientgui/msw/*.cpp clientgui/mac/*.cpp clientgui/gtk/*.cpp" -sed -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} +sed -e "s/@YEAR@/$YEAR/" -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} xgettext --from-code=UTF-8 --omit-header --add-comments -o - --keyword=_ -C ${FILE_LIST} >> ${TMPL_FILE} cd ${srcdir} @@ -52,7 +53,7 @@ TMPL_NAME="client" TMPL_FILE="${srcdir}/locale/templates/BOINC-Client.pot" FILE_LIST="client/*.cpp sched/*.cpp" -sed -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} +sed -e "s/@YEAR@/$YEAR/" -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} xgettext --omit-header --add-comments -o - --keyword=_ -C ${FILE_LIST} >> ${TMPL_FILE} cd ${srcdir} @@ -61,7 +62,7 @@ TMPL_NAME="setup" TMPL_FILE="${srcdir}/locale/templates/BOINC-Setup.pot" FILE_LIST="mac_installer/*.cpp" -sed -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} +sed -e "s/@YEAR@/$YEAR/" -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} xgettext --omit-header --add-comments -o - --keyword=_ -C ${FILE_LIST} >> ${TMPL_FILE} cd ${srcdir} @@ -70,7 +71,7 @@ TMPL_NAME="project generic website" TMPL_FILE="${srcdir}/locale/templates/BOINC-Project-Generic.pot" FILE_LIST="html/inc/*.inc html/user/*.php html/project.sample/*.inc" -sed -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} +sed -e "s/@YEAR@/$YEAR/" -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} cat ${GEN_HEADER_ADD} >> ${TMPL_FILE} xgettext --omit-header --add-comments -o - --keyword=tra -L PHP ${FILE_LIST} >> ${TMPL_FILE} @@ -80,7 +81,7 @@ TMPL_NAME="website" TMPL_FILE="${srcdir}/locale/templates/BOINC-Web.pot" FILE_LIST="doc/account_managers.inc doc/addons.php doc/docutil.php doc/download.php doc/index.php doc/help.php doc/help_funcs.php doc/links.php doc/logo.php doc/projects.inc html/inc/news.inc" -sed -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} +sed -e "s/@YEAR@/$YEAR/" -e "s/@DATE@/$DATE/" -e "s/@VERSION@/$VERSION/" -e "s/@TMPL_NAME@/$TMPL_NAME/" ${HEADER_FILE} > ${TMPL_FILE} cat ${GEN_HEADER_ADD} >> ${TMPL_FILE} xgettext --omit-header --add-comments -o - --keyword=tra -L PHP ${FILE_LIST} >> ${TMPL_FILE}