You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Yoshiki Hayashi <yo...@xemacs.org> on 2004/11/29 03:44:32 UTC
Web site translation
More than a year after I proposed web site translation, I
finally sat down for a while and did necessary coding to add
translation support.
The demo is available at http://www.apache.org/~yoshiki/httpd-site/
Note that only index.html at top level is translated into
Japanese. Also note that links at the left side menu are
broken because of the way transformation is done. You can
type in the relative portion of some of the URLs there.
Now my questions are:
Does anyone object to the direction we are going? i.e.,
having translation of web site at all?
Now that we have true version control software, I think
the way to go is to create a branch like Paul did.
I'm going to create
https://svn.apache.org/repos/asf/httpd/site/branches/translation
unless someone objects.
Is there any policy on how to create and use branch?
I extended Anakia to do some new things like providing
context to get available languages and getting the
destination filename. I'd like to put the source code
somewhere in Subversion repository. Where shoud I put it?
https://svn.apache.org/repos/asf/httpd/site-build looks like a
good candidate to me.
The modifed httpd-site can be found at
cvs.apache.org:~yoshiki/httpd-site for now if you are
interested.
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Turkish Translations
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Emre Sokullu <so...@ultratv.net> writes:
> I've finished some of the Turkish translations, I send them to you. Some
> of them are in xml format, some others in html. If you wish, I can make
> the necessary corrections.
Thank you for the contribution!
As a policy, we need your translation to be reviewed by
another person fluent in the language. That person can be
you friend, colleague, etc. All he/she has to do is to
review one of your translations and post a message to this
list which document he/she has reviewed. I think you have
seen this page because you are listed there but there's a
page about translation at:
http://httpd.apache.org/docs-project/translations.html
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Turkish Translations
Posted by Emre Sokullu <so...@ultratv.net>.
Hi all,
I've finished some of the Turkish translations, I send them to you. Some
of them are in xml format, some others in html. If you wish, I can make
the necessary corrections.
--
Emre SOKULLU
http://www.turkix.org
Re: Web site translation
Posted by Mads Toftum <ma...@toftum.dk>.
On Mon, Nov 29, 2004 at 08:38:44PM +0100, André Malo wrote:
> yep. We could even add priorities to the documents (only two, "important"
> and "normal"). Important would be, say, the frontpage and perhaps a few
> others. An update of an important English page would invalidate the
> translation, a normal page would get a warning (like the docs).
>
That sounds like a very good solution to me.
vh
Mads Toftum
--
`Darn it, who spiked my coffee with water?!' - lwall
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
André Malo <nd...@perlig.de> writes:
> * Yoshiki Hayashi wrote:
>
>> I think it puts too much burden on documentation writers. I
>> mildly protested to the current way of putting out of date
>> warning on all outdated translations no matter what.
>
> Oh? I must have overlooked that. But to be clear, it's not to blame the
> translators. It's meant as a help for the user.
Here, I meant writers of original English documentation.
There aren't as many contributor to documentation from
development team as is. I don't think it is a very good
idea to tax origanal documentation contributor for the sake
of translations. But...
> yep. We could even add priorities to the documents (only two, "important"
> and "normal"). Important would be, say, the frontpage and perhaps a few
> others. An update of an important English page would invalidate the
> translation, a normal page would get a warning (like the docs).
... If the main purpose is just to invalidate the
translation in case of really important change, I guess
that's fine by me.
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by André Malo <nd...@perlig.de>.
* Yoshiki Hayashi wrote:
> I think it puts too much burden on documentation writers. I
> mildly protested to the current way of putting out of date
> warning on all outdated translations no matter what.
Oh? I must have overlooked that. But to be clear, it's not to blame the
translators. It's meant as a help for the user.
> But it
> is actually quite easy to sync translation when the change
> is not extensive so in that case warning doesn't stay long.
>
> > Another approach could be to mark all translated pages with a link to
> > the english version and a note/warning if the english version is newer.
> > (Just throwing out ideas - I'm not quite sure what I think would be the
> > best way to go).
>
> It's actually already done for manual translation and I
> think it will be done for website translation, too.
yep. We could even add priorities to the documents (only two, "important"
and "normal"). Important would be, say, the frontpage and perhaps a few
others. An update of an important English page would invalidate the
translation, a normal page would get a warning (like the docs).
nd
--
"Solides und umfangreiches Buch"
-- aus einer Rezension
<http://pub.perlig.de/books.html#apache2>
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Mads Toftum <ma...@toftum.dk> writes:
> On Mon, Nov 29, 2004 at 08:45:04PM +0900, marika@plum.freemail.ne.jp wrote:
>> my opinion is:
>> add marking(revision, time, or something to indicate) within each documents,
>> so anyone can recognize which part of translated version is
>> corresponding to the part of English version.
>> then, newly writing or remove to the document,
>> replace corresponding part of translated document to English version.
>> this may makes easily to find updated part.
>>
> I'm not quite sure I understand who is supposed to do what in your opinion.
> Could you please explain the flow?
I'm not sure, either, but it looks like what I'm trying to
achieve at the moment. If you can align paragraphs,
sentences and even words, you can automatically incorporate
or at least invalidate corresponding sections in translation
when original documents change. The problem is that it
isn't as easy as it looks...
> One thing I did think about before was wether there should be a way to
> indicate that a change to the english version wasn't important enough to
> warrant the english version overwriting the other language versions.
I think it puts too much burden on documentation writers. I
mildly protested to the current way of putting out of date
warning on all outdated translations no matter what. But it
is actually quite easy to sync translation when the change
is not extensive so in that case warning doesn't stay long.
> Another approach could be to mark all translated pages with a link to the
> english version and a note/warning if the english version is newer.
> (Just throwing out ideas - I'm not quite sure what I think would be the
> best way to go).
It's actually already done for manual translation and I
think it will be done for website translation, too.
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Mads Toftum <ma...@toftum.dk>.
On Mon, Nov 29, 2004 at 08:45:04PM +0900, marika@plum.freemail.ne.jp wrote:
> my opinion is:
> add marking(revision, time, or something to indicate) within each documents,
> so anyone can recognize which part of translated version is
> corresponding to the part of English version.
> then, newly writing or remove to the document,
> replace corresponding part of translated document to English version.
> this may makes easily to find updated part.
>
I'm not quite sure I understand who is supposed to do what in your opinion.
Could you please explain the flow?
One thing I did think about before was wether there should be a way to
indicate that a change to the english version wasn't important enough to
warrant the english version overwriting the other language versions.
Another approach could be to mark all translated pages with a link to the
english version and a note/warning if the english version is newer.
(Just throwing out ideas - I'm not quite sure what I think would be the
best way to go).
(And sorry if this has been suggested before - I just discovered yesterday
that I'd been unsubscribed from the list in the middle of october and
haven't had the time to read the archive yet).
vh
Mads Toftum
--
`Darn it, who spiked my coffee with water?!' - lwall
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by ma...@plum.freemail.ne.jp.
On Mon, 29 Nov 2004 10:57:15 +0100
Mads Toftum <ma...@toftum.dk> wrote by mutt :
> > No, not really. However, I'm concerned about how long the translations
> > could stay out of sync. There's going to be times when we try to post an
> > urgent notice and if the translator is asleep (or AWOL for a few weeks),
> > then that's troublesome. One idea: perhaps when we change the English
> > version of a page, we pull all translations until the individual
> > translation is sync'd up?
> I like the idea about letting the english translation take over when there
> is a newer version. If we go with this, I'll hack together a script to let
> translators know which pages that needs translating.
almost +1;
my opinion is:
add marking(revision, time, or something to indicate) within each documents,
so anyone can recognize which part of translated version is
corresponding to the part of English version.
then, newly writing or remove to the document,
replace corresponding part of translated document to English version.
this may makes easily to find updated part.
victory
Nobuyuki Morita
marika@plum.freemail.ne.jp
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Mads Toftum <ma...@toftum.dk>.
On Sun, Nov 28, 2004 at 10:23:50PM -0800, Justin Erenkrantz wrote:
> No, not really. However, I'm concerned about how long the translations
> could stay out of sync. There's going to be times when we try to post an
> urgent notice and if the translator is asleep (or AWOL for a few weeks),
> then that's troublesome. One idea: perhaps when we change the English
> version of a page, we pull all translations until the individual
> translation is sync'd up?
>
I like the idea about letting the english translation take over when there
is a newer version. If we go with this, I'll hack together a script to let
translators know which pages that needs translating.
vh
Mads Toftum
--
`Darn it, who spiked my coffee with water?!' - lwall
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
André Malo <nd...@perlig.de> writes:
> * Yoshiki Hayashi <yo...@xemacs.org> wrote:
>
>> I didn't know you were going to replace the build system.
>> All I knew was CSS work and it doesn't conflict with my
>> change because layout is only handled by site.vsl which I
>> didn't really change much.
>>
>> Could you elaborate on your new build system? I've never
>> heard of it before. I'd rather stick with current system
>> than going XSLT (I hate XSLT as a language).
>
> If you like lisp, you should love xslt ;-)
Yeah, I might have like it if it came with lots of
infuriating and silly parenthesis instead of lots of absurd
angle brackets. :-)
>> If we change
>> the build system at all, I think it's better to consider
>> using projects like forrest than creating yet another
>> documentation system.
>
> Not yet another one. I've thought about one that is based on the docs-build.
> Most problems (multitple languages, translation versioning, standardized
> tools and languages) is already resolved. Actually it was a main target (for
> me) for a long time, to build a common system for the whole httpd site.
OK, I don't have problem with current manual documentation
system and as I've said, I'm willing to wait. If majority
of people like XSLT better than Velocity and willing to move
to it when it becomes available, I'm cool with that, too.
--
Yoshiki Hayashi
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, November 29, 2004 1:10 PM +0100 André Malo <nd...@perlig.de> wrote:
> (And when I see the output of the forrest using projects, I don't like it).
You aren't the only one. Forrest frequently produces non XHTML pages. Plus,
forrest is a disaster to run. No way we're going to use Forrest. -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Mads Toftum <ma...@toftum.dk>.
On Mon, Nov 29, 2004 at 01:10:00PM +0100, André Malo wrote:
> (And when I see the output of the forrest using projects, I don't like it).
>
+1. Both for the looks and for not liking the idea of running the site
on cocoon.
vh
Mads Toftum
--
`Darn it, who spiked my coffee with water?!' - lwall
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by André Malo <nd...@perlig.de>.
* Yoshiki Hayashi <yo...@xemacs.org> wrote:
> I didn't know you were going to replace the build system.
> All I knew was CSS work and it doesn't conflict with my
> change because layout is only handled by site.vsl which I
> didn't really change much.
>
> Could you elaborate on your new build system? I've never
> heard of it before. I'd rather stick with current system
> than going XSLT (I hate XSLT as a language).
If you like lisp, you should love xslt ;-)
> If we change
> the build system at all, I think it's better to consider
> using projects like forrest than creating yet another
> documentation system.
Not yet another one. I've thought about one that is based on the docs-build.
Most problems (multitple languages, translation versioning, standardized
tools and languages) is already resolved. Actually it was a main target (for
me) for a long time, to build a common system for the whole httpd site.
(And when I see the output of the forrest using projects, I don't like it).
nd
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Bernardino <be...@terra.com.br>.
Por favor não me mandem mais mensagens. B
----- Original Message -----
From: "Yoshiki Hayashi" <yo...@xemacs.org>
To: <do...@httpd.apache.org>
Cc: <de...@httpd.apache.org>
Sent: Monday, November 29, 2004 7:49 AM
Subject: Re: Web site translation
André Malo <nd...@perlig.de> writes:
> * Justin Erenkrantz wrote:
>
>> --On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
>>
>> <yo...@xemacs.org> wrote:
>> > More than a year after I proposed web site translation, I
>> > finally sat down for a while and did necessary coding to add
>> > translation support.
>>
>> BTW, this might need to be discussed on dev@httpd as well. This is going
>> to affect all developers who touch the site.
>
> In fact, I wanted to wait until we have the new layout and a better build
> system (with xslt). We also need to think about the paths of the
> translation in conclusion with the docs etc.
I didn't know you were going to replace the build system.
All I knew was CSS work and it doesn't conflict with my
change because layout is only handled by site.vsl which I
didn't really change much.
Could you elaborate on your new build system? I've never
heard of it before. I'd rather stick with current system
than going XSLT (I hate XSLT as a language). If we change
the build system at all, I think it's better to consider
using projects like forrest than creating yet another
documentation system.
>> > Does anyone object to the direction we are going? i.e.,
>> > having translation of web site at all?
>>
>> No, not really. However, I'm concerned about how long the translations
>> could stay out of sync. There's going to be times when we try to post an
>> urgent notice and if the translator is asleep (or AWOL for a few weeks),
>> then that's troublesome. One idea: perhaps when we change the English
>> version of a page, we pull all translations until the individual
>> translation is sync'd up?
>
> That could be done similar to the docs. Either a note on the top or just
> dropping outdated translation (perhaps a combination).
That's exactly what I had in mind.
>> > Now that we have true version control software, I think
>> > the way to go is to create a branch like Paul did.
>> > I'm going to create
>> > https://svn.apache.org/repos/asf/httpd/site/branches/translation
>> > unless someone objects.
>> > Is there any policy on how to create and use branch?
>>
>> That's fine, I guess. However, if we have two branches going: one for
>> css deployment and translation, that could end up being nasty to merge
>> back together....
>
> One of the reasons I would wait.
As I said above, my work doesn't conflict with CSS work.
Translation focuses on contents whereas CSS does on layout.
Thanks to Velocity, those two are mostly separated.
I also don't intent to start translation on the branch. It
should wait after the build system is moved to main branch
and it can even wait until the CSS change goes to the trunk.
It's main purpose is to give people time to look at the
build system and raise concerns and/or brush up the build
system.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
>> I extended Anakia to do some new things like providing
>> context to get available languages and getting the
>> destination filename. I'd like to put the source code
>> somewhere in Subversion repository. Where shoud I put it?
>> https://svn.apache.org/repos/asf/httpd/site-build looks like a
>> good candidate to me.
>
> First, you should post the source code changes either to here or dev@httpd
so
> that we can review it. I'm not sure what exactly you changed. Did you
change
> Velocity? Or, just the Velocity templates that we used? -- justin
It's both. I extended AnakiaTask to contain additional
contexts to make some of the operation required by
translation possible. What I have done is to add mapper
support to map *.xml to *.html.en and *.xml.ja to
*.html.ja.euc-jp etc. and add new context $language to get
list of available translations for a given file. I also
modified template to include "Available Language:" thingy at
the bottom of the page (you can see it at
http://www.apache.org/~yoshiki/httpd-site/index.html) and
added a template and a build rule to generate typemap.
I attach the patches. The build system change is also in my
copied working copy at cvs.apache.org:~yoshiki/httpd-site.
You need jars in there to actually try it out.
Esta mensagem foi verificada pelo E-mail Protegido Terra.
Scan engine: McAfee VirusScan / Atualizado em 24/11/2004 / Versão: 4.3.20
(10.21) - Dat 4410
Proteja o seu e-mail Terra: http://www.emailprotegido.terra.com.br/
----------------------------------------------------------------------------
----
> --- AnakiaTask.java 2004-11-29 18:46:35.000000000 +0900
> +++ HttpdSiteDoc.java 2004-11-29 09:30:12.000000000 +0900
> @@ -1,4 +1,4 @@
> -package org.apache.velocity.anakia;
> +package org.apache.httpd.docs;
>
> /*
> * Copyright 2001-2004 The Apache Software Foundation.
> @@ -28,6 +28,8 @@
> import org.apache.tools.ant.DirectoryScanner;
> import org.apache.tools.ant.Project;
> import org.apache.tools.ant.taskdefs.MatchingTask;
> +import org.apache.tools.ant.types.Mapper;
> +import org.apache.tools.ant.util.FileNameMapper;
>
> import org.xml.sax.SAXParseException;
>
> @@ -42,6 +44,12 @@
> import org.apache.velocity.util.StringUtils;
>
> import org.apache.velocity.VelocityContext;
> +import org.apache.velocity.anakia.AnakiaJDOMFactory;
> +import org.apache.velocity.anakia.OutputWrapper;
> +import org.apache.velocity.anakia.TreeWalker;
> +import org.apache.velocity.anakia.XPathTool;
> +import org.apache.velocity.anakia.Escape;
> +import org.apache.httpd.docs.Language;
>
> /**
> * The purpose of this Ant Task is to allow you to use
> @@ -58,7 +66,7 @@
> * @author <a href="mailto:szegedia@freemail.hu">Attila Szegedi</a>
> * @version $Id: AnakiaTask.java,v 1.38 2004/03/20 03:35:50 dlr Exp $
> */
> -public class AnakiaTask extends MatchingTask
> +public class HttpdSiteDoc extends MatchingTask
> {
> /** <code>{@link SAXBuilder}</code> instance to use */
> private SAXBuilder builder;
> @@ -102,10 +110,13 @@
> /** the VelocityEngine instance to use */
> private VelocityEngine ve = new VelocityEngine();
>
> + /** Mapper to use. */
> + private Mapper mapperElement = null;
> +
> /**
> * Constructor creates the SAXBuilder.
> */
> - public AnakiaTask()
> + public HttpdSiteDoc()
> {
> builder = new SAXBuilder();
> builder.setFactory(new AnakiaJDOMFactory());
> @@ -297,6 +308,18 @@
> }
>
> /**
> + * Defines the mapper to map source to destination files.
> + * @exception BuildException if more than one mapper is defined
> + */
> + public void addMapper(Mapper mapper) {
> + if (mapperElement != null) {
> + throw new BuildException("Cannot define more than one
mapper",
> + getLocation());
> + }
> + mapperElement = mapper;
> + }
> +
> + /**
> * Process an XML file using Velocity
> */
> private void process(File baseDir, String xmlFile, File destDir,
> @@ -310,10 +333,26 @@
> {
> // the current input file relative to the baseDir
> inFile = new File(baseDir,xmlFile);
> - // the output file relative to basedir
> - outFile = new File(destDir,
> - xmlFile.substring(0,
> - xmlFile.lastIndexOf('.')) + extension);
> +
> + FileNameMapper mapper = null;
> + if (mapperElement != null) {
> + mapper = mapperElement.getImplementation();
> + } else {
> + mapper = new StyleMapper();
> + }
> +
> + String[] outFileName = mapper.mapFileName(xmlFile);
> + if (outFileName == null || outFileName.length == 0) {
> + log("Skipping " + inFile + " it cannot get mapped to
output.",
> + Project.MSG_VERBOSE);
> + return;
> + } else if (outFileName == null || outFileName.length > 1) {
> + log("Skipping " + inFile + " its mapping is ambiguos.",
> + Project.MSG_VERBOSE);
> + return;
> + }
> +
> + outFile = new File(destDir, outFileName[0]);
>
> // only process files that have changed
> if (lastModifiedCheck == false ||
> @@ -355,6 +394,8 @@
> context.put ("xpath", new XPathTool() );
> context.put ("escape", new Escape() );
> context.put ("date", new java.util.Date() );
> + context.put ("fileName", outFile.getName());
> + context.put ("language", new
Language(inFile.toString()));
>
> // only put this into the context if it exists.
> if (projectDocument != null)
> @@ -470,4 +511,24 @@
> }
> }
> }
> +
> +
> + /**
> + * Mapper implementation of the "traditional" way <xslt>
> + * mapped filenames.
> + *
> + * <p>If the file has an extension, chop it off. Append whatever
> + * the user has specified as extension or ".html".</p>
> + */
> + private class StyleMapper implements FileNameMapper {
> + public void setFrom(String from) {}
> + public void setTo(String to) {}
> + public String[] mapFileName(String xmlFile) {
> + int dotPos = xmlFile.lastIndexOf('.');
> + if (dotPos > 0) {
> + xmlFile = xmlFile.substring(0, dotPos);
> + }
> + return new String[] {xmlFile + extension};
> + }
> + }
> }
> --- /dev/null 2004-09-06 10:55:55.000000000 +0900
> +++ Language.java 2004-11-29 11:10:28.000000000 +0900
> @@ -0,0 +1,67 @@
> +package org.apache.httpd.docs;
> +
> +/*
> + * Copyright 2004 The Apache Software Foundation.
> + *
> + * Licensed under the Apache License, Version 2.0 (the "License")
> + * you may not use this file except in compliance with the License.
> + * You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing, software
> + * distributed under the License is distributed on an "AS IS" BASIS,
> + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
> + * See the License for the specific language governing permissions and
> + * limitations under the License.
> + */
> +
> +import java.util.Vector;
> +import java.io.File;
> +
> +/**
> + * This class is to get available languages for a given file.
> + * It assumes the files follow the pattern *.xml.?? where ?? is
> + * a two letter language code. If the language code is omitted,
> + * it is assumed to be in English.
> + */
> +public class Language
> +{
> + public Language(String path) {
> + this.path = path;
> + }
> +
> + public Vector availableLanguages() {
> + Vector codes = new Vector();
> + File file = new File(path);
> +
> + String fileName = file.getName();
> + int extensionIndex = fileName.lastIndexOf(".xml");
> + if (extensionIndex != -1) {
> + fileName = fileName.substring(0, extensionIndex + 4);
> + }
> +
> + File parentDir = file.getParentFile();
> +
> + if (parentDir == null)
> + return codes;
> +
> + String[] files = parentDir.list();
> +
> + for (int i = 0; i < files.length; i++) {
> + if (files[i].startsWith(fileName)) {
> + if (files[i].equals(fileName)) {
> + codes.add("en");
> + } else {
> + String code = files[i].substring(fileName.length() + 1);
> + if (code.length() == 2) {
> + codes.add(code);
> + }
> + }
> + }
> + }
> + return codes;
> + }
> +
> + private String path;
> +}
>
----------------------------------------------------------------------------
----
> Index: build.xml
> ===================================================================
> --- build.xml (revision 106705)
> +++ build.xml (working copy)
> @@ -12,24 +12,24 @@
> </path>
>
> <target name="prepare">
> - <available classname="org.apache.velocity.anakia.AnakiaTask"
> - property="AnakiaTask.present">
> + <available classname="org.apache.httpd.docs.HttpdSiteDoc"
> + property="HttpdSiteDoc.present">
> <classpath refid="classpath"/>
> </available>
> </target>
>
> - <target depends="prepare" name="prepare-error"
unless="AnakiaTask.present">
> + <target depends="prepare" name="prepare-error"
unless="HttpdSiteDoc.present">
> <echo>
> - AnakiaTask is not present! Please check to make sure that
> - velocity.jar is in your classpath.
> + HttpdSiteDoc is not present! Please check to make sure that
> + httpd-docs.jar is in your classpath.
> </echo>
> </target>
>
> - <target name="docs" depends="prepare-error" if="AnakiaTask.present">
> - <taskdef name="anakia"
classname="org.apache.velocity.anakia.AnakiaTask">
> + <target name="docs" depends="prepare-error"
if="HttpdSiteDoc.present">
> + <taskdef name="httpdDocs"
classname="org.apache.httpd.docs.HttpdSiteDoc">
> <classpath refid="classpath"/>
> </taskdef>
> - <anakia basedir="${docs.src}" destdir="${docs.dest}/"
> + <httpdDocs basedir="${docs.src}" destdir="${docs.dest}/"
> extension=".html" style="./site.vsl"
> projectFile="stylesheets/project.xml"
> excludes="**/stylesheets/** empty.xml **/test/flood/*"
> @@ -37,9 +37,32 @@
> lastModifiedCheck="true"
> templatePath="${docs.src}/stylesheets"
> >
> - </anakia>
> + <mapper type="glob" from="*.xml" to="*.html.en"/>
> + </httpdDocs>
>
> - <anakia basedir="${docs.src}"
> + <httpdDocs basedir="${docs.src}" destdir="${docs.dest}/"
> + extension=".html" style="./site.vsl"
> + projectFile="stylesheets/ja/project.xml"
> + excludes="**/stylesheets/** empty.xml **/test/flood/*"
> + includes="**/*.xml.ja"
> + lastModifiedCheck="true"
> + templatePath="${docs.src}/stylesheets"
> + velocityPropertiesFile="properties/ja"
> + >
> + <mapper type="glob" from="*.xml.ja" to="*.html.ja.euc-jp"/>
> + </httpdDocs>
> +
> + <httpdDocs basedir="${docs.src}" destdir="${docs.dest}/"
> + extension=".html" style="./typemap.vsl"
> + projectFile="stylesheets/lang.xml"
> + excludes="**/stylesheets/** empty.xml **/test/flood/*"
> + includes="**/*.xml"
> + lastModifiedCheck="true"
> + templatePath="${docs.src}/stylesheets"
> + >
> + </httpdDocs>
> +
> + <httpdDocs basedir="${docs.src}"
> destdir="${docs.dest}"
> extension=".html" style="./site.vsl"
> projectFile="stylesheets/flood.xml"
> @@ -48,7 +71,7 @@
> lastModifiedCheck="true"
> templatePath="${docs.src}/stylesheets"
> >
> - </anakia>
> + </httpdDocs>
>
> <copy todir="${docs.dest}/" filtering="no">
> <fileset dir="${docs.src}/">
> Index: properties/ja
> ===================================================================
> --- properties/ja (revision 0)
> +++ properties/ja (revision 0)
> @@ -0,0 +1,3 @@
> +file.resource.loader.path=xdocs/stylesheets
> +input.encoding=utf-8
> +output.encoding=euc-jp
> Index: xdocs/stylesheets/lang.xml
> ===================================================================
> --- xdocs/stylesheets/lang.xml (revision 0)
> +++ xdocs/stylesheets/lang.xml (revision 0)
> @@ -0,0 +1,14 @@
> +<?xml version="1.0" encoding="ISO-8859-1"?>
> +<project href="http://httpd.apache.org/">
> +
> +<en>
> +<extension>.en</extension>
> +<charset>iso-8859-1</charset>
> +</en>
> +
> +<ja>
> +<extension>.ja.euc-jp</extension>
> +<charset>euc-jp</charset>
> +</ja>
> +
> +</project>
> Index: xdocs/stylesheets/typemap.vsl
> ===================================================================
> --- xdocs/stylesheets/typemap.vsl (revision 0)
> +++ xdocs/stylesheets/typemap.vsl (revision 0)
> @@ -0,0 +1,6 @@
> +#foreach ( $lang in $language.availableLanguages() )
> +URI: ${fileName}$project.getChild($lang).getChild("extension").getText()
> +Content-Language: $lang
> +Content-Type: text/html;
charset=$project.getChild($lang).getChild("charset").getText()
> +
> +#end
> Index: xdocs/stylesheets/site.vsl
> ===================================================================
> --- xdocs/stylesheets/site.vsl (revision 106705)
> +++ xdocs/stylesheets/site.vsl (working copy)
> @@ -247,6 +247,13 @@
> </td>
> </tr>
> <!-- FOOTER -->
> + <tr><td colspan="2" align="right">
> + Available Languages:
> + #set ($baseHtml = $fileName.substring(0,
$fileName.lastIndexOf(".html")))
> + #foreach ( $lang in $language.availableLanguages() )
> + <a href="$relativePath/${baseHtml}.html.$lang">$lang</a>
> + #end
> + </td></tr>
> <tr><td colspan="2"><hr noshade="noshade" size="1"/></td></tr>
> <tr><td colspan="2" align="center">
> <font size="-1">
> @@ -258,3 +265,4 @@
> </body>
> </html>
> #end
> +
> Index: xdocs/stylesheets/ja/project.xml
> ===================================================================
> --- xdocs/stylesheets/ja/project.xml (revision 0)
> +++ xdocs/stylesheets/ja/project.xml (revision 0)
> @@ -0,0 +1,48 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<project href="http://httpd.apache.org/">
> +
> +<title>The Apache HTTP Server Project</title>
> +<body>
> +<menu><title>??</title>
> + <li><a href="/ABOUT_APACHE.html">Apache ????</a></li>
> + <li><a href="http://www.apache.org/licenses/">?????</a></li>
> + <li><a href="/docs/misc/FAQ.html">FAQ</a></li>
> + <li><a href="/security_report.html">??????<br />????</a></li>
> +</menu>
> +
> +<menu><title>??????!</title>
> + <li><a href="/download.cgi">?????</a></li>
> +</menu>
> +
> +<menu><title href="/docs-project/">??????</title>
> + <li><a href="/docs/">Apache 1.3</a></li>
> + <li><a href="/docs-2.0/">Apache 2.0</a></li>
> +</menu>
> +
> +<menu><title>????</title>
> + <li><a href="/lists.html">????????</a></li>
> + <li><a href="/bug_report.html">????</a></li>
> + <li><a href="/dev/">????????</a></li>
> +</menu>
> +
> +<menu><title>????????</title>
> + <li><a href="/docs-project/">Docs</a></li>
> + <li><a href="/test/">Test</a></li>
> + <li><a href="/test/flood/">Flood</a></li>
> + <li><a href="/apreq/">libapreq</a></li>
> + <li><a href="/modules/">Modules</a></li>
> + <li><a href="/cli/">cli (.NET)</a></li>
> +</menu>
> +
> +<menu><title href="/info/">???</title>
> + <li><a href="/contributors/">????</a></li>
> + <li><a href="/awards.html">?</a></li>
> + <li><a href="http://webring.com/hub?ring=apachesupport"
> + >????<br />??????</a></li>
> +</menu>
> +<!--
> + <LI><A HREF="announcelist.html">Announcements via Email</A>
> + <LI><A HREF="related_projects.html">Related Projects</A>
> +-->
> +</body>
> +</project>
>
----------------------------------------------------------------------------
----
>
>
> --
> Yoshiki Hayashi
>
>
----------------------------------------------------------------------------
----
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
> For additional commands, e-mail: docs-help@httpd.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Andr� Malo <nd...@perlig.de> writes:
> * Justin Erenkrantz wrote:
>
>> --On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
>>
>> <yo...@xemacs.org> wrote:
>> > More than a year after I proposed web site translation, I
>> > finally sat down for a while and did necessary coding to add
>> > translation support.
>>
>> BTW, this might need to be discussed on dev@httpd as well. This is going
>> to affect all developers who touch the site.
>
> In fact, I wanted to wait until we have the new layout and a better build
> system (with xslt). We also need to think about the paths of the
> translation in conclusion with the docs etc.
I didn't know you were going to replace the build system.
All I knew was CSS work and it doesn't conflict with my
change because layout is only handled by site.vsl which I
didn't really change much.
Could you elaborate on your new build system? I've never
heard of it before. I'd rather stick with current system
than going XSLT (I hate XSLT as a language). If we change
the build system at all, I think it's better to consider
using projects like forrest than creating yet another
documentation system.
>> > Does anyone object to the direction we are going? i.e.,
>> > having translation of web site at all?
>>
>> No, not really. However, I'm concerned about how long the translations
>> could stay out of sync. There's going to be times when we try to post an
>> urgent notice and if the translator is asleep (or AWOL for a few weeks),
>> then that's troublesome. One idea: perhaps when we change the English
>> version of a page, we pull all translations until the individual
>> translation is sync'd up?
>
> That could be done similar to the docs. Either a note on the top or just
> dropping outdated translation (perhaps a combination).
That's exactly what I had in mind.
>> > Now that we have true version control software, I think
>> > the way to go is to create a branch like Paul did.
>> > I'm going to create
>> > https://svn.apache.org/repos/asf/httpd/site/branches/translation
>> > unless someone objects.
>> > Is there any policy on how to create and use branch?
>>
>> That's fine, I guess. However, if we have two branches going: one for
>> css deployment and translation, that could end up being nasty to merge
>> back together....
>
> One of the reasons I would wait.
As I said above, my work doesn't conflict with CSS work.
Translation focuses on contents whereas CSS does on layout.
Thanks to Velocity, those two are mostly separated.
I also don't intent to start translation on the branch. It
should wait after the build system is moved to main branch
and it can even wait until the CSS change goes to the trunk.
It's main purpose is to give people time to look at the
build system and raise concerns and/or brush up the build
system.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
>> I extended Anakia to do some new things like providing
>> context to get available languages and getting the
>> destination filename. I'd like to put the source code
>> somewhere in Subversion repository. Where shoud I put it?
>> https://svn.apache.org/repos/asf/httpd/site-build looks like a
>> good candidate to me.
>
> First, you should post the source code changes either to here or dev@httpd so
> that we can review it. I'm not sure what exactly you changed. Did you change
> Velocity? Or, just the Velocity templates that we used? -- justin
It's both. I extended AnakiaTask to contain additional
contexts to make some of the operation required by
translation possible. What I have done is to add mapper
support to map *.xml to *.html.en and *.xml.ja to
*.html.ja.euc-jp etc. and add new context $language to get
list of available translations for a given file. I also
modified template to include "Available Language:" thingy at
the bottom of the page (you can see it at
http://www.apache.org/~yoshiki/httpd-site/index.html) and
added a template and a build rule to generate typemap.
I attach the patches. The build system change is also in my
copied working copy at cvs.apache.org:~yoshiki/httpd-site.
You need jars in there to actually try it out.
Re: Web site translation
Posted by Yoshiki Hayashi <yo...@xemacs.org>.
André Malo <nd...@perlig.de> writes:
> * Justin Erenkrantz wrote:
>
>> --On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
>>
>> <yo...@xemacs.org> wrote:
>> > More than a year after I proposed web site translation, I
>> > finally sat down for a while and did necessary coding to add
>> > translation support.
>>
>> BTW, this might need to be discussed on dev@httpd as well. This is going
>> to affect all developers who touch the site.
>
> In fact, I wanted to wait until we have the new layout and a better build
> system (with xslt). We also need to think about the paths of the
> translation in conclusion with the docs etc.
I didn't know you were going to replace the build system.
All I knew was CSS work and it doesn't conflict with my
change because layout is only handled by site.vsl which I
didn't really change much.
Could you elaborate on your new build system? I've never
heard of it before. I'd rather stick with current system
than going XSLT (I hate XSLT as a language). If we change
the build system at all, I think it's better to consider
using projects like forrest than creating yet another
documentation system.
>> > Does anyone object to the direction we are going? i.e.,
>> > having translation of web site at all?
>>
>> No, not really. However, I'm concerned about how long the translations
>> could stay out of sync. There's going to be times when we try to post an
>> urgent notice and if the translator is asleep (or AWOL for a few weeks),
>> then that's troublesome. One idea: perhaps when we change the English
>> version of a page, we pull all translations until the individual
>> translation is sync'd up?
>
> That could be done similar to the docs. Either a note on the top or just
> dropping outdated translation (perhaps a combination).
That's exactly what I had in mind.
>> > Now that we have true version control software, I think
>> > the way to go is to create a branch like Paul did.
>> > I'm going to create
>> > https://svn.apache.org/repos/asf/httpd/site/branches/translation
>> > unless someone objects.
>> > Is there any policy on how to create and use branch?
>>
>> That's fine, I guess. However, if we have two branches going: one for
>> css deployment and translation, that could end up being nasty to merge
>> back together....
>
> One of the reasons I would wait.
As I said above, my work doesn't conflict with CSS work.
Translation focuses on contents whereas CSS does on layout.
Thanks to Velocity, those two are mostly separated.
I also don't intent to start translation on the branch. It
should wait after the build system is moved to main branch
and it can even wait until the CSS change goes to the trunk.
It's main purpose is to give people time to look at the
build system and raise concerns and/or brush up the build
system.
Justin Erenkrantz <ju...@erenkrantz.com> writes:
>> I extended Anakia to do some new things like providing
>> context to get available languages and getting the
>> destination filename. I'd like to put the source code
>> somewhere in Subversion repository. Where shoud I put it?
>> https://svn.apache.org/repos/asf/httpd/site-build looks like a
>> good candidate to me.
>
> First, you should post the source code changes either to here or dev@httpd so
> that we can review it. I'm not sure what exactly you changed. Did you change
> Velocity? Or, just the Velocity templates that we used? -- justin
It's both. I extended AnakiaTask to contain additional
contexts to make some of the operation required by
translation possible. What I have done is to add mapper
support to map *.xml to *.html.en and *.xml.ja to
*.html.ja.euc-jp etc. and add new context $language to get
list of available translations for a given file. I also
modified template to include "Available Language:" thingy at
the bottom of the page (you can see it at
http://www.apache.org/~yoshiki/httpd-site/index.html) and
added a template and a build rule to generate typemap.
I attach the patches. The build system change is also in my
copied working copy at cvs.apache.org:~yoshiki/httpd-site.
You need jars in there to actually try it out.
Re: Web site translation
Posted by André Malo <nd...@perlig.de>.
* Justin Erenkrantz wrote:
> --On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
>
> <yo...@xemacs.org> wrote:
> > More than a year after I proposed web site translation, I
> > finally sat down for a while and did necessary coding to add
> > translation support.
>
> BTW, this might need to be discussed on dev@httpd as well. This is going
> to affect all developers who touch the site.
In fact, I wanted to wait until we have the new layout and a better build
system (with xslt). We also need to think about the paths of the
translation in conclusion with the docs etc.
> > Does anyone object to the direction we are going? i.e.,
> > having translation of web site at all?
>
> No, not really. However, I'm concerned about how long the translations
> could stay out of sync. There's going to be times when we try to post an
> urgent notice and if the translator is asleep (or AWOL for a few weeks),
> then that's troublesome. One idea: perhaps when we change the English
> version of a page, we pull all translations until the individual
> translation is sync'd up?
That could be done similar to the docs. Either a note on the top or just
dropping outdated translation (perhaps a combination).
> > Now that we have true version control software, I think
> > the way to go is to create a branch like Paul did.
> > I'm going to create
> > https://svn.apache.org/repos/asf/httpd/site/branches/translation
> > unless someone objects.
> > Is there any policy on how to create and use branch?
>
> That's fine, I guess. However, if we have two branches going: one for
> css deployment and translation, that could end up being nasty to merge
> back together....
One of the reasons I would wait.
nd
--
Winnetous Erbe: <http://pub.perlig.de/books.html#apache2>
Re: Web site translation
Posted by André Malo <nd...@perlig.de>.
* Justin Erenkrantz wrote:
> --On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
>
> <yo...@xemacs.org> wrote:
> > More than a year after I proposed web site translation, I
> > finally sat down for a while and did necessary coding to add
> > translation support.
>
> BTW, this might need to be discussed on dev@httpd as well. This is going
> to affect all developers who touch the site.
In fact, I wanted to wait until we have the new layout and a better build
system (with xslt). We also need to think about the paths of the
translation in conclusion with the docs etc.
> > Does anyone object to the direction we are going? i.e.,
> > having translation of web site at all?
>
> No, not really. However, I'm concerned about how long the translations
> could stay out of sync. There's going to be times when we try to post an
> urgent notice and if the translator is asleep (or AWOL for a few weeks),
> then that's troublesome. One idea: perhaps when we change the English
> version of a page, we pull all translations until the individual
> translation is sync'd up?
That could be done similar to the docs. Either a note on the top or just
dropping outdated translation (perhaps a combination).
> > Now that we have true version control software, I think
> > the way to go is to create a branch like Paul did.
> > I'm going to create
> > https://svn.apache.org/repos/asf/httpd/site/branches/translation
> > unless someone objects.
> > Is there any policy on how to create and use branch?
>
> That's fine, I guess. However, if we have two branches going: one for
> css deployment and translation, that could end up being nasty to merge
> back together....
One of the reasons I would wait.
nd
--
Winnetous Erbe: <http://pub.perlig.de/books.html#apache2>
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
Re: Web site translation
Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Monday, November 29, 2004 11:44 AM +0900 Yoshiki Hayashi
<yo...@xemacs.org> wrote:
> More than a year after I proposed web site translation, I
> finally sat down for a while and did necessary coding to add
> translation support.
BTW, this might need to be discussed on dev@httpd as well. This is going to
affect all developers who touch the site.
> Does anyone object to the direction we are going? i.e.,
> having translation of web site at all?
No, not really. However, I'm concerned about how long the translations could
stay out of sync. There's going to be times when we try to post an urgent
notice and if the translator is asleep (or AWOL for a few weeks), then that's
troublesome. One idea: perhaps when we change the English version of a page,
we pull all translations until the individual translation is sync'd up?
> Now that we have true version control software, I think
> the way to go is to create a branch like Paul did.
> I'm going to create
> https://svn.apache.org/repos/asf/httpd/site/branches/translation
> unless someone objects.
> Is there any policy on how to create and use branch?
That's fine, I guess. However, if we have two branches going: one for css
deployment and translation, that could end up being nasty to merge back
together....
> I extended Anakia to do some new things like providing
> context to get available languages and getting the
> destination filename. I'd like to put the source code
> somewhere in Subversion repository. Where shoud I put it?
> https://svn.apache.org/repos/asf/httpd/site-build looks like a
> good candidate to me.
First, you should post the source code changes either to here or dev@httpd so
that we can review it. I'm not sure what exactly you changed. Did you change
Velocity? Or, just the Velocity templates that we used? -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org