Menu

#1209 whole HTML templates approach wrong

2.1 beta
open
nobody
Web/CGI (248)
5
2008-01-17
2008-01-01
jidanni
No

Gentlemen, observe the deformed child among

$ grep -ihc button mailman-2.1.10b1/templates/*/options.html|xargs
26 26 26 26 26 28 26 25 26 22 26 26 26 26 28 26 26 25 26 27 26 26 26
26 26 27 26 26 26 26 26 26 26 26 14
Yes at the very end, 14.

Might as well just
$ iconv -t gb2312 templates/zh_CN/options.html|iconv -f gb2312 -t big5|
iconv -f big5 > templates/zh_TW/options.html

It's better than a form without a submit button.

Who knows how many other parts of mailman lack an eye here, a leg
there...

Discussion

  • jidanni

    jidanni - 2008-01-17

    Logged In: YES
    user_id=1971011
    Originator: YES

    Gentlemen, I have figured out how to use the poorly documented
    transcheck command, and the winner is....
    $ for i in $(cd messages;ls); do echo -n $i:\ ; bin/transcheck -q $i;done
    ar: 15 warnings in 2 files
    ca: 51 warnings in 4 files
    cs: 2 warnings in 1 files
    da: 17 warnings in 2 files
    de: 38 warnings in 10 files
    es: 40 warnings in 6 files
    ja: 0 warnings in 0 files
    ...
    sv: 50 warnings in 2 files
    tr: 21 warnings in 2 files
    uk: 17 warnings in 2 files
    vi: 9 warnings in 3 files
    zh_CN: 31 warnings in 4 files
    zh_TW: 93 warnings in 10 files

    That's right, zh_TW, another gold medal.

    Actually it appears your whole approach is wrong.
    With entire .html and .txt files to be translated, there will always
    be missing buttons, etc. If instead using just strings in .po files,
    if a message isn't translated, at least the English will be shown to
    the user.

    Anyway how terrible to have unlucky languages with missing buttons.

    Let's see how MediaWiki does this. There is just one template, and the
    stings are translated only.

    Doesn't that make more sense? You program's functionality shouldn't
    vary by language, but just the strings that describe the
    functionality.

    If one wants to customize, then one should customize the template,
    affecting all languages.

     
  • jidanni

    jidanni - 2008-01-17
    • summary: zh_TW options even lacks SUBMIT button --> whole HTML templates approach wrong
     
  • jidanni

    jidanni - 2008-01-17

    Logged In: YES
    user_id=1971011
    Originator: YES

    So I thought maybe for my zh_TW site, I shall change the site language
    to English, to avoid running all the 93 files with all kinds of
    missing code in them, here on Dreamhost's installation where even me,
    site administrator, has only the web interface. (I downloaded the
    source and am looking at it on my home machine, not Dreamhost's.)

    I thought just maybe I could at least put some Chinese in some of the
    four pages that we are allowed to edit via the web interface.

    But then I see the HTTP header already has the ascii character set
    defined, an as you know that overrides anything I can put in the body.

    Yes, I could have the zh_TW versions shown to users by default, and
    even edit them first to my hearts content, but that means I must
    change the site language to zh_TW, consigning myself to running the 93
    defective parts.

     
  • jidanni

    jidanni - 2008-01-17

    Logged In: YES
    user_id=1971011
    Originator: YES

    I find putting & # 12345 ; style entities into the boxes on admin.cgi/.../general may be a workaround for getting past the charset stuff. Haven't tested ZH_tw blobs in EN email, or seen what will become of zh_TW archives when switching the _monolithic_ site language to EN.

     
  • jidanni

    jidanni - 2008-03-09

    Logged In: YES
    user_id=1971011
    Originator: YES

    See e.g., http://en.wikipedia.org/wiki/Tableless_web_design .

     

Log in to post a comment.