release-notes/devel/scripts Makefile, 1.1, 1.2 index.html.in, 1.2, 1.3 mkindex.awk, 1.2, 1.3 mkindex.map, 1.2, 1.3
by fedora-docs-commits@redhat.com
Author: jtr
Update of /cvs/docs/release-notes/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7509
Modified Files:
Makefile index.html.in mkindex.awk mkindex.map
Log Message:
I think I have the mapping infrastructure figured out; now all I need
is for folk to submit mapping entries for supported languages in
each locale. Failure is good, that's how we will learn the correct mappings.
Index: Makefile
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile 17 Sep 2006 21:11:31 -0000 1.1
+++ Makefile 19 Sep 2006 01:03:39 -0000 1.2
@@ -1,15 +1,18 @@
# The values below will be overriden when this script is invoked from
# Makefile.common with the proper values.
-PRI_LANG=en_US
+PRI_LANG=en
OTHERS =de ru
all:: index.html
-index.html:: mkindex mkindex.awk mkindex.map
+index.html:: mkindex mkindex.awk mkindex.map index.html.in
./mkindex -o $@ ${PRI_LANG} ${OTHERS}
clean::
distclean clobber:: clean
${RM} index.html
+
+view:: index.html
+ htmlview index.html
Index: index.html.in
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/index.html.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.html.in 17 Sep 2006 21:49:12 -0000 1.2
+++ index.html.in 19 Sep 2006 01:03:39 -0000 1.3
@@ -8,19 +8,17 @@
function getlanguage() {
language=navigator.language.replace( /-/, "_");
if( language == "" ) {
- language = "C";
+ language = "<pri_lang/>";
}
prefix = "<prefix/>";
suffix = "<suffix/>";
switch( language ) {
default :
- middle = language.substring( 0, 1 );
+ middle = language;
switch( middle ) {
default:
- middle = "C";
+ middle = "<pri_lang/>";
break;
- //* No direct support for this browser location, try remapping
- //* to generate something appropriate
<REMAP/>
}
break;
Index: mkindex.awk
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/mkindex.awk,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mkindex.awk 17 Sep 2006 21:49:12 -0000 1.2
+++ mkindex.awk 19 Sep 2006 01:03:39 -0000 1.3
@@ -1,3 +1,9 @@
+function trim( s, v ) {
+ v = s
+ sub( /^[ \t]*/, "", v )
+ sub( /[ \t]*$/, "", v )
+ return( v )
+}
BEGIN {
prefix="/usr/share/doc/fedora-release-5/RELEASE-NOTES-";
suffix=".html";
@@ -5,48 +11,58 @@
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
loc = substr( lang, 1, 2 )
- shorts[ loc ] = loc
+ shorts[ loc ] = lang
}
+ pri_lang = langs[ 1 ]
# Read in the maps
while( getline < MAP > 0 ) {
sub( /#.*$/, "" )
if( NF >= 2 ) {
- src = $1
- dst = $2
+ lang = $1
+ pseudo = $2
$1 = ""
$2 = ""
- note = $0
- maps[ src ] = dst
- notes[ src ] = note
- printf "<!-- %s|%s|%s -->\n", src, dst, note
+ note = trim( $0 )
+ pseudo2lang[ pseudo ] = lang
+ notes[ lang ] = note
+ printf "<!-- %s|%s|%s -->\n", lang, pseudo, note
}
}
}
+# Perform our macro substitutions
{
gsub( /<prefix\/>/, prefix )
gsub( /<suffix\/>/, suffix )
+ gsub( /<pri_lang\/>/, pri_lang )
}
+# Fill in matches for our known ${LANGUAGES}
/<LANGS\/>/ {
- printf "\t// Attempt to match specific locales\n"
+ printf "\t// Attempt to match supported locales\n"
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
+ printf "\t<!-- %s:%s -->\n", lang, notes[ lang ]
printf "\tcase \"%s\":\n", lang
- if( lang in maps ) {
- printf "\t\tmiddle = \"%s\";\n", maps[ lang ]
- }
printf "\t\tbreak;\n"
}
next
}
+# If ${LANGUAGES} matching fails, try to match the short form
/<REMAP\/>/ {
printf "\t\t\t// Attempt to match generic locales\n"
- for( lang in shorts ) {
- printf "\t\t\tcase \"%s\":\n", lang
- if( lang in maps ) {
- printf "\t\t\t//* %s;\n", notes[ lang ]
- printf "\t\t\t\tmiddle = \"%s\";\n", maps[ lang ]
+ for( lang in pseudo2lang ) {
+ found = 0
+ for( i = 1; i <= nLangs; ++i ) {
+ if( lang == langs[i] ) {
+ found = 1
+ break
+ }
+ }
+ if( !found ) {
+ printf "\t\t\tcase \"%s\":\n", lang
+ printf "\t\t\t\t//* %s;\n", notes[ lang ]
+ printf "\t\t\t\tmiddle = \"%s\";\n", pseudo2lang[ lang ]
+ printf "\t\t\t\tbreak;\n"
}
- printf "\t\t\t\tbreak;\n"
}
next
}
@@ -54,13 +70,12 @@
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
print "<DT><PARA>"
+ printf "%s - ", lang
if( lang in notes ) {
print notes[ lang ]
- } else {
- print lang
}
- if( lang in maps ) {
- lang = maps[ lang ]
+ if( lang in pseudo2lang ) {
+ lang = pseudo2lang[ lang ]
}
url = prefix lang suffix
print "</PARA></DT>"
Index: mkindex.map
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/mkindex.map,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mkindex.map 17 Sep 2006 21:49:12 -0000 1.2
+++ mkindex.map 19 Sep 2006 01:03:39 -0000 1.3
@@ -8,7 +8,7 @@
# This isn't very robust, but it's a (perhaps, false) start.
#
# Hint: map the language to itself so you can provide notes
-# BROWSER LANG Notes
-en_US en US English
+# ${LANG} BROWSER Notes
+en en_US US English
ru ru Russian
de de German
17 years, 8 months
release-notes/devel Makefile,1.32,1.33
by fedora-docs-commits@redhat.com
Author: pfrields
Update of /cvs/docs/release-notes/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19160
Modified Files:
Makefile
Log Message:
This should make all the package building functions work properly with non-phony prerequisites for every target. No unnecessary building, thanks TR!
Index: Makefile
===================================================================
RCS file: /cvs/docs/release-notes/devel/Makefile,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- Makefile 13 Sep 2006 09:41:59 -0000 1.32
+++ Makefile 18 Sep 2006 12:16:31 -0000 1.33
@@ -8,7 +8,7 @@
#
DOCBASE = RELEASE-NOTES
PRI_LANG = en_US
-OTHERS = el es fr_FR it ja_JP nl pa ru sv zh_CN pt # cs de gu hr ml ms pt_BR uk zh_TW
+OTHERS = el es fr_FR it ja_JP nl pa pt ru sv zh_CN # cs de gu hr ml ms pt_BR uk zh_TW
FDPDIR = ${PWD}/../..
# Special legalnotice for this document:
@@ -102,16 +102,17 @@
# if OMFINFILES is empty, try and get the file list.
# If it's still empty, and BUILDOMF is set, use that to populate the list.
# Otherwise it stays empty. After all, we may not want them at all.
+
ifeq "${OMFINFILES}" ""
-OMFINFILES=$(wildcard ${PRI_LANG}/*.omf.in)
+OMFINFILES=$(foreach F,$(wildcard ${PRI_LANG}/*.omf.in),$(shell basename ${F}))
ifeq "${OMFINFILES}" ""
ifdef BUILDOMF
-OMFINFILES=${PRI_LANG}/${PKGNAME}.omf.in
-${OMFINFILES}:: ${PRI_LANG}/${RPMINFO}
+OMFINFILES=${PKGNAME}.omf.in
+${PRI_LANG}/${PKGNAME}.omf.in:: ${PRI_LANG}/${RPMINFO}
${XSLTPROC} --stringparam lang ${PRI_LANG} \
--stringparam docbase ${PKGNAME} \
${FDPDIR}/docs-common/packaging/omf-in.xsl \
- ${PRI_LANG}/${RPMINFO} > $@
+ $< > $@
endif
endif
endif
@@ -119,12 +120,26 @@
showvars::
@echo "OMFINFILES=\"${OMFINFILES}\""
+define OMFVAR_template
+$(foreach F,${OMFINFILES},$(eval OMFINFILES-${1}+=${1}/${F}))
+$(foreach F,${OMFINFILES},$(eval OMFFILES-${1}+=$(patsubst %.in,${1}/%,${F})))
+$(foreach F,${OMFINFILES},$(eval PKGOMFFILES-${1}+=$(patsubst \
+ %.omf.in,$(if $(findstring ${PRI_LANG},${1}),%-C.omf,%-${1}.omf), \
+ ${F})))
+showvars-debug::
+ @echo "PKGOMFFILES-${1}=\"${PKGOMFFILES-${1}}\""
+endef
+
+$(foreach L,${LANGUAGES},$(eval $(call OMFVAR_template,${L})))
+
define OMFIN_template
.PHONY: omf-in-${1}
-omf-in-${1}:: $(foreach F,$(patsubst ${PRI_LANG}/%,%,${OMFINFILES}),${1}/${F})
+omf-in-${1}:: ${OMFINFILES-${1}}
+# Treat .omf.in files just like XML... since they are!
+$(foreach F,${OMFINFILES-${1}},$(eval $(call XML_template,${1},${F})))
clean::
- $(foreach F,$(patsubst ${PRI_LANG}/%,%,${OMFINFILES}),${RM} ${1}/${F})
+ ${RM} ${OMFINFILES-${1}}
help::
@printf ${TFMT} 'omf-in-${1}' 'Make OMF input file for ${1}'
@@ -133,15 +148,9 @@
$(foreach L,${OTHERS},$(eval $(call OMFIN_template,${L})))
-# Treat .omf.in files just like XML... since they are!
-$(foreach L,${OTHERS}, \
- $(foreach F,${OMFINFILES}, \
- $(eval $(call XML_template,${L},${F}))))
-
-omf-in-${PRI_LANG}:: ${OMFINFILES}
-
.PHONY: omf-in
-omf-in:: $(foreach L,${LANGUAGES},omf-in-${L})
+omf-in:: $(foreach L,${LANGUAGES},$(foreach F,${OMFINFILES},${L}/${F}))
+
help::
@printf ${TFMT} 'omf-in' 'Make all OMF input files'
@@ -165,11 +174,10 @@
define OMF_template
.PHONY: omf-${1}
-omf-${1}:: omf-in-${1} $(patsubst ${PRI_LANG}/%.in,${1}/%,${OMFINFILES})
+omf-${1}:: ${OMFFILES-${1}} ${OMFINFILES-${1}}
clean::
- $(foreach F,$(patsubst ${PRI_LANG}/%.in,%,${OMFINFILES}), \
- ${RM} ${1}/${F})
+ ${RM} ${OMFFILES-${1}}
help::
@printf ${TFMT} 'omf-${1}' 'Make all OMF files for ${1} locale'
@@ -179,26 +187,22 @@
$(foreach L,${LANGUAGES},$(eval $(call OMF_template,${L})))
.PHONY: omf
-omf:: $(foreach L,${LANGUAGES},omf-${L})
+omf:: $(foreach L,${LANGUAGES},${OMFFILES-${L}})
help::
@printf ${TFMT} 'omf' 'Make all OMF files for all locales'
-####
-# Build README fom PO'd file...
-#
define HACK_TXT_template
.PHONY: readme-${1} readme-isoburn-${1}
-
-txt-${1} text-${1}:: readme-${1} readme-isoburn-${1}
+$(eval TXTEXTRAFILES-${1}=README-${1}.txt README-BURNING-ISOS-${1}.txt)
readme-${1}:: README-${1}.txt
-README-${1}.txt::
- LANG=${1}.UTF-8 ${XMLLINT} ${XMLLINTOPT} ${1}/README.xml > \
- ${1}/README.lint.xml
+README-${1}.txt:: ${1}/README.xml
+ LANG=${1}.UTF-8 ${XMLLINT} ${XMLLINTOPT} ${1}/README.xml \
+ > ${1}/README.lint.xml
LANG=${1}.UTF-8 ${XSLTPROC} \
${FDPDIR}/docs-common/packaging/strip-for-txt.xsl \
${1}/README.lint.xml > ${1}/README.stripped.xml && \
@@ -209,7 +213,7 @@
readme-isoburn-${1}:: README-BURNING-ISOS-${1}.txt
-README-BURNING-ISOS-${1}.txt::
+README-BURNING-ISOS-${1}.txt:: ${1}/README-BURNING-ISOS.xml
LANG=${1}.UTF-8 ${XMLLINT} ${XMLLINTOPT} ${1}/README-BURNING-ISOS.xml \
> ${1}/README-BURNING-ISOS.lint.xml
LANG=${1}.UTF-8 ${XSLTPROC} \
@@ -223,13 +227,20 @@
README-BURNING-ISOS-${1}.txt
clean::
- ${RM} -f README-${1}.txt README-BURNING-ISOS-${1}.txt
+ ${RM} -f ${TXTEXTRAFILES-${1}}
${RM} -f ${1}/README.stripped.xml ${1}/README-BURNING-ISOS.stripped.xml
+txt-${1} text-${1}:: ${TXTEXTRAFILES-${1}}
+
+showvars::
+ echo "TXTEXTRAFILES-${1}=\"${TXTEXTRAFILES-${1}}\""
+
endef
+$(foreach L,${LANGUAGES},$(eval $(call HACK_TXT_template,${L})))
+
.PHONY: readme
-readme:: $(foreach L,${LANGUAGES},$(eval $(call HACK_TXT_template,${L})))
+readme:: $(foreach L,${LANGUAGES},${TXTEXTRAFILES-${L}})
#########
@@ -241,30 +252,42 @@
#
#########
+
+#define PKGOMFFILES_template
+#ifeq "${1}" "${PRI_LANG}"
+#PKGOMFFILES-${1}=$(patsubst %.omf,%-C.omf,${OMFFILES-${1}})
+#else
+#PKGOMFFILES-${1}=$(patsubst %.omf,%-${1}.omf,${OMFFILES-${1}})
+#endif
+#showvars::
+# @echo "PKGOMFFILES-${1}=${PKGOMFFILES-${1}}"
+#endef
+
+$(foreach L,${LANGUAGES},$(eval $(call PKGOMFFILES_template,${L})))
+
define PKGOMF_DOC_template
.PHONY: pkgomf-${1}-${2}
-ifneq "${2}" "${PRI_LANG}"
-pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-${2}.omf
-${PKGNAME}-${VERSION}/${1}-${2}.omf:: omf-${2}
+ifeq "${2}" "${PRI_LANG}"
+pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-C.omf
+${PKGNAME}-${VERSION}/${1}-C.omf:: ${2}/${1}.omf
mkdir -p ${PKGNAME}-${VERSION}
cp ${2}/${1}.omf $$@
else
-pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-C.omf
-${PKGNAME}-${VERSION}/${1}-C.omf:: omf-${2}
+pkgomf-${1}-${2}:: ${PKGNAME}-${VERSION}/${1}-${2}.omf
+${PKGNAME}-${VERSION}/${1}-${2}.omf:: ${2}/${1}.omf
mkdir -p ${PKGNAME}-${VERSION}
cp ${2}/${1}.omf $$@
endif
endef
$(foreach L,${LANGUAGES}, \
- $(foreach F,$(patsubst ${PRI_LANG}/%.omf.in,%,${OMFINFILES}), \
+ $(foreach F,$(patsubst %.omf.in,%,${OMFINFILES}), \
$(eval $(call PKGOMF_DOC_template,${F},${L}))))
define PKGOMF_template
.PHONY: pkgomf-${1}
-pkgomf-${1}:: $(foreach F,$(patsubst ${PRI_LANG}/%.omf.in,%,${OMFINFILES}), \
- pkgomf-${F}-${1})
-
+pkgomf-${1}:: $(foreach F,${PKGOMFFILES-${1}},${PKGNAME}-${VERSION}/${F})
+$(eval PKGFILES-${1}+=$(foreach F,${PKGOMFFILES-${1}},${PKGNAME}-${VERSION}/${F}))
endef
$(foreach L,${LANGUAGES},$(eval $(call PKGOMF_template,${L})))
@@ -272,7 +295,8 @@
define PKGHTML_NOCHUNKS_template
.PHONY: pkghtml-nochunks-${1}
pkghtml-nochunks-${1}:: ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html
-${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html:: html-nochunks-${1}
+$(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html)
+${PKGNAME}-${VERSION}/${DOCBASE}-${1}.html:: ${DOCBASE}-${1}.html
mkdir -p ${PKGNAME}-${VERSION}
cp ${DOCBASE}-${1}.html $$@
endef
@@ -282,14 +306,15 @@
define PKGTXT_template
.PHONY: pkgtxt-${1}
pkgtxt-${1}:: ${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt ${PKGNAME}-${VERSION}/README-${1}.txt ${PKGNAME}-${VERSION}/README-BURNING-ISOS-${1}.txt
-${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt:: txt-${1}
+$(eval PKGFILES-${1}+=${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt ${PKGNAME}-${VERSION}/README-${1}.txt ${PKGNAME}-${VERSION}/README-BURNING-ISOS-${1}.txt)
+${PKGNAME}-${VERSION}/${DOCBASE}-${1}.txt:: ${DOCBASE}-${1}.txt
mkdir -p ${PKGNAME}-${VERSION}
cp ${DOCBASE}-${1}.txt $$@
### README is hacked in until we have more control here...
-${PKGNAME}-${VERSION}/README-${1}.txt:: txt-${1}
+${PKGNAME}-${VERSION}/README-${1}.txt:: README-${1}.txt
mkdir -p ${PKGNAME}-${VERSION}
cp README-${1}.txt $$@
-${PKGNAME}-${VERSION}/README-BURNING-ISOS-${1}.txt:: txt-${1}
+${PKGNAME}-${VERSION}/README-BURNING-ISOS-${1}.txt:: README-BURNING-ISOS-${1}.txt
mkdir -p ${PKGNAME}-${VERSION}
cp README-BURNING-ISOS-${1}.txt $$@
endef
@@ -298,15 +323,14 @@
define PKG_template
.PHONY: release-pkg-${1}
-release-pkg-${1}:: pkghtml-nochunks-${1} pkgtxt-${1} pkgomf-${1}
+release-pkg-${1}:: ${PKGFILES-${1}}
endef
$(foreach L,${LANGUAGES},$(eval $(call PKG_template,${L})))
.PHONY: release-pkg
release-pkg:: ${PKGNAME}-${VERSION}.tar.gz
-${PKGNAME}-${VERSION}.tar.gz:: $(foreach L,${LANGUAGES},release-pkg-${L})
- rm -f $@
+${PKGNAME}-${VERSION}.tar.gz:: $(foreach L,${LANGUAGES},${PKGFILES-${L}})
cp -a --parents css/*css fedora.css img/*png stylesheet-images/*png ${PKGNAME}-${VERSION}
mkdir -p ${PKGNAME}-${VERSION}/about/C && \
cp ${PRI_LANG}/about-fedora.xml ${PKGNAME}-${VERSION}/about/C
@@ -327,12 +351,12 @@
.PHONY: release-srpm
-release-srpm:: ${PKGNAME}-${VERSION}-${PKGRELEASE}.src.rpm
-${PKGNAME}-${VERSION}-${PKGRELEASE}.src.rpm:: ${SPECFILE} release-pkg
+release-srpm:: ${PKGNAME}-${VERSION}-${RELEASE}.src.rpm
+${PKGNAME}-${VERSION}-${RELEASE}.src.rpm:: ${SPECFILE} ${PKGNAME}-${VERSION}.tar.gz
rpmbuild -bs ${PKGRPMFLAGS} ${SPECFILE}
clean::
- ${RM} -rf ${PKGNAME}-${VERSION}-${PKGRELEASE}.src.rpm
+ ${RM} -rf ${PKGNAME}-${VERSION}-${RELEASE}.src.rpm
help::
@printf ${TFMT} 'release-srpm' 'Make a SRPM suitable for import to Core'
17 years, 8 months
translation-quick-start-guide/en_US translation-quick-start.xml, 1.11, 1.12
by fedora-docs-commits@redhat.com
Author: mospina
Update of /cvs/docs/translation-quick-start-guide/en_US
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9272
Modified Files:
translation-quick-start.xml
Log Message:
edited to address some bugs reports
Index: translation-quick-start.xml
===================================================================
RCS file: /cvs/docs/translation-quick-start-guide/en_US/translation-quick-start.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- translation-quick-start.xml 14 Aug 2006 13:31:04 -0000 1.11
+++ translation-quick-start.xml 18 Sep 2006 01:54:28 -0000 1.12
@@ -84,7 +84,7 @@
</section>
<section id="sn-accounts-trans">
- <title>Accounts for Program Translation</title>
+ <title>Accounts for Software Translation</title>
<para>
To participate in the &FP; as a translator you need an account.
@@ -254,6 +254,20 @@
assigned to you. At the password prompt, enter the one you
received via e-mail when you applied for your account.
</para>
+ <!-- Bug: 205167 Start -->
+ <note>
+ <title>Requesting a status page for a language</title>
+ <para>
+ If your language is not in the list of available language, select
+ <guilabel>Other</guilabel> and click <guibutton>Show Status</guibutton>.
+ In the new page displayed you can select your language and press
+ <guibutton>Continue</guibutton> to show your interest. A new page instructs
+ you to send a e-mail to fedora-trans-list leaving the subject line intact
+ and expressing your interest in contributing in the translation of the
+ Fedora Project for the selected language.
+ </para>
+ </note>
+ <!-- Bug: 205167 End -->
<para>
You can now start translating.
</para>
@@ -283,6 +297,21 @@
</screen>
</step>
+<!-- Bug: 204266 -->
+ <step>
+ <para>
+ Before start translating, make sure the <filename>.po</filename> file
+ reflects the latest <filename>.pot</filename>. Run the following command
+ to syncronize your <filename>.po</filename> file:
+ </para>
+
+<screen>
+<command>msgmerge <replaceable>lang</replaceable>.po <replaceable>package_name</replaceable>.pot > <replaceable>tmp-file</replaceable></command>
+<command>mv <replaceable>tmp-file</replaceable> <replaceable>lang</replaceable>.po</command>
+</screen>
+
+ </step>
+<!-- Bug: 204266 - END -->
<step>
<para>
Translate the <filename>.po</filename> file of your language
17 years, 8 months
release-notes/devel/scripts index.html.in, 1.1, 1.2 mkindex.awk, 1.1, 1.2 mkindex.map, 1.1, 1.2
by fedora-docs-commits@redhat.com
Author: jtr
Update of /cvs/docs/release-notes/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25529
Modified Files:
index.html.in mkindex.awk mkindex.map
Log Message:
More thinking on browser language remapping and support for non-JavaScript
browsers.
Index: index.html.in
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/index.html.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- index.html.in 17 Sep 2006 21:11:31 -0000 1.1
+++ index.html.in 17 Sep 2006 21:49:12 -0000 1.2
@@ -10,8 +10,6 @@
if( language == "" ) {
language = "C";
}
- // prefix="/usr/share/doc/fedora-release-5/RELEASE-NOTES-";
- // suffix=".html";
prefix = "<prefix/>";
suffix = "<suffix/>";
switch( language ) {
@@ -21,10 +19,13 @@
default:
middle = "C";
break;
- <SHORTS/>
+ //* No direct support for this browser location, try remapping
+ //* to generate something appropriate
+ <REMAP/>
}
break;
- <LOCALES/>
+ //* These browser languages are directly supported
+ <LANGS/>
}
window.location=prefix + middle + suffix;
}
Index: mkindex.awk
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/mkindex.awk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mkindex.awk 17 Sep 2006 21:11:31 -0000 1.1
+++ mkindex.awk 17 Sep 2006 21:49:12 -0000 1.2
@@ -18,6 +18,7 @@
note = $0
maps[ src ] = dst
notes[ src ] = note
+ printf "<!-- %s|%s|%s -->\n", src, dst, note
}
}
}
@@ -25,50 +26,44 @@
gsub( /<prefix\/>/, prefix )
gsub( /<suffix\/>/, suffix )
}
-/<LOCALES\/>/ {
- printf "// Attempt to match specific locales\n"
+/<LANGS\/>/ {
+ printf "\t// Attempt to match specific locales\n"
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
printf "\tcase \"%s\":\n", lang
if( lang in maps ) {
- printf "\tmiddle = \"%s\";\n", maps[ lang ]
+ printf "\t\tmiddle = \"%s\";\n", maps[ lang ]
}
printf "\t\tbreak;\n"
}
next
}
-/<SHORTS\/>/ {
- printf "\t// Attempt to match generic locales\n"
+/<REMAP\/>/ {
+ printf "\t\t\t// Attempt to match generic locales\n"
for( lang in shorts ) {
- printf "\t\tcase \"%s\":\n", lang
+ printf "\t\t\tcase \"%s\":\n", lang
if( lang in maps ) {
- printf "\t\t\tmiddle = \"$s\";\n", maps[ lang ]
+ printf "\t\t\t//* %s;\n", notes[ lang ]
+ printf "\t\t\t\tmiddle = \"%s\";\n", maps[ lang ]
}
- printf "\t\t\tbreak;\n"
+ printf "\t\t\t\tbreak;\n"
}
next
}
/<ITEMS\/>/ {
for( i = 1; i <= nLangs; ++i ) {
- url = prefix lang suffix
- print "<DT>"
+ lang = langs[ i ]
+ print "<DT><PARA>"
if( lang in notes ) {
print notes[ lang ]
} else {
print lang
}
- print "</DT>"
- print "<DD>"
- printf "\t<a href=\"%s\">%s</a>\n", url, url
- print "</DD>"
- }
- for( lang in shorts ) {
- url = prefix lang suffix
- if( lang in notes ) {
- print notes[ lang ]
- } else {
- print lang
+ if( lang in maps ) {
+ lang = maps[ lang ]
}
+ url = prefix lang suffix
+ print "</PARA></DT>"
print "<DD>"
printf "\t<a href=\"%s\">%s</a>\n", url, url
print "</DD>"
Index: mkindex.map
===================================================================
RCS file: /cvs/docs/release-notes/devel/scripts/mkindex.map,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mkindex.map 17 Sep 2006 21:11:31 -0000 1.1
+++ mkindex.map 17 Sep 2006 21:49:12 -0000 1.2
@@ -7,5 +7,8 @@
#
# This isn't very robust, but it's a (perhaps, false) start.
#
-# BROWSER locale desc
+# Hint: map the language to itself so you can provide notes
+# BROWSER LANG Notes
en_US en US English
+ru ru Russian
+de de German
17 years, 8 months
release-notes/devel/scripts Makefile, NONE, 1.1 index.html.in, NONE, 1.1 mkindex, NONE, 1.1 mkindex.awk, NONE, 1.1 mkindex.map, NONE, 1.1
by fedora-docs-commits@redhat.com
Author: jtr
Update of /cvs/docs/release-notes/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25378
Added Files:
Makefile index.html.in mkindex mkindex.awk mkindex.map
Log Message:
Adaptive "index.html" for the Release Notes.
--- NEW FILE Makefile ---
# The values below will be overriden when this script is invoked from
# Makefile.common with the proper values.
PRI_LANG=en_US
OTHERS =de ru
all:: index.html
index.html:: mkindex mkindex.awk mkindex.map
./mkindex -o $@ ${PRI_LANG} ${OTHERS}
clean::
distclean clobber:: clean
${RM} index.html
--- NEW FILE index.html.in ---
<!--
vim: ts=2 sw=2
-->
<HTML>
<HEAD>
<SCRIPT language="javascript">
<!--
function getlanguage() {
language=navigator.language.replace( /-/, "_");
if( language == "" ) {
language = "C";
}
// prefix="/usr/share/doc/fedora-release-5/RELEASE-NOTES-";
// suffix=".html";
prefix = "<prefix/>";
suffix = "<suffix/>";
switch( language ) {
default :
middle = language.substring( 0, 1 );
switch( middle ) {
default:
middle = "C";
break;
<SHORTS/>
}
break;
<LOCALES/>
}
window.location=prefix + middle + suffix;
}
// -->
</SCRIPT>
</HEAD>
<BODY onload="javascript:getlanguage();">
<H1>Fedora Release Notes</H1>
<PARA>
In a moment, you should see the release notes in your language.
</PARA>
<PARA>
Depending on your browser, we may not be able to determine the
proper language to use.
</PARA>
<PARA>
If there is any problem, choose from the list below.
</PARA>
<PARA>
Use the links below to view the Feodra Release Notes in the language
of your choice.
</PARA>
<DL>
<ITEMS/>
</DL>
</BODY>
</HTML>
--- NEW FILE mkindex ---
#!/bin/bash
MYDIR=$(dirname $0)
ME=$(basename $0)
USAGE="usage: ${ME} [-o ofile] [-s skel] lang1 ... langN"
OFILE=
SKEL="${MYDIR}/index.html.in"
MAP="${MYDIR}/${ME}.map"
while getopts :m:s:o: c
do
case "${c}" in
s) SKEL="${OPTARG}";;
o) OFILE="${OPTARG}";;
*)
echo "${ME}: unknown switch -${OPTARG}" >&2
exit 1
esac
done
shift $(expr ${OPTIND} - 1 )
if [ $# -eq 0 ]; then
echo "${USAGE}" >&2
exit 1
fi
if [ "${OFILE}" ]; then
rm -f "${OFILE}"
exec >"${OFILE}"
fi
LANGS="$@"
SCRIPT="${MYDIR}/${ME}.awk"
set -x
exec /bin/awk -f "${SCRIPT}" -v LANGS="${LANGS}" -v MAP="${MAP}" "${SKEL}"
--- NEW FILE mkindex.awk ---
BEGIN {
prefix="/usr/share/doc/fedora-release-5/RELEASE-NOTES-";
suffix=".html";
nLangs = split( LANGS, langs );
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
loc = substr( lang, 1, 2 )
shorts[ loc ] = loc
}
# Read in the maps
while( getline < MAP > 0 ) {
sub( /#.*$/, "" )
if( NF >= 2 ) {
src = $1
dst = $2
$1 = ""
$2 = ""
note = $0
maps[ src ] = dst
notes[ src ] = note
}
}
}
{
gsub( /<prefix\/>/, prefix )
gsub( /<suffix\/>/, suffix )
}
/<LOCALES\/>/ {
printf "// Attempt to match specific locales\n"
for( i = 1; i <= nLangs; ++i ) {
lang = langs[ i ]
printf "\tcase \"%s\":\n", lang
if( lang in maps ) {
printf "\tmiddle = \"%s\";\n", maps[ lang ]
}
printf "\t\tbreak;\n"
}
next
}
/<SHORTS\/>/ {
printf "\t// Attempt to match generic locales\n"
for( lang in shorts ) {
printf "\t\tcase \"%s\":\n", lang
if( lang in maps ) {
printf "\t\t\tmiddle = \"$s\";\n", maps[ lang ]
}
printf "\t\t\tbreak;\n"
}
next
}
/<ITEMS\/>/ {
for( i = 1; i <= nLangs; ++i ) {
url = prefix lang suffix
print "<DT>"
if( lang in notes ) {
print notes[ lang ]
} else {
print lang
}
print "</DT>"
print "<DD>"
printf "\t<a href=\"%s\">%s</a>\n", url, url
print "</DD>"
}
for( lang in shorts ) {
url = prefix lang suffix
if( lang in notes ) {
print notes[ lang ]
} else {
print lang
}
print "<DD>"
printf "\t<a href=\"%s\">%s</a>\n", url, url
print "</DD>"
}
next
}
{
print
}
--- NEW FILE mkindex.map ---
# Map browser languages into known locales for the Release Notes
#
# Some browsers don't handle the ${LANG} environment very well, if at all.
# To try to accomodate them, we can try to map the "navigator.language"
# value reported by the browser into either the ${PRI_LANG} or ${OTHERS}
# value for which we have release notes.
#
# This isn't very robust, but it's a (perhaps, false) start.
#
# BROWSER locale desc
en_US en US English
17 years, 8 months
release-notes/devel/scripts - New directory
by fedora-docs-commits@redhat.com
Author: jtr
Update of /cvs/docs/release-notes/devel/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25317/scripts
Log Message:
Directory /cvs/docs/release-notes/devel/scripts added to the repository
17 years, 8 months
release-notes/devel/en_US README.xml,1.4,1.5
by fedora-docs-commits@redhat.com
Author: pfrields
Update of /cvs/docs/release-notes/devel/en_US
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17950
Modified Files:
README.xml
Log Message:
Changing DISTROVER in preparation for final release
Index: README.xml
===================================================================
RCS file: /cvs/docs/release-notes/devel/en_US/README.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- README.xml 13 Aug 2006 16:10:30 -0000 1.4
+++ README.xml 17 Sep 2006 20:08:21 -0000 1.5
@@ -14,7 +14,7 @@
<!ENTITY NAME "Fedora"> <!-- The project's (and software's) basic name -->
<!ENTITY PROJ "&NAME; Project"> <!-- The project's name -->
<!ENTITY DISTRO "&NAME; Core"> <!-- The software's name -->
-<!ENTITY DISTROVER "6 test2"> <!-- The software's version -->
+<!ENTITY DISTROVER "6"> <!-- The software's version -->
]>
17 years, 8 months
docs-common Makefile.common,1.142,1.143
by fedora-docs-commits@redhat.com
Author: pfrields
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10586
Modified Files:
Makefile.common
Log Message:
Get rid of faulty OMF stuff, soon to be replaced.
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- Makefile.common 17 Sep 2006 18:17:55 -0000 1.142
+++ Makefile.common 17 Sep 2006 18:51:25 -0000 1.143
@@ -891,35 +891,6 @@
${FDPDIR}/docs-common/packaging/khelpcenter-plugin.xsl \
${RPMINFO} >$@.tmp && move-if-change $@.tmp $@
-#define omf_template
-#omf-$(1):: fedora-doc-${DOCBASE}-$(1).omf
-#
-#fedora-doc-${DOCBASE}-$(1).omf:: ${1}/${RPMINFO}
-# LANG=$(1).UTF-8 ${XSLTPROC} --stringparam docbase "${DOCBASE}" \
-# --stringparam lang "$(1)" \
-# ${FDPDIR}/docs-common/packaging/omf.xsl ${1}/${RPMINFO} | \
-# $(XMLFORMAT) $(XMLFOPTS) >fedora-doc-${DOCBASE}-$(1).omf.tmp && \
-# move-if-change fedora-doc-${DOCBASE}-$(1).omf.tmp fedora-doc-${DOCBASE}-$(1).omf
-
-#help::
-# @printf ${TFMT} 'omf-${1}' 'OMF file for locale ${1}'
-# @printf ${TFMT} 'fedora-doc-${DOCBASE}-${1}.omf' 'OMF file for locale ${1}'
-#endef
-
-#help::
-# @printf ${TFMT} 'fedora-doc-${DOCBASE}-C.omf' 'Locale "EN" not the C locale'
-
-#fedora-doc-${DOCBASE}-C.omf:: fedora-doc-${DOCBASE}-en_US.omf
-# cp fedora-doc-$(DOCBASE)-en_US.omf $@
-
-#$(foreach LANG,${LANGUAGES},$(eval $(call omf_template,${LANG})))
-
-#help::
-# @printf ${TFMT} 'omf' 'Generates the OMF files'
-#
-#omf:: $(foreach LANG,${LANGUAGES},omf-$(LANG)) fedora-doc-${DOCBASE}-C.omf
-
-#########################################################################
define FDP_ENTITIES_template
${1}/$${FDP_ENTITIES}:: ${FDPDIR}/docs-common/common/entities/entities-${1}.xml
17 years, 8 months
docs-common Makefile.common,1.141,1.142
by fedora-docs-commits@redhat.com
Author: pfrields
Update of /cvs/docs/docs-common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10095
Modified Files:
Makefile.common
Log Message:
Don't use phony prerequisites for real file targets. Since the FDP entity
files are really all XML dependencies, wrap them up in XMLDEPFILES,
and now we have easier maintenance and readability. I think I caused
this problem my own durn self, so it's only just that I fix it too. :-)
Index: Makefile.common
===================================================================
RCS file: /cvs/docs/docs-common/Makefile.common,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -r1.141 -r1.142
--- Makefile.common 28 Aug 2006 01:56:45 -0000 1.141
+++ Makefile.common 17 Sep 2006 18:17:55 -0000 1.142
@@ -199,6 +199,7 @@
# Append per-document dependancies
$(foreach L, ${LANGUAGES}, $(eval XMLDEPFILES-${L}+=${DOC_ENTITIES_ENT-${L}}))
$(foreach L, ${LANGUAGES}, $(eval XMLDEPFILES-${L}+=${L}/fdp-info.xml))
+$(foreach L, ${LANGUAGES}, $(eval XMLDEPFILES-${L}+=${L}/${FDP_ENTITIES}))
#
#########################################################################
@@ -495,7 +496,7 @@
define HTML_template
.PHONY: html-${1}
html-$(1):: ${DOCBASE}-$(1)/index.html
-${DOCBASE}-$(1)/index.html:: set-locale-${1} ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
+${DOCBASE}-$(1)/index.html:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
LANG=$(1).UTF-8 ${XMLTO} html -x $(XSLHTML) -o $(DOCBASE)-$(1) $(1)/$(DOCBASE).xml
mkdir -p $(DOCBASE)-$(1)/stylesheet-images/
cp ${FDPDIR}/docs-common/stylesheet-images/*.png $(DOCBASE)-$(1)/stylesheet-images
@@ -530,7 +531,7 @@
html-nochunks-$(1):: ${DOCBASE}-$(1).html
-${DOCBASE}-$(1).html:: set-locale-${1} ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
+${DOCBASE}-$(1).html:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
LANG=${1}.UTF-8 ${XMLTO} html-nochunks -x $(XSLHTMLNOCHUNKS) $(1)/$(DOCBASE).xml
mv $(DOCBASE).html $(DOCBASE)-$(1).html
mkdir -p stylesheet-images/
@@ -588,7 +589,7 @@
define FO_template
.PHONY: fo-${1}
fo-${1}:: ${1}/${DOCBASE}.fo
-${1}/${DOCBASE}.fo:: set-locale-${1} ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
+${1}/${DOCBASE}.fo:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
LANG=${1}.UTF-8 xsltproc --xinclude \
--stringparam FDPDIR ${FDPDIR} \
--stringparam IMGROOT ${PWD} \
@@ -638,7 +639,7 @@
txt-$(1) text-$(1):: ${DOCBASE}-$(1).txt
-${DOCBASE}-$(1).txt:: set-locale-${1} ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
+${DOCBASE}-$(1).txt:: ${XMLFILES-${1}} ${XMLDEPFILES-${1}}
${XMLLINT} ${XMLLINTOPT} $(1)/$(DOCBASE).xml > $(1)/$(DOCBASE).lint.xml
${XSLTPROC} $(FDPDIR)/docs-common/packaging/strip-for-txt.xsl \
$(1)/$(DOCBASE).lint.xml > $(1)/$(DOCBASE).stripped.xml
@@ -764,7 +765,7 @@
define khelp_template
.PHONY: khelp-$(1)
-khelp-$(1):: set-locale-$(1) ${XMLFILES-$(1)} ${XMLDEPFILES-$(1)}
+khelp-$(1):: ${XMLFILES-$(1)} ${XMLDEPFILES-$(1)}
LANG=$(1).UTF-8 ${XMLLINT} --noent --xinclude $(1)/$(DOCBASE).xml 2>/dev/null >$(1)/$(DOCBASE).xml-parsed
mkdir -p kde-$(1)
${MEINPROC} --output kde-$(1)/index.docbook \
@@ -946,13 +947,10 @@
define LOCALE_template
.PHONY: set-locale-${1}
-set-locale-${1}:: ${1}/${FDP_ENTITIES} ${DOC_ENTITIES_ENT-${PRI_LANG}}
+set-locale-${1}:: ${XMLDEPFILES-${1}}
clean::
- ${RM} ${1}/${FDP_ENTITIES}
-ifneq "${DOC_ENTITIES_ENT-${1}}" ""
- ${RM} ${DOC_ENTITIES_ENT-${1}}
-endif
+ ${RM} ${XMLDEPFILES-${1}}
help::
@printf ${TFMT} 'set-locale-${1}' 'Link to locale ${1} FDP entities'
17 years, 8 months
release-notes/devel Makefile,1.30,1.31
by fedora-docs-commits@redhat.com
Author: pfrields
Update of /cvs/docs/release-notes/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19808
Modified Files:
Makefile
Log Message:
Oops. Closing quotes can be good.
Index: Makefile
===================================================================
RCS file: /cvs/docs/release-notes/devel/Makefile,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- Makefile 13 Sep 2006 00:06:26 -0000 1.30
+++ Makefile 13 Sep 2006 00:57:01 -0000 1.31
@@ -155,7 +155,7 @@
# locale name *unless* the locale is en_US, in which case is is replaced
# by "C", the fallback.
%.omf: %.omf.in
- sed -e 's!@RELEASE@!${VERSION}!g $< > $@
+ sed -e 's!@RELEASE@!${VERSION}!g' $< > $@
sed -i 's!@DATE@!${REVDATE}!g' $@
sed -i 's!@LANG@!$(patsubst %/$(shell basename $<),%,$<)!g' $@
sed -i 's!@LANGC@!$(if $(findstring en_US,$(patsubst \
17 years, 8 months