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

translation of searchtmpl/search.wml



Hi,

As already we know, web pages of searchtmpl/search.html must be encoded
in UTF-8 and it is already done.

  http://lists.debian.org/debian-www/2002/debian-www-200212/msg00260.html

However, though we can write translated (or original) searchtmpl/search.wml
in UTF-8, gettext items are converted into legacy encodings and it breaks
the pages.

I think I found a fix for this problem.  Though this doesn't immediately
enable translated search page, I think this surely fixes one of the
problems.

I found that target encoding of gettext is defined in
webwml/english/template/debian/common_tags.wml .  Thus, the best way
is to redefine CHARSET_WML and CHARSET variables before it.  (These
variables are defined in webwml/<language>/.wmlrc files.)  The patch
attached to this mail includes this modification.

It is also needed that translated search.wml files to be written in
UTF-8.  The following patch includes a note on this point.

(The patch for Makefile is to disable conversion from EUC-JP to
ISO-2022-JP for Japanese.)


May I commit these modifications?


PS. The content negotiation
  http://search.debian.org/new/index.en.cgi
  http://search.debian.org/new/index.fr.cgi
seems not work well.  Though I am afraid I am wrong, how about
renaming /org/search.debian.org/etc/search.<lang>.htm into
renaming /org/search.debian.org/etc/index.<lang>.htm ?  The source
code of mnoGoSearch seems to substitute ".cgi" with ".htm" to
search the configuration file (src/search.c).
Index: english/searchtmpl/search.data
===================================================================
RCS file: /cvs/webwml/webwml/english/searchtmpl/search.data,v
retrieving revision 1.30
diff -u -r1.30 search.data
--- english/searchtmpl/search.data	30 Dec 2002 03:26:24 -0000	1.30
+++ english/searchtmpl/search.data	19 Jan 2003 14:02:03 -0000
@@ -1,3 +1,4 @@
+$(CHARSET=UTF-8) $(CHARSET_WML=UTF-8)
 #include "../../english/searchtmpl/search.def"
 <!--variables
 DBAddr  pgsql://www-data@/mnogo/?dbmode=cache
@@ -62,7 +63,6 @@
 -->
 
 <!--top-->
-$(CHARSET=UTF-8) $(CHARSET_WML=UTF-8)
 #use wml::debian::common_translation HOME="http://www.debian.org";
 $(title=<search>)
 #use wml::debian::languages
Index: english/searchtmpl/Makefile
===================================================================
RCS file: /cvs/webwml/webwml/english/searchtmpl/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- english/searchtmpl/Makefile	2 Nov 2002 23:36:01 -0000	1.5
+++ english/searchtmpl/Makefile	19 Jan 2003 14:05:58 -0000
@@ -10,6 +10,11 @@
 
 include $(WMLBASE)/Make.lang
 
+ifeq "$(LANGUAGE)" "ja"
+	WMLOUTFILE = $(@F)
+	WMLPROLOG =
+	WMLEPILOG =
+endif
 
 search.$(LANGUAGE).html: search.wml $(ENGLISHSRCDIR)/searchtmpl/search.data \
   $(ENGLISHSRCDIR)/searchtmpl/search.def $(TEMPLDIR)/common_translation.wml \
Index: english/searchtmpl/search.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/searchtmpl/search.wml,v
retrieving revision 1.8
diff -u -r1.8 search.wml
--- english/searchtmpl/search.wml	20 Dec 2002 00:23:53 -0000	1.8
+++ english/searchtmpl/search.wml	19 Jan 2003 14:11:37 -0000
@@ -10,6 +10,8 @@
 # Of course edit the blurb below (in your language directory) to suit.
 # Email debian-www@lists.debian.org if you want to understand how this
 # horror works.
+#
+# Translated files of this file must be encoded in UTF-8.
 
 #include "$(ENGLISHDIR)/searchtmpl/search.data"
 

Reply to: