areguera / centos / Artwork

Forked from centos/Artwork 5 years ago
Clone

Blame html/Makefile

d428ee
###############################################################################
d428ee
#
d6a59a
#  The CentOS HTML files
d428ee
#  Copyright (C) 2019  Alain Reguera Delgado
d428ee
#
d428ee
#  This program is free software: you can redistribute it and/or modify it
d428ee
#  under the terms of the GNU General Public License as published by the Free
d428ee
#  Software Foundation, either version 3 of the License, or (at your option)
d428ee
#  any later version.
d428ee
#
d428ee
#  This program is distributed in the hope that it will be useful, but WITHOUT
d428ee
#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d428ee
#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
d428ee
#  more details.
d428ee
#
d428ee
#  You should have received a copy of the GNU General Public License along with
d428ee
#  this program.  If not, see <https://www.gnu.org/licenses/>.
d428ee
#
d428ee
###############################################################################
d428ee
d428ee
#==============================================================================
d428ee
# Configuration
d428ee
#==============================================================================
fb428a
lang = en-US
d428ee
localedir = PO
d428ee
d428ee
#==============================================================================
d428ee
# Requirements
d428ee
#==============================================================================
d6a59a
all:
6cf361
d6a59a
po: $(localedir)/$(lang).po
1395ad
1395ad
#==============================================================================
1395ad
# Sources
1395ad
#==============================================================================
6cf361
$(localedir)/$(lang).pot: centos-*/index.tpl.html
6cf361
	xml2po -l $(lang) -o /tmp/$(lang).pot centos-*/index.tpl.html
d428ee
	if [[ ! -f $(localedir)/$(lang).pot ]];then \
d428ee
		msginit -i /tmp/$(lang).pot -o $(localedir)/$(lang).pot -l $(lang) --no-translator --width=80; \
d428ee
	else \
d428ee
		msgmerge -U $(localedir)/$(lang).pot /tmp/$(lang).pot; \
d428ee
	fi
d428ee
	rm /tmp/$(lang).pot
d428ee
$(localedir)/$(lang).po: $(localedir)/$(lang).pot
d428ee
	if [[ ! -f $(localedir)/$(lang).po ]];then \
d428ee
		msginit -i $(localedir)/$(lang).pot -o $(localedir)/$(lang).po -l $(lang) --no-translator --width=80; \
d428ee
	else \
d428ee
		msgmerge -U $(localedir)/$(lang).po $(localedir)/$(lang).pot; \
d428ee
	fi