Simplified <-> Traditional Chinese Translator

OpenOffice.org 2.0

Document - ID	Specification Owner	Last Change	Status
	Falko Tesch	01/05/05	Final
Conforms to	http://www.openoffice.org/issues/show_bug.cgi?id=20132
Applies to	Writer, Impress, Draw, Calc
Task ID(s)	20132
Category	Feature

Abstract

Very close to the features of the Japanese 'Hiragana' and 'Katakana' and the Korean 'Hangul/Hanja Conversion' Chinese users are accustomed to having a built in conversion between Simplified and Traditional Chinese. This conversion allows them to easily transfer Chinese written text in between simplified Chinese and traditional Chinese characters.

i-Team Members (The specification Owner is part of the i-Team)

	Name	E-mail Address
User Experience	Falko Tesch, FT	Ft@openoffice.org,
Development	Oliver Specht	Os@openoffice.org,
Sun China	Hercule Li	hercule.li@sun.com,
Quality Assurance	Ulf Stroehler	Us@openoffice.org,
Documentation	Uwe Fischer	Ufi@openoffice.org

Approved for Implementation

	Approved by	Date
User Experience	Falko Tesch	27.04.2004
Development	Karl Hong	04.05.2004
Quality Assurance	Ulf Stroehler	27.04.2004
Documentation	Uwe Fischer	27.04.2004
String Review	Elizabeth Matthis	12.08.04

Document Change History

Rev. Level	Change	Initials	Date
1.0	First draft	FT	19.03.2004
1.1	Added approvals	FT	27.04.2004
1.2	Added Karl Hong's suggestions	FT	28.04.2004
1.3	Added more of Karl Hong's suggestions	FT	30.04.2004
1.4	Added yet another comment from Karl	FT	03.05.2004
1.5	Approval from Karl added	FT	04.05.2004
1.6	Added "(dictionary)" to all database entries for better understanding; changed string	FT	18.06.2004
	changed Simplified and Traditional Chinese Dialogues (row 70) and “Edit Dictionary” Dialogue (row 135) to modal dialogues. OK and Cancel buttons already indicated a modal, rather than a non-modal dialog.	MMP	11.08.04
	Integrated String Review from Elizabeth	IHA	12.08.04
2.0	Added undo/redo section	FT	23.08.2004
2.1	Added/changed translation defaults and formatting behaviour feedback to user	FT	26.08.2004
2.2	Removed (for time reasons) special conversion feature and re-targeted it to later	FT	07.09.2004
2.2.1	Minor addition to conversion behaviour	FT	08.12.2004
2.2.2	Minor addition to conversion behaviour	FT	05.01.2005

Contents

Glossary	1

1	Motivation	1

2	User Scenarios	1

3	Goals	1

4	Requirements and Dependencies	1

4.1	Requirements	1

4.2	Technical Dependencies	1

5	Competitive Analyses	2

6	Detailed Specification	3

6.1	Preface	3

6.2	General Issues	4

6.3	Standard Functions	4

6.4	Advanced Functions	6

6.5	Undo/Redo Behaviour	11

6.6	Error Conditions	11

7	Future Tasks	11

8	Notes	11

9	References	12

Glossary

Term	Description
CJK	Chinese-Japanese-Korean, synonym for software that supports special needs for those three countries/regions
Traditional (Chinese)	Written form of Chinese that has not altered the ancient Chinese writing, it is used in Taiwan, Macao and Hongkong
Simplified (Chinese)	Written form of Chinese that has altered (simplified) the ancient Chinese writing. Introduced after WW2 by Mao in PRChina
SAR	Special Administration Region, former colonies like Hongkong and Macao have special status within the PRC

Motivation

Chinese users nowadays use two different kind of writing – simplified and traditional – that are both used throughout the (Chinese) world.

To ease interoperation a converter will be introduced that can transfer in between these to writing styles.

User Scenarios

A Taiwanese company has a subsidiary in PRChina. While Taiwanese employees are used to traditional Chinese their colleagues in PRChina will have difficulties to read it. Therefore a tool to automatically transfer in between simplified and traditional Chinese is needed.

Goals

Integration of a traditional Chinese<->simplified Chinese translator tool will be added to OpenOffice.org.

Requirements and Dependencies

Requirements

A complete database (dictionary) with all Chinese characters that differ in between traditional and simplified writing.

Technical Dependencies

N/a

Competitive Analyses

MS Word XP (only, there are no other English UI products with this functionality known to the author):

MS Word XP (with installed multi-language pack for Chinese) provides a Simplified <-> Traditional Chinese Translator. It can be reached under “Tools – Language – Chinese Translation” (see Figure 1 on page 3).

