[PATCH] Makefile updates (for adding all locales). Review needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

With Sijis we were speaking about automatically adding all languages
in the select box for each websites. To do that, we need to duplicate
the LINGUAS file from fedoraproject.org/po/ (the more complete file)
in each sub domains. But while building, pyhton will interrupt with a
"file not found" error.

In order to prevent that, I've just made a patch for updating the
Makefile. Please, tell me if there is something wrong.
(I am just filling a fake po file when the page is not localized).

If nobody complains, I'll update them all (talk, boot, spins...
.fpo.o) and their LINGUAS file on Saturday. And then, someone will do
the infra job :). We will never have to add their LINGUAS local
anymore :) (only if a new localization team come along). And that will
correct many localized page not accessible.

Cheers,

-- 
KÃvin Raymond
GPG-Key: A5BCB3A2
From 6d8cf4b35b7da330efdfe512604bee9dfe7223ae Mon Sep 17 00:00:00 2001
From: shaiton <shaiton@xxxxxxxxxxxxxxxxx>
Date: Fri, 1 Oct 2010 02:28:10 +0200
Subject: [PATCH] Now create empty po file when not already localized (LINGUAS file could contains all locales)

---
 boot.fedoraproject.org/Makefile |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/boot.fedoraproject.org/Makefile b/boot.fedoraproject.org/Makefile
index 14a12e1..3adb1c9 100644
--- a/boot.fedoraproject.org/Makefile
+++ b/boot.fedoraproject.org/Makefile
@@ -1,6 +1,13 @@
 ifndef LANGUAGES
 LANGUAGES := $(shell grep -v "^\#" po/LINGUAS)
 endif
+GENERIC_HEADER=	msgid ""\
+				msgstr ""\
+				"Project-Id-Version: PROJECT VERSION\n"\
+				"MIME-Version: 1.0\n"\
+				"Content-Type: text/plain; charset=utf-8\n"\
+				"Content-Transfer-Encoding: 8bit"
+
 PO_FILES = $(filter-out po/en.po,$(wildcard po/*.po))
 MO_FILES = $(PO_FILES:.po=.mo)
 HTML_FILES = $(shell find data -name "*.html")
@@ -20,9 +27,7 @@ po/en.po: po/boot.fedoraproject.org.pot
 	cp po/boot.fedoraproject.org.pot po/en.po
 
 po/%.po: po/boot.fedoraproject.org.pot
-	msgmerge --no-wrap --update $@ $^
-	@touch $@
-
+	if test -f $@ ; then msgmerge --no-wrap --update $@ $^ ; else echo '$(GENERIC_HEADER)' > $@ ; fi
 po/en.mo: po/en.po
 	msgfmt -o $@ $<
 
-- 
1.7.2.3

-- 
websites mailing list
websites@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/websites

[Index of Archives]     [Fedora Users]     [Linux ARM]     [ARM Kernel]     [Older Fedora Users]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

  Powered by Linux