TONT 42363 为什么旋转文字不是个好主意

请注意:本页内容发布于 2291 天前,内容可能已经过时,请注意甄别。

超级变变变。

原文链接:https://blogs.msdn.microsoft.com/oldnewthing/20030929-02/?p=42363

In a previous entry, I said that the word “Start” disappears because the alternative is worse.

在之前的一篇博文中,我曾说过(开始按钮的)『开始』会消失,因为另一种方式(译注:即截断,请点击第一个分句的链接了解前因后果)更糟糕。

Somebody in a comment asked, “Why not draw the text vertically?”

评论里有人为,『那把文字竖过来怎么样?』

Ah, now you get to learn about the exciting world of vertical text.

嘿嘿,欢迎来到垂直排版的精彩世界。

We originally intended to run text vertically in the new XP Start menu. In original designs for the menu, your name ran vertically up the left side of the menu instead of running across the top.

我们原本在新版的XP开始菜单中(译注:双栏那种)将文本垂直排列。在原始设计中,用户的名字在开始菜单左侧自下而上垂直绘制,而不是(后来正式版中)在顶端水平描画。

Rotating text is problematic in languages that traditionally run vertically, such as Chinese. Since you probably don’t have Chinese fonts installed, pretend that , , and are the Chinese characters for your name. In traditional vertical text, it would be written as shown in Example 1 below. Notice that the English text is rotated clockwise. This preserves the top-to-bottom reading order.

对于传统上纵向排布的语言,例如中文,旋转文本方向试个大问题。鉴于读者的机器上可能没有安装中文字体(译注:本文成文于2003年,那时候Unicode还不成熟),假设下图中的代表你用户名中的三个汉字。在传统的竖排中文写法中,效果应为例1所示。注意其中的英文进行了顺时针旋转,以适应从上到下的阅读习惯。

(译注:该图片在源站的排版不正常,例3为译者按照文意理解自行重建,如有误请在评论中指出)

As a concession to Western influences, it is permissible to render Chinese characters left-to-right, in which case your name would be written as “ (Amy Smith)”.

作为对西方文化的让步,中文按照从左到右的方式进行描绘也是可以接受的,在这种情况下,用户的名字会被写作『 (Amy Smith)』。

Compare this to the traditional Western way of rotating text. Text which would normally be rendered as “Amy Smith” is rotated counter-clockwise and rendered as shown in Example 2.

然后与传统的西文中旋转文字的进行比较。通常来说,“Amy Smith”会被逆时针旋转,如上图例2种所示。

Now consider what happens if you take a Chinese name rendered the Western way, “(Amy Smith)”, then rotate the Western way, resulting in Example 3. Notice that from a Chinese point of view, everything is upside-down! The character that is supposed to be at the top () is now at the bottom.

现在考虑一下将用户的中文名字按西文方式(从左到右)进行描绘:(Amy Smith),然后按西文方式进行旋转,就得到了例3的效果。注意,从中文使用者的角度来看,所有的文字都上下颠倒了,应当在最顶端的字符()现在跑到最下面去了。

Windows for many years now has been multilingual. This means that the same underlying code runs regardless of language. Changing a language merely changes the strings being displayed. This means that there can be no language-specific UI. In this case, it means that we can’t have separate rotation rules for Chinese as opposed to English or German.

多年以来,Windows已成为一种多语言系统,这意味着不管系统设置成哪种语言,所运行的代码都是一样的,修改系统语言基本上不会影响字符串的显示方式。这也就意味着,针对特定语言的UI是不存在的。针对们刚刚讨论的情况,也就是说,为中文设计不同于英语或德语独立的旋转规则是不可能的。

(And even if we were allowed to have separate rotation rules, we would have to be able to tell whether the name was in the form above or was in the form “Amy Smith ()”. In this form, we should rotate it as in example 2, since this is an English string with Chinese characters embedded; as opposed to our example above where we had a Chinese string with English characters embedded. Those of you who have seen Arabic and English mixed together get to see punctuation marks bandied about with similar degrees of confusion.)