Apart from the major job translating in between traditional and simplified Chinese the translator take care of special cases, such as translating common terms, usage of special character variants used in Hongkong, Macao and Taiwan. It also provides the ability to create your own traditional<->simplified pairs in a user dictionary.

MS Word allows the user to modify system provided mapping, but it actually saves new mapping as user defined mapping, and activate the 'delete' button, when user delete it, system defined one will be displayed, and 'delete' button is de-active

Within MS Office XP only Word supports translation of traditional and simplified Chinese.

Figure 1 MS Word XP dialogues for simpl/trad Chinese

Detailed Specification

Preface

Please note that mnemonics in all screenshots are subject to change!

Please refer only to string list for final mnemonics!

General Issues

OO.o will provide a tool that allows the user to translate in between traditional and simplified Chinese. This tool will be available (analogue to Hangul/Hanja conversion) in Writer, Calc and Impress/Draw.

This new tool will only be available when CJK support under “Tools – Options – Language Settings – Languages” is turned on. Otherwise the entry will remain hidden.

To avoid creating too long menu list the menu structure of “Tools” (where this new tool will be located) will get a new submenu called “Language”.

All existing language relevant entries (Hangul/Hanja conversion; Thesaurus; Hyphenation) as well as the entry for this new tool (Chinese translation) will become submenu entries of “Language”

The new menu structure will look like this (new entries are marked red, entries only visible with CJK enabled are green):

Tools	Comments

Spellcheck	>

Language	>

...

Spellcheck	>	Submenu

Check...

AutoSpellcheck	F7

Language	>	Submenu

Hangul/Hanja conversion...	Ctrl+Shift+F7

Chinese translation...

Thesaurus...	Ctrl+F7

Hyphenation...

Standard Functions

Simplified and Traditional Chinese Dialogue

The dialogue is modal and always refers to the current document (window) and the selected text (if no text is selected it will refer to the whole document instead).

This item is post-poned to next version (see “Future” section”) Figure 2 New Chinese Translation Dialogue

.

Translation direction

Translation direction defines from which type (traditional or simplified) of Chinese is translated into the other.

This setting is not context-sensitive and must be set explicitly by the user.

This feature is activated by pressing the OK button. In case text has been selected the selection will be translated (if applicable). In case no text has been selected the entire document will be translated.

If the language attribute for the text is not the same as translation target language, the attribute should be set to the target language and font attribute should be set to default document font of target language.

Translation must not be applied on none Chinese (traditional or simplified) text. In case the Chinese source text contains multiple locales and variants of Chinese (such as Chinese Singapore, Chinese Macao etc.) the chosen translation direction is always dominant. The translator will not make any difference and will translate all Chinese characters to the chosen target selection.

Furthermore all simplified Chinese text that is converted to traditional Chinese will get Chinese/Taiwan (zh_tw) as its language formatting. All existing traditional Chinese formatted text (like Hongkong or Macau) will not be altered. In case of traditional to simplified Chinese translation all traditional Chinese text will be formatted as Chinese/PRC (zh_cn) locale, while already simplified Chinese text (like PRC or Singapore) will not be altered.

To preserve the newly set language setting also the whole document will change its language setting likewise (if necessary).

In case a complete document is translated the cursor must not move while translation and remain on its initial position. Furthermore the only indication of the text being translated will be an “hourglass” (aka as wait state) cursor.

The current setting of this dialgoue is persistent and must be saved with the application. So the setting must be preserved to its last state whenever the dialogue is (re-)opened.

Application installation default depends on set locale at “Tools – Options – Language Setting – Languages”:

If Asian default language for documents is is

Chinese (Hongkong)

Chinese (Macao)

Chinese (traditional)

than the setting defaults to Traditional Chinese

If Asian default language for documents is is

Chinese (simplified)

Chinese (Singapore)

Korean

Japanese

[none]

than the setting defaults to Simplified Chinese

Common Terms

“Common Terms” are words that have the same meaning in traditional and simplified Chinese but that are written with different characters.

A good example for such words are transliterations from foreign (Western) languages like computer, file, folder etc.

The option “Translate Common Terms” effects the way characters are translated. If turned off every single character will be checked and translated if possible. If turned on OO.o will first check for complete words (that contain 2 or more characters) and will compare them with a list of “Common Terms”. In case of an congruence the whole word will be translated instead of its single characters.

In case of translation direction “Simplified Chinese to Traditional Chinese” the state of this feature affects the state of the “Use Taiwan, Hongkong SAR, and Macao SAR character variants” feature by turning it ON.

DEV: we still need to define where to get this list from, see also 6.3Advanced Functions !

The current setting of this dialgoue is persistent and must be saved with the application. So the setting must be preserved to its last state whenever the dialogue is (re-)opened.

Application installation default: OFF

Edit Terms...

Invokes a dialogue to edit “Edit Dictionary”, see Advanced Functions.

