[Python-Dev] PEP 215 redux: toward a simplified consensus? (original) (raw)

Barry A. Warsaw barry@zope.com
Mon, 25 Feb 2002 18:19:24 -0500


"SM" == Skip Montanaro <skip@pobox.com> writes:

SM> So translators aren't programmers either.

Well, they may not be /Python/ programmers. ;)

SM> Just tell them anything between %(...) and the first
SM> alphabetic character after that is off-limits.  Again, it
SM> doesn't look to me like a programmer problem.

SM> Just to play the devil's advocate (and ignoring the bit about
SM> $-strings not being i18n-friendly), I suspect non-programming
SM> translators would have just as much trouble with something
SM> like

SM>     <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="normal">&quot;</mi><mi>P</mi><mi>l</mi><mi>e</mi><mi>a</mi><mi>s</mi><mi>e</mi><mi>c</mi><mi>o</mi><mi>n</mi><mi>f</mi><mi>i</mi><mi>r</mi><mi>m</mi><mi>y</mi><mi>o</mi><mi>u</mi><mi>r</mi><mi>c</mi><mi>h</mi><mi>o</mi><mi>i</mi><mi>c</mi><mi>e</mi><mi>o</mi><mi>f</mi><mi>c</mi><mi>o</mi><mi>l</mi><mi>o</mi><mi>r</mi><mo stretchy="false">(</mo></mrow><annotation encoding="application/x-tex">&quot;Please confirm your choice of color (</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord">&quot;</span><span class="mord mathnormal" style="margin-right:0.01968em;">Pl</span><span class="mord mathnormal">e</span><span class="mord mathnormal">a</span><span class="mord mathnormal">seco</span><span class="mord mathnormal">n</span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mord mathnormal">i</span><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="mord mathnormal">m</span><span class="mord mathnormal">yo</span><span class="mord mathnormal">u</span><span class="mord mathnormal">rc</span><span class="mord mathnormal">h</span><span class="mord mathnormal">o</span><span class="mord mathnormal">i</span><span class="mord mathnormal">ceo</span><span class="mord mathnormal" style="margin-right:0.10764em;">f</span><span class="mord mathnormal">co</span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mord mathnormal" style="margin-right:0.02778em;">or</span><span class="mopen">(</span></span></span></span>color)..."

SM> "$color" will look like a word to be translated.  You would
SM> have to tell them "don't translate anything immediately
SM> following a dollar sign up to, but not inluding the next
SM> character that can't be part of a Python identifier."  Seems
SM> either a bit error-prone or confusing to me if I pretend I'm
SM> not a programmer.

To be clear, I think the ideal interface would be a graphical one, with drag-n-drop icons for the textual placeholders. This would allow them to re-arrange the order of the placeholder, and it would be obvious what is variable in your templates, but it wouldn't allow them to change, remove, or add placeholders.

Then it wouldn't matter what syntax you actually used.

I'm holding my breath... ready... go! -Barry