[wp-polyglots] Locale Directory Structure

K Suominen ksuominen at gmail.com
Mon Feb 28 05:07:12 GMT 2005


On Sun, 27 Feb 2005 22:34:06 -0600, Ryan Boren <ryan at boren.nu> wrote:
> In order to make automated packaging easier, let's define the locale
> directory structure more precisely.

The fi_FI locale currently already has fully automated packaging
implemented.  It can also be easily extended to cover more locales, by
calling make(1) recursively, e.g. from an upper-level directory.

> All trunk development happens under lc_CC/trunk/.  Beneath this we have
> the following arrangement (using fr_FR as an example):
> 
> ./fr_FR/trunk/dist:
> license.txt  readme.html

The only definitive version of the GPL is the one in English -- it is
probably not a good idea to replace the English version in any
distribution.

I think at least a couple other translations in addition to Finnish
are providing a separate file with a translated GPL for assistance in
interpreting the definitive version.  That seems to be what other
projects have done as well.  (Maybe it is a GNU guideline, but I
haven't checked.)

> ./fr_FR/trunk/messages:
> ./fr_FR/trunk/theme:

When I was automating the packaging, I thought it would have been much
easier to place all files in a single tree, reflecting their proper
location in the final distribution.  In other words:

readme.html
wp-config-sample.php
wp-content/themes/default/...
wp-includes/languages/fr_FR.po  (not that the .po file needs to be distributed
wp-includes/languages/fr_FR.mo

What's the benefit from placing the themes or the message file elsewhere?

> Consider the dist directory to be the root of a wordpress installation.
> There is no need for a dist/wordpress/ subdirectory.

I have a subdirectory like that to aid the automated conversion
between character sets / entity encoding.  I could modify that to work
directly in the trunk directory, though.  (It would be even nicer if
there was just one tree of files to convert.)

> I notice that some locales are providing different versions of the
> default theme for each character set they support.  Let's decide on a
> structure for this.  How about:
> 
> lc_CC/trunk/theme/UTF-8/index.php
> lc_CC/trunk/theme/ISO-8859-1/index.php

It is not just themes that need this -- all the other translated files
need it, too.

For Finnish, though, I found it easiest to automate the conversion,
eliminating the need to commit different converted versions of the
same content into the repository.

I also consider the files in the repository to be "source" files.  The
automated packaging procedure (in the Makefile's and the top-level
build.sh) converts the source files to the correct character set or
entity encoding as required.  This minimizes the maintenance.

However, it also has a second impact: the "source" files should not be
distributed "as is."  They should be processed as part of the
packaging, as implemented.  For example, the "source" files are in ISO
8859-1, because UTF-8 support still falls short on the UNIX systems I
use.  I have set the svn:mime-type property accordingly.

Reards,
+ Kim


More information about the wp-polyglots mailing list