Advanced Functions

“Edit Dictionary” Dialogue

This dialogue is modal and is invoked through the “Options” button of the “Simplified and Traditional Chinese” dialogue (see figures 3 - Edit Dictionary - Empty Edit Fields, 4 - Edit Dictionary - Modify existing entry and 5 - Edit Dictionary - Add new entry).

This dialogue defines the frontend for a pre-defined and user-extendable database (dictionary).

Definition of Common Terms-Database

This database (dictionary) must have two main ranges (“Traditional Chinese to Simplified Chinese” and “Simplified Chinese to Traditional Chinese”) that contain in each range entries that consist out of four parts – Term, Mapping, Property, Protection-flag.

All parts must not be empty and entries in on range can also refer to a reverse entry in the other range (see also “Reverse Mapping” below).

The database (dictionary) must be installed into every users 'wordbook' directory. The unique filename of this database (dictionary) is: commonterms.ctd (chinesetranslationdictionary)

When updating or repairing OO.o this database (dictionary) must not be altered by any setup routines.

Protection Flag/Pre-defined database entries

The initial database (dictionary) (status when getting installed) has already a list of entries that must not be altered or deleted by the user. Therefore these entries carry the “Protection Flag”.

Figure 3 Edit Dictionary - Empty Edit Fields

Figure 4 Edit Dictionary - Modify existing entry

Figure 5 Edit Dictionary - Add new entry

Traditional Chinese to Simplified Chinese
Simplified Chinese to Traditional Chinese radioboxes

This setting defines in which language the Common term (“Term”) and its mapping (“Mapping”) is.

If “Traditional Chinese to Simplified Chinese” is selected the “term” is in traditional Chinese and its “Mapping” in simplified Chinese (and vice versa).

Default: Traditional Chinese to Simplified Chinese

Reverse Mapping

If “Reverse Mapping” is active than every entry made and/or is modified will also be added/modified within the opposite mapping direction.

Example: If a new traditional Chinese term and its simplified Chinese mapping is added, the reverse mapping gets automatically added to the Simplified Chinese to Traditional Chinese part of the database (dictionary), too.

Default: OFF

Term

“Term” is the string that OpenOffice.org will search for in the to-be-translated text (selection).

Every “Term” must have exactly one “Mapping” and one “Property” set.

Content of “Term” text box:

Empty - If the selection in the tab-list-box points to an existing pre-defined database (dictionary) entry

Content of selected entry - If the selection in the tab-list-box points to a user-defined database (dictionary) entry

Mapping

“Mapping” is the string that will be used as a replacement once its partnering “Term” was found by openOffice.org within the (selected) text.

Every “Term” must have exactly one “Mapping”.

Content of “Mapping text box:

Empty - If the selection in the tab-list-box points to an existing pre-defined database (dictionary) entry

Content of selected entry - If the selection in the tab-list-box points to a user-defined database (dictionary) entry

Property

A “property” defines the class of a word. Every database (dictionary) entry must have a property set.

For complete list of properties see String section below.

Content of “Property” drop-down list box:

“Other” - If the selection in the tab-list-box points to an existing pre-defined database (dictionary) entry

Content of selected entry - If the selection in the tab-list-box points to a user-defined database (dictionary) entry

Default: Other

Note: The list of properties is adapted to MS Word's property list for interoperability reasons.

Add

Adding a new user-defined entry to the database (dictionary).

This button becomes active when

a new “Term” is entered in the “Term” text box

a new “Term” is equal to an already existing pre-defined database (dictionary) entry, the altered term does not overwrite the existing one in the database (dictionary) but will blind out the existing pre-defined entry. For translation the manually added item will be used.

This button is not active when

the “Term” text box is empty

the content of the “Term” textbox is unaltered

Modify

Saving a modified user-defined entry to the database (dictionary).

This button becomes active when

a “Mapping” and/or the “Property” of an already existing Term is altered

This button is not active when

the “Add” button is active

the “Term” is an already existing pre-defined database (dictionary) entry

Delete

Deletes a user-defined entry from the database (dictionary) (w/o warning)

This button becomes active when

an already existing user entry is selected in the tab-list box

an term is selected that blinds out a sibling in the pre-defined database (dictionary). In case of deletion the blinded out term becomes active again and will be used for further translation. After that the “Delete” button becomes inactive.

This button is not active when

the “Add” button is active

the selection in the tab-list-box points to an existing pre-defined database (dictionary) entry

String list