(而且,即便是允许(基于语言的)不同旋转规则的存在,也得判断像刚才例子中,汉字是像例子里那样在句首,还是像『Amy Smith()』这样在句尾。在第二种情况下,又要按例二的形式进行旋转,因为这种情况下是先英文、后中文的排列,与上文的先中文、后英文的例子正好相反。见过阿拉伯文和英文混排(译注:阿拉伯文书写顺序为从右往左)的人可以再多了解一下这种情况下标点符号排版时同等级别的混乱局面。)

Multilingual support also explains why you see things like “1 folder(s)” instead of “1 folder” and “2 folders”. Why not have two format strings, one for when the number of items is exactly one, and one for when the number of items is two or more?

对多语言支持的设计还可以解释为什么在系统中可以见到类似『1 folder(s)』(译注:意为“1个文件夹”,其后的(s)是实际显示效果,不是行文修饰,也就是在系统中会看到“folder(s)”这种写法)而不是『1 folder』和『2 folders』的写法。为什么不设计两种格式字符串,一个是数量为1时使用,另一个在数量为2或更多时使用呢?

Well, for one, that would significantly increase the number of strings we would have to carry around. (If you say “just add s to make the plural” then you really need to get out more!)

一方面,这么做会极大地增加需要维护的字符串数量。(如果你想说“加个s变成复数不就得了”说明你没见过世面!)

For two, some languages (such as Slovene) have a “dual” number in addition to singular and plural. The Lahir language has singular (one), dual (two), trial (three), paucal (a few), and plural (many). So now you have to have perhaps five versions of every string that contains a replaceable number.

另一方面,一些语言(如斯洛文尼亚语)在『单数』和『复数』之外还有『多数』词。在Lahir语言中(译注:似乎是马来语的一种?),有单数(1个)、双数(2个)、三数(3个)、少数(几个)和复数(多个)五种形式(的数词),现在你要为相关字符串准备五个带有可替换数字位置的版本了。

This also explains why you see a lot of strings of the form “Property: Value” (for example, “Last modified: Monday, September 29, 2003”) instead of a phrase (“Last modified on Monday, September 29, 2003”). This is necessary to avoid problems caused by grammar. If you attempt to compose a phrase, you have to worry about subject/verb agreement, gender and number agreement, declensions, all sorts of things that computers aren’t good at. The only safe solution is to avoid it entirely and use the “Property: Value” notation instead.

同样的原因也能解释为何在系统中能见到大量的『属性:值』(例如,修改日期:2003年9月29日星期一)而不是短语型(例如,最后修改于2003年9月29日星期一)的写法。这也是为了避免语法相关的问题而做出的决定。如果非要用短语型的写法,就得考虑主谓一致问题、人称与数字一致问题、变格问题等等一大堆计算机并不擅长的问题。唯一安全的解决方法就是完全抛弃短语型,使用『属性:值』的写法取而代之。

We did get one special exception to the “grammar independence” rule: Personalized folders. When you view somebody else’s “My Documents” folder, it says “Chris’s Documents”. We made this request to the translators and they worked really hard to make sure that the templates for possessive forms were accurate in all the languages we support. (Fortunately, we didn’t have to deal with languages where the form of the template depended on us knowing whether Chris is a man or a woman.)

不过对于这种『语法无关原则』还是有一个特例:个性化文件夹。当查看别人的『我的文档』文件夹时,会显示『Chris的文档』这样的写法。我们给翻译组提出了相关的需求,而翻译们也很努力地让这里的翻译体现的所有格在我们支持的所有语言中都是准确的。(幸运的是,我们不用去管那些针对Chris是男是女时所有格写法不同的语言。)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

 剩余字数 ( Characters available )

Your comment will be available after auditing.
您的评论将在通过审核后显示。

Please DO NOT add any links in your comment, otherwise it would be identified as SPAM automatically and never be audited.
请不要在评论中插入任何链接,否则将被自动归类为垃圾评论,且永远不会被提交给博主进行复审。

*