htdocs and the newest news.

Derek Atkins warlord at MIT.EDU
Fri Feb 10 16:56:20 EST 2006


Neil Williams <linux at codehelp.co.uk> writes:

>> I'm a bit concerned that the translations are done via php.
>
> My reasons were relatively simple: 
> 1. The old site was already using php, albeit without translation.
> 2. PHP and gettext work well together
> 3. Using PHP for all translatable text generates a single POT file which is 
> always preferable for translators.

True, although one would think we could continue to do translation via
separate translation subdirs (at least for the main content -- it
probably makes sense to use php + gettext to translate the menus --
the menus dont change).

My fear is that someone makes a small change to a website and now the
international viewer gets a partial translation until the po file gets
updated.  I suppose the flip side is an out-of-date translation..  but
I'm not sure which is worse, out of date or partial.

> What do you think about translating the news items?

I still have no idea who does this translation..  But my feeling is
that yes, news should be translated if there's a translation
available; otherwise it should be printed in English.

> My conversion of oldnews.phtml is geared more towards easier translation than 
> easier editing because I've specifically excluded as many HTML tags and 
> "markers" (like the 'o' at the start of each feature description) from the 
> translatable text. oldnews.phtml isn't likely to need much editing, except 
> adding existing blocks to the top and maybe siphoning really old content off 
> the bottom.

For the news file I think it's more important towards easier editing.
In fact I almost think that's true for the normal website content,
too..  Keep in mind that MOST of the content is now off on the Wiki,
and the wiki is NOT translated!

> If news isn't to be translated, or at least not translated imminently after 
> upload, then the original text format is fine. The script is still in place 
> and can easily be modified to a new method.

I honestly have no idea.  I'd like to think that news will get
translated, but I also have no idea how rapidly changes to the website
will get translated.  Keep in mind it can take weeks or months to get
application translation, and AFAIK we still don't get full
translations!  I can't imagine how rapidly website content will get
translated.

> To make it available for translation, the file would need to be available to 
> PHP - otherwise you end up with multiple translation files, as we had in the 
> old news method - but all that this means is that news is uploaded as 
> text/plain in a file named .phtml instead of .txt.

I think multiple translation files is just file..  It's easy to upload
content to the website (or at least it will be once the migration is
done).  Indeed, I think multiple small translated news files is going
to be MUCH better than a single PO file.

> The strings do need to be marked up _in the news file_ before the
> strings can be available to be translated. So a text/plain format
> can't be translated as-is, at least without creating a separate
> translation file.

Why can't we do something like:

 if ( file_exists (<lang>/news-<date>) ) {
   include <lang>/news-<date>;
 } else {
   include en/news-<date>;
 }

We know what language the user wants.  Why can't we just go over the
list of news items and if there's an entry in the translated news
directory we use that instead of the english version?

>> (I'll note that my abhorrance of PHP isn't as pronounced as your
>> abhorrance to scheme -- but it's pretty close -- I'm at least willing
>> to LOOK at php code ;)
> ;-)
>
> All I can say to that is that php - especially as used in the
> revamped site - is, IMHO, easier to follow than all those unmatched
> parentheses in scheme!

Unmatched parentheses in scheme is just as bad as umatched
greater-than, less-than tags in PHP/HTML, and remembering to do the ?>
to close your tags and such.  Uggh..

> (and php is only on the website, it's not as critical as the scheme in 
> gnucash.)

I dont know -- people who can't get to the website usually can't
download the program!  :)

-derek
-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list