Item	English	German	Comments
Main Menu Entry	Language	Sprache	---
Menu Entry	Chi~nese Translation	Chinesische Übersetzung	---
Button	~Delete	~Entfernen	Applies to all dialogues
Button	OK	OK	Applies to all dialogues
Button	~Help	~Hilfe	Applies to all dialogues
Radio box text	~Traditional Chinese to simplified Chinese	Traditionelles in vereinfachtes Chinesisch	Applies to all dialogues
Radio box text	~Simplified Chinese to traditional Chinese	Vereinfachtes in traditionelles Chinesisch	Applies to all dialogues
Button	~Edit Terms...	Begriffe bearbeiten...	Applies to “Chinese translation” dialogue
Caption Bar	Chinese Translation	Chinesische Übersetzung	Applies to “Chinese translation” dialogue
Check Box text	~Use Taiwan, Hong Kong SAR, and Macao SAR character variants	Zeichenvarianten aus Taiwan, Hongkong und Macao benutzen	Applies to “Chinese translation” dialogue Post-poned to next version
Check box text	Translate ~common terms	Allgemeine Begriffe übersetzen	Applies to “Chinese translation” dialogue
Section Entry	Translation direction	Übersetzungsrichtung	Applies to “Chinese translation” dialogue
Section Entry	Common terms	Allgemeine Begriffe	Applies to “Chinese translation” dialogue
Button	~Add	Hinzufügen	Applies to “Edit Dictionary” dialogue
Button	~Modify	Ändern	Applies to “Edit Dictionary” dialogue
Caption Bar	Edit Dictionary	Benutzerwörterbuch bearbeiten	Applies to “Edit Dictionary” dialogue
Check box text	Reverse mapping	Beidseitige Entsprechung	Applies to “Edit Dictionary” dialogue
Drop down list box	Property	Eigenschaft	Applies to “Edit Dictionary” dialogue
Text box	Term	Begriff	Applies to “Edit Dictionary” dialogue
Text box	Mapping	Entsprechung	Applies to “Edit Dictionary” dialogue
Drop down list entry Other Other Drop down list entry Foreign Foreign Drop down list entry First name First name Drop down list entry Last name Last name Drop down list entry Title Title Drop down list entry Status Status Drop down list entry Place name Place name Drop down list entry Business Business Drop down list entry Adjective Adjective Drop down list entry Idiom Idiom Drop down list entry Abbreviation Abbreviation Drop down list entry Numerical Numerical Drop down list entry Noun Noun Drop down list entry Verb Verb Drop down list entry Brand name Brand name	I vote for not translating these terms to any other language than Chinese since MS does not use localized terms here. Translating these properties might lead to inconsistency with the database (dictionary) exchange! Note for Chinese translation: Please use terms MS Word uses in its Chinese localized versions of MS Word XP only!

Tab Order

Tab order follows standard routines of all dialogues.

Key Board Shortcuts

n/a

Undo/Redo Behaviour

Undo and Redo must always be applied on the complete translation done. It is not sufficient only to undo the last word within the applied conversion to be undone/redone.

Example: The user converts a complete document and pressed the undo button afterwards. Now the whole text must be reverted to its former state before the conversion took place.

Error Conditions

N/a

Future Tasks

The “Simplified <-> Traditional Chinese Translation” dialogue can only be invoked if the underlying document contains text. In case the document is blank resp. does not contain any text the menu entry will be grayed out

Use Taiwan, Hongkong SAR, and Macao SAR character variants

The option “Use Taiwan, Hongkong SAR, and Macao SAR character variants” (SAR = Special Administration Region) is only available if “Simplified Chinese to Traditional Chinese” translation direction is chosen.

Some traditional characters are variants that are not regarded as standard glyphs in mainland China. They are only appropriate for use in Taiwan, Hong Kong SAR, and Macao SAR. To convert to Traditional Chinese by using character variants that will make the converted text more readable, select the “Use Taiwan, Hong Kong SAR, and Macao SAR character variants” check box.

See also “Private Area” in Unicode/locale for Hongkong for a list of characters.

This feature is also affected by “Common Terms” feature. In case the “Common Terms” and the translation direction is from simplified to traditional this feature will be automatically turned ON.

The current setting of this dialgoue is persistent and must be saved with the application. So the setting must be preserved to its last state whenever the dialogue is (re-)opened.

Application installation default: OFF

Notes

<Questions will arise during the writing of the specification. State these in here.>

References

<Give references to related documentation, such as engineering designs, technical specs, and other sources for related units. Also include links to documents that other sections in this spec need to refer to, such as user opinions usability test reports.>

Required - Give references to related documentation, such as engineering designs, technical specs, and other sources for related units. Also include links to documents that other sections in this spec need to refer to, such as user opinions usability test reports.

Simplified <-> Traditional Chinese Translator

Page 12

Http://specs.openoffice.org/g11n/simplified-traditional_chinese_translator/simplified-traditional_chinese_translator.sxw

Simplified <-> Traditional Chinese Translator

Falko Tesch

2004-03-10T12:02:24